All the programs in Gnuastro are designed such that specifying an output file or directory (based on the program context) is optional. When no output name is explicitly given (with --output, see Input/Output options), the programs will automatically set an output name based on the input name(s) and what the program does. For example when you are using ConvertType to save FITS image named dataset.fits to a JPEG image and don’t specify a name for it, the JPEG output file will be name dataset.jpg. When the input is from the standard input (for example a pipe, see Standard input), and --output isn’t given, the output name will be the program’s name (for example converttype.jpg).
Another very important part of the automatic output generation is that all the directory information of the input file name is stripped off of it. This feature can be disabled with the --keepinputdir option, see Input/Output options. It is the default because astronomical data are usually very large and organized specially with special file names. In some cases, the user might not have write permissions in those directories84.
Let’s assume that we are working on a report and want to process the FITS images from two projects (ABC and DEF), which are stored in the sub-directories named ABCproject/ and DEFproject/ of our top data directory (/mnt/data).
The following shell commands show how one image from the former is first converted to a JPEG image through ConvertType and then the objects from an image in the latter project are detected using NoiseChisel.
The text after the
# sign are comments (not typed!).
$ pwd # Current location /home/usrname/research/report $ ls # List directory contents ABC01.jpg $ ls /mnt/data/ABCproject # Archive 1 ABC01.fits ABC02.fits ABC03.fits $ ls /mnt/data/DEFproject # Archive 2 DEF01.fits DEF02.fits DEF03.fits $ astconvertt /mnt/data/ABCproject/ABC02.fits --output=jpg # Prog 1 $ ls ABC01.jpg ABC02.jpg $ astnoisechisel /mnt/data/DEFproject/DEF01.fits # Prog 2 $ ls ABC01.jpg ABC02.jpg DEF01_detected.fits
In fact, even if the data is stored on your own computer, it is advised to only grant write permissions to the super user or root. This way, you won’t accidentally delete or modify your valuable data!