update caller to interp_by_coord
@@ -618,7 +618,7 @@ def reproject_exposure(exposure, ref_cube):
"""Helper function to reproject exposure to a reference cube.
TODO: this is a temp solution, as long as we use HpxNDMap objects for exposure
- and SkyCube objects otherwise. This should be changed to use WCSMapND
+ and SkyCube objects otherwise. This should be changed to use WcsNDMap
instead of SkyCube in the future.
Parameters
@@ -641,7 +641,7 @@ def reproject_exposure(exposure, ref_cube):
coords = geom.get_coord()
for idx, energy in enumerate(ref_cube.energies().value):
coords_hpx = coords[0], coords[1], energy
- vals = exposure.get_by_coord(coords_hpx, interp='linear')
+ vals = exposure.interp_by_coord(coords_hpx, interp='linear')
exposure_cube.data[idx] = vals.reshape(ref_image.data.shape)
exposure_cube.data = exposure_cube.data * u.Unit('cm2 s')
