NEW BOARD SETUP

RULE: All scripts with date in their name are using fiducial coordinates and have to be adjusted once fiducials are setup.

MSIM Load XML File with Newscale Data

  1. Get XML file from Mitsuko
  2. Load XML file into database:
  3. Copy the XML file in D:/[…]/xmlfiles/ (where the shortcut XML in explorer points)
  4. In the script window, go to Commands -> Database -> cmd_load_Xml_file_to_Database
  5. Put the XML file basename (without .xml)behind the command string.
  6. Add Command.
  7. Add Command cmd_save_Database.
  8. Run.
  9. Restart MSIM

Camera Adjustment

  1. Take image with MaximDL5 to look at pixel values and background. Currently background dominates with 2000 and pixels are only about 10% above.
  2. Turn Off Illumination.
  3. Run script take_dark_image.lst to take dark images (exposure time, save image).
  4. Copy dark image to DarkBiasImages dir. (PFSTests)
  5. Turn On Illumination!

Fiducial Setup

  1. Take image with MSIM using 2018_xx_xx_take_fiducial_image.lst
  2. Open from MSIM Control Panel -> Camera -> GetImage -> ImageProcessing Tab
  3. Clear the command dialog.
  4. Now click in the "Threshold binary Image" on the coordinates for the fiducials then click on the image processing pane on "Add Fiducial cmd".
  5. This adds a command in the command dialog.
     cmd_setHornMethodFiducialCoordinate  96,1644, 10 
    The last argument (10) is the radius around your provided center (argument 1 x and 2 y).
  6. Repeat this for all fiducials, then save the commands to a file and use it in all your scripts.

Frequency Sweep/Calibration

  1. Run Script CalibrateCommand to get all frequencies and save them to DB.

Positioner Coarse Centers

  1. Home all Positioners. Use home_All.lst for this.
  2. Update the fiducial lines in 2018_xx_xx_take_fiducial_image.lst
  3. Run the script 2018_xx_xx_ctake_fiducial_image.lst
  4. Open from MSIM Control Panel -> Camera -> GetImage -> ImageProcessing Tab
  5. Now click on the "Threshold binary image" on the center of the upper left dot -> this is the center of PID1. PID 1 is in the top left corner, PID 57 in the lower right. This is only true for the MSIM picture, the video camera is the opposite.
  6. On the image processing pane edit the PID number and click on "Add Arm Cntr cmd". This has to happen in this sequence.
  7. This adds a command in the command dialog.
     cmd_tbdpid...  96,1644, 10 
    The last argument (10) is the radius around your provided center (argument 1 x and 2 y).
  8. Repeat this for all positioners. The row closest to the fiducial are the odd numbered positioners. It helps starting with the even numbers so the tags don't get in your way.
  9. Add cmd_save_Database to it and execute the script.

Positioner Fine Centers (~1hr)

  1. Now that we have coarse positioner locations, MSIM can identify the centroids.
  2. Open script 2018_xx_xx_centers_at_home.lst and update fiducial coordinates.
  3. Run the script.
  4. Copy the results folder over to dropbox.
  5. Run
    createCenters.m
  6. Check all centers for correctness. This will produce issues if you haven't loaded the correct xml file.
  7. Save the resulting xml and load it into MSIM.

Link Lengths (~1hr 20min)

  1. Manually put positioners in non colliding configuration.
  2. Run 2018_xx_xx_link_lengths_not_colliding.lst
  3. Execute the command to find theta centers and save the results:
    createLinkLengths
  4. For each Positioner, decide whether to use the data or not.
  5. Save the resulting xml and load it into MSIM.

Phi Stage Inside Hard stops

  1. Make sure manually that all phi stages are on inside hardstop.
  2. Run 2018_xx_xx_measure_phi_hardstop.lst
  3. Got to the output_log.txt file, and find the last assigned fiber positions:
  4. ===>>> Unit 0 Command Execution Time = 31 msec <<<===
    seq_setCurrentPos() ==>> Module_Id=1, Positioner_Id=1, found cx=1948.849694, cy=1807.224149
    seq_setCurrentPos() ==>> Module_Id=1, Positioner_Id=2, found cx=1971.169289, cy=1725.110211
    etc.
  5. Copy measured positions (removing seq_setCurrentPos() ==>> Module_Id=1,) into a new file "inner_hardstop.txt".
  6. Make sure there are 57 lines.
  7. Save it to the results folder from the link length run in the previous step. (e.g. Dropbox\PFS_Production\TEST_RESULTS\Module#\2018_xx_xx_link_lengths\Log\)

Phi Stage Outside Hardstops

  1. Make sure manually that all phi stages are on outside hardstop.
  2. If ontimes have to be adjusted to reach outside, record successful ontimes.
  3. Run 2018_xx_xx_measure_phi_hardstop.lst
  4. Got to the output_log.txt file, and find the last assigned fiber positions:
  5. ===>>> Unit 0 Command Execution Time = 31 msec <<<===
    seq_setCurrentPos() ==>> Module_Id=1, Positioner_Id=1, found cx=1948.849694, cy=1807.224149
    seq_setCurrentPos() ==>> Module_Id=1, Positioner_Id=2, found cx=1971.169289, cy=1725.110211
    etc.
  6. Copy measured positions (removing seq_setCurrentPos() ==>> Module_Id=1,) into a new file "outer_hardstop.txt".
  7. Make sure there are 57 entries.
  8. Save it to the results folder from the link length run in the previous step. (e.g. Dropbox\PFS_Production\TEST_RESULTS\Module#\2018_xx_xx_link_lengths\Log\)
  9. Run register_s2_hardstops.m in that folder and check results.
  10. Save the resulting xml and load it into MSIM.

Positioner Z-Orientation Setup

  1. Manually run positioners home to negative hardstop.
  2. Update script 2018_xx_xx_setHardstopOrientations_manual_ccw.lst with fiducial info.
  3. Run the script.
  4. Manually run positioners anti-home.
  5. Update script 2018_xx_xx_setHardstopOrientations_manual_cw.lst with fiducial info.
  6. Run the script.

On-Time Tuning (tbd)

Generating Targets

  1. Change the matlab directory to where you want the target files generated
  2. Create an archive folder and move the existing targets in there first.
  3. Run ics_cobraOps\matlab\collisions\generateFieldTargets.m with the arguments (200,1.5);
  4. Run the script
  5. Restart MSIM

Running Targets

  1. Open the latest target script in Dropbox\PFS_EM\SVN\MSIM and add latest fiducial coordinates.
  2. Run and make sure everything works.

Target Convergence Analysis

  1. Copy MSIM target log dir on testbed computer (eg: D:\PfsTests\06_16_14_10_36_21_TargetRun\Log) to the drobox test results target convergence folder (Dropbox\PFS_EM\TEST_RESULTS\TargetConvergence\). Rename the log directory in dropbox to have the same name as the mother directory on testbed computer (eg: 06_16_14_10_36_21_TargetRun). This directory will now be referred to as the test directory here.
  2. Move the appropriate CobraConfig xml (the most recent file in explorer:Libraries->xmlfiles) used by MSIM into the test directory.
  3. Change the matlab current folder to the test directory in dropbox.
  4. Execute the following command to run the target analysis script:
    analyzeTargetRun
  5. When prompted, select the appropriate xml which was used for the MSIM test. The one you moved into test directory.
  6. Run the script and mat files will be saved to the same log directory as the log txt files are in.

Target Convergence Comparisons

  1. Change the matlab current folder to Dropbox\PFS_EM\TEST_RESULTS\TargetConvergenceRun the target convergence analysis on data you wish to compare. The mat files from that script are needed for this comparison.
  2. Open the convergence comparison matlab script in that folder: convCompare.m
  3. Edit the INPUTS section so that the dataDirs array contains the folder names of test data you wish to compare. These must all contain the results of analyzeTargetRun script.
  4. Run the script.
  5. The convergence comparison figure will automatically be saved in the last folder of the dataDirs array, so make sure that is in order.

Motor Map Update

  1. Do a TargetConvergenceAnalysis as described above.
  2. Add your new test directory to the list of directories in the beginning of updateMotorMapsFromTargetData.m
  3. Uncomment all directories that contain data you want to include in the analysis.
  4. Run the script with your latest xml and take a thorough look at the results. Look for extreme map values and decide whether it is realistic and ok for the positioner to have these values.
  5. Follow the Loading XML into MSIM procedure above.

-- JohannesGross - 12 Oct 2017

Edit | Attach | Watch | Print version | History: r19 | r17 < r16 < r15 < r14 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r15 - 2018-06-14 - JohannesGross
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback