This HTML automatically generated with rman for NEMO
Table of Contents

Name

sdinfo - sdfits (BINTABLE) info and benchmark

Synopsis

sdinfo [parameter=value]

Description

sdinfo list some tabular properties of an SDFITS (and some dialects) file, and has options to benchmark some basic operations.

SDFITS files have a BINTABLE extension named "SINGLE DISH", and are used to store single dish spectra and all associated variables. This program was written to provide size info and can run a few basic benchmarks. A few known dialects to this are known: "CIMAFITS" (Arecibo) and "MATRIX" (30m/CLASS), the latter designates the spectrum via a "SPECTRUM" column name, instead of the more common "DATA" column name in classic "SDFITS".

Parameters

The following parameters are recognized in order; they may be given in any order if the keyword is also given. Use --help to confirm this man page is up to date.
in=
Input SDFITS fits file(s). Multiple files can be given as well, as a space or comma separated list. No default.
mom=
If set to a non-negative value, this is the max. moment of the stats being computed. mom=0 is a special case, and will just sum, and be much faster than general moment computation. You also need this option if a row (see row= below) is output. [-1].
cols=
Column names to track. Currently it just gives the column number and format used. Default: not used.
dims=
A list of dimensions how the data-block should be processed. The procedure of processing is set by the proc= keyword. For example dims=2,11,2,2,4. The product of the dimensions should be NAXIS2 (or less than) from the BINTABLE. Default: not used.
proc=
The procedure of processing can be set with this. Currently only one specific example (see EXAMPLES below) for ngc5291 is implemented. Options would be PS (Position Switching), FS (frequency switching), NOD (nodding), TP (total power). NOT IMPLEMENTED YET, if ever.
nchan=
Override the number of channels found in the data. Some dataset will find nchan=0 and it will be useful to set this here. This number is related to NAXIS1 in the BINTABLE.
row=
If used, this row (0 being the first) will be output as an ascii spectrum. This spectrum has two columns: channel number (0 being the first) and the spectrum value, native units.
raw=
Do only raw I/O? If selected, no SDFITS processing is done, the file is just read in blocks of 2880 bytes. See also csf(1NEMO) with blocksize=. [f]
hdu=
Which HDU to process. Normally hdu=2 should contain the BINTABLE, but it’s possible there are more. [2]
blfit=
Another benchmark option: setting the blfit (baseline fit order) to a non-negative number, a baseline of that order will be fitted to each spectrum. [-1]
bench=
How many times the procedure should be processed. This will only re-execute the procedure, not the alloc/free that are needed for this. Using 0 will bypass the procedure. Default: 1
mode=
Another benchmark option: setting this to a non-negative value will restrict how far the SDFITS is processed.
datadim=1|2
Another benchmark option: allowing all data to appear in one long one dimensional DATA[nrows*nchan] array vs. a two dimensional DATA[nrows][nchan] array. [1]

tab=
If given, this will be the (ascii) table to which either 1dim or 2dim data (see datadim=) is written. For 1dim the x,y values printed are assumed Hz converted to GHz and raw intensity. For 2dim the row,x,y are printed, where row=1 is the first row. Apologies to non-radio users. Default: none.

Caveats

By default NEMO compiles in double precision. The DATA1[nrows*nchan] "ONEDIM" mode will this occupy half the memory of a DATA2[nrows][nchan] array. NEMO will need to be compiled in single mode to have them use the same memory.

Examples

The following example takes all fits files matching a particular pattern and summarize their contents.
    ls *.?.fits > dirin.lis
    sdinfo in=@dirin.lis
AGBT15B_287_35.raw.vegas.A.fits : Nrows: 2168   Ncols: 70  Nchan: 32768
AGBT15B_287_35.raw.vegas.B.fits : Nrows: 2168   Ncols: 70  Nchan: 32768
AGBT15B_287_35.raw.vegas.C.fits : Nrows: 2168   Ncols: 70  Nchan: 32768
AGBT15B_287_39.raw.vegas.A.fits : Nrows: 3004   Ncols: 70  Nchan: 32768
AGBT15B_287_39.raw.vegas.B.fits : Nrows: 3004   Ncols: 70  Nchan: 32768
AGBT15B_287_39.raw.vegas.C.fits : Nrows: 3004   Ncols: 70  Nchan: 32768
Here is a benchmark of the GBT ngc5291 example:
    time sdinfo ngc5291.fits dims=2,11,2,2,4 bench=100 help=c
    ### nemo Debug Info: ngc5291.fits : Nrows: 352   Ncols: 46  Nchan: 32768
    ### nemo Debug Info: tcal: 24   cal: 46 sig: 45 fdnum: 0 ifnum: 0 plnum:
0
    ### nemo Debug Info: DATA keyword TDIM7 = (32768,1,1,1)
    ### Warning [sdinfo]: PS Reduction procedure in 5 dimensions; data_col
= 7
    ### nemo Debug Info: DATA6 3.71521 0.0366262 3.30351     1.42437
    ### nemo Debug Info: CPU_USAGE sdinfo : 3.09    3.04 0.04  0.00 0.00  1803498650
    real    0m3.095s
    user    0m3.047s
    sys     0m0.048s

Here is a way to plot a spectrum, with the X-axis being the channel number

    sdinfo ngc5291.fits 0 row=11 | tabcomment - | tabplot -

See Also

scanfits(1NEMO) , fitshead(1NEMO) , csf(1NEMO) , fits(5NEMO)

https://fits.gsfc.nasa.gov/registry/sdfits.html

Files

src/image/fits

http://safe.nrao.edu/wiki/pub/GB/Data/GBTIDLExampleAndSampleData/ngc5291.fits

Author

Peter Teuben

History


23-Nov-2019    V0.1 Created    PJT
14-dec-2019    V0.4 dimension analysis w/ ngc5291    PJT
18-dec-2019    V0.7 Handle CIMAFITS and MATRIX extensions    PJT
27-sep-2021    V0.9 Improved column reading, display TDIM    PJT
15-mar-2023    V1.0 Finalized more benchmarks        PJT
18-oct-2023    V1.1 add tab=    PJT


Table of Contents