realfastvla / rfpipe

Fast radio interferometric transient search pipeline

Home Page:https://realfastvla.github.io/rfpipe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

spworder incorrect in some cases

caseyjlaw opened this issue · comments

Getting inconsistent spw frequencies when parsing with metadata.sdm_metadata for SDM 18A-199.sb34989985.eb35001577.58155.0041900694.

In [13]: meta['spworder']
Out[13]:
[('AC-0', 1988.0),
('AC-1', 2116.0),
('AC-2', 2244.0),
('AC-3', 2372.0),
('AC-4', 2500.0),
('AC-5', 2628.0),
('AC-6', 2756.0),
('AC-7', 2884.0),
('BD-0', 2988.0),
('BD-1', 3116.0),
('BD-2', 3244.0),
('BD-3', 3372.0),
('BD-4', 3500.0),
('BD-5', 3628.0),
('BD-6', 3756.0),
('BD-7', 3884.0)]

versus
In [15]: meta['spw_reffreq']
Out[15]:
[4488000000.0,
4616000000.0,
4744000000.0,
4872000000.0,
5000000000.0,
5128000000.0,
5256000000.0,
5384000000.0,
5488000000.0,
5616000000.0,
5744000000.0,
5872000000.0,
6000000000.0,
6128000000.0,
6256000000.0,
6384000000.0,
1988000000.0,
2116000000.0,
2244000000.0,
2372000000.0,
2500000000.0,
2628000000.0,
2756000000.0,
2884000000.0,
2988000000.0,
3116000000.0,
3244000000.0,
3372000000.0,
3500000000.0,
3628000000.0,
3756000000.0,
3884000000.0]

spworder iterates over sdmpy scanobj.bdf.spw object. spw_reffreq iterates over SpectralWindow.xml rows.

Note above that the two freq values are not even the same length.
Even when parsed well, it also seems that these two frequencies differ by 1 MHz for 17B-301 metadata parsing.

Fixed bug in spw metadata parsing. It was parsing XML file for some metadata, but that is the sum of all spectral configurations, while sdmpy scan object is specific to a scan.