This HTML automatically generated with rman for NEMO
Table of Contents


sdinfo - sdfits (BINTABLE) info and benchmark


sdinfo [parameter=value]


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".


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.
Input SDFITS fits file(s). Multiple files can be given as well, as a space or comma separated list. No default.
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].
Column names to track. Currently it just gives the column number and format used. Default: not used.
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.
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.
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.
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.
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]
Which HDU to process. Normally hdu=2 should contain the BINTABLE, but it’s possible there are more. [2]
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]
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
Another benchmark option: setting this to a non-negative value will restrict how far the SDFITS is processed.
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]

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.


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.


The following example takes all fits files matching a particular pattern and summarize their contents.
    ls *.?.fits > dirin.lis
    sdinfo in=@dirin.lis : Nrows: 2168   Ncols: 70  Nchan: 32768 : Nrows: 2168   Ncols: 70  Nchan: 32768 : Nrows: 2168   Ncols: 70  Nchan: 32768 : Nrows: 3004   Ncols: 70  Nchan: 32768 : Nrows: 3004   Ncols: 70  Nchan: 32768 : 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:
    ### 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)




Peter Teuben


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