Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

XTCAV is a detector that is used to determine the laser-power vs. time of each LCLS shot.  Alvaro Sanchez-Gonzalez has written psana-python code to do the rather complex analysis of images from the XTCAV camera to determine these quantities.  Some detailed documentation from Tim Maxwell on this device is Here.

These scripts use some XTCAV data that was made public so they should be runnable by all users.  The scripts can be found in /reg/g/psdm/tutorials/examplePython/xtcav/ in the files xtcavDark.py, xtcavLasingOff.py, xtcavLasingOn.py.  They analyze a minimal number of events to make them run fairly quickly.

Analysis Setup

Two things must be done before XTCAV analysis will function: a "dark run" must be analyzed to get the pedestal values for cameras, and a "no lasing" run must be analyzed to generate sets of "no lasing" images (the latter is quite a complex process).  An example of a dark-run analysis is in /reg/g/psdm/tutorials/examplePython/xtcav/xtcavDark.py:

...

Once the dark/lasing-off analysis has been completed, users can analyze the lasing-on events using a standard psana-python script similar to the one below.

Example Analysis Script

This script assumes that dark/lasing-off data has been analyzed (see above).   This script can be found in /reg/g/psdm/tutorials/examplePython/xtcav/xtcavLasingOn.py:

...

This script runs on one core, but it can be MPI-parallelized in the standard psana-python manner described here.

Two caveats:

  • the above lasing-off data (run 101) is not really appropriate for the lasing-on data below (run 124) because the separation between the two bunches changed between the runs, but it's the best publicly-available data we have
  • this data is two-bunch data, but the bunches are not well enough separated using the default "scipyLabel" island-split method, so for the purposes of this example we analyze with nb=1.

Some tips for lasing-on analysis:

  • Look at the distribution of the "agreement" parameter that is returned by the ReconstructionAgreement() method.  This value represents the "dot product" of the power-spectrum from the first-moment-analysis of the XTCAV image with the power-spectrum from the second-moment-analysis of the XTCAV image.   Only believe the data where the agreement is good (in the past >0.5 has been useful for some analyses)
  • Ignore shots where the X-ray intensity is low, but cutting on the FEEGasDetector value to select stronger shots

How Often to Take a Lasing Off Run

(courtesy of Tim Maxwell)

...

There's not really a hard, fast rule here. When necessary or when time allows has been the practical answer so far.

Lasing-off Analysis Parameters

(courtesy of Alvaro Sanchez-Gonzalez)

...

  • normal sase (not many beam-related fluctuations): take sqrt of number shots and use that many groups (beat down background noise with lots of averaging).   Tim suggests perhaps a maximum of 100 groups.
  • two-bunch slotted foil (many beam-related of fluctuations): restrict it to 5-10 images per group, make as many groups as possible using typically 30 seconds to a minute of data at 60Hz.
  • split undulator, single bunch, head and tail lase in separate sections of the split undulator: Tim expects this to be somewhat more chaotic than SASE, but not as chaotic as slotted-foil, so some number of groups in between.
  • seeded beam: For any results, I would use the SASE settings. However, note that reconstruction for seeding is a little ambiguous. The beam first seeds, so is partly spoiled before seeding itself in the second stage. Therefore it isn't clear exactly with one lasing off reference which part lased more for the seeded part. It is similar to the case when one bunch is used to make two pulses with the split undulator. However, if seeding amplification was strong and intense, this may be enough.

120Hz Operation Issues

(Thoughts from Tim Maxwell on 2/2/2015, discouraging this mode of operation)

This was an option. However it restricts the vertical energy ROI. For soft xrays it would easily and frequently clip the image of the beam as well as require very careful ROI management, and so may have compromised random images for your data.

Another largely untested option are other running conditions recently found. This appears to delay tagging of all images by one event (3 fiducials). However, we are absolutely not certain this behavior is consistent and therefore don't recommend it for critical data.

Detector Resolution

(From Tim Maxwell)

Time resolution is around 1.1 fs RMS for soft x-rays, 2.5 fs fwhm (in quadrature, of course). So actually pulse length is probably 4.3 - 9.7 fs FWHM.

This also doesn't include the "slippage resolution." That is, if they're using the full undulator, then by the end the x-rays can have slipped out of the electron slice by ~3 fs for soft x-rays. Obviously not a small number if trying to make 5 fs pulses. They've been advised to not use the full undulator when shorter pulses are more important than number of photons.

Tips for XTCAV Analysis

...