CaltechOpticalObservatories / NGPS

NGPS Software
3 stars 0 forks source link

Automate TCS offset calibration using ACAM images #41

Open chazshapiro opened 1 year ago

chazshapiro commented 1 year ago

The default offsets on the P200 TCS periodically (nightly? after resets?) need to be calibrated and "zeroed". We should be able to do this using the ACAM. There needs to be an automatic (or very easy + documented) procedure for doing so.

Steps:

  1. Choose target to center on ACAM (have a list of good targets) -- use POINTMODE = ACAM 2. Use FPoffsets to solve for scope coordinates (acam to scope) -- same as when doing this for a target from the list
  2. Slew to target -- should be visible in ACAM but not centered.
  3. Do acquisition sequence with offset upper limit removed
  4. Once target is acquired, the resulting offsets should be logged, then zeroed out in the TCS. then verbally signal the TCS operator to zero the offsets.
  5. Repeat acquisition to verify offset is near 0; might as well log and zero the offsets again.
  6. Reinstate offset upper limit

If the required offsets are very large (several arcmin) the acquisition may fail. Then we need some manual procedure involving e.g. astrometry.net for step 4-5.

UPDATED: step 4 -- We will not be allowed to automate zeroing the offsets, the TCS operator will have to do that

chazshapiro commented 1 year ago

If a target field is solved during acquisition but with a large offset, this effectively accomplishes the above, except we normally prevent large offsets. We could have some exception to the rule or put a warning in the text box that uses the last solution to zero the offsets.

jenniferwillow commented 1 year ago

Hi Dave, Chaz

 I had another thought.  It looks like this procedure is identical to acquiring a target except that the upper limit on the offsets are removed.  Maybe we just put the system into “calibration” mode (and make this a command that can be sent by the OS).  On considering this again, all of the telescope motion commands are sent by the OS so I’m not sure how this should be assigned to the ACAM system?  I think this is really a procedure that needs to be implemented in the OS and not part of ACAM.  None of the actions in this list are really actions for the ACAM beyond supporting the functions that it already does (i.e. acquire images and return the file name).

Sincerely, Jennifer Milburn

On Sep 14, 2023, at 10:33 AM, Chaz Shapiro @.**@.>> wrote:

If a target field is solved during acquisition but with a large offset, this effectively accomplishes the above, except we normally prevent large offsets. We could have some exception to the rule or put a warning in the text box that uses the last solution to zero the offsets.

— Reply to this email directly, view it on GitHubhttps://github.com/CaltechOpticalObservatories/NGPS/issues/41#issuecomment-1719869095, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFCPAKEOIHI62DNAK5Z6PEDX2M5VDANCNFSM6AAAAAAZ26HDQY. You are receiving this because you were assigned.Message ID: @.***>

astronomerdave commented 2 months ago

The "X" command is indicated in the manual as being DISABLED-- not available to clients; telescope operator only. We may have to resort to only logging the offsets in step 4, then give a verbal signal to the TCS operator to perform the zeroing.

jenniferwillow commented 2 months ago

You might want to look at the TX command which is available remotely. Jennifer Sent from my iPad

On Aug 26, 2024, at 10:25 PM, David Hale @.***> wrote:



The "X" command is indicated in the manual as being DISABLED-- not available to clients; telescope operator only. We may have to resort to only logging the offsets in step #4https://github.com/CaltechOpticalObservatories/NGPS/issues/4, then give a verbal signal to the TCS operator to perform the zeroing.

— Reply to this email directly, view it on GitHubhttps://github.com/CaltechOpticalObservatories/NGPS/issues/41#issuecomment-2311599138, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFCPAKCCLOL3CQIX4NFI3RDZTQEV3AVCNFSM6AAAAAAZ26HDQ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJRGU4TSMJTHA. You are receiving this because you were assigned.Message ID: @.***>

astronomerdave commented 2 months ago

John Henning reported today that client access to X and TX have been disabled as a policy decision. Before I ask to open those up to NGPS, I'd like for us to come up with a design plan and procedure for exactly how this calibration would be carried out.

astronomerdave commented 2 months ago

Updated original issue because Rick Burruss has now said that the X command will not be made available to us.

chazshapiro commented 2 months ago

But can't the operator do it? The offset has to be zeroed by someone.

chazshapiro commented 2 months ago

I guess we can automate by carrying "de-offset" parameters ourselves. Rather than zero it on the TCS, we record the values that would have been zeroed and save them somewhere like sequencerd or tcsd. Then we have to apply them to every TCS query.

All TCS queries for RA, DEC would require an extra FPoffsets call to remove the TCS offset.

astronomerdave commented 2 months ago

But can't the operator do it? The offset has to be zeroed by someone.

yes, of course, but humans aren't easily scriptable. I updated the original issue again.

chazshapiro commented 2 months ago

Alternate script for doing this:

  1. Ask operator to slew to anywhere with a decent amount of stars. Perhaps have a list of options available for the operator.
  2. Press button on GUIDER GUI --> 2a. Get TCS coords, convert to ACAM coords. Set these ACAM coords as the goal. 2b. Do ACAM acquisition using this goal with offset limit removed. 2c. Display final offsets and solver result (e.g. DS9 popup). Log these.
  3. Assuming solver script returns GOOD, ask operator to zero out the current offsets.
  4. Ask operator to slew off target and slew back.
  5. Press same button on GUIDER GUI --> Confirm final offsets are small.

We need to check that 2b. works with large-ish offsets.

The popup in 2c. could have helpful instructions, reminding them about steps 3-5.

astronomerdave commented 1 month ago

@chazshapiro should I be implementing the steps in the original (edited) first post or the "alternate script" above? The former seems to be initiated from the main observe GUI while the latter is initiated from the ACAM GUI. If the former then is it your expectation that a key in the target name (such as _TCSOFFCAL) would trigger it?

chazshapiro commented 1 month ago

I like the Alternate version better - ACAM GUI only

astronomerdave commented 1 month ago

Okay then how about I add a command to acamd that you can tie to a button? I'll call the command offsetcal, it will take no arguments, and carry out the steps 2a,b. I'm not sure how to trigger 2c.

chazshapiro commented 1 month ago

Sounds good. For 2c, start by generating this output. Then we'll push it to the ACAM GUI.

ACAM CALIBRATION RESULT

Astrometry result = ________   // GOOD, NOISY, etc.
ACAM center = ____, _____      // RA, DEC from solver

Offset RA  = ________ ''    // reqstat
Offset DEC = ________ ''    // reqstat
Total Offset = _________ '' // hypotenuse

Total Offset GOAL = <TBD>

If the total offset is larger than the goal, ask the operator to zero them now.  Then slew off the target, slew back, and press CALIBRATE again to verify offsets are still small.

Calibrating and zeroing the offset improves the efficiency of the Acquisition and Guide system but does not affect accuracy.

Send it with/home/developer/Software/GuiderGUI/message.sh guider "YOUR MESSAGE HERE"

chazshapiro commented 1 month ago

Actually, if acam offsetcal returns the message to STDOUT, that might be good enough -- try that first, see if it shows up in DS9