tortcoord

sofia_redux.instruments.exes.tortcoord.tortcoord(header, skew=False)[source]

Calculate undistorted image coordinates.

Use the array size and tort parameters from the FITS header and calculate the x and y coordinates in the undistorted array that correspond to the x and y coordinates of the raw array, using knowledge of the optics of the instrument.

Parameters:
headerfits.Header

FITS header containing distortion parameters, as produced by exes.readhdr.

skewbool, optional

If True, correct for echelon slit skewing.

Returns:
xcor, ycor2-tuple of numpy.ndarray

Both arrays are of shape (ny, nx) and of type numpy.float64 xcor is the undistorted x-coordinate array. ycor is the undistorted y-coordinate array.