gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master 60abc08: Book: added nice example of how to li


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 60abc08: Book: added nice example of how to limit results of --listlines
Date: Wed, 4 Dec 2019 15:26:07 -0500 (EST)

branch: master
commit 60abc085c6323c44275085ea3599e9bda06cab56
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    Book: added nice example of how to limit results of --listlines
    
    While I was playing with the new `--listlines' option of CosmicCalculator,
    I noticed a good and useful combination of it with Gnuastro's Table
    program, so I added it to the book for users to also use if they need it.
    
    Also, while compiling, I notice the compiler warning that `tdata' in
    Table's relatively new `table_selection_equal_or_notequal' function was
    extra and never used. It has thus been removed.
---
 bin/table/table.c |  2 +-
 doc/gnuastro.texi | 13 ++++++++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/bin/table/table.c b/bin/table/table.c
index 5a5dd09..b5cb585 100644
--- a/bin/table/table.c
+++ b/bin/table/table.c
@@ -177,7 +177,7 @@ table_selection_equal_or_notequal(struct tableparams *p, 
gal_data_t *col,
   size_t i, one=1;
   int numok=GAL_ARITHMETIC_NUMOK;
   int inplace=GAL_ARITHMETIC_INPLACE;
-  gal_data_t *eq, *tdata, *out=NULL, *value=NULL;
+  gal_data_t *eq, *out=NULL, *value=NULL;
   gal_data_t *arg = e0n1 ? p->notequal : p->equal;
 
   /* Note that this operator is used to make the "masked" array, so when
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index 31829cd..4b485b0 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -17231,9 +17231,20 @@ List the pre-defined spectral line wavelengths and 
names on standard output, the
 When this option is given, other operations on the command-line will be 
ignored.
 This is convenient when you forget the specific name of the spectral line used 
within Gnuastro.
 
-The format of the list is a two-column table, with Gnuastro's text table 
format (see @ref{Gnuastro text table format}).
 These names can be used with the options that deal with spectral lines, for 
example @option{--obsline} (below) and @option{--lineatz} 
(@ref{CosmicCalculator specific calculations}).
 
+The format of the output list is a two-column table, with Gnuastro's text 
table format (see @ref{Gnuastro text table format}).
+Therefore, if you are only looking for lines in a specific range, you can pipe 
the output into Gnuastro's table program and use its @option{--range} option on 
the @code{wavelength} (first) column.
+For example, if you only want to see the lines between 4000 and 6000 
Angstroms, you can run this command:
+
+@example
+$ astcosmiccal --listlines \
+               | asttable --range=wavelength,4000,6000
+@end example
+
+@noindent
+And if you want to use the list later and have it as a table in a file, you 
can easily add the @option{--output} (or @option{-o}) option to the 
@command{asttable} command, and specify the filename, for example 
@option{--output=lines.fits} or @option{--output=lines.txt}.
+
 @item -O STR/FLT,FLT
 @itemx --obsline=STR/FLT,FLT
 @cindex Rest-frame wavelength



reply via email to

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