Pointing#
- jwpoint.pointing.calculate_offset(xpoint, ypoint, file, coords='detector')[source]#
Calculate the applied offset based on the final pointing position
The offset is always returned in detector coordinates (X-Y) with units of arcseconds.
- Parameters:
xoffset – x pointing position [pixel or arcsec]
yoffset – y pointing position [pixel or arcsec]
file (
str|Path|JwstDataModel) – File that will be used to get the WCS and derive the offsets.coords (
str) – Coordinates in which the transofmration is applied internally. This does not change the output coordinates which are always arcsec. Can be"detector"or"v2v3".xpoint (float)
ypoint (float)
- Raises:
ValueError – Raised if an invalid
coordsargument is provided- Return type:
tuple[float,float]- Returns:
The offset applied to the reference position
- jwpoint.pointing.get_pointing_position(xoffset, yoffset, file, offset_frame='detector')[source]#
Get the pointing position coordinates with an offset applied
The pointing position is always returned in detector coordinates (pixels).
- Parameters:
xoffset (
float) – x or V2 offset [arcsec]yoffset (
float) – y or V3 offset [arcsec]file (
str|Path|JwstDataModel) – File that will be used to get the WCS and derive the pointing posisioncoords – Coordinates in which the transofmration is applied internally. This does not change the output coordinates which are always pixels. Can be
"detector"or"v2v3".offset_frame (str)
- Raises:
ValueError – Raised if an invalid
coordsargument is provided- Return type:
tuple[float,float]- Returns:
The pointing detector coordinates in pixels
- jwpoint.pointing.long_to_short(x, y, file_lw, file_sw)[source]#
Convert position from the long- to short-wavelength channel for NIRCam
The long-wavelenth (LW) X-Y detector position is converted to V2-V3 using the LW file. This is then converted to short-wavelength (SW) X-Y detector position using the SW file.
- Parameters:
x (
float) – X position in the LW channely (
float) – Y position in the SW channelfile_lw (
str|Path|JwstDataModel) – LW file to use for WCSfile_sw (
str|Path|JwstDataModel) – SW file to use for WCS
- Return type:
tuple[float,float]- Returns:
The X and Y positions in SW
- jwpoint.pointing.v2v3_to_xy(v2, v3, model)[source]#
Convert V2-V3 coordinates to detector position
- Parameters:
v2 (
float) – V2 positionv3 (
float) – V3 positionmodel (
str|Path|JwstDataModel) – File used to define WCS coordinates
- Return type:
tuple[float,float]- Returns:
x and y detector coordinates
- jwpoint.pointing.xy_to_v2v3(x, y, model)[source]#
Convert X-Y detector position to V2-V3
- Parameters:
x (
float) – X position in detector coordinatesy (
float) – Y position in detector coordinatesmodel (
str|Path|JwstDataModel) – File used to define WCS
- Return type:
tuple[float,float]- Returns:
V2 and V3 cooordinates