get_distorion_offsets

simcado.spatial.get_distorion_offsets(x, y, dist_map_hdus, corners)[source]

Returns the distortion offsets for position relative to the FoV centre

Parameters
x, yfloat, list

[arcsec] Distances from the centre of the distortion map (which should also be the centre of the FoV, given by CPREFn header Keywords)

dist_map_hduslist, astropy.io.fits.HDUList

The distortion maps in X and Y directions. Accepts either - a list of two PrimaryHDU objects, each containing a map of the

distortion on the x and y direction. E.g. dist_map_hdus=(hdu_dx, hdu_dy) where hdu_dx and hdu_dy are FITS image objects (ImageHDU), or

  • a HDULlist object which contains 3 HDU objects: A PrimaryHDU and two ImageHDUs. - extension [0] (the PrimaryHDU) is nothing by a header, - extension [1] contains a map of the x-axis distortion, - extension [2] contains a map of the y-axis distortions

cornerslist

[arcsec] A list containing 4 values for the borders of the distortion map grid in the following order (x_min, x_max, y_min, y_max)

Returns
dx, dyfloat, list

[arcsec] the shifts which need to be applied to the input positions x,y