gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master 08152a74: Book: Changed the output directory t


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 08152a74: Book: Changed the output directory to read codes easier
Date: Sat, 2 Dec 2023 14:23:16 -0500 (EST)

branch: master
commit 08152a7414d4d58d508648b31163e6c02fd0eee4
Author: Faezeh Bidjarchian <fbidjarchian@gmail.com>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>

    Book: Changed the output directory to read codes easier
    
    Until now, in the general tutorial's section where we show how to make
    publication ready images, a seperate directory was created for saving the
    outputs and the commands were run from outside of it. This resulted in
    longer file paths for the output/input files of the commands that would
    make it hard for a new user. Also, there were some typos in the comments of
    some parts of the library.
    
    With this commit, to keep the codes shorter and easier to read in the
    tutorial, we first 'cd' into that directory and can use much
    shorter/simpler commands. Fortheremore, the typos have been fixed.
---
 doc/gnuastro.texi | 23 ++++++++---------------
 lib/label.c       |  4 ++--
 lib/table.c       |  2 +-
 lib/tableintern.c |  2 +-
 4 files changed, 12 insertions(+), 19 deletions(-)

diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index 00ea679c..e50d48fa 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -4501,16 +4501,16 @@ To summarize, and to keep the image for the next 
section in a separate directory
 @example
 $ zeropoint=25.94
 $ mkdir report-image
+$ cd report-image
 $ sblimit=$(astfits cat/xdf-f160w.fits --keyvalue=SBLMAG -q)
 $ astwarp nc/xdf-f160w.fits --scale=1/4 --centeroncorner \
-          --output=report-image/warped.fits
-$ pixarcsec2=$(astfits report-image/warped.fits --pixelareaarcsec2)
-$ astarithmetic report-image/warped.fits $zeropoint $pixarcsec2 \
+          --output=warped.fits
+$ pixarcsec2=$(astfits warped.fits --pixelareaarcsec2)
+$ astarithmetic warped.fits $zeropoint $pixarcsec2 \
                 counts-to-sb set-sb \
                 sb sb $sblimit gt sb isblank or $sblimit where \
-                --output=report-image/sb.fits
-$ astconvertt report-image/sb.fits --output=report-image/sb.pdf \
-              --fluxlow=20
+                --output=sb.fits
+$ astconvertt sb.fits --output=sb.pdf --fluxlow=20
 @end example
 
 @noindent
@@ -4532,19 +4532,12 @@ To add coordinates on the edges of the figure in your 
paper, see @ref{Annotation
 To start with, let's put a red plus sign over the sub-sample of reddest clumps 
similar to @ref{Reddest clumps cutouts and parallelization}.
 First, we will need to make the table of marks.
 We will choose those with a color stronger than 1.5 magnitudes and a 
signal-to-noise ratio (in F160W) larger than 5.
-We also only need the RA, Dec, color and magnitude (in F160W) columns.
+We also only need the RA, Dec, color and magnitude (in F160W) columns (recall 
that at the end of the previous section we were already in the 
@file{report-image/} directory):
 
 @example
 $ asttable cat/mags-with-color.fits --range=F105W-F160W,1.5:inf \
            --range=sn-f160w,5:inf -cRA,DEC,MAG-F160w,F105W-F160W \
-           -oreport-image/reddest-cat.fits
-@end example
-
-@noindent
-To keep the rest of the code easier to read, let's move to the 
@file{report-image} directory:
-
-@example
-$ cd report-image
+           --output=reddest-cat.fits
 @end example
 
 Gnuastro's ConvertType program also has features to add marks over the finally 
produced PDF.
diff --git a/lib/label.c b/lib/label.c
index db622e2c..0fa181e0 100644
--- a/lib/label.c
+++ b/lib/label.c
@@ -377,7 +377,7 @@ gal_label_watershed(gal_data_t *values, gal_data_t *indexs,
             else
               {
                 rlab = curlab++;
-                if( topinds )              /* This is a local maximum of "?". 
*/
+                if( topinds )              /* This is a local maximum of */
                   topinds[rlab]=*a;        /* this region, save its index. */
               }
 
@@ -961,7 +961,7 @@ gal_label_grow_indexs(gal_data_t *labels, gal_data_t 
*indexs, int withrivers,
                     {
                       if(n1)       /* A prev. ngb label has been found. */
                         {
-                          if( n1 != nlab )    /* Different label from "?". */
+                          if( n1 != nlab )    /* Different label from */
                             {    /* prevously found ngb for this pixel. */
                               n1=GAL_LABEL_RIVER;
                               searchngb=0;
diff --git a/lib/table.c b/lib/table.c
index 60db006e..6a831f63 100644
--- a/lib/table.c
+++ b/lib/table.c
@@ -627,7 +627,7 @@ gal_table_write_log(gal_data_t *logll, char *program_string,
 {
   char *msg;
 
-  /* Write all the comments into "?". */
+  /* Write the program name and time first. */
   gal_table_comments_add_intro(&comments, program_string, rawtime);
 
   /* Write the log file to disk. */
diff --git a/lib/tableintern.c b/lib/tableintern.c
index 9a7d4225..e2bb6be8 100644
--- a/lib/tableintern.c
+++ b/lib/tableintern.c
@@ -445,7 +445,7 @@ gal_tableintern_read_blank(gal_data_t *col, char *blank)
   /* Read the blank value as the given type. If successful, then
      'gal_data_string_to_type' will return 0. In that case, we need to
      initialize the necessary parameters to read this data structure
-     correctly. If it isn't successful, then "?" */
+     correctly. */
   if( gal_type_from_string((void **)(&col->array), blank, col->type) )
     {
       col->flag |= GAL_TABLEINTERN_FLAG_ARRAY_IS_BLANK_STRING;



reply via email to

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