Skip to content

Commit

Permalink
Minor updates to support v6 format
Browse files Browse the repository at this point in the history
  • Loading branch information
kartographer committed Mar 20, 2024
1 parent 25c2ab8 commit 0d3163a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion pyuvdata/uvdata/mir.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ def _init_from_mir_parser(
cat_lon=np.median(source_ra),
cat_lat=np.median(source_dec),
cat_epoch=None if (source_epoch != 2000.0) else source_epoch,
cat_frame="icrs" if (source_epoch != 2000.0) else "fk5",
cat_frame="icrs",
info_source="file",
cat_id=int(sou_id),
)
Expand Down
14 changes: 7 additions & 7 deletions pyuvdata/uvdata/mir_meta_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,14 @@
("corrchunk", np.int16),
# Correlator number (0 = ASIC; 1 = SWARM)
("correlator", np.int32),
# Spare value, always 0
# DDS operating mode, matched to 'ddsmode' in codes_read
("iddsmode", np.int16),
# Spare value, always 0
("spareshort", np.int16),
# Spare value, always 0
("spareint3", np.int32),
# Spare value, always 0
("spareint4", np.int32),
# Gunn multiplier for the receiver
("gunnMult", np.int16),
# Spectral band continuum amplitude (corr co-eff)
("amp", np.float32),
# Spectral band continuum phase (rad)
("phase", np.float32),
# Spare value, always 0
("spareint5", np.int32),
# Spare value, always 0
Expand Down
6 changes: 3 additions & 3 deletions pyuvdata/uvdata/tests/test_mir_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2274,11 +2274,11 @@ def test_mir_remember_me_sp_data(mir_data):

assert np.all(mir_data.sp_data["iddsmode"] == 0)

assert np.all(mir_data.sp_data["spareshort"] == 0)
assert np.all(mir_data.sp_data["gunnMult"] == 0)

assert np.all(mir_data.sp_data["spareint3"] == 0)
assert np.all(mir_data.sp_data["amp"] == 0)

assert np.all(mir_data.sp_data["spareint4"] == 0)
assert np.all(mir_data.sp_data["phase"] == 0)

assert np.all(mir_data.sp_data["spareint5"] == 0)

Expand Down
6 changes: 3 additions & 3 deletions pyuvdata/uvdata/tests/test_uvdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -10325,7 +10325,7 @@ def test_print_object_standard(sma_mir, kwargs):
" ID Cat Entry Type Az/Lon/RA El/Lat/Dec Frame Epoch \n" # noqa
" # Name hours deg \n" # noqa
"------------------------------------------------------------------------------\n" # noqa
" 1 3c84 sidereal 3:19:48.16 +41:30:42.11 fk5 J2000.0 \n" # noqa
" 1 3c84 sidereal 3:19:48.16 +41:30:42.11 icrs J2000.0 \n" # noqa
)

table_str = sma_mir.print_phase_center_info(
Expand Down Expand Up @@ -10354,7 +10354,7 @@ def test_print_object_dms(sma_mir):
" ID Cat Entry Type Az/Lon/RA El/Lat/Dec Frame Epoch \n" # noqa
" # Name deg deg \n" # noqa
"-------------------------------------------------------------------------------\n" # noqa
" 1 3c84 sidereal 49:57:02.40 +41:30:42.11 fk5 J2000.0 \n" # noqa
" 1 3c84 sidereal 49:57:02.40 +41:30:42.11 icrs J2000.0 \n" # noqa
)

# And likewise when forcing the degree format
Expand Down Expand Up @@ -10693,7 +10693,7 @@ def test_add_phase_center_known_source(sma_mir):
cat_type="sidereal",
cat_lon=0.8718035968995141,
cat_lat=0.7245157752262148,
cat_frame="fk5",
cat_frame="icrs",
cat_epoch="j2000",
)

Expand Down

0 comments on commit 0d3163a

Please sign in to comment.