-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for CASA-based MS calibration tables #1391
Conversation
ffe164e
to
c8d8a55
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## prep_v3.0 #1391 +/- ##
===========================================
Coverage 99.92% 99.93%
===========================================
Files 39 41 +2
Lines 21488 22390 +902
===========================================
+ Hits 21472 22375 +903
+ Misses 16 15 -1 ☔ View full report in Codecov by Sentry. |
a6621cf
to
894ee10
Compare
894ee10
to
ffdcc05
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is still a draft, but I took a look and had a few comments.
I'm testing this branch with some calibration solutions I'm working with. I have a CASA-generated *.bcal file and a pyuvdata-generated *.calfits file.
Let me know if you want the files I used for this test. |
Thanks @rlbyrne -- yes, if you could send along the files, it'd be helpful for trying to chase down the issues you were running into. |
Just sent them via Slack |
@rlbyrne -- looks like that final issue are running into is because I'm assuming future array shapes without explicitly checking. I'll fix that in the code, but I think if you run the |
Recording this here for the sake of documentation -- I've at least had one successful full test of exporting SMA-based solutions into CASA and applying them via |
2d25065
to
f630da3
Compare
8cfe88e
to
1ecfe10
Compare
@kartographer I'm just getting back to this after travel... I used |
28a432e
to
8ee64b1
Compare
Hey @rlbyrne -- I do remember seeing this error at some point, but I believe I've fixed in the last couple of weeks. Trying with both files you sent (which now should alert you when you aren't using future array shapes), I seem to get sensible looking files. Could I ask you to delete/re-pull the branch and try again to see if you see the same behavior? |
@kartographer I'm still getting the error. I'm on branch |
@rlbyrne -- can you check what version of casacore you have installed? Just want to rule out an external API issue... |
8ee64b1
to
84d2b5b
Compare
…p based on testing
…nd-tripping of MSCal to CalH5
332efce
to
5779003
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, Thank you!!
Adds the
MSCal
class, and other related features toUVCal
.Description
NOTE: This PR is an early draft and still WIP -- internal consistency within pyuvdata has been checked, but CASA testing has been much more limited. Comments/feedback are very much welcome!At this point, the PR has advanced out of draft stage, and is ready for "full" review (though I think I've already gotten a good number of helpful comments thusfar). So far the code has been tested against SMA and LWA data, and I think is ready for a sort of "beta" release. There's a couple of outstanding items to take care of, which are on the checklist below (and will be ticked off upon completion accordingly). Comments/feedback still very much welcome.
The
MSCal
class -- a subclass ofUVCal
-- has been added, which enables read/write support for MS calibration tables with sky-based calibration schemes (gains, bandpass, delays). To support full loopback of the information with the MS tables, handling of phase center information (and the associated parametersNphase
,phase_center_catalog
, andphase_center_id_array
) has been added, along with the ability to create "flex-Jones" objects, which mimics theUVData
flex-pol functionality (support for which required the addition of the optional parameterflex_jones_array
).Additional optional parameters also include
scan_number_array
andantenna_diameters
-- all of the above mimicking theirUVData
counterparts.One additional parameter has been added --
ref_antenna_array
-- which allows for the reference antenna to vary across the time-axis of aUVCal
object. The MS format supports such variation, and given that there's no reason one has to keep the same reference antenna across a gains solution, I decided to add support for it to provide better preservation of information when reading/writing MS gains table.SMA-based MS calibration files have also been added for testing, which will also eventually got folded in the relevant tutorial. Some additional clean-up has also been done in the
data
folder of the repository to reduce the overall footprint for packaging (tarball was ~65 MB, now appears to be ~45 MB from tests on my laptop).Separately, a bug affecting
UVBase.__eq__
has been fixed, whereallowed_failures
was being ignored if a parameter was required (i.e., non-optional). An additional bug which affected howselect
,__add__
, andfast_concat
dealt with identifying desired or overlapping frequency channels, which only affectedUVCal
objects whereflex_spw=True
that had more than one spectral window.Motivation and Context
Adds support for reading/writing
UVCal
objects into Measurement Set format, so that they may be used within/read from various CASA routines.Closes #143
Closes #1016
Closes #1202
Closes #1407
Types of changes
Checklist:
Bug fix checklist:
New feature checklist: