Skip to content

Commit a078f88

Browse files
committed
Fixing remaining small bugs on visualization routines caused by the change in meta data structure.
1 parent e1e99e2 commit a078f88

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/astrohack/visualization/diagnostics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def calibration_plot_chunk(param_dict):
9292

9393
UNIX_CONVERSION = 3506716800
9494

95-
radius = np.power(data.grid_params["cell_size"] * delta, 2)
95+
radius = np.power(data.attrs["summary"]["beam"]["cell size"] * delta, 2)
9696

9797
l_axis = data.DIRECTIONAL_COSINES.values[..., 0]
9898
m_axis = data.DIRECTIONAL_COSINES.values[..., 1]

src/astrohack/visualization/fits.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def export_to_fits_panel_chunk(parm_dict):
2424
f"Exporting panel contents of {antenna} {ddi} to FITS files in {destination}"
2525
)
2626
xds = parm_dict["xds_data"]
27-
telescope = Telescope(xds.attrs["telescope_name"])
27+
telescope = Telescope.from_xds(xds)
2828
surface = AntennaSurface(xds, telescope, reread=True)
2929
basename = f"{destination}/{antenna}_{ddi}"
3030
surface.export_to_fits(basename)
@@ -67,7 +67,7 @@ def export_to_fits_holog_chunk(parm_dict):
6767
else:
6868
reffreq = input_xds.chan.values[nchan // 2]
6969

70-
telname = input_xds.attrs["telescope_name"]
70+
telname = input_xds.attrs["summary"]["general"]["telescope name"]
7171

7272
if telname in ["EVLA", "VLA", "JVLA"]:
7373
telname = "VLA"
@@ -81,7 +81,7 @@ def export_to_fits_holog_chunk(parm_dict):
8181
"STOKES": ", ".join(polist),
8282
"WAVELENG": clight / reffreq,
8383
"FREQUENC": reffreq,
84-
"TELESCOP": input_xds.attrs["ant_name"],
84+
"TELESCOP": input_xds.attrs["summary"]["general"]["antenna name"],
8585
"INSTRUME": telname,
8686
"TIME_CEN": input_xds.attrs["time_centroid"],
8787
"PADDING": metadata["padding_factor"],

0 commit comments

Comments
 (0)