GreenBankObservatory / dysh

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

`getfs` does not respect `scan` selection #315

Closed astrofle closed 6 days ago

astrofle commented 1 month ago

Describe the bug When using getfs and the keyword scan, the resulting ScanBlock still contains all the available scans irrespective of the scan selection.

How to Reproduce

from dysh.fits import GBTFITSLoad
filename = "/home/dysh/example_data/frequencyswitch/data/TREG_050627/TREG_050627.raw.acs/"
sdf_fs = GBTFITSLoad(filename)
fs_scan = sdf_fs.getfs(scan=90, ifnum=0, plnum=0)
print(f"Number of FS scans: {len(fs_scan)}")
    Number of FS scans: 5

It should be 1.

Environment

teuben commented 1 month ago

confirmed, I'll look into this.

mpound commented 3 weeks ago

don't forget to fix the bogus pytest on FS selection when this is fixed.