How to perform ARGOS LGSW to ADSEC calibrations

This HowTo describes what to do to create a new reconstructor for the AO loop. The description tries to include all the steps needed with new KL from scratch or just re-doing it with the same KL as already used. The KL are the mode set of the AdSec.
  • The ARGOS reconstructor needs to be built with the same mode set as the AdSec is configured with. Discrepancies will crash the loop from beginning.
  • On the AdSec side the mode set and the bad actuator mask has to comply or the feed forward map is not loaded, leading to suppressed mode response applying the commands (happened December 2018)
  • With a new KL you start with 10 then 50 to do finally the 150 modes reconstructor. This is not necessarily needed when re-doing reconstructors with the same KL as already in use.
  • One can get information about existing reconstructor following instructions in HowToGetInformationAboutOldCalibration.
Prerequisits
  • Be sure which KLs are used on the AdSec.
  • If you use a new KL set: Get the KL set onto ARGOS machine. (HowToGetNewKLsetToARGOS)
  • You might want to create a new modal history at this point: If you don't know anymore which modal history is the right one, or you wish to use a new one. (HowToCreateANewModalHistory)
  • Setup ARGOS for calibrations (HowToSetupARGOSForCalibrations)
  • Flatten AdSec. Normally a good existing flat used with FLAO is good enough. But in case:
    • Load REC and close loop on the 3 LGS (if you don't have a good REC align manually the hexapod to null as much as possible the TT on the LGSW)
    • Save Adsec flat shape
    • Open the AO loop and restore the flat
  • Adjust pupil illumination through acquiring and pupil adjustment with the motors until illuminated homogeneously. This positions should become the new default values in argos_?x_pupil_motor_$COLOR_device.cfg.
    • argos_pupil_image_ccd_viewer.png
    • Files to be found in /home/argos/workspace/argos_git/site/lbt/?x-lgsw/etc/instroot/etc
    • Install with 'mi' from /home/argos/workspace/argos_git/site/lbt/?x-lgsw/etc/instroot
  • Set the slope offset to zero
    • Either in LGSW controller GUI -> "Calibration" tab -> Slope offset tag: write 'zero'
    • Or in an argos terminal on ?x-lgsw:
argos.lgsw.controller.setSlopeOffsetTag('zero')
  • Close jitter stabilizer loop and save the current position as "Initial position" in the "Calibration" tab in the LGSW controller GUI
  • Set the LGSW frame rate to <500Hz: in the LGSW LAB GUI go to the "Pulse Generator" tab and then in the C tab ("WFS camera trigger"). In the "OFF cycles" field write 19.
Procedure
  • Perform InteractionMatrix (IM) measurement.
    • Open an argos terminal on the respective LGSW workstation (argos?x_terminal_) and type:
from argos.arbitrator.aoloop import acquire_lgsw_interaction_matrix

lgswIM = acquire_lgsw_interaction_matrix
imacq = lgswIM.AcquireLgswInteractionMatrix(argos.aarbCalibrationManager, lgsw.calibrationManager, argos.adsec, argos.lgsw.controller, argos.lgsw.controller.getActualSubaperturesDefinitionTag(), argos.lgsw.frameBuffer.isWfsCameraUpsideDown(), lgswReconstructorTag, modalHistoryTag, argos._logger, argos)
im= imacq.acquire(gain=0)
im.displayShift(np.arange(6))
im.generateInteractionMatrix(shift= yourBestGuess)
im.displayIM()
rec = im.createReconstructorObject(np.arange(numberOfModes))
argos.aarbCalibrationManager.saveAoLoopLgswReconstructorMatrix(rec, 'Rec Tag')
    • Substitute following parameters with the proper values:
      • lgswReconstructorTag - the tag of a lgsw reconstrutor created with the proper KL. Example: 20181203_093800 (find all in /home/argos/nfs/calib/DX/aarb/aoloop/rec)
      • modalHistoryTag - the tag of the modal history you want to create an IM with. Example: 20181202_192600 (find all in /home/argos/nfs/calib/?X/aarb/aoloop/modalhistory)
      • yourBestGuess - the number of row with best calibration (counting from bottom to top from 0 to 5)calibration_display_of_modes.png
      • numberOfModes - should correspond to the number of modes used for the modal history.
  • Test the IM and the LGSW Rec: HowToDoAPerformanceCheckOnNewRec
  • Create a new combined reconstructor matrix (Needed for operation. LGSW alone reconstructor is not enough for the ARGOS arbitrator)
    • If the new combined reconstructor is with a new FLAO reconstructor:
      • Get the new FLAO reconstructor
        • scp AOeng@dxadsec:/local/aomeas/adsec_calib/M2C/KL_v26/RECs/Rec_YYYYMMDD_HHMMSS.fits /home/argos/nfs/calib/SIDE/aarb/aoloop/flaorec/
    • Create the combined reconstructor (see HowToCreateACombinedReconstructor)
    • Setup truth sensing (see HowToBuildFlaoAndTrueSensRecsForArgos)
  • If a new set of KL modes are used, before going on sky: Make sure the new set of modes is added to ngs_truth_sensor.py and figure out the right direction - or + for that mode set!
  • Test the combined reconstructor in close loop: HowToDoAPerformanceCheckOnNewRec
  • Change the software permanently to the new reconstructors (see HowToInstallNewReconstructorInArgosSW)
  • Keep track of the recorded IMs and all reconstructors built into the following pages:
  • Commit the changes to argos_git (probaby argos_?x_pupil_motor_$COLOR_device.cfg, argos_?x_foremen_configuration_tables.py and ngs_truth_sensor.py)
  • If reconstructor is using a new KL mode set you might want to create new disturbance matrices for day time testing (see HowToConvertDisturbanceInNewModalBasis).


How to get new KL set to ARGOS

(see alternatively HowToAddANewModalBasis)
  • Store the new KL in the nfs partition to the respective side. (Substitute ? with side index. Take care of upper or lower case. Substitute ## with the correct number.)
mkdir /home/argos/nfs/calib/?X/aarb/aoloop/m2c/KL_v##

scp AOeng@?xadsec:/towerdata/adsec_calib/M2C/KL_v##/amp_envelope.fits /home/argos/nfs/calib/?X/aarb/aoloop/m2c/KL_v##
scp AOeng@?xadsec:/towerdata/adsec_calib/M2C/KL_v##/m2c.fits /home/argos/nfs/calib/?X/aarb/aoloop/m2c/KL_v##
  • Create the corresponding command to mode set in an ARGOS terminal. Start argos_?x_terminal on the respective LGSW workstation and type:
m2c= pyfits.getdata('/home/argos/nfs/calib/?X/aarb/aoloop/m2c/KL_v##/m2c.fits')
c2m=np.linalg.pinv(m2c) 
pyfits.writeto('/home/argos/nfs/calib/?X/aarb/aoloop/m2c/KL_v##/c2m.fits', c2m)

How to create a new modal history

The modal history does create the commands to be applied for the registration of the interaction matrix (IM).
  • Open an ARGOS terminal on the respective LGSW workstation and type:
from argos.arbitrator.aoloop.modal_history import AdsecModalHistory

mh=AdsecModalHistory(np.arange(numberOfModes), modalAmplitudeTag, modalBasisTag, argos.aarbCalibrationManager, numberOfFramesUp = FRAMES_UP)
argos.aarbCalibrationManager.saveAoLoopModalHistory(mh, modalHistoryTag)
  • Substitute following parameters with proper values:
    • numberOfModes - ARGOS has a maximum of 150 modes.
    • modalAmplitudeTag - defines the stroke for each mode. To create a new modal amplitude go to HowToCreateACalibratedModalAmplitudeForModalHistory. Example: 20161205_214300 (see /home/argos/nfs/calib/DX/aarb/aoloop/modalamplitude)
    • modalBasisTag - the name of the KL mode set. Example: KL_v26
    • [optional] numberOfFramesUp - if not used = 3, and this should be the number to use.It defines the number of cycles the mode is pushed or pulled. 1 and 2 cycles to few to get the mirror set 4 and more do not freeze the vibration good enough. So the empirical outcome. If this is not defined in the command it is automatically set to 3!
    • modalHistoryTag - name of the new modal history fits file which will be stored in /home/argos/nfs/calib/?X/aarb/aoloop/modalhistory.

-- MarcoBonaglia - 03 Dec 2014
Topic revision: r27 - 05 Mar 2020, LorenzoBusoni
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback