JwstDispersionTransform

class grizli.grismconf.JwstDispersionTransform(instrument='NIRCAM', module='A', grism='R', conf_file=None, header=None)[source]

Bases: object

Rotate NIRISS and NIRCam coordinates such that slitless dispersion has wavelength increasing towards +x. Also works for HST, but does nothing.

Attributes Summary

array_center

Center of rotation

rot90

Rotations are all multiples of 90 for now, so compute values that can be passed to numpy.rot90 for rotating 2D image arrays

rotation

Clockwise rotation (degrees) from detector to wavelength increasing towards +x direction

trace_axis

Which detector axis corresponds to increasing wavelength

Methods Summary

forward(x, y)

Forward transform, detector to +x

reverse(x, y)

Reverse transform, +x to detector

rotate_coordinates(x, y, theta, center)

Rotate cartesian coordinates x and y by angle theta (radians) about center

Attributes Documentation

array_center

Center of rotation

Maybe this is 1020 for NIRISS?

rot90

Rotations are all multiples of 90 for now, so compute values that can be passed to numpy.rot90 for rotating 2D image arrays

rotation

Clockwise rotation (degrees) from detector to wavelength increasing towards +x direction

trace_axis

Which detector axis corresponds to increasing wavelength

Methods Documentation

forward(x, y)[source]

Forward transform, detector to +x

reverse(x, y)[source]

Reverse transform, +x to detector

static rotate_coordinates(x, y, theta, center)[source]

Rotate cartesian coordinates x and y by angle theta (radians) about center