[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[task #16253] Warp: let the user determine the output projection CTYPE
From: |
Mohammad Akhlaghi |
Subject: |
[task #16253] Warp: let the user determine the output projection CTYPE |
Date: |
Fri, 9 Sep 2022 06:44:38 -0400 (EDT) |
Update of task #16253 (project gnuastro):
Percent Complete: 0% => 90%
_______________________________________________________
Follow-up Comment #2:
The basic way this works in Gnuastro is like this:
There are no default values for options in the programs (that breaks the
modularity principle: options should be set outside of the programs). Instead,
each program's source directory has a configuration file inside of it also
(besides the '*.c' and '*.h' files.
These configuration files later get installed in the installation path and the
programs load them after reading the command-line options. There is a full
section describing the Configuration file precedence
<https://www.gnu.org/software//gnuastro/manual/html_node/Configuration-file-precedence.html>
in the manual.
After all the parsing of the command-line options and configuration files are
done, the programs just check if an option they require has been given a value
or not. If not, the programs will abort, and let the user know that an
mandatory option, hasn't been assigned a value.
So the user doesn't give any value, the "default" value is read from these
configuration files. It is not hard-coded in the program source.
As one example of what the option should look like, see the '--ctype' option
of MakeProfiles in its configuration file
<https://git.savannah.gnu.org/cgit/gnuastro.git/tree/bin/mkprof/astmkprof.conf>.
You can even take the 'args.h' block for '--ctype' from and go ahead
MakeProfiles's args.h
<https://git.savannah.gnu.org/cgit/gnuastro.git/tree/bin/mkprof/args.h> ;-).
I am changing the status of this task to 90% because after you take the model
from MakeProfiles, you can directly implement this option (there isn't much
work needed after that) ;-).
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/task/?16253>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/