Skip to content

Commit 2b38040

Browse files
committed
Fix for tile rotation
1 parent 2d13d5d commit 2b38040

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

arrakis/makecat.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -873,11 +873,19 @@ def update_tile_separations(rmtab: TableLike, field_col: Collection) -> TableLik
873873

874874
for field_name, row in field_data.iterrows():
875875
field_coord = row["coords"]
876-
tab_idx = rmtab["tile_id"] == field_name
876+
tab_idx = rmtab["field_name"] == field_name
877877
tile_sep = coords[tab_idx].separation(field_coord)
878-
tile_l, tile_m = coords[tab_idx].spherical_offsets_to(field_coord)
879-
rmtab["l_tile_centre"][tab_idx] = tile_l
880-
rmtab["m_tile_centre"][tab_idx] = tile_m
878+
tile_pa = field_coord.position_angle(coords[tab_idx])
879+
880+
pol_axis = row["POL_AXIS"] * u.deg
881+
pa = +45 * u.deg # Assume this to always be true for ASKAP
882+
883+
footprint_pa = pa + pol_axis
884+
tile_l_rot = tile_sep.to(u.rad) * np.sin(tile_pa - footprint_pa)
885+
tile_m_rot = tile_sep.to(u.rad) * np.cos(tile_pa - footprint_pa)
886+
887+
rmtab["l_tile_centre"][tab_idx] = tile_l_rot.to(u.deg)
888+
rmtab["m_tile_centre"][tab_idx] = tile_m_rot.to(u.deg)
881889
rmtab["separation_tile_centre"][tab_idx] = tile_sep
882890
rmtab["beamdist"][tab_idx] = tile_sep
883891

0 commit comments

Comments
 (0)