## Wavelength calibration

1. Optically align the instrument with a theodolite so everything is roughly in a straight line.
2. Optically align the instrument with neutrons for the collimation slits (slits 2 and 3) by scanning the upper blade past the lower blade and see when counts start to increase, the zero opening is when counts diverge from 0. On Platypus we have ~micron accuracy and reproducibility for these two slits which is essential for measuring samples without a critical edge.
3. Optically align the instrument for slits 1 and 4 (pre and post collimation slits), such that the slit openings open around the beam defined by slits 2 and 3.
4. Steps 2+3 might have to be repeated if the beam needs to pass through a certain optical element (e.g. polariser) at a specific place. This is done by moving slits 2 + 3 around until that’s achieved, then adjusting 1 + 4 again.
5. Measure all the TOF flight distances on the instrument using a Laser Tracker. This should get to at least mm accuracy.
6. Place a highly reflective sample on the sample stage and align the sample. Vary the sample - detector distance (SDD) across its entire range. Plot the difference in pixel number for the direct and reflected beams as a function of SDD. This plot should go through the origin. If it doesn’t then enter an offset for SDD until the plot goes through the origin. This step ensures that the overall flight distance is correct because the exact detection plane of the detector is unknown.
7. Place a sample with Bragg peaks on the sample (in our case we use a Ni-Ti multilayer, we have 4 useful peaks) and align it. Vary SDD and measure spectra at each distance. For each of the four diffraction peaks plot the TOF channel number as a function of SDD. This plot should furnish 4 straight lines for each of the diffraction peaks. The gradient of the straight line is then used to calculate the wavelength of the neutrons producing each of the diffraction peaks. The gradient of that graph is d_time_channel / d_SDD, you multiply by the time channel length (we use linear time bins on Platypus) to give dt/dx, then take the inverse to give a velocity dx/dt, which then furnishes the wavelength. This step should be carried out at an angle which results in the wavelengths covering as much of the useful wavelength spectrum as possible.
8. The phasing of the following chopper with respect to the leading chopper is then calibrated by closing the following chopper (such that the leading/opening edge of the following chopper crosses the beam after the trailing/closing edge of the leading chopper crosses the beam, rather than at the same time), and measuring spectra as a function of following chopper phase. The intensity of each of the diffraction peaks (from step 7) is integrated over and plotted as a function of chopper phase. Closing the following chopper has the effect of removing shorter wavelengths from the beam (because they don’t get to the following chopper by the time it closes). One can calculate the theoretical phase angle which should extinguish neutrons of a certain wavelength (if one knows the distance between the choppers). This theoretical phase angle is compared to the intercept of integrated peak intensity vs phase angle. The difference in the angles is then used to operate the choppers such that the opening edge of the following chopper crosses the beam at the same time as the closing edge of the leading chopper (“optically blind operation”). For example, on Platypus the disc openings for choppers 1 and 3 are 60 degrees and 25 degrees respectively. Because the T0 pulses are aligned to the middle of the windows we should operate at a nominal phase angle of 42.5 degrees. However, when we do the calibration plot we notice that the integrated intensity for a given peak is extinguished 0.3 degrees too early. This means we need to operate the choppers in a slightly more open fashion, at 42.2 degrees.
9. The last remaining correction is a phase offset for the leading chopper, the angle from where we believe the T0 pulse originates from, compared to where it actually is. This phase offset shifts the wavelength spectrum to lower/higher values because T0 will be at a slightly wrong time. This angle is calculated by acquiring a spectrum of the Bragg mirror for reasonably good statistics. The leading chopper phase offset is then systematically altered in the reduction code such that the peak locations (which will vary as this phase offset changes) then match those calculated for each of the four peaks measured in step 7. We minimise the sum of least squares differences between the actual locations (step7) and those produced by the reduction code, as a function of leading chopper phase offset. The reduction code for Platypus and Spatz is currently contained in the refnx project.

## Resolution Function

On Platypus and Spatz the resolution functions are theoretically calculated using Nelson and Dewhurst, but can also be calculated as part of a Monte Carlo approach for simulating datasets on a TOF reflectometer.