Currently, the LCLS2 time tool is similar to LCLS1.
A video discussion of the timetool on Dec. 3, 2020 is here: https://pswww.slac.stanford.edu/swdoc/tutorials/ttool_demo.mp4
Some simple python python software to play around with the edge-finding algorithm and showing how to access the DAQ data can be found here: https://github.com/chrisvam/psana_cpo/blob/master/ttool_edges.py
A description of Matt Weaver's algorithm can be found here: TimeTool. (NOTE: use this only for the description, pointers to code will be for LCLS1, not LCLS2). A psana implementation for LCLS2 can be found here: ttool_verify.py.
TMO Setup
Analysis of data taken from tmolw5618 was performed to determine proper configuration of the online algorithm. An example ATM camera image shows the optical laser reflection induced by the x-ray coincidence. For this analysis rows 350-450 of the camera were selected because of the abundance of reflection and the absence of any damage in that region. That region was projected onto the horizontal axis for the current event and a previously acquired event with no x-rays.
The ratio of the projections (x-ray / no x-ray) produced a typical curve as seen in red below. The convolution of this curve with a vector of weights chosen to be a differential filter for a characteristic edge is shown in gold. The peak of that convolution gives both the amplitude of the reflected edge and the position of the edge, and hence, the relative arrival time of the x-rays and optical laser.
For a given setup, the distribution of amplitude versus position indicates a distinct difference between the actual induced edges in the reflection and apparent edges from other sources. In this case, a selection of amplitude > 0.1 was chosen to select signal.
The distribution of signal position versus the laser time delay is shown below. The laser time is the control value for las_fs14_delay and is expressed in picoseconds. The full scale across the ATM image is about 2 picoseconds. Note that the position loses its dependence upon the delay at values less than 200 pixels. Adjacent runs show that features below pixel number 200 are sometimes present independent of the laser time delay. A removal of this part of the projection from consideration would likely recover more signal. Note that the scan across the laser time was done in a pseudo random fashion, so drift from other sources could potentially affect the relationship shown.
The DAQ configuration for the corresponding online analysis is shown here: