You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

This page describes how to manually change the reference positions which the auto-aligner aligns to. This should only be done in cases where the sector 20 laser has been realigned to new references by hand beforehand and you have verified with all relevant interested S20 laser users (e.g. Brendan, Robert, Alex etc.) that these are indeed going to be the agreed-upon references going forward.


The auto-aligner references are stored in a .mat structure named s20LaserTargetPositionswMPA.mat located in the same directory as the auto aligner GUI: /usr/local/facet/matlabTNG/F2_LAA/


Steps

  1. First, if you haven't already done so, check out a local copy of the F2_LAA directory in your home folder (in my case /home/fphysics/cemma/git_work/matlabTNG/F2_LAA). 

  2. In your local directory do a git pull to confirm you have the most up to date version of the GUI checked out

  3. Determine the new reference positions on each of the cameras you are planning to change them for. In order to do this unambiguously using the same centroid finder routine as the auto-aligner, in your local copy of the F2_LAA folder run the function 
    [ NewXReference , NewYReference ] = displayLaserCentroidForSingleCamera(cameraPV)
    where cameraPV is a string containing the PV name of the camera you are interested in (e.g. 'CAMR:LT20:100')

  4. Load the existing reference structure.

    references = importdata('s20LaserTargetPositionswMPA.mat');

    the references structure has 15 elements, one for each camera in the auto-aligner. Each element has the fields cameraPV, cameraName, XmeanTarget, YmeanTarget. The XmeanTarget and YmeanTarget are the reference X and Y positions that the auto-aligner will align to. If for example you want to change the references for the first camera type:

    newreferences = references;
    newreferences(1).XmeanTarget = NewXReference;
    newreferences(1).YmeanTarget = NewYReference;

    where NewXReference and NewYReference are your new X and Y references. Repeat this for every camera you want to change the reference for

  5. Save the new references: save('s20LaserTargetPositionswMPA','newreferences'); Note: this will over-write the old reference structure in your local directory. If you want to, save a local copy of the old references somewhere else so you can undo the changes if they don't work out for some reason.

         Now save the changes to the git repo and pull them into production. The aligner cannot be tested in development, it must be tested in production.

          git add s20LaserTargetPositionswMPA.mat
          git commit -m "changed the reference positions for the S20 laser auto aligner"
          git push 

          cd /usr/local/facet/tools/matlabTNG/F2_LAA/
          git pull

  1. Test the auto-aligner with the new references in your local directory:

    launch F2_LAA 
    Use the GUI to align the laser to your new references

  • No labels