Running find_acm_on_ihmp on Dec2017 data


Here I review the run of find_ihmp_on_acm on data taken after the Dec2017 installation of IFUs on the IHMP. The orignial data file (Data.ALL) and output files from my last run of the find_acm_on_ihmp can be viewed in the source directory for this web doc ($scohtm/scocodes/het_eng/Work_HET/Dec2017).

The shuffle code is used to set up an observation with the HET. It is used to create a command sequence and simulated acm finding chart that allows the observers to locate a sky target onto a particular detector (i.e. LRS2-B or VIRUS IFUSLOT 094, etc...). The shuffle code uses two fundamental input files: fplane.txt and shuffle.cfg. The first file specified locations of IFUs and other fiber bundles (BIB, HPF acm) on the IHMP. The fplane.txt file will not be changed, but a number of parameters in the shuffle.cfg will almost certainly require adjustment beofre reliable observing can proceed. To see these files on mcs:

 
[astronomer@mcs play]$ shuffle_config
Copied files:  fplane.txt, shuffle.cfg
[astronomer@mcs play]$ ls
fplane.txt  shuffle.cfg

NOTE: The shuffle.cfg used by SIR's auto_shuffle is located in a path like: 
[astronomer@mcs play]$ ls /data1/mcs/shuffle_data/18-1/100 
done  done.log	E/  LOG.ERR  shuffle/
[astronomer@mcs play]$ ls /data1/mcs/shuffle_data/18-1/100/shuffle 
fplane.txt  shuffle_args.E  shuffle.cfg  shuffle_version

You can view examples of shuffle.cfg and fplane.txt that were in use on mcs as of early Dec2017.

For our purposes here, the important parts of these two large files are:

  # From the shuffle.cfg file: 
# ACAM coordinates for clarity and use in defining candidate stars that fall within the acam
acam_x_origin = 189.1
acam_y_origin = 386.8
acam_pix_scale = 0.2709
acam_x_length = 775
acam_y_length = 773
# section with the angle offsets in degrees for the various parts of the focal
# plane assembly. The offset should be 0 degree for all of them. The overall 90
# degrees rotation is already accounted for in the code
acam = 1.07

# From the fplane.txt file: 
# IFUSLOT X_FP   Y_FP   SPECID SPECSLOT IFUID IFUROT PLATESC
000       0.0    0.0    900     900     900     0.0     1.0    # IHMP center
056     -49.8 -148.7    998     998     998     0.0     1.0    # LRS2-B
066      49.8 -151.3    999     999     999     0.0     1.0    # LRS2-R
555       3.3  -73.2    901     901     901     0.0     1.0    # BIB
600     -35.0   10.1    902     902     902     0.0     1.0    # HPF acquisition camera
600     -34.7    9.9    902     902     902     0.0     1.0    # HPF from Joe Ninan 

From Joe Ninan:
I calculated the HPF ACQM camera position in fplane.txt file by 
fitting the linear transformation matrix for all the BIB, IHMP, 
LRS2R and LRS2B simultaneously.  If I don't use IHMP in the 
calculation, the then 600 position in fplane.txt file becomes
-34.67 and 9.9

# From the RA wiki page "Current best position for markers": 
 ACM Positions:
    CWFS - 183 426
    IHMP - 183.3 386.3
    LRS2B - 741.8 213.3
    LRS2R - 744.5 581.5
    HPF center - 148 254.8
    TTC - 177 288
    BIB - 452.6 402.6 

We must derive a new value for the IHMP center in the acm coordinate frame (i.e. install new values of acam_x_origin and acam_y_origin). This position can change a lot when the FPA is removed, but will nearly always involve at least a small change when only the IHMP was moved. Although less common, the value of thefield rotation angle correction (acam) can also change. The approach we'll take is to re-measure the acm positions for the LRS2-B, LRS2-R and BIB locations. As of this writing, we have a new camera that could also be used: the HPF acquisition camera. Hence, we will have 3 or 4 points for which we know the X,Y flpane position (in units of arcseconds) and the corresponding X,Y positions (in pixels) on the acm. We will fit a simple XY transformation relation that converts the fplane (X,Y( to the acm (X,Y). We'll then use this relation to convert our (X,Y)=0,0 IHMP center in the IHMP system to an estimated IHMP center (X,Y) (in pixels) on the acm. These X,Y numbers are what we'll use to replace the values in the shuffle.cfg file (acam_x_origin and acam_y_origin).

Remember that the acm plate scale (acam_pix_scale) should retain a fixed value of PS=0.2709 arcsec/pixl. The angle named "acam" in the shuffle.cfg file is a small correction to the two primary things needed to transform acm to IHMP and vice -versa: the coordinates must be flipped on one axis (a parity change) and a rotation of approxiamtely 90 degrees is applied. The acm value is a small change to the 90 degree rotation. When life is good, the value of acam will not change measurably after a simple installation involving the IHMP. As I have never seenthe shuffle equations that perform the flip or the rotation, I'll use a full derivation using my trs_ code (trs = translation, rotation, scale). The sense of applying a new acam value, should it be required, will be determined by trial and error.

I made some early notes on running trs_solve_2 for the current acm+IHMP data points. In the end, I decided to build a single script named find_ihmp_on_acm that executes all of the solution and plotting commands we need. All we need to do is build a file (named Data.ALL in the example below) that contains our new position measurements. Here is how it works:


[sco@mcs shuf2]$ cat Data.ALL 

# IHMP-acm positions PRIOR to early Dec2017 engineering run 
# name     X,Y_ihmp      X,Y_acm 
# data
056     -49.8 -148.7   741.8 213.3  
066      49.8 -151.3   744.5 581.5
555       3.3  -73.2   452.6 402.6
600     -34.7    9.9   148.0 254.8

[sco@mcs shuf2]$ find_ihmp_on_acm Data.ALL  

**** Now Computing IHMP Origin on acm **** 
# data
  182.709	  384.796

Plot the results? Y/N: Y 
# I use the show() routine to adjust the plot and make a hardcopy.

I can see all residuals in:  Final_Residuals.List

The typical sort of plot I get is below.

The IHMP to acm fit made with the positions for 056 (LRS2-B), 066(LRS2-R), 555(BIB), and 600(HPFacq). In this case the small blue squares are the original acm positions. The larger red squares are the IHMP positions transformed to the acm system using the results from our trs_solve_2 run. These results are contained in the local file named TRS.final.

Hence, after we have measured the data for 056 (LRS2-B), 066(LRS2-R), 555(BIB), and 600(HPFacq) we can quickly derive the position on the acm of the IHMP origin. In this case we would get values for the shuffle.cfg file of:
 
  acam_x_origin = 182.7  
  acam_y_origin = 384.8  

We could also use the rotation angle measure: 
[sco@mcs shuf2]$ cat trs_rotatedet.explain  
Final values (Theta_deg,err,MeanRes_pixels,Npoints): 
  268.807     0.3632        4.6793       3
 
I would guess:     acam = 270-268.8 = 1.2 degrees 
Recall our original value in the shuffle.cfg file was: 
acam = 1.07


This is a good start to fixing up the shuffle.cfg file. The next step would be to insure that our shuffle.cfg produces acm finding charts that match the real acm images reasonably well.




Back to calling page