simcado.spatial module¶
TODO: Insert docstring
-
simcado.spatial.
tracking
(arr, cmds)[source]¶ A method to simulate tracking errors ===== Currently a place holder with minimum functionality ========= !! TODO, work out the shift during the DIT for the object RA, DEC etc !!
-
simcado.spatial.
derotator
(arr, cmds)[source]¶ A method to simulate field rotation in case the derotator is <100% effective ===== Currently a place holder with minimum functionality ========= !! TODO, work out the rotation during the DIT for the object RA, DEC etc !!
-
simcado.spatial.
wind_jitter
(arr, cmds)[source]¶ A method to simulate wind jitter ===== Currently a place holder with minimum functionality ========= !! TODO, get the read spectrum for wind jitter !! !! Add in an angle parameter for the ellipse !!
-
simcado.spatial.
make_distortion_maps
(real_xy, detector_xy, step=1)[source]¶ Generate distortion maps based on star positions.
The centres of the returned images correspond to the centre of the detector plane
- Parameters
- real_xylist
[arcsec] Contains 2 arrays: ([x_pos], [y_pos]) where x_pos, y_pos are the coordinates of the real position of the stars
- detector_xylist
[arcsec] Contains 2 arrays: ([x_pos], [y_pos]) where x_pos, y_pos are the coordinates of the detected position of the stars
- stepfloat
[arcsec] the grid spacing of the returned images
- Returns
- dx, dy2D array
Returns two arrays with
-
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)
wherehdu_dx
andhdu_dy
are FITS image objects (ImageHDU
), ora 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