pyuvdata icon indicating copy to clipboard operation
pyuvdata copied to clipboard

Dcp uvfits rdate fix

Open telegraphic opened this issue 1 year ago • 2 comments
trafficstars

Fixes to RDATE and DATE-OBS header parameters in UVFITS writer

Description

As per #1433, RDATE calculation is odd. I've also updated DATE-OBS to be YYYY-MM-DD, instead of ISOT, as this is what AIPS memo 117 uses.

Motivation and Context

This fixes incorrect RDATE and DATE-OBS header parameters. These parameters are used by MIRIAD when importing UVFITS files, and MIRIAD was getting confused. I'm not sure if CASA uses these when importing uvfits (if it did, I think this would have been caught sooner?)

Types of changes

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] Documentation change (documentation changes only)
  • [ ] Version change
  • [ ] Build or continuous integration change

Checklist:

  • [x] I have read the contribution guide.
  • [x] My code follows the code style of this project.

Bug fix checklist:

  • [ ] My fix includes a new test that breaks as a result of the bug (if possible).
  • [ ] All new and existing tests pass.
  • [ ] I have updated the CHANGELOG.

Bugfix notes

One unit test now fails, test_uvfits_extra_params, due to DUT1 being slightly different (-0.2136028 vs expected -0.2137079). Not sure if test is incorrect, or astropy's DUT1 calculation is unexpected.

telegraphic avatar May 03 '24 02:05 telegraphic

Note: I'm not going to attempt to fix linting issues as I'm clearly cursed 👻 👕

telegraphic avatar May 03 '24 04:05 telegraphic

@telegraphic -- since there's a little bit of clean-up to do here (both w/ the failing test and the linting), do you mind if I pull this over into a new branch so that I can clean a few things up? That should allow us to get this in quickly.

kartographer avatar May 16 '24 14:05 kartographer