GreenBankObservatory / dysh

https://dysh.readthedocs.io
Other
9 stars 3 forks source link

cannot use getps() on a fits file with multiple PROC types #385

Open teuben opened 1 day ago

teuben commented 1 day ago

Describe the bug It seems if an sdfits file has some/certain types of PROC type, one cannot extract it via a scan= selection.

How to Reproduce From the standard examples:

sdf = `GBTFITSLoad('nod-KPFA/data/TGBT22A_503_02.raw.vegas')`
sdf.summary()
    SCAN OBJECT VELOCITY   PROC  PROCSEQN   RESTFREQ    DOPFREQ # IF # POL # INT # FEED     AZIMUTH   ELEVATIO
0     60   W3_1    -40.0  OnOff         1  23.959156  23.694495    6     2    31      7  324.227878  38.705977
1     61   W3_1    -40.0  OnOff         2  23.959156  23.694495    6     2    31      7  324.152607  39.012111
2     62   W3_1    -40.0    Nod         1  23.959156  23.694495    6     2    31      7  324.274257  38.419406
3     63   W3_1    -40.0    Nod         2  23.959156  23.694495    6     2    31      7  324.367171  38.285767
4     64   W3_1    -40.0  Track         1  23.959156  23.694496    6     2    21      7  324.388427  38.083529
...

sdf.getps(scans=[60,61],ifnum=0,plnum=0)

Exception: Found more than one PROCTYPE in the requested scans: {'Track', 'OnOff', 'Nod'}

but then the command

sdf.getps(scan=[60,61],ifnum=0,plnum=0)

works.

Environment

teuben commented 1 day ago

There is clearly some confusion between the use of scan= and scans=