Skip to content

Update calib management scripts based on MagAO-X practices #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from

Conversation

jaredmales
Copy link
Member

cacao-calib-archive and cacao-calib-apply are modified to support MagAO-X operations. This includes programmatic shutdown and restart of processes when calibration is loaded, and some symlinks pointing back to the calib directory so GUIs and other software can access meta data.

@jaredmales
Copy link
Member Author

@oguyon @DasVinch I think this is pretty close. I want to add a pre- and post- script to cacao-calib-archive (see what I did in -apply). Been using this on MagAO-X, and using the CACAO-CONFWDIR in a script, makes a very efficient workflow.

The other thing I'd like to add is a dump of fps parameters at the time the calibration is taken.

@jaredmales
Copy link
Member Author

@oguyon @DasVinch we had to hack some stuff on MAPS, which currently has special cases, last night due to the switch to CMmodesDM and CMmodesWFS shmim names. It would be good if we could get this version of cacao-calib-XXXXX scripts propagated so we can standardize on it.

@jaredmales
Copy link
Member Author

Hi @oguyon any comments on this? If not I will merge.

@DasVinch
Copy link
Contributor

DasVinch commented May 7, 2025

Thanks for the extensive doc.

Mostly beyond you and Oli I don't think many users know how to properly use cacao-calib archive and apply.

One caveat in your code: you've removed the recursive file listing

for f in $CONFDIR
...etc...

for an explicit list of files. That's both good (skip byproducts of computation that you don't want to archive) and bad (if mode naming is out of this list e.g. Zernike or custom poking instead of conventional Hadamard yielding an eventual zrespM, then your archiving is gonna skip the actually important files?).

@oguyon ...

@jaredmales
Copy link
Member Author

I just updated the docs to reflect that RMmodesDM/WFS are saved.

When you run the script cacao-aorun-030-acqlinResp -n 4 basis_name the file basis_name.fits gets symlinked to RMmodesDM.fits, so the file you used to poke is saved, albeit without any metadata you encoded in the filename. I put all of the parameters of a basis set in the FITS headers of the poke mode file so it gets saved. Perhaps we could de-reference symlinks?

zrespM-H.fits is explicitly saved always, though it doesn't have metadata in it. I added this b/c even for a modal poke calibration, you need zrespM for zpo and we use it for alignment.

I did indeed change this so only the files needed to process a calibration using the latest scripts and then to load the resultant control system are copied. Copying everything in conf for every new calibration was taking up huge amounts of space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants