E1200797-v8
IAS Alignment Solutions

This is an evolving notebook used for calculating/providing the positions and orientations of the IAS theodolite-total-station/autocolimator for initial alignment and positioning of the primary optics. It also calculates the pitch angles of the COC relative to the local horizontal. The alignment solutions (angles, positions/distances) calculated in this notebook are inserted into each of the IAS alignment procedures.

This notebook is released each time a particular set of alignment solutions are available. Each alignment solution, and associated notes, are given a separate DCC number. However all of the solutions to date are kept in this evolving notebook. The notebook will be posted to the parent DCC number (E1200797) as well as the subsidiary DCC number for the specific alignment solution which was the reason for the version release.

Version History

E1200556-v1  D. Coyne  8/29/2011, 5/30/2012

1) Started with iLIGO version of this notebook
1) Calculation of the monument locations required for alignment of H2-FMy on LHO Mechanical Test Stand #2. (The output was releasd in an alignment procedure, this notebook was not released to the DCC.)
2) Incorporated the coordinates and orientations for all optics of H1 and L1. H2 is no longer to be deployed (H2 will become LIGO-India, I1).
3) Calculated the optic pitch and yaw values to be checked against values used in SolidWorks.

E1200556-v2  D. Coyne  6/7/2012

1) Released to show L1 PR3 alignment solutions (yaw, pitch, x, y, z)

E1200556-v3  D. Coyne  6/7/2012

1) Released to show L1 PRM angular alignment solution (yaw, pitch)

E1200556-v4  D. Coyne  6/12/2012

1) Updated all L1 optic positions and orientations per D0902216-x010 Zemax model. Need to update H1 as well.
2) Released to show LBSC2 cartridge alignment solutions -- HOWEVER THE BS ORIENTATION IS APPARENTLY OPPOSITE TO WHAT I HAVE ASSUMED -- MUST BE RE-CALCULATED

E1200556-v5  D. Coyne  6/14/2012

1) Corrected LBSC2 cartridge alignment solutions (with an orientation of the BS which reflects the actual orientation chosen at LLO)
2) Revised the BS AR normal vector to be consistent with BS SN002 wedge angle of 0.070 deg (rather than the avergae value of 0.073 deg used in Zemax D0902216-x010)
3) Released to show 4 BS alignment solutions for the cartridge on the test stand

E1200556-v6  D. Coyne  6/18/2012

1) LBSC2 BS AR yaw & pitch alignment: Based on measurements by Joe Hanson 6/14/2012 on the position of the LLO Test Stand #1 monuments relative to the LVEA wall (which correct D1200869-v4 and E1100374-v4), the location of the proposed monument TS1-17 in v5 of this document is in the LVEA wall. As a consequence the location of the proposed monuments to support angular alignment of the BS vai the AR surface for LBSC2 are revised in this v6 version.
One can (just barely) get sufficient range to separate the AR surface reflection from the HR surface reflection, when aligned normal to the HR surface. However, one cannot get sufficient range to separate the returns when aligned normal to the AR surface (in transmission through the HR surface). However, since it is possible that one can still get sufficient return signal intensity by blocking the HR reflection through the use of an iris to close down the aperture for the exiting laser autocollimator beam and, simultaneously, the return aperture, a solution is provided for alignment of the pitch & yaw of the AR surface (in transmission through the HR surface).
2) LBSC2 BS HR yaw & pitch alignment: I calculated that 8995 mm of distance was required between the Total Station and the BS optic in order to separate the HR and AR returns, The alignment solution for pitch & yaw alignment of the BS HR face had only 8717 mm of distance in v5. I revised the solution so that the minimum distance is achieved.

E1200556-v7  D. Coyne  6/26/2012

1) Corrected the LLO Test Stand #1 monument locations per Doug Cook’s and Jason Oberling’s survey and re-calculated the LBSC2 TS1 solutions.

E1200798-v1  D. Coyne  9/4/2012

1) Formulated BS cartridge alignment on LHO Test Stand #2. Included “BS AR” coordinates and normal vector for H1.

E1200797-v2  D. Coyne  9/5/2012

1) Formulated alignment solutions for the L1 power recycling cavity (PRC) optics: PRM, PR2 and PR3.

2) Calculated positional (x, y, z) alignment solution for LBSC2 BS in the chamber.

E1200797-v3  D. Coyne  10/11/2012

1) Correction: had incorrect matrix indices for SR2 and SR3 in section “1.4.1, H1, corrected, calc.” and in section  “1.4.3, L1, corrected, calc.” Since the IAS alignment solution for these optics has not yet been calculated, there are no other required changes ore updates.
2) Correction: Jason Oberling noted that the L1 ITMy yaw angle was incorrect in section “1.4, Optic Pitch & Yaw Angles”! Now properly calculates yaw angles.
3) Corrected alignment solution indexing for both H1 & L1 (did not effect previously calculated alignment solutions)
4) Changed notation from “BS AR” to “BS ARc” to denote the center of the AR surface of the BS optic. In the Zemax model optic location files (D0901920 and D0902216) “BS AR” denotes the in-line chief ray intersection point on the AR surface and “BS ARS” denotes the off-line chief ray intersection point on the AR surface.
5) Changed H1 & L1 summary tables so that empty (or “NA”) entries are used for solutions not yet calculated. 
6) Updated H1 optic locations from D0901920-v10 to D0901920-V12, which includes the Schnupp asymmetry change to 80 mm. The “BS ARc” coordinates are the average of the “BS AR” and “BS ARS” coordinates. The only H1 alignment solution provided to date (BS cartridge alignment) is not effected by this update.
Note that the optic orientations (outward normal vector direcitons) are not given in D0901920-v12 and have not been updated/changed. 
These optic orientations were taken from an earlier H1 Zemax model and should be updated!!
7) Updated L1 optic locations per D0902216-V7 (was per Zemax model “D09002216 L1 Zemax layout.zar”, PDMW vault version x010). The positional changes were all small/negligible (< 1 mm).
These optic orientations were taken from an earlier L1 Zemax model and should be updated!!
8) Removed H2 cartridge alignment solutions for the one arm test, since H2 will no longer be installed. (Can see this solution in previous versions of this document if interested).

E1200797-v4  D. Coyne  11/7/2012

0) Changed the manner of inputting the initial alignment monument labels and positions matrix for LHO to be the same as used for LLO.
1) Formulated alignment solutions for the H1 power recycling cavity (PRC) optics: PRM, PR2 and PR3.
2) Need to incorporate separate LLO TS monuments from the overall monument list, just as done for LHO. Also need to create solution table functions specific for general monuments and each test stand, so that monument references are correct. ... Ah, this will not work for the summary table of all solutions, including test stands. Hummm ... need to consider how best to resolve.

E1200797-v5  D. Coyne  2/8/2013

0) Created a separate Mathematica notebook (“aLIGO recycling cavities optical layout v1.nb”) to calculate the theoretically correct PRC & SRC optic positions and orientations for H1 & L1, using as-built wedge angles and thicknesses. Comparison to IO and Zemax latest layouts indicate small errors. However, fairly large differences from the dated Zemax positional information used in this workbook for the PRC alignment. This separate workbook is filed at the DCC entry for E1200797 ... but has since been revised/improved/corrected and is now filed as E1300128.
1) Changed the L1 optic positions and orientations to be consistent with the optical layout calculated in the Mathematica notebook entitled “aLIGO recycling cavities optical layout v1.nb”. This notebook uses as-built/assigned optic parameters. Comparison is also made to the IO and Zemax layouts and shown to be quite close.
2/12/2013: N.B.: I’ve improved upon this calculation and filed it as a separate DCC document, E1300128-v1. There are some small differences from the L1 results in the file referred to above.
2) Added the in-chamber alignment solutions for LBSC2.

E1200797-v6  D. Coyne  2/12/2013

1)  Had an incorrect calculation for the theodolite pitch angle which effected the BS alignment solutions. (The calculation was also incorrect for PRM, PR2, PR3, SRM, SR2, and SR3 but since these pitch angles are zero, or the y-component of the tehodolite line-of-sight vector was small, the result was uneffected). This did not effect the BS cartridge solutions, only the in-chamber solution, which has to date only been calculated for L1 (not H1 yet).
2) Revised the L1 BS solution, E1200556-v10 based on these results
3) Revised the optic positions and orientation vectors in accordance with E1300128-v1. This changed the solutions for the L1 PRC (E1200802-v3) by 0.3 mm max and 2 arc sec max.

E1200797-v7  D. Coyne  2/19/2013

1)  Had calculated the distance for the Total Station to the PR2 HR face, but we are measuring the distance to the AR face. Corrected this for the L1 PR2.

E1200797-v8  D. Coyne  2/19/2013

1)  Calculated the H1 BS in-chamber alignment solutions

.. Intialization

Off[General::"spell"]
Off[General::"spell1"]

Needs["VectorAnalysis`"]

Needs[“Geometry`Rotations`”]
is no longer needed. Use built - in RotationTransform and RotationMatrix
RotationMatrix uses yaw-pitch-roll angles rather than the Euler angles used by RotationMatrix3D

RotationMatrix3D[phi_,theta_,psi_]:=RotationMatrix[Pi - psi, {0, 0, 1}].RotationMatrix[
  theta, {1, 0, 0}].RotationMatrix[Pi - phi, {0, 0, 1}]

RotationMatrix3D[phi,theta,psi]

Note: Per J. Wertz, "Spacecraft Attitude Determination and Control", D. Reidel Pub., 1985, pp.763-764, This is a Type 2 Euler Angle representation with a z-x-z rotation sequence.

Needs["Graphics`Shapes`"]
The functionality of RotateShape, TranslateShape, and AffineShape is provided by the newly added kernel functions Rotate, Translate, Scale and GeometricTransformation

pi=N[π,10];

The function "Reflect[u,n]" takes the unit ray vector, u, and reflects it from the surface with an outward surface normal vector, n, and returns the reflected unit ray vector, v.

Clear[Reflect];
Reflect[u_,n_]:=Block[{temp,i,j},temp=CrossProduct[u,n];If[temp.temp==0, Return[-u],i=(temp/(Sqrt[temp.temp]));j=CrossProduct[n,i];Return[u.j j-u.n n]]];

The function "Refract[u,n,ni,nt]" takes the unit ray vector, u, and refracts it through the surface with an outward surface normal vector, n, and returns the refracted unit ray vector, v. The incident ray travels through a media with an index of refraction, ni, and refracts into a media with an index of refraction, nt.

Clear[Refract,ni,nt];
Refract[u_,n_,ni_,nt_]:=Block[{temp,i,j},temp=CrossProduct[u,n];i=(temp/(Sqrt[temp.temp]));j=CrossProduct[n,i];temp=((ni u.j)/nt);Return[temp j-(Sqrt[1-(temp^2)]) n]];

DMS[rad_]:={IntegerPart[rad 180/Pi],IntegerPart[FractionalPart[rad 180/Pi] 60+Sign[rad]10^-18],Round[FractionalPart[(rad 180/Pi) 60] 60]};

RAD[deg_,min_,sec_]:=(deg+min/60+sec/3600) Pi/180;

The functions LTHR reflects the light back parallel to the input beam but translated; Lateral Transfer Hollow Retroreflector (LTHR) function. (The physical unit used in the IAS system is called a PLX retroreflector, made by the PLX Inc.)

The function LTHRangle takes the input vector, u, and returns the retroreflected ray, v.

The function LTHRpos takes an entrance aperture center point, a, translates it along the axis vector, axis, a distance, d, and returns the exit aperture center point, b, where the retroreflected and translated ray, v, eminates.

Clear[LTHRangle];
LTHRangle[u_]:=-u;

Clear[LTHRpos];
LTHRpos[a_,axis_,d_]:=a+d axis;

Clear[LTHPangle];
LTHRangle[u_]:=u;

Clear[LTHPpos];
LTHRpos[a_,axis_,d_]:=a+d axis;

LTHPlength=15.75 25.4;
LTHRlength = LTHPlength

.. Global to Local Coordinate Transformation Matrices

See Tables 10-14 and Tables 25-27 of T980044-v1(aka -10), "Determination of Local and Global Coordinate Axes for the LIGO Sites".

... Rhc	-> Hanford Corner station

xangle=619.49 10^-6;
yangle=12.4832 10^-6;

Rhc = RotationMatrix3D[0,yangle,0].RotationMatrix3D[pi/2,xangle,-pi/2]; 
MatrixForm[Rhc]

MatrixForm[Rhc-IdentityMatrix[3]]

Rhcinv =RotationMatrix3D[Pi/2,-xangle,-Pi/2]. RotationMatrix3D[0,-yangle,0];
MatrixForm[Rhc.Rhcinv]

MatrixForm[Rhcinv]

... Rhxm	-> Hanford x-mid station

xangle=305.827 10^-6;
yangle=12.0075 10^-6;

Rhxm = RotationMatrix3D[0,yangle,0].RotationMatrix3D[Pi/2,xangle,-Pi/2];
MatrixForm[Rhxm]

MatrixForm[Rhxm-IdentityMatrix[3]]

Rhxminv =RotationMatrix3D[Pi/2,-xangle,-Pi/2]. RotationMatrix3D[0,-yangle,0];
MatrixForm[Rhxm.Rhxminv]

... Rhxe	-> Hanford x-end station

xangle=-7.8389 10^-6;
yangle=11.5318 10^-6;

Rhxe = RotationMatrix3D[0,yangle,0].RotationMatrix3D[Pi/2,xangle,-Pi/2];
MatrixForm[Rhxe]

MatrixForm[Rhxe-IdentityMatrix[3]]

Rhxeinv =RotationMatrix3D[Pi/2,-xangle,-Pi/2]. RotationMatrix3D[0,-yangle,0];
MatrixForm[Rhxe.Rhxeinv]

... Rhym	-> Hanford y-mid station

xangle=619.97 10^-6;
yangle=325.84 10^-6;

Rhym = RotationMatrix3D[0,yangle,0].RotationMatrix3D[Pi/2,xangle,-Pi/2];
MatrixForm[Rhym]

MatrixForm[Rhym-IdentityMatrix[3]]

Rhyminv =RotationMatrix3D[Pi/2,-xangle,-Pi/2]. RotationMatrix3D[0,-yangle,0];
MatrixForm[Rhym.Rhyminv]

... Rhye	-> Hanford y-end station

xangle=620.45 10^-6;
yangle=639.20 10^-6;

Rhye = RotationMatrix3D[0,yangle,0].RotationMatrix3D[Pi/2,xangle,-Pi/2];
MatrixForm[Rhxe]

MatrixForm[Rhye-IdentityMatrix[3]]

Rhyeinv =RotationMatrix3D[Pi/2,-xangle,-Pi/2]. RotationMatrix3D[0,-yangle,0];
MatrixForm[Rhye.Rhyeinv]

(180/Pi) 619 10^-6 //N

... Rlc	-> Livingston Corner station

xangle=312.0 10^-6;
yangle=-611.0 10^-6;

Rlc = RotationMatrix3D[0,yangle,0].RotationMatrix3D[Pi/2,xangle,-Pi/2];
MatrixForm[Rlc]

MatrixForm[Rlc-IdentityMatrix[3]]

Rlcinv =RotationMatrix3D[Pi/2,-xangle,-Pi/2]. RotationMatrix3D[0,-yangle,0];
MatrixForm[Rlc.Rlcinv]

... Rlxe	-> Livingston x-end station

xangle=-315.0 10^-6;
yangle=-610.0 10^-6;

Rlxe = RotationMatrix3D[0,yangle,0].RotationMatrix3D[Pi/2,xangle,-Pi/2];
MatrixForm[Rlxe]

MatrixForm[Rlxe-IdentityMatrix[3]]

Rlxeinv =RotationMatrix3D[Pi/2,-xangle,-Pi/2]. RotationMatrix3D[0,-yangle,0];
MatrixForm[Rlxe.Rlxeinv]

MatrixForm[Rlxeinv-Transpose[Rlxe]]

... Rlye	-> Livingston y-end station

xangle=311.0 10^-6;
yangle=18.8 10^-6;

Rlye = RotationMatrix3D[0,yangle,0].RotationMatrix3D[Pi/2,xangle,-Pi/2];
MatrixForm[Rlye]

MatrixForm[Rlye-IdentityMatrix[3]]

Rlyeinv =RotationMatrix3D[Pi/2,-xangle,-Pi/2]. RotationMatrix3D[0,-yangle,0];
MatrixForm[Rlye.Rlyeinv]

.. Optic surface positions & orientations and Monument Positions

Global coordinates and normal vectors taken from E1300128-v1, except for ETMs which are taken from E0901920-v? (H1) and D0902216-v? (L1)

... Global Coordinates

H1

Optics

opticLabelH1={"PRM HR","PR2 HR","PR3 HR","BS HR","BS ARs","SRM HR","SR2 HR","SR3 HR","ITMx HR","ITMy HR","ETMx HR","ETMy HR"};
nOpticsH1=Length[opticLabelH1];

opticPosH1G={{-20189.599529831`,-628.0000096656564`,-94.96934575283231`},{-3581.299683786465`,-530.4000070204817`,-84.80459274529535`},{-19740.000000000004`,-173.88597850510578`,-94.9386085990607`},{-202.62498451058457`,-183.80958567797188`,-82.97961849494024`},{-183.88902039200707`,-250.1344064434214`,-83.00872021534009`},{305.4004934313132`,-19908.59952381972`,-114.05876255770352`},{-594.0995035696229`,-4178.1003167253675`,-104.96625587026485`},{-174.12770766228402`,-19615.9`,-94.86266673854672`},{5013,-200,-80},{-200,4983.1`,-80},{3999498.0,-200.0,-80.0},
{-200.0 ,3999468.1,-80.0}};

opticOrientH1G ={{0.9999825460712962`,0.0058764774267325934`,0.0006120178276455851`},{-0.9999670712773671`,0.008091507469408187`,-0.0006195706881841161`},{0.9999361464644848`,-0.011283576573102104`,0.0006195913778063688`},{-0.7067356616494237`,0.7074777060465943`,0.`},{0.7057966062175542`,-0.7084145330608221`,0.`},{-0.05708864370697776`,0.9983689467047002`,0.0005770749042948121`},{0.04214607465768349`,-0.9991114586983983`,0.000038581183293535706`},{-0.013850289248339028`,0.9999040799217315`,-0.00002106211939584043`},{1,0,0},{0,1,0}, {-1,0,0},{0,-1,0}};

tableHead={"Xg","Yg","Zg","Ug","Vg","Wg"};
Print[TableForm[Partition[Flatten[Transpose[{opticPosH1G,opticOrientH1G}]],6],TableHeadings->{opticLabelH1,tableHead}]]

Tables

nTablesH1=11;
tableLabelH1={"WHAM1","WHAM2","WHAM3","WHAM4","WHAM5","WHAM6","WBSC1","WBSC2","WBSC3","WBSC9","WBSC10"};

tablePosH1G={{-22692,0,0},
{-20122,0,0},
	{-3831,0,0},
	{0,-3831,0},
	{0,-20122,0},
	{0,-22692,0},
	{0,4580,0},
{0,0,0},
{4580,0,0},
{4000000,0,0},
{0,4000000,0}};

tableHead={"x_global","y_global","z_global"};
Print[TableForm[tablePosH1G,TableHeadings->{tableLabelH1,tableHead}]]

H2

H2 will not be installed

L1

Optics

All of the optics positions and orientations (except for ETMs) are taken from the Mathematica workbook E1300128-v1. This workbook calculates the positions and orientations of the optics based on as-built/assigned optics. It is in close agreement with the IO and Zemax layout.

opticLabelL1={"PRM HR","PR2 HR","PR3 HR","BS HR","BS ARs","SRM HR","SR2 HR","SR3 HR","ITMx HR","ITMy HR","ETMx HR","ETMy HR"};
nOpticsL1=Length[opticLabelL1];

opticPosL1G={{-20189.60039935566`,-628.0004222667684`,-103.40393051014982`},{-3579.200017746558`,-530.4002536588778`,-93.69426647203895`},{-19740.000000000004`,-176.43630007483074`,-94.17254011612248`},{-202.51081097878733`,-184.12669480193927`,-82.8267682375803`},{-183.9307609302812`,-249.88863344915075`,-82.85414358002801`},{304.99999262502274`,-19908.599940379274`,-93.18886389821596`},{-594.0998589177657`,-4178.0999730278745`,-84.33298679049891`},{-175.30787467299908`,-19615.9`,-94.1003354420015`},{5013,-200,-80},{-200,4983.1`,-80},{3999498.0,-200.0,-80.0},{-200.0 ,3999468.1,-80.0}};

opticOrientL1G={{0.9999825668165662`,0.005875744406155814`,0.0005845430901537381`},{-0.9999678595614747`,0.008011587653408543`,-0.0003070949598774682`},{0.9999378332516309`,-0.011146142968478058`,0.000305170378130907`},{-0.7067844227241789`,0.7074289927578946`,0.`},{0.7059196078967399`,-0.7082919646494044`,0.`},{-0.05706332809358454`,0.9983704025451893`,0.0005620575068352936`},{0.042095249652445405`,-0.999113423571094`,-0.0005973246569983118`},{-0.013782713654694953`,0.9999048298663913`,0.0006066417194717071`},{1,0,0},{0,1,0},{-1,0,0},{0,-1,0}};

tableHead={"Xg","Yg","Zg","Ug","Vg","Wg"};
Print[TableForm[Partition[Flatten[Transpose[{opticPosL1G,opticOrientL1G}]],6],TableHeadings->{opticLabelL1,tableHead}]]

Tables

nTablesL1=11;
tableLabelL1={"LHAM1","LHAM2","LHAM3","LHAM4","LHAM5","LHAM6","LBSC1","LBSC2","LBSC3","LBSC4","LBSC5"};

tablePosL1G={{-22692,0,0},
{-20122,0,0},
	{-3831,0,0},
	{0,-3831,0},
	{0,-20122,0},
	{0,-22692,0},
	{0,4580,0},
{0,0,0},
{4580,0,0},
{4000000,0,0},
{0,4000000,0}};

tableHead={"x_global","y_global","z_global"};
Print[TableForm[tablePosL1G,TableHeadings->{tableLabelL1,tableHead}]]

Chambers

Chamber center positions, in global coordinates, are listed in D0902216-v6

chambersL1={{"LBSC1", 0.0, 4580.0, 0.0},
{"LBSC2", 0.0 ,0.0, 0.0},
{"LBSC3", 4580.0 ,0.0 ,0.0},
{"LBSC4", 4000000.0, 0.0 ,0.0},
{"LBSC5", 0.0 ,4000000.0 ,0.0},
{"LHAM1",-22692.0 ,0.0 ,0.0},
{"LHAM2",-20122.0 ,0.0 ,0.0},
{"LHAM3",-3831.0 ,0.0 ,0.0},
{"LHAM4", 0.0,-3831.0 ,0.0},
{"LHAM5", 0.0,-20122.0, 0.0},
{"LHAM6", 0.0,-22692.0 ,0.0}};
nChambersL1=Length[chambersL1];
nBSCchambersL1=5;
nHAMchambersL1=6;

tableHead={"x_global","y_global","z_global"};
Print[TableForm[chambersL1[[All,2;;4]],TableHeadings->{chambersL1[[All,1]],tableHead}]]

opticPosL1G[[10,2]]-chambersL1[[1,3]]

H1 and L1 Differences

tableHead={"Xg","Yg","Zg","Ug","Vg","Wg"};
Print[TableForm[Partition[Flatten[Transpose[{(opticPosL1G-opticPosH1G),(opticOrientL1G-opticOrientH1G)}]],6],TableHeadings->{opticLabelL1,tableHead}]]

Just a check; In global coordinates we expect that H1 is quite similar to L1. However since PR2, PR3, SR2 and SR3 are vertical in the local (gravity) frame, the vertical component of their surface normal vectors (Wg) should be different. Moreover the differences should be the same for PR2 & SR3, as well as for SR2 & SR3. This is the case above.
As a consequence Wg will be different for PRM and SRM as well. 
The vertical positions of PRM, PR2, SRM and SR2 are also different, as a consequence of the pitch angle difference. 
Yaw angles should all be very similar ... and they are somewhat similar. The largest difference is 80 microrad.

... Local Coordinates

IAM @ LHO

coordinates of the Initial Alignment Monuments (IAM) for aLIGO are given in D1100291-v4

IAMlho = {{"BTVE-1",0.0,46000.0},{"BTVE-5",46000.0,0.0},{"IAM-1",2362.3,-3251.2},{"IAM-2",11543.0,-3251.2},{"IAM-3",213360.0,-3251.2},{"IAM-4",2362.3,212.9},{"IAM-5",11543.1,-200.0},{"IAM-6",-3251.2 ,2362.2},{"IAM-7",-200.0 ,2362.2},{"IAM-8",11543.0,9060.0},{"IAM-9",-3251.2 ,11428.0},{"IAM-10",200.0,11428.0},{"IAM-11",9163.1,11428.0},{"IAM-12",-3251.2, 213360.0},{"PSI-1",2362.3,44643.1},{"PSI-2",9219.6,31601.7},{"PSI-3",-2362.2 ,9219.6},{"PSI-4",-22382.7 ,2362.2},{"PSI-5",-22382.7 ,0.0},{"PSI-6",2362.2,2362.2},{"PSI-7",0.0,-22382.7},{"PSI-8",2362.1,-22382.7},{"PSI-9",2362.2,-2362.2},{"PSI-10",9219.6,-2362.2},{"PSI-11",31601.1,9219.6},{"PSI-12",44642.6,2362.2},{"LV1",-2132.9 ,11428.0},{"LV2",-2133.6, 2362.2},{"LV3",-2131.6, 38158.1},{"LV4",NaN,NaN},{"LV5",-2133.6,-1930.7},{"LV6",11543.0,-1930.7},{"LV7",38155.0,-1930.7},{"LV8",NaN,NaN},{"LV9",11543.0,11428.0},{"LV10",27340.1,11428.0},{"LV11",11543.0,27306.3},{"LV12",-2132.2, 25171.9},{"LV13",-2131.9 ,31415.1},{"LV14",1375.2,-1930.7},{"LV15",31426.7,-1930.7},{"LV16",33967.1,-1930.7},{"LV17",200.0,38158.1},{"LV18",0.0,38158.1},{"LV19",-200.0 ,38158.1},{"LV20",-2133.6,-3830.7},{"LV21",-2133.6,-20122.0},{"LV22",-2133.6,-22692.0},{"LV23",-3831.0,-3050.7},{"LV24",-20122.0,-3050.7},{"LV25",-22692.0,-3050.7},{"LV26",-2133.6,-3050.7}};

IAMLabellho=Transpose[IAMlho][[1]];
IAMPosLlho=IAMlho[[All,2;;3]];
tableHead={"Xl","Yl"};
Print[TableForm[IAMPosLlho,TableHeadings->{IAMLabellho,tableHead}]]

labels=Text[#[[1]],1.1 #[[{2,3}]]]&/@Drop[IAMlho,{30,34,4}];
dataPlot=ListPlot[IAMPosLlho,PlotStyle->PointSize->Large];
Show[dataPlot,Graphics[{Red,labels}],PlotRange->{{-30000,60000},{-30000,60000}},AspectRatio->1]

TS1 @ LHO

TS#1 monuments are in local coordinates, i.e. center of TS1 is (0,0)

IAMlhoTS1={{"TS1-1",-200.0, 5133.0},
{"TS1-2", 0.0, 5133.0},
{"TS1-3", 200.0, 5133.0},
{"TS1-4",-200.0,-7570.0},
{"TS1-5", 0.0,-7570.0},
{"TS1-6", 200.0,-7570.0},
{"TS1-10", 0.0 ,0.0},
{"TS1-11",-7289.0 ,200.0},
{"TS1-12",-7289.0, 0.0},
{"TS1-13",-7289.0,-200.0},
{"TS1-15", 2872.0, 200.0},
{"TS1-16", 2872.0, 0.0},
{"TS1-17", 2872.0,-200.0}};

IAMLabellhoTS1=Transpose[IAMlhoTS1][[1]];
IAMPosLlhoTS1=IAMlhoTS1[[All,2;;3]];

tableHead={"Xl","Yl"};
Print[TableForm[IAMPosLlhoTS1,TableHeadings->{IAMLabellhoTS1,tableHead}]]

TS2 @ LHO

TS#2 monuments are in local coordinates, i.e. center of TS2 is (0,0)

IAMlhoTS2={{"TS2-1",-200.0, 5133.0},
{"TS2-2", 0.0, 5133.0},
{"TS2-3", 200.0, 5133.0},
{"TS2-4",-200.0,-7570.0},
{"TS2-5", 0.0,-7570.0},
{"TS2-6", 200.0,-7570.0},
{"TS2-7",-200.0, 2800.0},
{"TS2-8", 3327.3, 2800.0},
{"TS2-9", 3327.3,-326.1},
{"TS2-10", 0.0 ,0.0},
{"TS2-11",-2872.0 ,200.0},
{"TS2-12",-2872.0, 0.0},
{"TS2-13",-2872.0,-200.0},
{"TS2-14", 200.0 ,7570.0},
{"TS2-15", 7285.0, 200.0},
{"TS2-16", 7285.0 ,0.0},
{"TS2-17", 7285.0,-200.0}};

IAMLabellhoTS2=Transpose[IAMlhoTS2][[1]];
IAMPosLlhoTS2=IAMlhoTS2[[All,2;;3]];

tableHead={"Xl","Yl"};
Print[TableForm[IAMPosLlhoTS2,TableHeadings->{IAMLabellhoTS2,tableHead}]]

H1

Optics

opticPosH1L=Table[0,{nOpticsH1}];
opticOrientH1L=opticPosH1L;

Do[
	opticPosH1L[[i]]=opticPosH1G[[i]].Rhc //N;
	opticOrientH1L[[i]] = opticOrientH1G[[i]].Rhc //N;
	If[Abs[opticOrientH1L[[i]].opticOrientH1L[[i]]-1]> 10^-15, Print["error"],],
	{i,nOpticsH1-2}];

opticPosH1L[[nOpticsH1-1]]=opticPosH1G[[nOpticsH1-1]].Rhxe //N;
opticOrientH1L[[nOpticsH1-1]] = opticOrientH1G[[nOpticsH1-1]].Rhxe //N;
If[Abs[opticOrientH1L[[nOpticsH1-1]].opticOrientH1L[[nOpticsH1-1]]-1]> 10^-15, Print["error"],];

opticPosH1L[[nOpticsH1]]=opticPosH1G[[nOpticsH1]].Rhye //N;
opticOrientH1L[[nOpticsH1]] = opticOrientH1G[[nOpticsH1]].Rhye //N;
If[Abs[opticOrientH1L[[nOpticsH1]].opticOrientH1L[[nOpticsH1]]-1]> 10^-15, Print["error"],];

tableHead={"Xl","Yl","Zl","Ul","Vl","Wl"};
Print[TableForm[Partition[Flatten[Transpose[{opticPosH1L,opticOrientH1L}]],6],TableHeadings->{opticLabelH1,tableHead}]]

Tables

Convert the global coordinates of the optics tables into the local coordinate system:

tablePosH1L=Table[0,{nTablesL1}];
Do[
	tablePosH1L[[i]]=tablePosH1G[[i]].Rhc //N,
	{i,nTablesH1}];
tableHead={"x_local","y_local","z_local"};
Print[TableForm[tablePosH1L,TableHeadings->{tableLabelH1,tableHead}]]

H2

H2 is not installed

IAM @ LLO

coordinates of the Initial Alignment Monuments (IAM) for aLIGO are given in D980499-C and E1100374-v4

IAMllo={{"IAM-L1",-22382.3,-1854.2},{"IAM-L2",-1854.2,-1854.2},{"IAM-L3",-1854.2,-22089.6},{"IAM-L4", 2362.2,-1854.2},{"IAM-L5", 38154.0,-1854.2},{"IAM-L6", 220000.0,-1854.2},{"IAM-L7",-1854.2 ,2362.2},{"IAM-L8",-1854.2 ,38154.0},{"IAM-L9",-1854.2 ,220000.0},{"L1 IAM 380", 0.0 ,NaN},{"L1 IAM 379",-1858.0,-26231.2},{"L1 IAM 378",-1858.0,-2245.5},{"L1 IAM 377",-1858.0,-1845.1},{"L1 IAM 381", 11591.0,-1845.1},{"_87", 45990.8,-1845.1},{"L1 IAM 382",-22283.5,-2245.5},{"L1 IAM 376",-1858.0 ,12604.4},{"IAM 92",-1858.0 ,45962.2},{"AM 405",-1858.0,-22503.2},{"AM 404",-1858.0,-19941.0},{"AM 403",-1858.0,-3650.0},{"AM 400",-3831.1,-2245.5},{"AM 401",-20122.1,-2245.5},{"AM 402",-22692.0,-2245.5},{"IAM 333", 6526.5,2037.4},{"IAM 398", 6726.5,2037.4},{"IAM 332", 6926.5,2037.4},{"IAM 329", 14019.5,6968.4},{"IAM 393", 14019.5,7168.4},{"IAM 337", 14019.5,7368.4},{"IAM 334", 6926.5,14739.4},{"IAM 391", 6726.5,14739.4},{"IAM 349", 6526.5,14739.4},{"IAM 389", 3859.5,7368.4},{"IAM 397", 3859.5,7168.4},{"IAM 400", 3859.5,6968.4},{"IAM 394", 6726.5,7168.4},{"IAM 342", 9433.0,-1429.1},{"IAM 396", 9633.0,-1429.1},{"IAM 350", 9833.0,-1429.1},{"IAM 346", 17203.0,3503.9},{"IAM 392", 17203.0,3703.9},{"IAM 338", 17203.0,3903.9},{"IAM 327", 9833.0,10992.9},{"IAM 395", 9633.0,10992.9},{"IAM 385", 9433.0,10992.9},{"IAM 330", 6761.0,3903.9},{"IAM 390", 6761.0,3703.9},{"IAM 326", 6761.0,3503.9},{"IAM 399", 9633.0,3703.9}};

IAMLabelllo=Transpose[IAMllo][[1]];
IAMPosLllo=IAMllo[[All,2;;3]];
tableHead={"Xl","Yl"};
Print[TableForm[IAMPosLllo,TableHeadings->{IAMLabelllo,tableHead}]]

labels=Text[#[[1]],1.1 #[[{2,3}]]]&/@Drop[IAMllo,{10}];
dataPlot=ListPlot[IAMPosLllo,PlotStyle->PointSize->Large];
Show[dataPlot,Graphics[{Red,labels}],PlotRange->{{-30000,60000},{-30000,60000}},AspectRatio->1]

labelsTS1=Text[#[[1]],1.08 #[[{2,3}]]]&/@IAMllo[[25;;37]];
labelsTS2=Text[#[[1]],1.08 #[[{2,3}]]]&/@IAMllo[[38;;50]];
dataPlot=ListPlot[IAMPosLllo,PlotStyle->PointSize->Large];
Show[dataPlot,Graphics[{Red,labelsTS1}],Graphics[{Green,labelsTS2}],PlotRange->{{0,20000},{-5000,20000}},AspectRatio->1]

Subtract center coordinates from all Test Stand #1 monuments, so that all calculations are done in TS#1 local coordinates

IAMlloTS1=Table["",{13},{3}];
Do[IAMlloTS1[[i-24,1]]=IAMllo[[i,1]];IAMlloTS1[[i-24,2;;3]]=IAMllo[[i,2;;3]]-IAMllo[[37,2;;3]],{i,25,37}];
IAMLabellloTS1=Transpose[IAMlloTS1][[1]];
IAMPosLlloTS1=IAMlloTS1[[All,2;;3]];
tableHead={"Xl","Yl"};
Print[TableForm[IAMPosLlloTS1,TableHeadings->{IAMLabellloTS1,tableHead}]]

Subtract center coordinates from all Test Stand #2 monuments, so that all calculations are done in TS#2 local coordinates

IAMlloTS2=Table["",{13},{3}];
Do[IAMlloTS2[[i-37,1]]=IAMllo[[i,1]];IAMlloTS2[[i-37,2;;3]]=IAMllo[[i,2;;3]]-IAMllo[[50,2;;3]],{i,38,50}];
IAMLabellloTS2=Transpose[IAMlloTS2][[1]];
IAMPosLlloTS2=IAMlloTS2[[All,2;;3]];
tableHead={"Xl","Yl"};
Print[TableForm[IAMPosLlloTS2,TableHeadings->{IAMLabellloTS2,tableHead}]]

L1

Optics

opticPosL1L=Table[0,{nOpticsL1}];
opticOrientL1L=opticPosL1L;

Do[
	opticPosL1L[[i]]=opticPosL1G[[i]].Rlc //N;
	opticOrientL1L[[i]] = opticOrientL1G[[i]].Rlc //N;
	If[Abs[opticOrientL1L[[i]].opticOrientL1L[[i]]-1]> 10^-15, Print["error"],],
	{i,nOpticsL1-2}];

opticPosL1L[[nOpticsL1-1]]=opticPosL1G[[nOpticsL1-1]].Rlxe //N;
opticOrientL1L[[nOpticsL1-1]] = opticOrientL1G[[nOpticsL1-1]].Rlxe //N;
If[Abs[opticOrientL1L[[nOpticsL1-1]].opticOrientL1L[[nOpticsL1-1]]-1]> 10^-15, Print["error"],];

opticPosL1L[[nOpticsL1]]=opticPosL1G[[nOpticsL1]].Rlye //N;
opticOrientL1L[[nOpticsL1]] = opticOrientL1G[[nOpticsL1]].Rlye //N;
If[Abs[opticOrientL1L[[nOpticsL1]].opticOrientL1L[[nOpticsL1]]-1]> 10^-15, Print["error"],];

tableHead={"Xl","Yl","Zl","Ul","Vl","Wl"};
Print[TableForm[Partition[Flatten[Transpose[{opticPosL1L,opticOrientL1L}]],6],TableHeadings->{opticLabelL1,tableHead}]]

Tables

Convert the global coordinates of the optics tables into the local coordinate system:

tablePosL1L=Table[0,{nTablesL1}];
Do[
	tablePosL1L[[i]]=tablePosL1G[[i]].Rlc //N,
	{i,nTablesL1}];
tableHead={"x_local","y_local","z_local"};
Print[TableForm[tablePosL1L,TableHeadings->{tableLabelL1,tableHead}]]

Chambers

.. Optic Pitch & Yaw Angles

... H1

The  pitch & yaw angles are determined for the optics

Uncorrected from Zemax

opticPitchRadianH1=Table[0,{nOpticsH1}];
opticPitchDegreeH1=opticPitchRadianH1;
opticPitchDMSH1=opticPitchRadianH1;
opticPitchDirectionH1=opticPitchRadianH1;
Do[
opticPitchRadianH1[[i]]=VectorAngle[opticOrientH1L[[i]],{opticOrientH1L[[i,1]],opticOrientH1L[[i,2]],0}];
If[opticOrientH1L[[i,3]]>0,opticPitchDirectionH1[[i]]="up",
If[opticOrientH1L[[i,3]]<0,opticPitchDirectionH1[[i]]="down",
opticPitchDirectionH1[[i]]=""]];
opticPitchDegreeH1[[i]]=opticPitchRadianH1[[i]] 180/Pi;
opticPitchDMSH1[[i]]=DMS[opticPitchRadianH1[[i]]],
{i,nOpticsH1}];

pitch table

tableHead={"Ul","Vl","Wl","Pitch","(rad)","(deg)","(deg)","(min)","(sec)"};
Print[TableForm[Partition[Flatten[N[Transpose[{opticOrientH1L,opticPitchDirectionH1,opticPitchRadianH1,opticPitchDegreeH1,opticPitchDMSH1}],3]],9],TableHeadings->{opticLabelH1,tableHead}]]

yaw table

tableHead={"Ul","Vl","Wl","Yaw","(rad)","(deg)","(deg)","(min)","(sec)"};
Print[TableForm[Partition[Flatten[N[Transpose[{opticOrientH1L,opticYawDirectionH1,opticYawRadianH1,opticYawDegreeH1,opticYawDMSH1}],3]],9],TableHeadings->{opticLabelH1,tableHead}]]

... H2

The H@ interferometer will not be installed for aLIGO.

... L1

The  pitch angle is determined for hanging the optics on the bench:

opticPitchRadianL1=Table[0,{nOpticsL1}];
opticPitchDegreeL1=opticPitchRadianL1;
opticPitchDMSL1=opticPitchRadianL1;
opticPitchDirectionL1=opticPitchRadianL1;
Do[
opticPitchRadianL1[[i]]=VectorAngle[opticOrientL1L[[i]],{opticOrientL1L[[i,1]],opticOrientL1L[[i,2]],0}];
If[opticOrientL1L[[i,3]]>0,opticPitchDirectionL1[[i]]="up",
If[opticOrientL1L[[i,3]]<0,opticPitchDirectionL1[[i]]="down",
opticPitchDirectionL1[[i]]=""]];
opticPitchDegreeL1[[i]]=opticPitchRadianL1[[i]] 180/Pi;
opticPitchDMSL1[[i]]=DMS[opticPitchRadianL1[[i]]],
{i,nOpticsL1}];

The convention for the yaw angle is to give a value relative to the nearest Pi/2 direction. So the yaw angles are always <= 45 deg. In addition the sign is set to positive and a “left” or “right” direciton is noted. The direction is stated for an ‘upright’ person (i.e. a person with their head up and feet down) looking along the nearest Pi/2 cardinal direction (i.e. +X, +Y, -X or -Y direction). A “left direction means that the outward facing normal vector to the surface is then to the left of this observer.

opticYawRadianL1=Table[0,{nOpticsL1}];
opticYawDegreeL1=opticPitchRadianL1;
opticYawDMSL1=opticPitchRadianL1;
opticYawDirectionL1=opticPitchRadianL1;
Do[
opticYawRadianL1[[i]]=VectorAngle[{opticOrientL1L[[i,1]],opticOrientL1L[[i,2]],0},{1,0,0}];
opticYawRadianL1[[i]]=Abs[opticYawRadianL1[[i]]-Round[opticYawRadianL1[[i]],Pi/2]];
If[opticOrientL1L[[i,1]]>0,
If[opticOrientL1L[[i,2]]>0,
If[Abs[opticOrientL1L[[i,1]]]>Abs[opticOrientL1L[[i,2]]],opticYawDirectionL1[[i]]="left",opticYawDirectionL1[[i]]="right"],
If[Abs[opticOrientL1L[[i,1]]]>Abs[opticOrientL1L[[i,2]]],opticYawDirectionL1[[i]]="right",opticYawDirectionL1[[i]]="left"]],
If[opticOrientL1L[[i,2]]>0,
If[Abs[opticOrientL1L[[i,1]]]>Abs[opticOrientL1L[[i,2]]],opticYawDirectionL1[[i]]="right",opticYawDirectionL1[[i]]="left"],
If[Abs[opticOrientL1L[[i,1]]]>Abs[opticOrientL1L[[i,2]]],opticYawDirectionL1[[i]]="left",opticYawDirectionL1[[i]]="right"]]];
opticYawDegreeL1[[i]]=opticYawRadianL1[[i]] 180/Pi;
opticYawDMSL1[[i]]=DMS[opticYawRadianL1[[i]]],
{i,nOpticsL1}];

pitch table

tableHead={"Ul","Vl","Wl","Pitch","(rad)","(deg)","(deg)","(min)","(sec)"};
Print[TableForm[Partition[Flatten[N[Transpose[{opticOrientL1L,opticPitchDirectionL1,opticPitchRadianL1,opticPitchDegreeL1,opticPitchDMSL1}],3]],9],TableHeadings->{opticLabelL1,tableHead}]]

yaw table

The convention for the yaw angle is to give a value relative to the nearest Pi/2 direction. So the yaw angles are always <= 45 deg. In addition the sign is set to positive and a “left” or “right” direciton is noted. The direction is stated for an ‘upright’ person (i.e. a person with their head up and feet down) looking along the nearest Pi/2 cardinal direction (i.e. +X, +Y, -X or -Y direction). A “left direction means that the outward facing normal vector to the surface is then to the left of this observer.

tableHead={"Ul","Vl","Wl","Yaw","(rad)","(deg)","(deg)","(min)","(sec)"};
Print[TableForm[Partition[Flatten[N[Transpose[{opticOrientL1L,opticYawDirectionL1,opticYawRadianL1,opticYawDegreeL1,opticYawDMSL1}],3]],9],TableHeadings->{opticLabelL1,tableHead}]]

.. Intialization

L1

nAlignOpticsL1=2*nOpticsL1;
theoYawL1=Table[0,{nAlignOpticsL1}];
theoPitchL1=theoYawL1;
theoDistanceL1=theoYawL1;
theoOrientL1=Table[0,{nAlignOpticsL1},{3}];
theoPosL1=theoOrientL1;
iIAMOptSqL1=Table[1,{nAlignOpticsL1}];
iIAMOptSqRefL1=iIAMOptSqL1;
iIAMtheoL1=iIAMOptSqL1;
iIAMtheoRefL1=iIAMOptSqL1;
LTHRL1=Table["",{nAlignOpticsL1}];
LTHPL1=LTHRL1;

formatLLOAlignTable[il_,ih_]:=Grid[Flatten[{{{"Alignment",SpanFromLeft,SpanFromLeft,SpanFromLeft,"Transit Square",SpanFromLeft,SpanFromLeft,SpanFromLeft,SpanFromLeft,SpanFromLeft,"Total Station",SpanFromLeft,SpanFromLeft,SpanFromLeft,SpanFromLeft,SpanFromLeft,SpanFromLeft,SpanFromLeft,SpanFromLeft,SpanFromLeft,SpanFromLeft,SpanFromLeft,SpanFromLeft,SpanFromLeft,"PLX",SpanFromLeft},\
{"Name","Local Coordinates\n(mm)",SpanFromLeft,SpanFromLeft,"Over Monument\n(mm)",SpanFromLeft,SpanFromLeft,"Sights Monument\n(mm)",SpanFromLeft,SpanFromLeft,"Over Monument\n(mm)",SpanFromLeft,SpanFromLeft,SpanFromLeft,"Sights Monument\n(mm)",SpanFromLeft,SpanFromLeft,"Distance\n(mm)","Yaw",SpanFromLeft,SpanFromLeft,"Pitch",SpanFromLeft,SpanFromLeft,"LTHR","LTHP"},{SpanFromAbove,"Xl","Yl","Zl","Name","Xl","Yl","Name","Xl","Yl","Name","Xl","Yl","Zl","Name","Xl","Yl",SpanFromAbove,"deg","min","sec","deg","min","sec",SpanFromAbove,SpanFromAbove}},\
Table[{alignLabelL1[[i]],NumberForm[alignOpticPosL1L[[i,1]],{10,1}],NumberForm[alignOpticPosL1L[[i,2]],{10,1}],NumberForm[alignOpticPosL1L[[i,3]],{10,1}],\
If[iIAMOptSqL1[[i]]!="NA",IAMllo[[iIAMOptSqL1[[i]],1]],"NA"],If[iIAMOptSqL1[[i]]!="NA",NumberForm[IAMllo[[iIAMOptSqL1[[i]],2]],{10,1}],""],If[iIAMOptSqL1[[i]]!="NA",NumberForm[IAMllo[[iIAMOptSqL1[[i]],3]],{10,1}],""],\
If[iIAMOptSqRefL1[[i]]!="NA",IAMllo[[iIAMOptSqRefL1[[i]],1]],"NA"],If[iIAMOptSqRefL1[[i]]!="NA",NumberForm[IAMllo[[iIAMOptSqRefL1[[i]],2]],{10,1}],""],If[iIAMOptSqRefL1[[i]]!="NA",NumberForm[IAMllo[[iIAMOptSqRefL1[[i]],3]],{10,1}],""],\
If[iIAMtheoL1[[i]]≠"NA",IAMllo[[iIAMtheoL1[[i]],1]],"NA"],If[iIAMtheoL1[[i]]≠"NA",NumberForm[IAMllo[[iIAMtheoL1[[i]],2]],{10,1}],""],If[iIAMtheoL1[[i]]≠"NA",NumberForm[IAMllo[[iIAMtheoL1[[i]],3]],{10,1}],""],If[iIAMtheoL1[[i]]≠"NA",NumberForm[theoPosL1[[i,3]],{10,1}],""],\
If[iIAMtheoRefL1[[i]]!="NA",IAMllo[[iIAMtheoRefL1[[i]],1]],"NA"],If[iIAMtheoRefL1[[i]]!="NA",NumberForm[IAMllo[[iIAMtheoRefL1[[i]],2]],{10,1}],""],If[iIAMtheoRefL1[[i]]!="NA",NumberForm[IAMllo[[iIAMtheoRefL1[[i]],3]],{10,1}],""],\
NumberForm[theoDistanceL1[[i]],{10,1}],NumberForm[DMS[theoYawL1[[i]] Pi/180][[1]],{10,0}],NumberForm[DMS[theoYawL1[[i]] Pi/180][[2]],{10,0}],NumberForm[DMS[theoYawL1[[i]] Pi/180][[3]],{10,0}],NumberForm[DMS[theoPitchL1[[i]] Pi/180][[1]],{10,0}],NumberForm[DMS[theoPitchL1[[i]] Pi/180][[2]],{10,0}],NumberForm[DMS[theoPitchL1[[i]] Pi/180][[3]],{10,0}],\
LTHRL1[[i]],LTHPL1[[i]]},{i,il,ih}]},1],Frame->All];

H1

nAlignOpticsH1=2*nOpticsH1;
theoYawH1=Table[0,{nAlignOpticsH1}];
theoPitchH1=theoYawH1;
theoDistanceH1=theoYawH1;
theoOrientH1=Table[0,{nAlignOpticsH1},{3}];
theoPosH1=theoOrientH1;
iIAMOptSqH1=Table[1,{nAlignOpticsH1}];
iIAMOptSqRefH1=iIAMOptSqH1;
iIAMtheoH1=iIAMOptSqH1;
iIAMtheoRefH1=iIAMOptSqH1;
LTHRH1=Table["",{nAlignOpticsH1}];
LTHPH1=LTHRH1;

formatLHOAlignTable[il_,ih_]:=Grid[Flatten[{{{"Alignment",SpanFromLeft,SpanFromLeft,SpanFromLeft,"Transit Square",SpanFromLeft,SpanFromLeft,SpanFromLeft,SpanFromLeft,SpanFromLeft,"Total Station",SpanFromLeft,SpanFromLeft,SpanFromLeft,SpanFromLeft,SpanFromLeft,SpanFromLeft,SpanFromLeft,SpanFromLeft,SpanFromLeft,SpanFromLeft,SpanFromLeft,SpanFromLeft,SpanFromLeft,"PLX",SpanFromLeft},\
{"Name","Local Coordinates\n(mm)",SpanFromLeft,SpanFromLeft,"Over Monument\n(mm)",SpanFromLeft,SpanFromLeft,"Sights Monument\n(mm)",SpanFromLeft,SpanFromLeft,"Over Monument\n(mm)",SpanFromLeft,SpanFromLeft,SpanFromLeft,"Sights Monument\n(mm)",SpanFromLeft,SpanFromLeft,"Distance\n(mm)","Yaw",SpanFromLeft,SpanFromLeft,"Pitch",SpanFromLeft,SpanFromLeft,"LTHR","LTHP"},{SpanFromAbove,"Xl","Yl","Zl","Name","Xl","Yl","Name","Xl","Yl","Name","Xl","Yl","Zl","Name","Xl","Yl",SpanFromAbove,"deg","min","sec","deg","min","sec",SpanFromAbove,SpanFromAbove}},\
Table[{alignLabelH1[[i]],NumberForm[alignOpticPosH1L[[i,1]],{10,1}],NumberForm[alignOpticPosH1L[[i,2]],{10,1}],NumberForm[alignOpticPosH1L[[i,3]],{10,1}],\
If[iIAMOptSqH1[[i]]!="NA",IAMlho[[iIAMOptSqH1[[i]],1]],"NA"],If[iIAMOptSqH1[[i]]!="NA",NumberForm[IAMlho[[iIAMOptSqH1[[i]],2]],{10,1}],""],If[iIAMOptSqH1[[i]]!="NA",NumberForm[IAMlho[[iIAMOptSqH1[[i]],3]],{10,1}],""],\
If[iIAMOptSqRefH1[[i]]!="NA",IAMlho[[iIAMOptSqRefH1[[i]],1]],"NA"],If[iIAMOptSqRefH1[[i]]!="NA",NumberForm[IAMlho[[iIAMOptSqRefH1[[i]],2]],{10,1}],""],If[iIAMOptSqRefH1[[i]]!="NA",NumberForm[IAMlho[[iIAMOptSqRefH1[[i]],3]],{10,1}],""],\
If[iIAMtheoH1[[i]]≠"NA",IAMlho[[iIAMtheoH1[[i]],1]],"NA"],If[iIAMtheoH1[[i]]≠"NA",NumberForm[IAMlho[[iIAMtheoH1[[i]],2]],{10,1}],""],If[iIAMtheoH1[[i]]≠"NA",NumberForm[IAMlho[[iIAMtheoH1[[i]],3]],{10,1}],""],If[iIAMtheoH1[[i]]≠"NA",NumberForm[theoPosH1[[i,3]],{10,1}],""],\
If[iIAMtheoRefH1[[i]]!="NA",IAMlho[[iIAMtheoRefH1[[i]],1]],"NA"],If[iIAMtheoRefH1[[i]]!="NA",NumberForm[IAMlho[[iIAMtheoRefH1[[i]],2]],{10,1}],""],If[iIAMtheoRefH1[[i]]!="NA",NumberForm[IAMlho[[iIAMtheoRefH1[[i]],3]],{10,1}],""],\
NumberForm[theoDistanceH1[[i]],{10,1}],NumberForm[DMS[theoYawH1[[i]] Pi/180][[1]],{10,0}],NumberForm[DMS[theoYawH1[[i]] Pi/180][[2]],{10,0}],NumberForm[DMS[theoYawH1[[i]] Pi/180][[3]],{10,0}],NumberForm[DMS[theoPitchH1[[i]] Pi/180][[1]],{10,0}],NumberForm[DMS[theoPitchH1[[i]] Pi/180][[2]],{10,0}],NumberForm[DMS[theoPitchH1[[i]] Pi/180][[3]],{10,0}],\
LTHRH1[[i]],LTHPH1[[i]]},{i,il,ih}]},1],Frame->All];

.. H1

... Alignment Solution List

Each alignment solution is given as a single row in a table associated with an optic. Some optics require more than one alignment solution. For example, one solution for angular alignment and one for positional alignment. In order to accomplish this the optics list is augmented with additional entries. Not an elegant approach, but workable. Start by alternately listing {x,y,z} and {q,y} solutions, then tweak as needed.

alignLabelH1=Table[0,{2*nOpticsH1}];
alignOpticPosH1L=Table[0,{2*nOpticsH1},{3}];
alignOpticOrientH1L=alignOpticPosH1L;
Do[
j=Floor[(i+1)/2];
alignLabelH1[[i]]=StringJoin[opticLabelH1[[j]],If[EvenQ[i]," q,y"," x,y,z"]];
alignOpticPosH1L[[i]]=opticPosH1L[[j]];
alignOpticOrientH1L[[i]]=opticOrientH1L[[j]];
,{i,1,2*nOpticsH1}]

The BS has 4 cartridge alignment solutions and 3 chamber alignment solutions. Only one of the “BS HR q,y” or “BS AR q,y” solutions is needed; Both are listed just in case one return is weak.

alignLabelH1[[7]]="TS BS&ARellpBaf x,y,z";
alignLabelH1[[8]]="TS BS HR q,y";
alignLabelH1[[9]]="TS BS AR q,y";
alignLabelH1[[10]]="TS BS HRellpBaf x,y,z";
alignOpticPosH1L[[7]]=opticPosH1L[[5]];
alignOpticPosH1L[[8]]=opticPosH1L[[4]];
alignOpticPosH1L[[9]]=opticPosH1L[[5]];
alignOpticPosH1L[[10]]=opticPosH1L[[4]];
alignOpticOrientH1L[[7]]=opticOrientH1L[[5]];
alignOpticOrientH1L[[8]]=opticOrientH1L[[4]];
alignOpticOrientH1L[[9]]=opticOrientH1L[[5]];
alignOpticOrientH1L[[10]]=opticOrientH1L[[4]];

Rotate the BS optic coordinates 90 deg to reflect the fact that TS#2 is rotated relative to WBSC2

Do[alignOpticPosH1L[[i]]=RotationMatrix3D[Pi/2,0,0].alignOpticPosH1L[[i]];alignOpticOrientH1L[[i]]=RotationMatrix3D[Pi/2,0,0].alignOpticOrientH1L[[i]],{i,7,10}]

The BS has 3 chamber alignment solutions.

alignLabelH1=Insert[alignLabelH1,"BS HR&ITMellpBafs x,y,z",11];
alignLabelH1=Insert[alignLabelH1,"BS HR q,y",12];
alignLabelH1=Insert[alignLabelH1,"BS AR q,y",13];

alignOpticPosH1L=Join[Take[alignOpticPosH1L,10],{opticPosH1L[[4]]},{opticPosH1L[[4]]},{opticPosH1L[[5]]},Take[alignOpticPosH1L,{11,2*nOpticsH1}]];
alignOpticOrientH1L=Join[Take[alignOpticOrientH1L,10],{alignOpticOrientH1L[[4]]},{alignOpticOrientH1L[[4]]},{alignOpticOrientH1L[[5]]},Take[alignOpticOrientH1L,{11,2*nOpticsH1}]];

tableHead={"Xl","Yl","Zl","Ul","Vl","Wl"};
Print[TableForm[Partition[Flatten[Transpose[{alignOpticPosH1L,alignOpticOrientH1L}]],6],TableHeadings->{alignLabelH1,tableHead}]]

nAlignsH1=Length[alignLabelH1];
nAlignOpticsH1=2*nOpticsH1;
theoYawH1=Table[0,{nAlignsH1}];
theoPitchH1=theoYawH1;
theoDistanceH1=theoYawH1;
theoOrientH1=Table[0,{nAlignsH1},{3}];
theoPosH1=theoOrientH1;
iIAMOptSqH1=Table["NA",{nAlignsH1}];
iIAMOptSqRefH1=iIAMOptSqH1;
iIAMtheoH1=iIAMOptSqH1;
iIAMtheoRefH1=iIAMOptSqH1;
LTHRH1=Table["",{nAlignsH1}];
LTHPH1=LTHRH1;

... PRM Alignment

Angular Alignment (q, y)
A direct view perpendicular to the center of PRM is not possible from the region of the spool between HAM3 and BSC2, due to the PR2 suspension blocking the view. Consequently a periscope (PLX LTHP) is used
Derive yaw reference from sight line from "LV26" to "LV25" (parallel to X-axis) with Bruson Optical Square
Derive a reference line to sight/locate new monuments on the “survey pipe bridge table”, in the region between HAM3 and BSC2, using “LV20” and “LV22” (parallel to the Y axis) with the Total Station.
Place Theodolite/Total Station over new monument "am 500" which is placed at same X location as "LV20" and "LV22" but along normal vector to PRM, translated by the PLX LTHP
The PLX LTHP is placed in the spool to the -X side of HAM3

calculations

ialign=2;
alignLabelH1[[ialign]]

theoOrientH1[[ialign]]=-alignOpticOrientH1L[[ialign]];

iIAMOptSqH1[[ialign]]=52;
IAMlho[[iIAMOptSqH1[[ialign]]]]

iIAMOptSqRefH1[[ialign]]=51;
IAMlho[[iIAMOptSqRefH1[[ialign]]]]

Approximate position of the LTHP (in the spool to the -X side of the HAM3 chamber, but before the MC Baffle):

LTHPH1[[ialign]]="Y";
LTHPorient=Append[LTHPlength RotationMatrix[Pi/2].alignOpticOrientH1L[[ialign,1;;2]],0];
LTHPPosInX=-5550;
s=(LTHPPosInX-alignOpticPosH1L[[ialign,1]])/alignOpticOrientH1L[[ialign,1]];
LTHPPosIn=alignOpticPosH1L[[ialign]]+s alignOpticOrientH1L[[ialign]];
LTHPPosOut=LTHPPosIn+LTHPorient;

d=(IAMPosLlho[[iIAMOptSqH1[[ialign]],1]]-alignOpticPosH1L[[ialign,1]]-LTHPorient[[1]])/alignOpticOrientH1L[[ialign,1]];
theoPosH1[[ialign]]=alignOpticPosH1L[[ialign]]+d alignOpticOrientH1L[[ialign]]+LTHPorient;
d1=alignOpticPosH1L[[ialign]]-LTHPPosIn;
d2=LTHPorient;
d3=LTHPPosIn+LTHPorient-theoPosH1[[ialign]];
theoDistanceH1[[ialign]]=Sqrt[d1.d1]+Sqrt[d2.d2]+Sqrt[d3.d3];

IAMlho=Append[IAMlho,Flatten[{"LHO AM 500",theoPosH1[[ialign,1;;2]]}]];
iIAMtheoH1[[ialign]]=Length[IAMlho];
Flatten[{"LHO AM 500",theoPosH1[[ialign,1;;2]]}]

iIAMtheoRefH1[[ialign]]=48;
IAMlho[[iIAMtheoRefH1[[ialign]]]]

zeroYawReference=IAMlho[[iIAMOptSqH1[[ialign]],2;;3]]-IAMlho[[iIAMtheoH1[[ialign]],2;;3]];
theoYawH1[[ialign]]=VectorAngle[theoOrientH1[[ialign,1;;2]],zeroYawReference] 180/Pi

theoPitchH1[[ialign]]=theoOrientH1[[ialign,3]] 180/Pi

data={alignOpticPosH1L[[ialign,1;;2]],IAMlho[[iIAMOptSqH1[[ialign]],2;;3]],IAMlho[[iIAMOptSqRefH1[[ialign]],2;;3]],IAMlho[[iIAMtheoH1[[ialign]],2;;3]],IAMlho[[iIAMtheoRefH1[[ialign]],2;;3]],LTHPPosIn[[1;;2]],LTHPPosOut[[1;;2]]};
dataPlot=ListPlot[data,PlotStyle->PointSize->Large];
labels={alignLabelH1[[ialign]],"OptSq","OptSq Ref","TS","TS Ref","LTHP In","LTHP Out"};
PointLabels=Table[Text[labels[[i]],data[[i]]+{500,1000}],{i,1,Length[labels]}];

results

Show[dataPlot,Graphics[{Red,PointLabels}],AspectRatio->1,PlotRange->{{-25000,2000},All}]

formatLHOAlignTable[ialign,ialign]

Position Alignment (x,y,z)

Set the Total Station/Theodolite at y = 0 for a clear sight to PRM HR center -- add this as monument “LHO AM 501”

calculations

ialign=1;
alignLabelH1[[ialign]]

iIAMOptSqH1[[ialign]]=52;
IAMlho[[iIAMOptSqH1[[ialign]]]]

iIAMOptSqRefH1[[ialign]]=51;
IAMlho[[iIAMOptSqRefH1[[ialign]]]]

theoPosH1[[ialign]]={IAMlho[[iIAMOptSqH1[[ialign]],2]],0,alignOpticPosH1L[[ialign,3]]};
IAMlho=Append[IAMlho,Flatten[{"LHO AM 501",theoPosH1[[ialign,1;;2]]}]];
iIAMtheoH1[[ialign]]=Length[IAMlho];
Flatten[{"LHO AM 501",theoPosH1[[ialign,1;;2]]}]

d=alignOpticPosH1L[[ialign]]-theoPosH1[[ialign]];
theoDistanceH1[[ialign]]=Sqrt[d.d];
theoOrientH1[[ialign]]=d/theoDistanceH1[[ialign]]

iIAMtheoRefH1[[ialign]]=48;
IAMlho[[iIAMtheoRefH1[[ialign]]]]

zeroYawReference=IAMlho[[iIAMOptSqH1[[ialign]],2;;3]]-IAMlho[[iIAMtheoH1[[ialign]],2;;3]];
theoYawH1[[ialign]]=VectorAngle[theoOrientH1[[ialign,1;;2]],zeroYawReference] 180/Pi

theoPitchH1[[ialign]]=theoOrientH1[[ialign,3]] 180/Pi

data={alignOpticPosH1L[[ialign,1;;2]],IAMlho[[iIAMOptSqH1[[ialign]],2;;3]],IAMlho[[iIAMOptSqRefH1[[ialign]],2;;3]],IAMlho[[iIAMtheoH1[[ialign]],2;;3]],IAMlho[[iIAMtheoRefH1[[ialign]],2;;3]]};
dataPlot=ListPlot[data,PlotStyle->PointSize->Large,PlotRange->All];
labels={alignLabelH1[[ialign]],"OptSq","OptSq Ref","TS","TS Ref"};
PointLabels=Table[Text[labels[[i]],data[[i]]],{i,1,Length[labels]}];

results

Show[dataPlot,Graphics[{Red,PointLabels}],AspectRatio->1,PlotRange->{{-25000,5000},{-30000,2000}}]

formatLHOAlignTable[ialign,ialign]

... PR2 Alignment

Angular Alignment (q, y)

A direct view perpendicular to the center of PR2, from the region of the spool between HAM3 and BSC2, is possible with the use of an extended retro-reflector (PLX LTHR)

Derive yaw reference from sight line from "LV26" to "LV25" (parrallel to X-axis) with Bruson Optical Square
Place Theodolite/Total Station over new monument "LHO AM 502" which is placed at same X location as "LV26" but along normal vector to PR2, translated by the PLX LTHR
The PLX LTHR is placed in the spool to the -X side of HAM3

calculations

ialign=4;
alignLabelH1[[ialign]]

theoOrientH1[[ialign]]=alignOpticOrientH1L[[ialign]];

iIAMOptSqH1[[ialign]]=52;
IAMlho[[iIAMOptSqH1[[ialign]]]]

iIAMOptSqRefH1[[ialign]]=51;
IAMlho[[iIAMOptSqRefH1[[ialign]]]]

Approximate position of the LTHR (in the spool to the -X side of the HAM3 chamber, but before the MC Baffle):

LTHRH1[[ialign]]="Y";
LTHRorient=Append[LTHRlength RotationMatrix[-Pi/2].alignOpticOrientH1L[[ialign,1;;2]],0]
LTHRPosInX=-5550;
s=(LTHRPosInX-alignOpticPosH1L[[ialign,1]])/alignOpticOrientH1L[[ialign,1]];
LTHRPosIn=alignOpticPosH1L[[ialign]]+s alignOpticOrientH1L[[ialign]]
LTHRPosOut=LTHRPosIn+LTHRorient

d=(IAMPosLlho[[iIAMOptSqH1[[ialign]],1]]-alignOpticPosH1L[[ialign,1]]-LTHRorient[[1]])/alignOpticOrientH1L[[ialign,1]];
theoPosH1[[ialign]]=alignOpticPosH1L[[ialign]]+d alignOpticOrientH1L[[ialign]]+LTHRorient;
d1=alignOpticPosH1L[[ialign]]-LTHRPosIn;
d2=LTHRorient;
d3=LTHRPosIn+LTHRorient-theoPosH1[[ialign]];
theoDistanceH1[[ialign]]=Sqrt[d1.d1]+Sqrt[d2.d2]+Sqrt[d3.d3];

IAMlho=Append[IAMlho,Flatten[{"LHO AM 502",theoPosH1[[ialign,1;;2]]}]];
iIAMtheoH1[[ialign]]=Length[IAMlho];
Flatten[{"LHO AM 502",theoPosH1[[ialign,1;;2]]}]

iIAMtheoRefH1[[ialign]]=48;
IAMlho[[iIAMtheoRefH1[[ialign]]]]

zeroYawReference=IAMlho[[iIAMOptSqH1[[ialign]],2;;3]]-IAMlho[[iIAMtheoH1[[ialign]],2;;3]];
theoYawH1[[ialign]]=VectorAngle[theoOrientH1[[ialign,1;;2]],zeroYawReference] 180/Pi

theoPitchH1[[ialign]]=theoOrientH1[[ialign,3]] 180/Pi

data={alignOpticPosH1L[[ialign,1;;2]],IAMlho[[iIAMOptSqH1[[ialign]],2;;3]],IAMlho[[iIAMOptSqRefH1[[ialign]],2;;3]],IAMlho[[iIAMtheoH1[[ialign]],2;;3]],IAMlho[[iIAMtheoRefH1[[ialign]],2;;3]],LTHPPosIn[[1;;2]],LTHPPosOut[[1;;2]]};
dataPlot=ListPlot[data,PlotStyle->PointSize->Large];
labels={alignLabelH1[[ialign]],"OptSq","OptSq Ref","TS","TS Ref","LTHP In","LTHP Out"};
PointLabels=Table[Text[labels[[i]],data[[i]]+{200,500}],{i,1,Length[labels]}];

results

Show[dataPlot,Graphics[{Red,PointLabels}],AspectRatio->1,PlotRange->{{-25000,5000},{-25000,5000}}]

formatLHOAlignTable[ialign,ialign]

Position Alignment (x,y,z)

Set the Total Station/Theodolite at the intersection of the PR2 HR normal vector (projected backwards) and the monument reference line x = -2133.6 mm

calculations

ialign=3;
alignLabelH1[[ialign]]

iIAMOptSqH1[[ialign]]=52;
IAMlho[[iIAMOptSqH1[[ialign]]]]

iIAMOptSqRefH1[[ialign]]=51;
IAMlho[[iIAMOptSqRefH1[[ialign]]]]

s=(IAMlho[[iIAMOptSqH1[[ialign]],2]]-alignOpticPosH1L[[ialign,1]])/alignOpticOrientH1L[[ialign,1]];
theoPosH1[[ialign]]=alignOpticPosH1L[[ialign]]+s alignOpticOrientH1L[[ialign]]

IAMlho=Append[IAMlho,Flatten[{"LHO AM 503",theoPosH1[[ialign,1;;2]]}]];
iIAMtheoH1[[ialign]]=Length[IAMlho];
Flatten[{"LHO AM 503",theoPosH1[[ialign,1;;2]]}]

d=alignOpticPosH1L[[ialign]]-theoPosH1[[ialign]];
theoDistanceH1[[ialign]]=Sqrt[d.d];
theoOrientH1[[ialign]]=d/theoDistanceH1[[ialign]];

iIAMtheoRefH1[[ialign]]=48;
IAMlho[[iIAMtheoRefH1[[ialign]]]]

zeroYawReference=IAMlho[[iIAMOptSqH1[[ialign]],2;;3]]-IAMlho[[iIAMtheoH1[[ialign]],2;;3]];
theoYawH1[[ialign]]=VectorAngle[theoOrientH1[[ialign,1;;2]],zeroYawReference] 180/Pi

theoPitchH1[[ialign]]=theoOrientH1[[ialign,3]] 180/Pi

data={alignOpticPosH1L[[ialign,1;;2]],IAMlho[[iIAMOptSqH1[[ialign]],2;;3]],IAMlho[[iIAMOptSqRefH1[[ialign]],2;;3]],IAMlho[[iIAMtheoH1[[ialign]],2;;3]],IAMlho[[iIAMtheoRefH1[[ialign]],2;;3]]};
dataPlot=ListPlot[data,PlotStyle->PointSize->Large,PlotRange->All];
labels={alignLabelH1[[ialign]],"OptSq","OptSq Ref","TS","TS Ref"};
PointLabels=Table[Text[labels[[i]],data[[i]]],{i,1,Length[labels]}];

results

Show[dataPlot,Graphics[{Red,PointLabels}],AspectRatio->1,PlotRange->{{-25000,5000},{-25000,5000}}]

formatLHOAlignTable[ialign,ialign]

... PR3 Alignment

Angular Alignment (q, y)

A direct view perpendicular to the center of PR3 is not possible from the region of the spool between HAM3 and BSC2, due to the PR2 suspension blocking the view. Consequently a periscope (PLX LTHP) is used

Derive yaw reference from sight line from "LV26" to "LV25" (parrallel to X-axis) with Bruson Optical Square
Place Theodolite/Total Station over new monument "LHO AM 504" which is placed at same X location as "LV22" but along normal vector to PR3, translated by the PLX LTHP
The PLX LTHP is placed in the spool to the -X side of HAM3

calculations

ialign=6;
alignLabelH1[[ialign]]

theoOrientH1[[ialign]]=-alignOpticOrientH1L[[ialign]];

iIAMOptSqH1[[ialign]]=52;
IAMlho[[iIAMOptSqH1[[ialign]]]]

iIAMOptSqRefH1[[ialign]]=51;
IAMlho[[iIAMOptSqRefH1[[ialign]]]]

Approximate position of the LTHP (in the spool to the -X side of the HAM3 chamber, but before the MC Baffle):

LTHPH1[[ialign]]="Y";
LTHPorient=Append[LTHPlength RotationMatrix[Pi/2].alignOpticOrientH1L[[ialign,1;;2]],0];
LTHPPosInX=-5550;
s=(LTHPPosInX-alignOpticPosH1L[[ialign,1]])/alignOpticOrientH1L[[ialign,1]];
LTHPPosIn=alignOpticPosH1L[[ialign]]+s alignOpticOrientH1L[[ialign]];
LTHPPosOut=LTHPPosIn+LTHPorient;

d=(IAMPosLlho[[iIAMOptSqH1[[ialign]],1]]-alignOpticPosH1L[[ialign,1]]-LTHPorient[[1]])/alignOpticOrientH1L[[ialign,1]];
theoPosH1[[ialign]]=alignOpticPosH1L[[ialign]]+d alignOpticOrientH1L[[ialign]]+LTHPorient;
d1=alignOpticPosH1L[[ialign]]-LTHPPosIn;
d2=LTHPorient;
d3=LTHPPosIn+LTHPorient-theoPosH1[[ialign]];
theoDistanceH1[[ialign]]=Sqrt[d1.d1]+Sqrt[d2.d2]+Sqrt[d3.d3];

IAMlho=Append[IAMlho,Flatten[{"LHO AM 504",theoPosH1[[ialign,1;;2]]}]];
iIAMtheoH1[[ialign]]=Length[IAMlho];
Flatten[{"LHO AM 504",theoPosH1[[ialign,1;;2]]}]

iIAMtheoRefH1[[ialign]]=48;
IAMlho[[iIAMtheoRefH1[[ialign]]]]

zeroYawReference=IAMlho[[iIAMOptSqH1[[ialign]],2;;3]]-IAMlho[[iIAMtheoH1[[ialign]],2;;3]];
theoYawH1[[ialign]]=VectorAngle[theoOrientH1[[ialign,1;;2]],zeroYawReference] 180/Pi

theoPitchH1[[ialign]]=theoOrientH1[[ialign,3]] 180/Pi

data={alignOpticPosH1L[[ialign,1;;2]],IAMlho[[iIAMOptSqH1[[ialign]],2;;3]],IAMlho[[iIAMOptSqRefH1[[ialign]],2;;3]],IAMlho[[iIAMtheoH1[[ialign]],2;;3]],IAMlho[[iIAMtheoRefH1[[ialign]],2;;3]],LTHPPosIn[[1;;2]],LTHPPosOut[[1;;2]]};
dataPlot=ListPlot[data,PlotStyle->PointSize->Large];
labels={alignLabelH1[[ialign]],"OptSq","OptSq Ref","TS","TS Ref","LTHP In","LTHP Out"};
PointLabels=Table[Text[labels[[i]],data[[i]]+{500,1000}],{i,1,Length[labels]}];

results

Show[dataPlot,Graphics[{Red,PointLabels}],AspectRatio->1,PlotRange->{{-25000,5000},All}]

formatLHOAlignTable[ialign,ialign]

Position Alignment (x,y,z)

Set the Total Station/Theodolite at y = 0 for a clear sight to PR3 HR center

calculations

ialign=5;
alignLabelH1[[ialign]]

iIAMOptSqH1[[ialign]]=52;
IAMlho[[iIAMOptSqH1[[ialign]]]]

iIAMOptSqRefH1[[ialign]]=51;
IAMlho[[iIAMOptSqRefH1[[ialign]]]]

theoPosH1[[ialign]]={IAMlho[[iIAMOptSqH1[[ialign]],2]],0,alignOpticPosH1L[[ialign,3]]};
IAMlho=Append[IAMlho,Flatten[{"LHO AM 505",theoPosH1[[ialign,1;;2]]}]];
iIAMtheoH1[[ialign]]=Length[IAMlho];
Flatten[{"LHO AM 505",theoPosH1[[ialign,1;;2]]}]

d=alignOpticPosH1L[[ialign]]-theoPosH1[[ialign]];
theoDistanceH1[[ialign]]=Sqrt[d.d]
theoOrientH1[[ialign]]=d/theoDistanceH1[[ialign]]

iIAMtheoRefH1[[ialign]]=48;
IAMlho[[iIAMtheoRefH1[[ialign]]]]

zeroYawReference=IAMlho[[iIAMOptSqH1[[ialign]],2;;3]]-IAMlho[[iIAMtheoH1[[ialign]],2;;3]];
theoYawH1[[ialign]]=VectorAngle[theoOrientH1[[ialign,1;;2]],zeroYawReference] 180/Pi

theoPitchH1[[ialign]]=theoOrientH1[[ialign,3]] 180/Pi

data={alignOpticPosH1L[[ialign,1;;2]],IAMlho[[iIAMOptSqH1[[ialign]],2;;3]],IAMlho[[iIAMOptSqRefH1[[ialign]],2;;3]],IAMlho[[iIAMtheoH1[[ialign]],2;;3]],IAMlho[[iIAMtheoRefH1[[ialign]],2;;3]]};
dataPlot=ListPlot[data,PlotStyle->PointSize->Large,PlotRange->All];
labels={alignLabelH1[[ialign]],"OptSq","OptSq Ref","TS","TS Ref"};
PointLabels=Table[Text[labels[[i]],data[[i]]],{i,1,Length[labels]}];

results

Show[dataPlot,Graphics[{Red,PointLabels}],AspectRatio->1,PlotRange->{{-25000,5000},{-30000,2000}}]

formatLHOAlignTable[ialign,ialign]

... PRC Alignment Summary

Table summarizing the alignment solutions for the Power Recycling Cavity (PRC) optics: PRM, PR2 and PR3

formatLHOAlignTable[1,6]

... BS Alignment

Cartridge

The BS is aligned on the cartridge while on Test Stand #2 at LHO.

The BS to be used for H1 is SN 06 which has a wedge angle of 0.076 deg

solution 1

ialign=7;
alignLabelH1[[ialign]]

Rotate the BS optic coordinates 90 deg to reflect the fact that TS#2 is rotated relative to WBSC2

BSARPos=alignOpticPosH1L[[ialign]]

BS wedge angle (deg) used in Zemax. Actual wedge angle for H1 BS-06 is 0.076 deg:

wedge=VectorAngle[alignOpticOrientH1L[[ialign]],-alignOpticOrientH1L[[ialign+1]]] 180/Pi

BSHROrient=alignOpticOrientH1L[[ialign+1]]

BSAROrient=alignOpticOrientH1L[[ialign]]

iIAMOptSqRefH1[[ialign]]=16;
IAMlhoTS2[[iIAMOptSqRefH1[[ialign]]]]

iIAMOptSqH1[[ialign]]=12;
IAMlhoTS2[[iIAMOptSqH1[[ialign]]]]

IAMlhoTS2[[iIAMOptSqH1[[ialign]],2]]

BSARPos[[1]]

Add a monument (TS2-18) along the TS2-11 to TS2-13 line and normal to the BS AR surface:

d=(IAMlhoTS2[[iIAMOptSqH1[[ialign]],2]]-BSARPos[[1]])/BSAROrient[[1]];
IAMlhoTS2=Append[IAMlhoTS2,Flatten[{"TS2-18",BSARPos+d BSAROrient}]];
iIAMtheoH1[[ialign]]=Length[IAMlhoTS2];
IAMlhoTS2[[iIAMtheoH1[[ialign]]]]

theoPosH1[[ialign]]=IAMlhoTS2[[iIAMtheoH1[[ialign]],2;;4]]

theoOrientH1[[ialign]]=-BSAROrient

Separation from LAC to BS AR surface (mm):

theoDistanceH1[[ialign]]=Sqrt[(theoPosH1[[ialign]]-BSARPos).(theoPosH1[[ialign]]-BSARPos)]

iIAMtheoRefH1[[ialign]]="NA";

IAMlhoTS2[[iIAMOptSqH1[[ialign]],2;;3]]
IAMlhoTS2[[iIAMtheoH1[[ialign]],2;;3]]

zeroYawReference=IAMlhoTS2[[iIAMOptSqH1[[ialign]],2;;3]]-IAMlhoTS2[[iIAMtheoH1[[ialign]],2;;3]];
theoYawH1[[ialign]]=VectorAngle[theoOrientH1[[ialign,1;;2]],zeroYawReference] 180/Pi

theoPitchH1[[ialign]]=theoOrientH1[[ialign,3]] 180/Pi

formatLHOAlignTable[ialign,ialign]

solution 2

ialign=8;
alignLabelH1[[ialign]]

Required beam separation from HR and AR surfaces so as not to get an erroneous laser autocollimator (LAC) reading is 32 mm. The beam divergence of the Newport LDS-vector LAC is 100 urad. Given a wedge angle of 0.070 deg (minimum wedge angle for any BS) and an index of refraction at 670 nm of ~1.456, the separation from the LAC to the BS AR surface must be at least ~9 m :

31/(1.456 (.070 Pi/180) 2-100 10^-6)

31.9/(1.456 (.070 Pi/180) 2)

So place a new TS2-19 monument along the X = 0 line (formed by TS2-10, at the center, and TS2-2):

IAMlhoTS2=Append[IAMlhoTS2,Flatten[{"TS2-19",0,9250/Sqrt[2]//N}]];
iIAMOptSqH1[[ialign]]=Length[IAMlhoTS2];
IAMlhoTS2[[iIAMOptSqH1[[ialign]]]]

iIAMOptSqRefH1[[ialign]]=10;
IAMlhoTS2[[iIAMOptSqRefH1[[ialign]]]]

alignOpticOrientH1L[[ialign]]

Add a monument (TS2-20) at the intersection of a line from TS2-19 which is normal to the line through TS2-19 and TS2-10 and a line normal to the BS HR surface, but displaced laterally by the LTHP:

LTHPH1[[ialign]]="Y";
LTHPorient=Append[LTHPlength RotationMatrix[Pi/2].alignOpticOrientH1L[[ialign,1;;2]],0];
LTHPPosInX=200;
s=(LTHPPosInX-alignOpticPosH1L[[ialign,1]])/alignOpticOrientH1L[[ialign,1]];
LTHPPosIn=alignOpticPosH1L[[ialign]]+s alignOpticOrientH1L[[ialign]];
LTHPPosOut=LTHPPosIn+LTHPorient;

d=(IAMlhoTS2[[iIAMOptSqH1[[ialign]],3]]-alignOpticPosH1L[[ialign,2]]-LTHPorient[[2]])/alignOpticOrientH1L[[ialign,2]];
theoPosH1[[ialign]]=alignOpticPosH1L[[ialign]]+d alignOpticOrientH1L[[ialign]]+LTHPorient;
d1=alignOpticPosH1L[[ialign]]-LTHPPosIn;
d2=LTHPorient;
d3=LTHPPosIn+LTHPorient-theoPosH1[[ialign]];
theoDistanceH1[[ialign]]=Sqrt[d1.d1]+Sqrt[d2.d2]+Sqrt[d3.d3]

IAMlhoTS2=Append[IAMlhoTS2,Flatten[{"TS2-20",theoPosH1[[ialign]]}]];
iIAMtheoH1[[ialign]]=Length[IAMlhoTS2];
IAMlhoTS2[[iIAMtheoH1[[ialign]]]]

theoPosH1[[ialign]]=IAMlhoTS2[[iIAMtheoH1[[ialign]],2;;4]]

theoOrientH1[[ialign]]=-BSHROrient

Calculate the angular separation between the beam reflected by the AR surface (after trasmission through the HR surface) and the beam reflected from the HR surface:

separationAngle=VectorAngle[Refract[Reflect[Refract[(1+10^-13)theoOrientH1[[ialign]],BSHROrient,1,1.456],BSAROrient],-BSHROrient,1.456,1],BSHROrient]

approximate calculation of this angle:

2 1.456 (wedge Pi/180)

Calculate the separation of the beam reflected from the BS AR surface, at the location of the Total Station:

BSthickness=59.88;
theoDistanceH1[[ialign]] separationAngle + BSthickness 2 wedge Pi/180

iIAMtheoRefH1[[ialign]]=Length[IAMlhoTS2]-1;

zeroYawReference=IAMlhoTS2[[iIAMOptSqH1[[ialign]],2;;3]]-IAMlhoTS2[[iIAMtheoH1[[ialign]],2;;3]];
theoYawH1[[ialign]]=VectorAngle[theoOrientH1[[ialign,1;;2]],zeroYawReference] 180/Pi

theoPitchH1[[ialign]]=theoOrientH1[[ialign,3]] 180/Pi

formatLHOAlignTable[ialign,ialign]

solution 3

In case the return beam intensity from the HR surface is too faint, add a monument (TS2-21) (near to monument (TS2-20)) at the intersection of a line at 90 deg from the line between TS2-19 and TS2-20 and a line along the retro-reflection from the BS AR surface through the BS HR surface, but displaced laterally by the LTHP:

ialign=9;
alignLabelH1[[ialign]]

iIAMOptSqRefH1[[ialign]]=10;
IAMlhoTS2[[iIAMOptSqRefH1[[ialign]]]]

Reverse the orientation of the AR surface since we are reflecting off the AR surface after trasmission through the BS:

theoOrientH1[[ialign]]=-Refract[-alignOpticOrientH1L[[ialign]],-BSHROrient,1.456,1]

Use the optic position for the previous alignment (align-1), i.e. the HR surface:

LTHPH1[[ialign]]="Y";
LTHPorient=Append[LTHPlength RotationMatrix[Pi/2].theoOrientH1[[ialign,1;;2]],0];
LTHPPosInX=200;
s=(LTHPPosInX-alignOpticPosH1L[[ialign-1,1]])/theoOrientH1[[ialign,1]];
LTHPPosIn=alignOpticPosH1L[[ialign-1]]+s theoOrientH1[[ialign]];
LTHPPosOut=LTHPPosIn+LTHPorient;

d=(IAMlhoTS2[[Length[IAMlhoTS2],2]]-alignOpticPosH1L[[ialign-1,1]]-LTHPorient[[1]])/theoOrientH1[[ialign,1]];
theoPosH1[[ialign]]=alignOpticPosH1L[[ialign-1]]+d theoOrientH1[[ialign]]+LTHPorient;
d1=alignOpticPosH1L[[ialign-1]]-LTHPPosIn;
d2=LTHPorient;
d3=LTHPPosIn+LTHPorient-theoPosH1[[ialign]];
theoDistanceH1[[ialign]]=Sqrt[d1.d1]+Sqrt[d2.d2]+Sqrt[d3.d3]

theoDistanceH1[[ialign]] separationAngle + BSthickness 2 wedge Pi/180

IAMlhoTS2=Append[IAMlhoTS2,Flatten[{"TS2-21",theoPosH1[[ialign]]}]];
iIAMtheoH1[[ialign]]=Length[IAMlhoTS2];
IAMlhoTS2[[iIAMtheoH1[[ialign]]]]

theoPosH1[[ialign]]=IAMlhoTS2[[iIAMtheoH1[[ialign]],2;;4]]

IAMlhoTS2=Append[IAMlhoTS2,Flatten[{"TS2-22",0,theoPosH1[[ialign,2]]}]];
iIAMtheoRefH1[[ialign]]=Length[IAMlhoTS2];
IAMlhoTS2[[iIAMtheoRefH1[[ialign]]]]

iIAMOptSqH1[[ialign]]=Length[IAMlhoTS2];
IAMlhoTS2[[iIAMOptSqH1[[ialign]]]]

zeroYawReference=IAMlhoTS2[[iIAMOptSqH1[[ialign]],2;;3]]-IAMlhoTS2[[iIAMtheoH1[[ialign]],2;;3]];
theoYawH1[[ialign]]=VectorAngle[theoOrientH1[[ialign,1;;2]],zeroYawReference] 180/Pi

theoPitchH1[[ialign]]=theoOrientH1[[ialign,3]] 180/Pi

formatLHOAlignTable[ialign,ialign]

solution 4

ialign=10;
alignLabelH1[[ialign]]

iIAMOptSqRefH1[[ialign]]="NA";
iIAMOptSqH1[[ialign]]="NA";

Add a monument, TS2-23, at the Y-coordinate of TS2-14, and the X-coordinate of the BS HR face:

IAMlhoTS2=Append[IAMlhoTS2,Flatten[{"TS2-23",alignOpticPosH1L[[ialign,1]],IAMlhoTS2[[14,3]]}]];
iIAMtheoH1[[ialign]]=Length[IAMlhoTS2];
IAMlhoTS2[[iIAMtheoH1[[ialign]]]]

theoPosH1[[ialign]]=Append[IAMlhoTS2[[iIAMtheoH1[[ialign]],2;;3]],alignOpticPosH1L[[ialign,3]]]

Add a monument, TS2-24, at the Y-coordinate of TS2-10, and the X-coordinate of the BS HR face:

IAMlhoTS2=Append[IAMlhoTS2,Flatten[{"TS2-24",alignOpticPosH1L[[ialign,1]],IAMlhoTS2[[10,3]]}]];
iIAMtheoRefH1[[ialign]]=Length[IAMlhoTS2];
IAMlhoTS2[[iIAMtheoRefH1[[ialign]]]]

theoOrientH1[[ialign]]={0,-1,0}

theoDistanceH1[[ialign]]=Sqrt[(theoPosH1[[ialign]]-alignOpticPosH1L[[ialign]]).(theoPosH1[[ialign]]-alignOpticPosH1L[[ialign]])]

theoYawH1[[ialign]]=0;
theoPitchH1[[ialign]]=0;

formatLHOAlignTable[ialign,ialign]

summary of BS cartridge solutions

formatLHOAlignTable[7,10]

Chamber

solution 1

Set the Total Station on the beam line path from the center of the BS to the center of PR3, looking at the center of the BS, in order to align the position (x, y, z) of the LBSC2 cartridge, using the HR Elliptical Baffle target (x, z) and the retro-reflector (y)

ialign=11;
alignLabelH1[[ialign]]

Dimensions[IAMlho]

iIAMOptSqH1[[ialign]]=52;
IAMlho[[iIAMOptSqH1[[ialign]]]]

iIAMOptSqRefH1[[ialign]]=51;
IAMlho[[iIAMOptSqRefH1[[ialign]]]]

IAMlho[[iIAMOptSqH1[[ialign]],2]]

s=(IAMlho[[iIAMOptSqH1[[ialign]],2]]-alignOpticPosH1L[[5,1]])/(alignOpticPosH1L[[ialign,1]]-alignOpticPosH1L[[5,1]]);
theoPosH1[[ialign]]=s (alignOpticPosH1L[[ialign]]-alignOpticPosH1L[[5]])+alignOpticPosH1L[[5]];
IAMlho=Append[IAMlho,Flatten[{"LHO AM 506",theoPosH1[[ialign,1;;2]]}]];
iIAMtheoH1[[ialign]]=Length[IAMlho];
Flatten[{"LHO AM 506",theoPosH1[[ialign,1;;2]]}]

alignOpticPosH1L[[ialign]]

theoPosH1[[ialign]]

d=alignOpticPosH1L[[ialign]]-theoPosH1[[ialign]];
theoDistanceH1[[ialign]]=Sqrt[d.d]
theoOrientH1[[ialign]]=d/theoDistanceH1[[ialign]]

iIAMtheoRefH1[[ialign]]=48;
IAMlho[[iIAMtheoRefH1[[ialign]]]]

zeroYawReference=IAMlho[[iIAMOptSqH1[[ialign]],2;;3]]-IAMlho[[iIAMtheoH1[[ialign]],2;;3]];
theoYawH1[[ialign]]=VectorAngle[theoOrientH1[[ialign,1;;2]],zeroYawReference] 180/Pi

theoPitchH1[[ialign]]=theoOrientH1[[ialign,3]] 180/Pi

data={alignOpticPosH1L[[ialign,1;;2]],IAMlho[[iIAMOptSqH1[[ialign]],2;;3]],IAMlho[[iIAMOptSqRefH1[[ialign]],2;;3]],IAMlho[[iIAMtheoH1[[ialign]],2;;3]],IAMlho[[iIAMtheoRefH1[[ialign]],2;;3]]};
dataPlot=ListPlot[data,PlotStyle->PointSize->Large,PlotRange->All];
labels={alignLabelH1[[ialign]],"OptSq","OptSq Ref","TS","TS Ref"};
PointLabels=Table[Text[labels[[i]],data[[i]]],{i,1,Length[labels]}];

Show[dataPlot,Graphics[{Red,PointLabels}],AspectRatio->1,PlotRange->{{-25000,5000},{-30000,2000}}]

formatLHOAlignTable[ialign,ialign]

solution 2

ialign=12;
alignLabelH1[[ialign]]

iIAMOptSqH1[[ialign]]=52;
IAMlho[[iIAMOptSqH1[[ialign]]]]

iIAMOptSqRefH1[[ialign]]=51;
IAMlho[[iIAMOptSqRefH1[[ialign]]]]

alignOpticOrientH1L[[ialign]]=opticOrientH1L[[4]];
theoOrientH1[[ialign]]=-alignOpticOrientH1L[[ialign]];

Approximate position of the LTHP (in the BSC2 chamber, in the -X direction from the BS):

LTHPH1[[ialign]]="Y";
LTHPorient=Append[LTHPlength RotationMatrix[Pi/2].alignOpticOrientH1L[[ialign,1;;2]],0];
LTHPPosInX=-1000;
s=(LTHPPosInX-alignOpticPosH1L[[ialign,1]])/alignOpticOrientH1L[[ialign,1]];
LTHPPosIn=alignOpticPosH1L[[ialign]]+s alignOpticOrientH1L[[ialign]];
LTHPPosOut=LTHPPosIn+LTHPorient;

d=(IAMPosLlho[[iIAMOptSqH1[[ialign]],1]]-alignOpticPosH1L[[ialign,1]]-LTHPorient[[1]])/alignOpticOrientH1L[[ialign,1]];
theoPosH1[[ialign]]=alignOpticPosH1L[[ialign]]+d alignOpticOrientH1L[[ialign]]+LTHPorient;
d1=alignOpticPosH1L[[ialign]]-LTHPPosIn;
d2=LTHPorient;
d3=LTHPPosIn+LTHPorient-theoPosH1[[ialign]];
theoDistanceH1[[ialign]]=Sqrt[d1.d1]+Sqrt[d2.d2]+Sqrt[d3.d3];

IAMlho=Append[IAMlho,Flatten[{"LHO AM 507",theoPosH1[[ialign,1;;2]]}]];
iIAMtheoH1[[ialign]]=Length[IAMlho];
Flatten[{"LHO AM 507",theoPosH1[[ialign,1;;2]]}]

iIAMtheoRefH1[[ialign]]=48;
IAMlho[[iIAMtheoRefH1[[ialign]]]]

zeroYawReference=IAMlho[[iIAMOptSqH1[[ialign]],2;;3]]-IAMlho[[iIAMtheoH1[[ialign]],2;;3]];
theoYawH1[[ialign]]=VectorAngle[theoOrientH1[[ialign,1;;2]],zeroYawReference] 180/Pi

theoPitchH1[[ialign]]=theoOrientH1[[ialign,3]] 180/Pi

data={alignOpticPosH1L[[ialign,1;;2]],IAMlho[[iIAMOptSqH1[[ialign]],2;;3]],IAMlho[[iIAMOptSqRefH1[[ialign]],2;;3]],IAMlho[[iIAMtheoH1[[ialign]],2;;3]],IAMlho[[iIAMtheoRefH1[[ialign]],2;;3]],LTHPPosIn[[1;;2]],LTHPPosOut[[1;;2]]};
dataPlot=ListPlot[data,PlotStyle->PointSize->Large];
labels={alignLabelH1[[ialign]],"OptSq","OptSq Ref","TS","TS Ref","LTHP In","LTHP Out"};
PointLabels=Table[Text[labels[[i]],data[[i]]+{500,1000}],{i,1,Length[labels]}];

Show[dataPlot,Graphics[{Red,PointLabels}],AspectRatio->1,PlotRange->{{-25000,2000},All}]

formatLHOAlignTable[ialign,ialign]

solution 3

ialign=13;
alignLabelH1[[ialign]]

SOLUTION NOT NEEDED -- REFLECTANCE FROM HR FACE IS SUFFICIENT

summary of BS chamber solutions

formatLHOAlignTable[11,13]

... SRM Alignment

... SR2 Alignment

... SR3 Alignment

... SRC Alignment Summary

... ITMx Alignment

... ITMy Alignment

... ETMx Alignment

... ETMy Alignment

... Summary of H1 Alignment Solutions

formatLHOAlignTable[1,nAlignsH1]

.. H2

H2 is not installed

.. L1

... Alignment Solution List

Each alignment solution is given as a single row in a table associated with an optic. Some optics require more than one alignment solution. For example, one solution for angular alignment and one for positional alignment. In order to accomplish this the optics list is augmented with additional entries. Not an elegant approach, but workable. Start by alternately listing {x,y,z} and {q,y} solutions, then tweak as needed.

alignLabelL1=Table[0,{2*nOpticsL1}];
alignOpticPosL1L=Table[0,{2*nOpticsL1},{3}];
alignOpticOrientL1L=alignOpticPosL1L;
Do[
j=Floor[(i+1)/2];
alignLabelL1[[i]]=StringJoin[opticLabelL1[[j]],If[EvenQ[i]," q,y"," x,y,z"]];
alignOpticPosL1L[[i]]=opticPosL1L[[j]];
alignOpticOrientL1L[[i]]=opticOrientL1L[[j]];
,{i,1,2*nOpticsL1}]

The BS has 4 cartridge alignment solutions and 3 chamber alignment solutions. Only one of the “BS HR q,y” or “BS AR q,y” solutions is needed; Both are listed just in case one return is weak.

alignLabelL1[[7]]="TS BS&ARellpBaf x,y,z";
alignLabelL1[[8]]="TS BS HR q,y";
alignLabelL1[[9]]="TS BS AR q,y";
alignLabelL1[[10]]="TS BS HRellpBaf x,y,z";
alignOpticPosL1L[[7]]=opticPosL1L[[5]];
alignOpticPosL1L[[8]]=opticPosL1L[[4]];
alignOpticPosL1L[[9]]=opticPosL1L[[5]];
alignOpticPosL1L[[10]]=opticPosL1L[[4]];
alignOpticOrientL1L[[7]]=opticOrientL1L[[5]];
alignOpticOrientL1L[[8]]=opticOrientL1L[[4]];
alignOpticOrientL1L[[9]]=opticOrientL1L[[5]];
alignOpticOrientL1L[[10]]=opticOrientL1L[[4]];

Rotate the BS optic coordinates 90 deg to reflect the fact that TS#1 is rotated relative to LBSC2

Do[alignOpticPosL1L[[i]]=RotationMatrix3D[Pi/2,0,0].alignOpticPosL1L[[i]];alignOpticOrientL1L[[i]]=RotationMatrix3D[Pi/2,0,0].alignOpticOrientL1L[[i]],{i,7,10}]

The BS has 3 chamber alignment solutions.

alignLabelL1=Insert[alignLabelL1,"BS HR&ITMellpBafs x,y,z",11];
alignLabelL1=Insert[alignLabelL1,"BS HR q,y",12];
alignLabelL1=Insert[alignLabelL1,"BS AR q,y",13];

alignOpticPosL1L=Join[Take[alignOpticPosL1L,10],{opticPosL1L[[4]]},{opticPosL1L[[4]]},{opticPosL1L[[5]]},Take[alignOpticPosL1L,{11,2*nOpticsL1}]];
alignOpticOrientL1L=Join[Take[alignOpticOrientL1L,10],{alignOpticOrientL1L[[4]]},{alignOpticOrientL1L[[4]]},{alignOpticOrientL1L[[5]]},Take[alignOpticOrientL1L,{11,2*nOpticsL1}]];

tableHead={"Xl","Yl","Zl","Ul","Vl","Wl"};
Print[TableForm[Partition[Flatten[Transpose[{alignOpticPosL1L,alignOpticOrientL1L}]],6],TableHeadings->{alignLabelL1,tableHead}]]

nAlignsL1=Length[alignLabelL1];
nAlignOpticsL1=2*nOpticsL1;
theoYawL1=Table[0,{nAlignsL1}];
theoPitchL1=theoYawL1;
theoDistanceL1=theoYawL1;
theoOrientL1=Table[0,{nAlignsL1},{3}];
theoPosL1=theoOrientL1;
iIAMOptSqL1=Table["NA",{nAlignsL1}];
iIAMOptSqRefL1=iIAMOptSqL1;
iIAMtheoL1=iIAMOptSqL1;
iIAMtheoRefL1=iIAMOptSqL1;
LTHRL1=Table["",{nAlignsL1}];
LTHPL1=LTHRL1;

... PRM Alignment

Angular Alignment (q, y)

A direct view perpendicular to the center of PRM is not possible from the region of the spool between HAM3 and BSC2, due to the PR2 suspension blocking the view. Consequently a periscope (PLX LTHP) is used

Derive yaw reference from sight line from "L1 IAM 378" to "L1 IAM 382" (parrallel to X-axis) with Bruson Optical Square
Place Theodolite/Total Station over new monument "am 503" which is placed at same X location as "L1 IAM 378" but along normal vector to PRM, translated by the PLX LTHP
The PLX LTHP is placed in the spool to the -X side of HAM3

calculations

ialign=2;
alignLabelL1[[ialign]]

theoOrientL1[[ialign]]=-alignOpticOrientL1L[[ialign]];

iIAMOptSqL1[[ialign]]=12;
IAMllo[[iIAMOptSqL1[[ialign]]]]

iIAMOptSqRefL1[[ialign]]=16;
IAMllo[[iIAMOptSqRefL1[[ialign]]]]

Approximate position of the LTHP (in the spool to the -X side of the HAM3 chamber, but before the MC Baffle):

LTHPL1[[ialign]]="Y";
LTHPorient=Append[LTHPlength RotationMatrix[Pi/2].alignOpticOrientL1L[[ialign,1;;2]],0];
LTHPPosInX=-5550;
s=(LTHPPosInX-alignOpticPosL1L[[ialign,1]])/alignOpticOrientL1L[[ialign,1]];
LTHPPosIn=alignOpticPosL1L[[ialign]]+s alignOpticOrientL1L[[ialign]];
LTHPPosOut=LTHPPosIn+LTHPorient;

d=(IAMPosLllo[[iIAMOptSqL1[[ialign]],1]]-alignOpticPosL1L[[ialign,1]]-LTHPorient[[1]])/alignOpticOrientL1L[[ialign,1]];
theoPosL1[[ialign]]=alignOpticPosL1L[[ialign]]+d alignOpticOrientL1L[[ialign]]+LTHPorient;
d1=alignOpticPosL1L[[ialign]]-LTHPPosIn;
d2=LTHPorient;
d3=LTHPPosIn+LTHPorient-theoPosL1[[ialign]];
theoDistanceL1[[ialign]]=Sqrt[d1.d1]+Sqrt[d2.d2]+Sqrt[d3.d3];

IAMllo=Append[IAMllo,Flatten[{"am 500",theoPosL1[[ialign,1;;2]]}]];
iIAMtheoL1[[ialign]]=Length[IAMllo];
Flatten[{"am 500",theoPosL1[[ialign,1;;2]]}]

iIAMtheoRefL1[[ialign]]=11;
IAMllo[[iIAMtheoRefL1[[ialign]]]]

zeroYawReference=IAMllo[[iIAMOptSqL1[[ialign]],2;;3]]-IAMllo[[iIAMtheoL1[[ialign]],2;;3]];
theoYawL1[[ialign]]=VectorAngle[theoOrientL1[[ialign,1;;2]],zeroYawReference] 180/Pi

theoPitchL1[[ialign]]=theoOrientL1[[ialign,3]] 180/Pi

data={alignOpticPosL1L[[ialign,1;;2]],IAMllo[[iIAMOptSqL1[[ialign]],2;;3]],IAMllo[[iIAMOptSqRefL1[[ialign]],2;;3]],IAMllo[[iIAMtheoL1[[ialign]],2;;3]],IAMllo[[iIAMtheoRefL1[[ialign]],2;;3]],LTHPPosIn[[1;;2]],LTHPPosOut[[1;;2]]};
dataPlot=ListPlot[data,PlotStyle->PointSize->Large];
labels={alignLabelL1[[ialign]],"OptSq","OptSq Ref","TS","TS Ref","LTHP In","LTHP Out"};
PointLabels=Table[Text[labels[[i]],data[[i]]+{500,1000}],{i,1,Length[labels]}];

results

Show[dataPlot,Graphics[{Red,PointLabels}],AspectRatio->1,PlotRange->{{-25000,2000},All}]

formatLLOAlignTable[ialign,ialign]

Position Alignment (x,y,z)

Set the Total Station/Theodolite at y = 0 for a clear sight to PRM HR center

calculations

ialign=1;
alignLabelL1[[ialign]]

iIAMOptSqL1[[ialign]]=12;
IAMllo[[iIAMOptSqL1[[ialign]]]]

iIAMOptSqRefL1[[ialign]]=16;
IAMllo[[iIAMOptSqRefL1[[ialign]]]]

theoPosL1[[ialign]]={IAMllo[[iIAMOptSqL1[[ialign]],2]],0,alignOpticPosL1L[[ialign,3]]};
IAMllo=Append[IAMllo,Flatten[{"am 501",theoPosL1[[ialign,1;;2]]}]];
iIAMtheoL1[[ialign]]=Length[IAMllo];
Flatten[{"am 501",theoPosL1[[ialign,1;;2]]}]

d=alignOpticPosL1L[[ialign]]-theoPosL1[[ialign]];
theoDistanceL1[[ialign]]=Sqrt[d.d];
theoOrientL1[[ialign]]=d/theoDistanceL1[[ialign]]

iIAMtheoRefL1[[ialign]]=11;
IAMllo[[iIAMtheoRefL1[[ialign]]]]

zeroYawReference=IAMllo[[iIAMOptSqL1[[ialign]],2;;3]]-IAMllo[[iIAMtheoL1[[ialign]],2;;3]];
theoYawL1[[ialign]]=VectorAngle[theoOrientL1[[ialign,1;;2]],zeroYawReference] 180/Pi

theoPitchL1[[ialign]]=theoOrientL1[[ialign,3]] 180/Pi

data={alignOpticPosL1L[[ialign,1;;2]],IAMllo[[iIAMOptSqL1[[ialign]],2;;3]],IAMllo[[iIAMOptSqRefL1[[ialign]],2;;3]],IAMllo[[iIAMtheoL1[[ialign]],2;;3]],IAMllo[[iIAMtheoRefL1[[ialign]],2;;3]]};
dataPlot=ListPlot[data,PlotStyle->PointSize->Large,PlotRange->All];
labels={alignLabelL1[[ialign]],"OptSq","OptSq Ref","TS","TS Ref"};
PointLabels=Table[Text[labels[[i]],data[[i]]],{i,1,Length[labels]}];

results

Show[dataPlot,Graphics[{Red,PointLabels}],AspectRatio->1,PlotRange->{{-25000,5000},{-30000,2000}}]

formatLLOAlignTable[ialign,ialign]

... PR2 Alignment

Angular Alignment (q, y)

A direct view perpendicular to the center of PR2, from the region of the spool between HAM3 and BSC2, is possible with the use of an extended retro-reflector (PLX LTHR)

Derive yaw reference from sight line from "L1 IAM 378" to "L1 IAM 382" (parrallel to X-axis) with Bruson Optical Square
Place Theodolite/Total Station over new monument "am 500" which is placed at same X location as "L1 IAM 378" but along normal vector to PR2, translated by the PLX LTHR
The PLX LTHR is placed in the spool to the -X side of HAM3

calculations

ialign=4;
alignLabelL1[[ialign]]

theoOrientL1[[ialign]]=alignOpticOrientL1L[[ialign]];

iIAMOptSqL1[[ialign]]=12;
IAMllo[[iIAMOptSqL1[[ialign]]]]

iIAMOptSqRefL1[[ialign]]=16;
IAMllo[[iIAMOptSqRefL1[[ialign]]]]

Approximate position of the LTHR (in the spool to the -X side of the HAM3 chamber, but before the MC Baffle):

LTHRL1[[ialign]]="Y";
LTHRorient=Append[LTHRlength RotationMatrix[-Pi/2].alignOpticOrientL1L[[ialign,1;;2]],0]
LTHRPosInX=-5550;
s=(LTHRPosInX-alignOpticPosL1L[[ialign,1]])/alignOpticOrientL1L[[ialign,1]];
LTHRPosIn=alignOpticPosL1L[[ialign]]+s alignOpticOrientL1L[[ialign]]
LTHRPosOut=LTHRPosIn+LTHRorient

d=(IAMPosLllo[[iIAMOptSqL1[[ialign]],1]]-alignOpticPosL1L[[ialign,1]]-LTHRorient[[1]])/alignOpticOrientL1L[[ialign,1]];
theoPosL1[[ialign]]=alignOpticPosL1L[[ialign]]+d alignOpticOrientL1L[[ialign]]+LTHRorient;
d1=alignOpticPosL1L[[ialign]]-LTHRPosIn;
d2=LTHRorient;
d3=LTHRPosIn+LTHRorient-theoPosL1[[ialign]];
theoDistanceL1[[ialign]]=Sqrt[d1.d1]+Sqrt[d2.d2]+Sqrt[d3.d3];

IAMllo=Append[IAMllo,Flatten[{"am 502",theoPosL1[[ialign,1;;2]]}]];
iIAMtheoL1[[ialign]]=Length[IAMllo];
Flatten[{"am 502",theoPosL1[[ialign,1;;2]]}]

iIAMtheoRefL1[[ialign]]=11;
IAMllo[[iIAMtheoRefL1[[ialign]]]]

zeroYawReference=IAMllo[[iIAMOptSqL1[[ialign]],2;;3]]-IAMllo[[iIAMtheoL1[[ialign]],2;;3]];
theoYawL1[[ialign]]=VectorAngle[theoOrientL1[[ialign,1;;2]],zeroYawReference] 180/Pi

theoPitchL1[[ialign]]=theoOrientL1[[ialign,3]] 180/Pi

data={alignOpticPosL1L[[ialign,1;;2]],IAMllo[[iIAMOptSqL1[[ialign]],2;;3]],IAMllo[[iIAMOptSqRefL1[[ialign]],2;;3]],IAMllo[[iIAMtheoL1[[ialign]],2;;3]],IAMllo[[iIAMtheoRefL1[[ialign]],2;;3]],LTHPPosIn[[1;;2]],LTHPPosOut[[1;;2]]};
dataPlot=ListPlot[data,PlotStyle->PointSize->Large];
labels={alignLabelL1[[ialign]],"OptSq","OptSq Ref","TS","TS Ref","LTHP In","LTHP Out"};
PointLabels=Table[Text[labels[[i]],data[[i]]+{200,500}],{i,1,Length[labels]}];

results

Show[dataPlot,Graphics[{Red,PointLabels}],AspectRatio->1,PlotRange->{{-25000,5000},{-25000,5000}}]

formatLLOAlignTable[ialign,ialign]

Position Alignment (x,y,z)

Set the Total Station/Theodolite at the intersection of the PR2 HR normal vector (projected backwards) and the monument reference line x = -1858.0 mm
Set the distance to the AR surface based on the thickness of the L1 PR2 optic

calculations

ialign=3;
alignLabelL1[[ialign]]="PR2 AR x,y,z"

L1PR2thick=75.0;

iIAMOptSqL1[[ialign]]=12;
IAMllo[[iIAMOptSqL1[[ialign]]]]

iIAMOptSqRefL1[[ialign]]=16;
IAMllo[[iIAMOptSqRefL1[[ialign]]]]

s=(IAMllo[[iIAMOptSqL1[[ialign]],2]]-alignOpticPosL1L[[ialign,1]])/alignOpticOrientL1L[[ialign,1]];
theoPosL1[[ialign]]=alignOpticPosL1L[[ialign]]+s alignOpticOrientL1L[[ialign]]

IAMllo=Append[IAMllo,Flatten[{"am 503",theoPosL1[[ialign,1;;2]]}]];
iIAMtheoL1[[ialign]]=Length[IAMllo];
Flatten[{"am 503",theoPosL1[[ialign,1;;2]]}]

d=alignOpticPosL1L[[ialign]]-theoPosL1[[ialign]];
dd=Sqrt[d.d];
theoOrientL1[[ialign]]=d/dd;
theoDistanceL1[[ialign]]=Sqrt[d.d]-L1PR2thick;

iIAMtheoRefL1[[ialign]]=11;
IAMllo[[iIAMtheoRefL1[[ialign]]]]

zeroYawReference=IAMllo[[iIAMOptSqL1[[ialign]],2;;3]]-IAMllo[[iIAMtheoL1[[ialign]],2;;3]];
theoYawL1[[ialign]]=VectorAngle[theoOrientL1[[ialign,1;;2]],zeroYawReference] 180/Pi

theoPitchL1[[ialign]]=theoOrientL1[[ialign,3]] 180/Pi

data={alignOpticPosL1L[[ialign,1;;2]],IAMllo[[iIAMOptSqL1[[ialign]],2;;3]],IAMllo[[iIAMOptSqRefL1[[ialign]],2;;3]],IAMllo[[iIAMtheoL1[[ialign]],2;;3]],IAMllo[[iIAMtheoRefL1[[ialign]],2;;3]]};
dataPlot=ListPlot[data,PlotStyle->PointSize->Large,PlotRange->All];
labels={alignLabelL1[[ialign]],"OptSq","OptSq Ref","TS","TS Ref"};
PointLabels=Table[Text[labels[[i]],data[[i]]],{i,1,Length[labels]}];

results

Show[dataPlot,Graphics[{Red,PointLabels}],AspectRatio->1,PlotRange->{{-25000,5000},{-25000,5000}}]

formatLLOAlignTable[ialign,ialign]

... PR3 Alignment

Angular Alignment (q, y)

A direct view perpendicular to the center of PR3 is not possible from the region of the spool between HAM3 and BSC2, due to the PR2 suspension blocking the view. Consequently a periscope (PLX LTHP) is used

Derive yaw reference from sight line from "L1 IAM 378" to "L1 IAM 382" (parrallel to X-axis) with Bruson Optical Square
Place Theodolite/Total Station over new monument "am 500" which is placed at same X location as "L1 IAM 378" but along normal vector to PR3, translated by the PLX LTHP
The PLX LTHP is placed in the spool to the -X side of HAM3

calculations

ialign=6;
alignLabelL1[[ialign]]

theoOrientL1[[ialign]]=-alignOpticOrientL1L[[ialign]];

iIAMOptSqL1[[ialign]]=12;
IAMllo[[iIAMOptSqL1[[ialign]]]]

iIAMOptSqRefL1[[ialign]]=16;
IAMllo[[iIAMOptSqRefL1[[ialign]]]]

Approximate position of the LTHP (in the spool to the -X side of the HAM3 chamber, but before the MC Baffle):

LTHPL1[[ialign]]="Y";
LTHPorient=Append[LTHPlength RotationMatrix[Pi/2].alignOpticOrientL1L[[ialign,1;;2]],0];
LTHPPosInX=-5550;
s=(LTHPPosInX-alignOpticPosL1L[[ialign,1]])/alignOpticOrientL1L[[ialign,1]];
LTHPPosIn=alignOpticPosL1L[[ialign]]+s alignOpticOrientL1L[[ialign]];
LTHPPosOut=LTHPPosIn+LTHPorient;

d=(IAMPosLllo[[iIAMOptSqL1[[ialign]],1]]-alignOpticPosL1L[[ialign,1]]-LTHPorient[[1]])/alignOpticOrientL1L[[ialign,1]];
theoPosL1[[ialign]]=alignOpticPosL1L[[ialign]]+d alignOpticOrientL1L[[ialign]]+LTHPorient;
d1=alignOpticPosL1L[[ialign]]-LTHPPosIn;
d2=LTHPorient;
d3=LTHPPosIn+LTHPorient-theoPosL1[[ialign]];
theoDistanceL1[[ialign]]=Sqrt[d1.d1]+Sqrt[d2.d2]+Sqrt[d3.d3];

IAMllo=Append[IAMllo,Flatten[{"am 504",theoPosL1[[ialign,1;;2]]}]];
iIAMtheoL1[[ialign]]=Length[IAMllo];
Flatten[{"am 504",theoPosL1[[ialign,1;;2]]}]

iIAMtheoRefL1[[ialign]]=11;
IAMllo[[iIAMtheoRefL1[[ialign]]]]

zeroYawReference=IAMllo[[iIAMOptSqL1[[ialign]],2;;3]]-IAMllo[[iIAMtheoL1[[ialign]],2;;3]];
theoYawL1[[ialign]]=VectorAngle[theoOrientL1[[ialign,1;;2]],zeroYawReference] 180/Pi

theoPitchL1[[ialign]]=theoOrientL1[[ialign,3]] 180/Pi

data={alignOpticPosL1L[[ialign,1;;2]],IAMllo[[iIAMOptSqL1[[ialign]],2;;3]],IAMllo[[iIAMOptSqRefL1[[ialign]],2;;3]],IAMllo[[iIAMtheoL1[[ialign]],2;;3]],IAMllo[[iIAMtheoRefL1[[ialign]],2;;3]],LTHPPosIn[[1;;2]],LTHPPosOut[[1;;2]]};
dataPlot=ListPlot[data,PlotStyle->PointSize->Large];
labels={alignLabelL1[[ialign]],"OptSq","OptSq Ref","TS","TS Ref","LTHP In","LTHP Out"};
PointLabels=Table[Text[labels[[i]],data[[i]]+{500,1000}],{i,1,Length[labels]}];

results

Show[dataPlot,Graphics[{Red,PointLabels}],AspectRatio->1,PlotRange->{{-25000,5000},All}]

formatLLOAlignTable[ialign,ialign]

Position Alignment (x,y,z)

Set the Total Station/Theodolite at y = 0 for a clear sight to PR3 HR center

calculations

ialign=5;
alignLabelL1[[ialign]]

iIAMOptSqL1[[ialign]]=12;
IAMllo[[iIAMOptSqL1[[ialign]]]]

iIAMOptSqRefL1[[ialign]]=16;
IAMllo[[iIAMOptSqRefL1[[ialign]]]]

theoPosL1[[ialign]]={IAMllo[[iIAMOptSqL1[[ialign]],2]],0,alignOpticPosL1L[[ialign,3]]};
IAMllo=Append[IAMllo,Flatten[{"am 505",theoPosL1[[ialign,1;;2]]}]];
iIAMtheoL1[[ialign]]=Length[IAMllo];
Flatten[{"am 505",theoPosL1[[ialign,1;;2]]}]

d=alignOpticPosL1L[[ialign]]-theoPosL1[[ialign]];
theoDistanceL1[[ialign]]=Sqrt[d.d]
theoOrientL1[[ialign]]=d/theoDistanceL1[[ialign]]

iIAMtheoRefL1[[ialign]]=11;
IAMllo[[iIAMtheoRefL1[[ialign]]]]

zeroYawReference=IAMllo[[iIAMOptSqL1[[ialign]],2;;3]]-IAMllo[[iIAMtheoL1[[ialign]],2;;3]];
theoYawL1[[ialign]]=VectorAngle[theoOrientL1[[ialign,1;;2]],zeroYawReference] 180/Pi

theoPitchL1[[ialign]]=theoOrientL1[[ialign,3]] 180/Pi

data={alignOpticPosL1L[[ialign,1;;2]],IAMllo[[iIAMOptSqL1[[ialign]],2;;3]],IAMllo[[iIAMOptSqRefL1[[ialign]],2;;3]],IAMllo[[iIAMtheoL1[[ialign]],2;;3]],IAMllo[[iIAMtheoRefL1[[ialign]],2;;3]]};
dataPlot=ListPlot[data,PlotStyle->PointSize->Large,PlotRange->All];
labels={alignLabelL1[[ialign]],"OptSq","OptSq Ref","TS","TS Ref"};
PointLabels=Table[Text[labels[[i]],data[[i]]],{i,1,Length[labels]}];

results

Show[dataPlot,Graphics[{Red,PointLabels}],AspectRatio->1,PlotRange->{{-25000,5000},{-30000,2000}}]

formatLLOAlignTable[ialign,ialign]

... PRC Alignment Summary

Table summarizing the alignment solutions for the Power Recycling Cavity (PRC) optics: PRM, PR2 and PR3

formatLLOAlignTable[1,6]

... BS Alignment

Cartridge

solution 1

ialign=7;
alignLabelL1[[ialign]]

Rotate the BS optic coordinates 90 deg to reflect the fact that TS#1 is rotated relative to LBSC2

BSARPos=alignOpticPosL1L[[ialign]]

BS wedge angle (deg):

wedge=VectorAngle[alignOpticOrientL1L[[ialign]],-alignOpticOrientL1L[[ialign+1]]] 180/Pi

BSHROrient=alignOpticOrientL1L[[ialign+1]]

BSAROrient=alignOpticOrientL1L[[ialign]]

iIAMOptSqRefL1[[ialign]]=5;
IAMlloTS1[[iIAMOptSqRefL1[[ialign]]]]

iIAMOptSqL1[[ialign]]=11;
IAMlloTS1[[iIAMOptSqL1[[ialign]]]]

Add a monument (TS1-14) along the IAM-389 to IAM IAM-400 line and normal to the BS AR surface:

d=(IAMlloTS1[[iIAMOptSqL1[[ialign]],2]]-BSARPos[[1]])/BSAROrient[[1]];
IAMlloTS1=Append[IAMlloTS1,Flatten[{"TS1-14",BSARPos+d BSAROrient}]];
iIAMtheoL1[[ialign]]=Length[IAMlloTS1];
IAMlloTS1[[iIAMtheoL1[[ialign]]]]

theoPosL1[[ialign]]=IAMlloTS1[[iIAMtheoL1[[ialign]],2;;4]]

theoOrientL1[[ialign]]=-BSAROrient

Separation from LAC to BS AR surface (mm):

theoDistanceL1[[ialign]]=Sqrt[(theoPosL1[[ialign]]-BSARPos).(theoPosL1[[ialign]]-BSARPos)]

iIAMtheoRefL1[[ialign]]="NA";

zeroYawReference=IAMlloTS1[[iIAMOptSqL1[[ialign]],2;;3]]-IAMlloTS1[[iIAMtheoL1[[ialign]],2;;3]];
theoYawL1[[ialign]]=VectorAngle[theoOrientL1[[ialign,1;;2]],zeroYawReference] 180/Pi

theoPitchL1[[ialign]]=theoOrientL1[[ialign,3]] 180/Pi

formatLLOAlignTable[ialign,ialign]

solution 2

ialign=8;
alignLabelL1[[ialign]]

Required beam separation from HR and AR surfaces so as not to get an erroneous laser autocollimator (LAC) reading is 32 mm. The beam divergence of the Newport LDS-vector LAC is 100 urad. Given a wedge angle of 0.070 deg (for BS SN002 to be used for L1) and an index of refraction at 670 nm of ~1.456, the separation from the LAC to the BS AR surface must be at least ~9 m :

31/(1.456 (.070 Pi/180) 2-100 10^-6)

31.9/(1.456 (.070 Pi/180) 2)

So place a new TS1-15 monument along the X = 0 line between IAM394 and IAM391:

IAMlloTS1=Append[IAMlloTS1,Flatten[{"TS1-15",0,9250/Sqrt[2]//N}]];
iIAMOptSqL1[[ialign]]=Length[IAMlloTS1];
IAMlloTS1[[iIAMOptSqL1[[ialign]]]]

iIAMOptSqRefL1[[ialign]]=13;
IAMlloTS1[[iIAMOptSqRefL1[[ialign]]]]

alignOpticOrientL1L[[ialign]]

Add a monument (TS1-16) at the intersection of a line from TS1-15 which is normal to the line through IAM-349 and IAM-391 and a line normal to the BS HR surface, but displaced laterally by the LTHP:

LTHPL1[[ialign]]="Y";
LTHPorient=Append[LTHPlength RotationMatrix[Pi/2].alignOpticOrientL1L[[ialign,1;;2]],0];
LTHPPosInX=200;
s=(LTHPPosInX-alignOpticPosL1L[[ialign,1]])/alignOpticOrientL1L[[ialign,1]];
LTHPPosIn=alignOpticPosL1L[[ialign]]+s alignOpticOrientL1L[[ialign]];
LTHPPosOut=LTHPPosIn+LTHPorient;

d=(IAMlloTS1[[iIAMOptSqL1[[ialign]],3]]-alignOpticPosL1L[[ialign,2]]-LTHPorient[[2]])/alignOpticOrientL1L[[ialign,2]];
theoPosL1[[ialign]]=alignOpticPosL1L[[ialign]]+d alignOpticOrientL1L[[ialign]]+LTHPorient;
d1=alignOpticPosL1L[[ialign]]-LTHPPosIn;
d2=LTHPorient;
d3=LTHPPosIn+LTHPorient-theoPosL1[[ialign]];
theoDistanceL1[[ialign]]=Sqrt[d1.d1]+Sqrt[d2.d2]+Sqrt[d3.d3]

IAMlloTS1=Append[IAMlloTS1,Flatten[{"TS1-16",theoPosL1[[ialign]]}]];
iIAMtheoL1[[ialign]]=Length[IAMlloTS1];
IAMlloTS1[[iIAMtheoL1[[ialign]]]]

theoPosL1[[ialign]]=IAMlloTS1[[iIAMtheoL1[[ialign]],2;;4]]

theoOrientL1[[ialign]]=-BSHROrient

Calculate the angular separation between the beam reflected by the AR surface (after trasmission through the HR surface) and the beam reflected from the HR surface:

separationAngle = VectorAngle[Refract[Reflect[Refract[(1 + 10^-13) theoOrientL1[[ialign]], BSHROrient, 1, 1.456], BSAROrient], -BSHROrient, 1.456, 1], BSHROrient]

approximate calculation of this angle:

2 1.456 (wedge Pi/180)

Calculate the separation of the beam reflected from the BS AR surface, at the location of the Total Station:

BSthickness = 59.88;
theoDistanceL1[[ialign]] separationAngle + BSthickness 2 wedge Pi/180

iIAMtheoRefL1[[ialign]]=Length[IAMlloTS1]-1;

zeroYawReference=IAMlloTS1[[iIAMOptSqL1[[ialign]],2;;3]]-IAMlloTS1[[iIAMtheoL1[[ialign]],2;;3]];
theoYawL1[[ialign]]=VectorAngle[theoOrientL1[[ialign,1;;2]],zeroYawReference] 180/Pi

theoPitchL1[[ialign]]=theoOrientL1[[ialign,3]] 180/Pi

formatLLOAlignTable[ialign,ialign]

solution 3

In case the return beam intensity from the HR surface is too faint, add a monument (TS1-17) (near to monument (TS1-16)) at the intersection of a line at 90 deg from the line between TS1-15 and TS1-16 and a line along the retro-reflection from the BS AR surface through the BS HR surface, but displaced laterally by the LTHP:

ialign=9;
alignLabelL1[[ialign]]

iIAMOptSqRefL1[[ialign]]=13;
IAMlloTS1[[iIAMOptSqRefL1[[ialign]]]]

Reverse the orientation of the AR surface since we are reflecting off the AR surface after trasmission through the BS:

theoOrientL1[[ialign]]=-Refract[-alignOpticOrientL1L[[ialign]],-BSHROrient,1.456,1]

Use the optic position for the previous alignment (align-1), i.e. the HR surface:

LTHPL1[[ialign]]="Y";
LTHPorient=Append[LTHPlength RotationMatrix[Pi/2].theoOrientL1[[ialign,1;;2]],0];
LTHPPosInX=200;
s=(LTHPPosInX-alignOpticPosL1L[[ialign-1,1]])/theoOrientL1[[ialign,1]];
LTHPPosIn=alignOpticPosL1L[[ialign-1]]+s theoOrientL1[[ialign]];
LTHPPosOut=LTHPPosIn+LTHPorient;

d=(IAMlloTS1[[16,2]]-alignOpticPosL1L[[ialign-1,1]]-LTHPorient[[1]])/theoOrientL1[[ialign,1]];
theoPosL1[[ialign]]=alignOpticPosL1L[[ialign-1]]+d theoOrientL1[[ialign]]+LTHPorient;
d1=alignOpticPosL1L[[ialign-1]]-LTHPPosIn;
d2=LTHPorient;
d3=LTHPPosIn+LTHPorient-theoPosL1[[ialign]];
theoDistanceL1[[ialign]]=Sqrt[d1.d1]+Sqrt[d2.d2]+Sqrt[d3.d3]

theoDistanceL1[[ialign]] separationAngle + BSthickness 2 wedge Pi/180

IAMlloTS1=Append[IAMlloTS1,Flatten[{"TS1-17",theoPosL1[[ialign]]}]];
iIAMtheoL1[[ialign]]=Length[IAMlloTS1];
IAMlloTS1[[iIAMtheoL1[[ialign]]]]

theoPosL1[[ialign]]=IAMlloTS1[[iIAMtheoL1[[ialign]],2;;4]]

IAMlloTS1=Append[IAMlloTS1,Flatten[{"TS1-18",0,theoPosL1[[ialign,2]]}]];
iIAMtheoRefL1[[ialign]]=Length[IAMlloTS1];
IAMlloTS1[[iIAMtheoRefL1[[ialign]]]]

iIAMOptSqL1[[ialign]]=18;
IAMlloTS1[[iIAMOptSqL1[[ialign]]]]

zeroYawReference=IAMlloTS1[[iIAMOptSqL1[[ialign]],2;;3]]-IAMlloTS1[[iIAMtheoL1[[ialign]],2;;3]];
theoYawL1[[ialign]]=VectorAngle[theoOrientL1[[ialign,1;;2]],zeroYawReference] 180/Pi

theoPitchL1[[ialign]]=theoOrientL1[[ialign,3]] 180/Pi

formatLLOAlignTable[ialign,ialign]

solution 4

ialign=10;
alignLabelL1[[ialign]]

alignOpticPosL1L[[10,1]]

iIAMOptSqRefL1[[ialign]]="NA";
iIAMOptSqL1[[ialign]]="NA";

Add a monument, TS1-19, at the Y-coordinate of IAM349, and the X-coordinate of the BS HR face:

IAMlloTS1=Append[IAMlloTS1,Flatten[{"TS1-19",alignOpticPosL1L[[ialign,1]],IAMlloTS1[[9,3]]}]];
iIAMtheoL1[[ialign]]=Length[IAMlloTS1];
IAMlloTS1[[iIAMtheoL1[[ialign]]]]

theoPosL1[[ialign]]=Append[IAMlloTS1[[iIAMtheoL1[[ialign]],2;;3]],alignOpticPosL1L[[ialign,3]]]

Add a monument, TS1-20, at the Y-coordinate of IAM394, and the X-coordinate of the BS HR face:

IAMlloTS1=Append[IAMlloTS1,Flatten[{"TS1-20",alignOpticPosL1L[[ialign,1]],IAMlloTS1[[13,3]]}]];
iIAMtheoRefL1[[ialign]]=Length[IAMlloTS1];
IAMlloTS1[[iIAMtheoRefL1[[ialign]]]]

theoOrientL1[[ialign]]={0,-1,0}

theoDistanceL1[[ialign]]=Sqrt[(theoPosL1[[ialign]]-alignOpticPosL1L[[ialign]]).(theoPosL1[[ialign]]-alignOpticPosL1L[[ialign]])]

theoYawL1[[ialign]]=0;
theoPitchL1[[ialign]]=0;

formatLLOAlignTable[ialign,ialign]

summary of BS cartridge solutions

formatLLOAlignTable[7,10]

Chamber

solution 1

Set the Total Station on the beam line path from the center of the BS to the center of PR3, looking at the center of the BS, in order to align the position (x, y, z) of the LBSC2 cartridge, using the HR Elliptical Baffle target (x, z) and the retro-reflector (y)

ialign=11;
alignLabelL1[[ialign]]

iIAMOptSqL1[[ialign]]=12;
IAMllo[[iIAMOptSqL1[[ialign]]]]

iIAMOptSqRefL1[[ialign]]=16;
IAMllo[[iIAMOptSqRefL1[[ialign]]]]

IAMllo[[iIAMOptSqL1[[ialign]],2]]

s=(IAMllo[[iIAMOptSqL1[[ialign]],2]]-alignOpticPosL1L[[5,1]])/(alignOpticPosL1L[[ialign,1]]-alignOpticPosL1L[[5,1]]);
theoPosL1[[ialign]]=s (alignOpticPosL1L[[ialign]]-alignOpticPosL1L[[5]])+alignOpticPosL1L[[5]];
IAMllo=Append[IAMllo,Flatten[{"am 506",theoPosL1[[ialign,1;;2]]}]];
iIAMtheoL1[[ialign]]=Length[IAMllo];
Flatten[{"am 506",theoPosL1[[ialign,1;;2]]}]

alignOpticPosL1L[[ialign]]

theoPosL1[[ialign]]

d=alignOpticPosL1L[[ialign]]-theoPosL1[[ialign]];
theoDistanceL1[[ialign]]=Sqrt[d.d]
theoOrientL1[[ialign]]=d/theoDistanceL1[[ialign]]

iIAMtheoRefL1[[ialign]]=11;
IAMllo[[iIAMtheoRefL1[[ialign]]]]

zeroYawReference=IAMllo[[iIAMOptSqL1[[ialign]],2;;3]]-IAMllo[[iIAMtheoL1[[ialign]],2;;3]];
theoYawL1[[ialign]]=VectorAngle[theoOrientL1[[ialign,1;;2]],zeroYawReference] 180/Pi

theoPitchL1[[ialign]]=theoOrientL1[[ialign,3]] 180/Pi

data={alignOpticPosL1L[[ialign,1;;2]],IAMllo[[iIAMOptSqL1[[ialign]],2;;3]],IAMllo[[iIAMOptSqRefL1[[ialign]],2;;3]],IAMllo[[iIAMtheoL1[[ialign]],2;;3]],IAMllo[[iIAMtheoRefL1[[ialign]],2;;3]]};
dataPlot=ListPlot[data,PlotStyle->PointSize->Large,PlotRange->All];
labels={alignLabelL1[[ialign]],"OptSq","OptSq Ref","TS","TS Ref"};
PointLabels=Table[Text[labels[[i]],data[[i]]],{i,1,Length[labels]}];

Show[dataPlot,Graphics[{Red,PointLabels}],AspectRatio->1,PlotRange->{{-25000,5000},{-30000,2000}}]

formatLLOAlignTable[11,11]

solution 2

ialign=12;
alignLabelL1[[ialign]]

iIAMOptSqL1[[ialign]]=12;
IAMllo[[iIAMOptSqL1[[ialign]]]]

iIAMOptSqRefL1[[ialign]]=16;
IAMllo[[iIAMOptSqRefL1[[ialign]]]]

alignOpticOrientL1L[[ialign]]=opticOrientL1L[[4]];
theoOrientL1[[ialign]]=-alignOpticOrientL1L[[ialign]];

IAMllo[[iIAMOptSqL1[[ialign]],2]]

s=(IAMllo[[iIAMOptSqL1[[ialign]],2]]-alignOpticPosL1L[[5,1]])/(alignOpticPosL1L[[ialign,1]]-alignOpticPosL1L[[5,1]]);
theoPosL1[[ialign]]=s (alignOpticPosL1L[[ialign]]-alignOpticPosL1L[[5]])+alignOpticPosL1L[[5]];
IAMllo=Append[IAMllo,Flatten[{"am 506",theoPosL1[[ialign,1;;2]]}]];
iIAMtheoL1[[ialign]]=Length[IAMllo];
Flatten[{"am 506",theoPosL1[[ialign,1;;2]]}]

alignOpticPosL1L[[ialign]]

theoPosL1[[ialign]]

alignOpticOrientL1L[[ialign]]

Approximate position of the LTHP (in the BSC2 chamber, in the -X direction from the BS):

LTHPL1[[ialign]]="Y";
LTHPorient=Append[LTHPlength RotationMatrix[Pi/2].alignOpticOrientL1L[[ialign,1;;2]],0];
LTHPPosInX=-1000;
s=(LTHPPosInX-alignOpticPosL1L[[ialign,1]])/alignOpticOrientL1L[[ialign,1]];
LTHPPosIn=alignOpticPosL1L[[ialign]]+s alignOpticOrientL1L[[ialign]];
LTHPPosOut=LTHPPosIn+LTHPorient;

d=(IAMPosLllo[[iIAMOptSqL1[[ialign]],1]]-alignOpticPosL1L[[ialign,1]]-LTHPorient[[1]])/alignOpticOrientL1L[[ialign,1]];
theoPosL1[[ialign]]=alignOpticPosL1L[[ialign]]+d alignOpticOrientL1L[[ialign]]+LTHPorient;
d1=alignOpticPosL1L[[ialign]]-LTHPPosIn;
d2=LTHPorient;
d3=LTHPPosIn+LTHPorient-theoPosL1[[ialign]];
theoDistanceL1[[ialign]]=Sqrt[d1.d1]+Sqrt[d2.d2]+Sqrt[d3.d3];

IAMllo=Append[IAMllo,Flatten[{"am 507",theoPosL1[[ialign,1;;2]]}]];
iIAMtheoL1[[ialign]]=Length[IAMllo];
Flatten[{"am 507",theoPosL1[[ialign,1;;2]]}]

iIAMtheoRefL1[[ialign]]=11;
IAMllo[[iIAMtheoRefL1[[ialign]]]]

zeroYawReference=IAMllo[[iIAMOptSqL1[[ialign]],2;;3]]-IAMllo[[iIAMtheoL1[[ialign]],2;;3]];
theoYawL1[[ialign]]=VectorAngle[theoOrientL1[[ialign,1;;2]],zeroYawReference] 180/Pi

theoPitchL1[[ialign]]=theoOrientL1[[ialign,3]] 180/Pi

data={alignOpticPosL1L[[ialign,1;;2]],IAMllo[[iIAMOptSqL1[[ialign]],2;;3]],IAMllo[[iIAMOptSqRefL1[[ialign]],2;;3]],IAMllo[[iIAMtheoL1[[ialign]],2;;3]],IAMllo[[iIAMtheoRefL1[[ialign]],2;;3]],LTHPPosIn[[1;;2]],LTHPPosOut[[1;;2]]};
dataPlot=ListPlot[data,PlotStyle->PointSize->Large];
labels={alignLabelL1[[ialign]],"OptSq","OptSq Ref","TS","TS Ref","LTHP In","LTHP Out"};
PointLabels=Table[Text[labels[[i]],data[[i]]+{500,1000}],{i,1,Length[labels]}];

Show[dataPlot,Graphics[{Red,PointLabels}],AspectRatio->1,PlotRange->{{-25000,2000},All}]

formatLLOAlignTable[ialign-1,ialign]

solution 3

ialign=13;
alignLabelL1[[ialign]]

SOLUTION NOT NEEDED -- REFLECTANCE FROM HR FACE IS SUFFICIENT

summary of BS chamber solutions

formatLLOAlignTable[11,13]

... SRM Alignment

... SR2 Alignment

... SR3 Alignment

... ITMx Alignment

Cartridge

Chamber

... ITMy Alignment

Cartridge

Chamber

... ETMx Alignment

Cartridge

Chamber

... ETMy Alignment

Cartridge

Chamber

... Summary of L1 Alignment Solutions

formatLLOAlignTable[1,nAlignsL1]