CaltechOpticalObservatories / NGPS

NGPS Software
2 stars 0 forks source link

TCS offset in "slit coordinates" #37

Open chazshapiro opened 1 year ago

chazshapiro commented 1 year ago

This will only be relevant once the slit viewing cameras are working.

Based on the slit-viewing cameras or the quick-look analysis of the 3 slices, users may want to adjust the pointing offset to get the target closer to the slit center. They should not have to guess or hunt around for the correct offset direction. So there should be some graphical display or perhaps just a table somewhere that tell the user about the orientation of the slit and direction of the side slices in RA/Dec. <-- This is tedious.

Even better, if there are graphical offset controls, these could be converted to slit coordinates so that e.g. a LEFT arrow button, which means "offset 1 arcsec to the left of the slit on this display" would automatically be converted to TCS offset commands. Maybe this is already implemented?

chazshapiro commented 11 months ago

FPoffsets.py now has a convenience function to help with this:

def solve_offset_arcsec_slit(dx_arcsec, dy_arcsec, casangle_deg):

Compute TCS offsets (dRA, dDEC) from offsets specified in the slit's coordinate frame (x,y when looking at the slit cam).
The slit's long axis is defined as y; slit has position angle 0 (or 180 deg) when long axis is aligned with North.
Moving a target from the slit cam field onto the slit should require only an offset in x.

dx/dy_arcsec: desired pointing offset (arcsec) in the slit's x-y frame
casangle_deg: current cassegrain angle in deg

Returns: (dRA, dDEC) in arcsec, which can be used in PT offset command
chazshapiro commented 11 months ago

I'm also adding solve_offset_arcsec_acam() which is the same thing for the ACAM. This could be tested with the image simulations

chazshapiro commented 2 months ago

In a DS9 version of the slice viewer GUI, we can add a button that moves the slit to the DS9 crosshairs.