gnuastro-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[task #16073] --copykeys of Fits program takes keyword names also


From: Mohammad Akhlaghi
Subject: [task #16073] --copykeys of Fits program takes keyword names also
Date: Sat, 26 Mar 2022 06:39:54 -0400 (EDT)

Update of task #16073 (project gnuastro):

        Percent Complete:                      0% => 60%                    

    _______________________________________________________

Follow-up Comment #4:

Very good progress Jash and congratulations on your first free software
contribution :-).

The code generally looks good, but to help me inspect it easily in the middle
of the rest of the source, I recommend to build a Git branch and "push" your
changes there. A Forking tutorial
<https://www.gnu.org/software/gnuastro/manual/html_node/Forking-tutorial.html>
has been written to help new contributors in doing this.

Now that you have bootstrapped, built, and tested your new function,
implementing the forking tutorial will be very easy :-).

Here are just some small tips that I noticed after a fast look in the code in
Savannah. I'll have more comments after inspecting your Git branch, since it
will be on my own GNU Emacs advanced text editor, which is much more easier to
read than a webpage :-):

* To identify if a character is a number or an alphabetical, instead of
directly looking at the ASCII value of a character ('*pt >=65 && *pt<= 90'),
its more robust/clean/generic to use the C library's 'isalpha' or 'isdigit'
functions (that are described in the GNU C Library manual
<https://ftp.gnu.org/old-gnu/Manuals/glibc-2.2.3/html_chapter/libc_4.html>).
* Now that I think about it more generally, it may happen that a FITS keyword
also starts with a digit. So the most generic test would be to parse through
the whole keyword and stop as soon as you find a single non-digit character.



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/task/?16073>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]