Open astrofle opened 1 week ago
Describe the bug When working on a file with multiple binary tables, using getps returns the wrong data.
getps
How to Reproduce
from dysh.fits.gbtfitsload import GBTFITSLoad filename = "/home/sdfits/TRCO_240809_Ku/TRCO_240809_Ku.raw.vegas" sdf = GBTFITSLoad(filename) ps_ta = sdf.getps(scan=21, fdnum=0, plnum=0, ifnum=0).timeaverage() ps_ta.data.shape (1024,)
So, dysh returns a Spectrum that has 1024 channels. However, if we look at the raw data we see scan 21 has 2**14 channels:
dysh
Spectrum
from astropy.io import fits hdu = fits.open("/home/sdfits/TRCO_240809_Ku/TRCO_240809_Ku.raw.vegas/TRCO_240809_Ku.raw.vegas.A.fits") table = hdu[5].data print(set(table["SCAN"]), table["DATA"].shape) {32, 33, 34, 36, 37, 38, 39, 21, 22, 23, 24, 30, 31} (2420, 16384)
Environment
May be related to #405
Describe the bug When working on a file with multiple binary tables, using
getps
returns the wrong data.How to Reproduce
So,
dysh
returns aSpectrum
that has 1024 channels. However, if we look at the raw data we see scan 21 has 2**14 channels:Environment