Versions Compared

Key

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

...

XTCAV Analysis Parameters

-experiment: Name of XTCAV experiment (i.e. 'xpptut15')

-run_number: Run number within experiment. Can be in string or integer format.

-num_bunches: Number of bunches: typically 1, but can be 2+ for some LCLS experiments. For analysis of a lasing on run, this must be the same as the number of bunches in the reference lasing off run that you're using.

-maxshotsmax_shots: number of images to process for dark background or lasing off reference generation. In principle the bigger the better, but around 1000 should work fine. If you select a bigger number for dark background generation, then you should get a more representative average of the background noise.  If you select a bigger number for lasing off reference generation, you will get more references. This will take longer to process but you'll have a better chance of finding a well matched profile when processing lasing on shots. 

...

-validity_range (default `(current_run_number - end)`): The range of run numbers for which the reference run you are creating is valid. Parameter can be set in initialization of both the DarkBackground and the LasingOffReference. See example above. Note: Hopefully this is obvious, but if you set the validity range to (574,578) then the reference run will not be used for run 579 unless the reference path is explicitly given.

-start_image (default 0): Image within the run to start building the reference from. Can be set for `DarkBackgroundReference` and `LasingOffReference`.

-island_split_method: (default value: 'scipylabel') Only necessary when analyzing data with more than 1 bunch. Several image processing algorithms have been created to separate bunches that appear on the same image.  See here for some algorithm details.

  • 'scipyLabel' calls the scipy label function to label contiguous regions.  this is fast, but requires a region of no signal (after de-noising) between the regions.
  • 'autothreshold' tries to separate the islands by automatically finding thresholds that separate them.  this is the recommended mode for multi-bunch operation.
  • 'contourLabel' tries to adjust a threshold until two large groups are found, grouping together pixels using an opencv contour method.  there are two parameters ('ratio1/ratio2') that are settable for the contour method that determine

Differences from Previous XTCAV code

  • Changes to the user interface:
    • All parameters should be set during the initialization of `DarkBackgroundReference`, `LasingOffReference`, and `LasingOnCharacterization`.
    • There is no longer a `.Generate()` call. A reference will be created upon initialization of the `DarkBackgroundReference` and `LasingOffReference` classes. The reference will be saved to the psana data directory (default location unless the `calibration_path` parameter is set). If you would like to access the generated reference profiles, you can either load them from the saved file or access the member variable `averaged_profiles` within the `LasingOffReference` class.
    • Some parameters, such as roi_waist_threshold, have been deprecated. The current code automatically chooses this value for you based on the `snr_filter` (see documentation above). Other parameter names have changed so that naming convention is consistent across the entire xtcav package (again, see documentation above). 
  • Changes to analysis:
    • Improved profile clustering algorithm
    • Image is no longer median filtered before analysis
    • Power profile for lasing off image is not averaged between RMS and COM methods
  • Other changes include: improved code readability, integration with psana detector interface, and speed up in processing time.

Detector Resolution

(From Tim Maxwell)

...