Fee Summed
fee_summed
Functions
main
Run the FEE summed spectrum pipeline.
Accumulates FEE spectra from psana, produces diagnostic plots, and optionally posts the spectrum figure to the eLog.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
args
|
list of str
|
Command-line arguments (typically |
required |
Source code in scripts/cctbx/fee_summed.py
parse_args
Parse command-line arguments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
args
|
list of str
|
Raw command-line arguments (typically |
required |
Returns:
| Type | Description |
|---|---|
Namespace
|
Parsed arguments with attributes |
Source code in scripts/cctbx/fee_summed.py
plot_histogram
Plot a histogram of per-event maximum intensity values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
maxes
|
list of float
|
Per-event maximum intensity values. |
required |
Returns:
| Type | Description |
|---|---|
Figure
|
The histogram figure. |
Source code in scripts/cctbx/fee_summed.py
plot_presence
Plot FEE detector presence as a function of event number.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
events
|
list of int
|
Per-event FEE presence flags (1 present, 0 absent). |
required |
Source code in scripts/cctbx/fee_summed.py
plot_spectrum
Plot the normalised FEE spectrum with smoothed overlay and gradient.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
exp
|
str
|
Experiment name, used in the plot title. |
required |
runs
|
list of int
|
Run numbers, used in the legend label. |
required |
data
|
ndarray
|
Normalised accumulated spectrum. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
fig |
Figure
|
The spectrum figure. |
edge_pixel |
int
|
Pixel position of the gradient minimum (absorption edge). |
Source code in scripts/cctbx/fee_summed.py
post_to_elog
Post the FEE spectrum figure to the LCLS eLog.
Authentication is performed via Kerberos; a valid token must exist
before calling this function (obtain one with kinit).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
exp
|
str
|
Experiment name (used to construct the eLog endpoint URL). |
required |
fig
|
Figure
|
Spectrum figure to attach to the eLog entry. |
required |
runs
|
list of int
|
Run numbers included in the plot. |
required |
total
|
int
|
Total number of good events accumulated. |
required |
edge_pixel
|
int
|
Pixel position of the gradient minimum (absorption edge). |
required |
Source code in scripts/cctbx/fee_summed.py
process_runs
Accumulate FEE spectrometer data across one or more runs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
exp
|
str
|
Experiment name. |
required |
runs
|
list of int
|
Run numbers to process. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
data |
ndarray
|
Normalised, accumulated horizontal projection spectrum. |
events |
list of int
|
Per-event FEE presence flags (1 present, 0 absent). |
maxes |
list of float
|
Per-event maximum intensity values for good events. |
total |
int
|
Total number of good events accumulated. |