pleiades.sammy.data.options module
- class pleiades.sammy.data.options.DataTypeOptions(value)[source]
-
- TRANSMISSION = 'TRANSMISSION'
- TOTAL_CROSS_SECTION = 'TOTAL CROSS SECTION'
- SCATTERING = 'SCATTERING'
- ELASTIC = 'ELASTIC'
- DIFFERENTIAL_ELASTIC = 'DIFFERENTIAL ELASTIC'
- DIFFERENTIAL_REACTION = 'DIFFERENTIAL REACTION'
- REACTION = 'REACTION'
- INELASTIC_SCATTERING = 'INELASTIC SCATTERING'
- FISSION = 'FISSION'
- CAPTURE = 'CAPTURE'
- SELF_INDICATION = 'SELF INDICATION'
- INTEGRAL = 'INTEGRAL'
- COMBINATION = 'COMBINATION'
- class pleiades.sammy.data.options.SammyData(*, data_file: Path | None = None, data_type: DataTypeOptions = DataTypeOptions.TRANSMISSION, data_format: str = 'LST', energy_units: EnergyUnitOptions = EnergyUnitOptions.eV, cross_section_units: CrossSectionUnitOptions = CrossSectionUnitOptions.barn, data: DataFrame | None = None)[source]
Bases:
BaseModelContainer for LST data, loaded from a SAMMY .LST file using pandas.
- data_file
Path to the LST file.
- Type:
pathlib.Path | None
- data
Pandas DataFrame holding the LST data.
- Type:
pandas.DataFrame | None
- model_config = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- data_type: DataTypeOptions
- energy_units: EnergyUnitOptions
- cross_section_units: CrossSectionUnitOptions
- model_post_init(_SammyData__context)[source]
Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.
- plot_transmission(show_diff=False, plot_uncertainty=False, figsize=None, title=None, xscale='linear', yscale='linear', data_color='#433E3F', final_color='#ff6361', show=True)[source]
Plot the transmission data and optionally the residuals.
- Parameters:
show_diff (bool) – If True, plot the residuals.
plot_uncertainty (bool) – (Unused, for compatibility)
figsize (tuple) – Figure size (width, height) in inches.
title (str) – Plot title.
xscale (str) – X-axis scale (‘linear’ or ‘log’).
yscale (str) – Y-axis scale (‘linear’ or ‘log’).
data_color (str) – Color for experimental data points.
final_color (str) – Color for fitted theoretical curve.
show (bool) – If True, display the plot. If False, return figure object.
- Returns:
The figure object if show=False, None otherwise.
- Return type:
matplotlib.figure.Figure
- property energy
- property experimental_cross_section
- property theoretical_cross_section
- property experimental_transmission
- property theoretical_transmission