GNU Astronomy Utilities manual

Next: , Previous: , Up: Developing   [Contents][Index]


10.2 Design philosophy

The core processing functions of each program are written mostly with the basic ISO C90 standard. We do make lots of use of the GNU additions to the C language in the GNU C Library, but these additional functions are mainly used in the user interface functions (reading your inputs and preparing them prior to or after the analysis). The actual algorithms, which most scientists would be more interested in, are much more closer to ISO C90. For this reason, the source files containing user interface code and those containing actual processing code are clearly separated, see Program source. If anything particular to the GNU C Library is used in the processing functions, it is explained in the comments in between the code.

Similar to GNU Coreutils, all the Gnuastro utilities provide very low level operations. This enables you to use the GNU Bash scripting language (which is the default in most GNU/Linux operating systems) or any other shell you might be using to operate on a large number of files or do very complex things through the creative combinations of these tools that the authors had never dreamed of. We have put a few simple examples in Tutorials.

For example all the analysis output is provided as ASCII tables which you can feed into your favorite plotting program to inspect visually. Python’s Matplotlib is very useful for fast plotting of the tables to immediately check your results. If you want to include the plots in a document, you can use the PGFplots package within LaTeX, no attempt is made to include such operations in Gnuastro. In short, Bash can act as a glue to connect the inputs and outputs of all these various Gnuastro utilities (and other programs) in any fashion you please.

The advantage of this architecture is that the programs become small and transparent: the starting and finishing point of every program is clearly demarcated. For nearly all operations on a modern computer, the read/write speed is very insignificant compared to the actual processing a program does. Therefore the complexity which arises from sharing memory in a large application is simply not worth the speed gain. This basic design is influenced by Eric Raymond’s “The Art of Unix Programming”104 which beautifully describes the design philosophy and practice which lead to the success of Unix-based operating systems105.

Finally, and arguably the most important, principle of Gnuastro is this: Gnuastro is not planned to be a repository of creative programs with no clear purpose. The purpose of each program and all the major operations it does have to be very clearly documented and aligned with the general purpose of Gnuastro. Through the main management hub, we have a set of planned tasks and bugs, see Gnuastro project webpage. If you have a plan to add something and want it to be an official part of Gnuastro, please check there and if it (or something similar to it) doesn’t already exist, then add it. This will notify all the developers of your intent, so potentially parallel operations do not occur and similar ideas can be discussed. If something similar to your idea already exists, you can contact the person in charge and join that work.


Footnotes

(104)

Eric S. Raymond, 2004, The Art of Unix Programming, Addison-Wesley Professional Computing Series.

(105)

KISS principle: Keep It Simple, Stupid!


Next: , Previous: , Up: Developing   [Contents][Index]


Read in other formats.
GNU Astronomy Utilities manual, November 2015.