pleiades.sammy.parameters.misc module
Parsers and containers for SAMMY’s Card Set 11 parameters.
This module implements parsers and containers for SAMMY’s Card Set 11 miscellaneous parameters which can appear in either the PARameter or INPut file.
Format specification from Table VI B.2: Card Set 11 contains optional parameter sets with distinct formats:
DELTA - Length-dependent flight path parameters
ETA - Normalization coefficients for ETA data
FINIT - Finite-size corrections for angular distributions
GAMMA - Radiation width specifications
5. TZERO - Time offset parameters …etc.
The card set starts with header “MISCEllaneous parameters follow”. Each parameter type has a specific identifier in columns 1-5 and its own fixed-width format. Parameters can be omitted when not needed.
- class pleiades.sammy.parameters.misc.Card11ParameterType(value)[source]
-
Enumeration of Card 11 parameter types.
- DELTA = 'DELTA'
- ETA = 'ETA'
- FINIT = 'FINIT'
- GAMMA = 'GAMMA'
- TZERO = 'TZERO'
- SIABN = 'SIABN'
- SELFI = 'SELFI'
- EFFIC = 'EFFIC'
- DELTE = 'DELTE'
- DRCAP = 'DRCAP'
- NONUN = 'NONUN'
- class pleiades.sammy.parameters.misc.Card11Parameter(*, type: Card11ParameterType)[source]
Bases:
BaseModelBase class for Card 11 parameter types.
This class provides common functionality for all Card 11 parameter types including parsing and formatting of fixed-width formats.
- type
Parameter type identifier
- Type:
- type: Card11ParameterType
- classmethod identify_type(line: str) Card11ParameterType | None[source]
Identify parameter type from input line.
- Parameters:
line – Input line starting with parameter identifier
- Returns:
Parameter type or None if not recognized
- classmethod from_lines(lines: List[str]) Card11Parameter | None[source]
Factory method to create appropriate parameter object.
- Parameters:
lines – Input lines for parameter
- Returns:
Parsed parameter object or None if invalid
- Raises:
ValueError – If format is invalid
- to_lines() List[str][source]
Convert parameter to fixed-width format lines.
- Returns:
List of formatted lines
- Raises:
NotImplementedError – Must be implemented by subclasses
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pleiades.sammy.parameters.misc.DeltaParameters(*, type: Card11ParameterType = Card11ParameterType.DELTA, l1_coefficient: float, l1_uncertainty: float | None = None, l0_constant: float, l0_uncertainty: float | None = None, l1_flag: VaryFlag = VaryFlag.NO, l0_flag: VaryFlag = VaryFlag.NO)[source]
Bases:
Card11ParameterContainer for DELTA (Length-dependent flight path) parameters.
Format specification from Table VI B.2: Cols Format Variable Description 1-5 A “DELTA” Parameter identifier 7 I IFLAG1 Flag for L’₁ (1=vary, 3=PUP, 0=fixed) 9 I IFLAG0 Flag for L’₀ 11-20 F DELL11 L’₁ coefficient of E (m/eV) 21-30 F D1 Uncertainty on L’₁ (m/eV) 31-40 F DELL00 L’₀ constant term (m) 41-50 F D0 Uncertainty on L’₀ (m)
- l1_flag
Flag for varying L’₁
- l0_flag
Flag for varying L’₀
- type: Card11ParameterType
- classmethod from_lines(lines: List[str]) DeltaParameters[source]
Parse DELTA parameters from fixed-width format lines.
- Parameters:
lines – List of input lines (expects single line for DELTA parameters)
- Returns:
Parsed parameters
- Return type:
- Raises:
ValueError – If format is invalid or required values missing
- to_lines() List[str][source]
Convert parameters to fixed-width format line.
- Returns:
List containing single formatted line
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pleiades.sammy.parameters.misc.EtaParameters(*, type: Card11ParameterType = Card11ParameterType.ETA, nu_value: float, nu_uncertainty: float | None = None, energy: float | None = None, flag: VaryFlag = VaryFlag.NO)[source]
Bases:
Card11ParameterContainer for ETA (normalization coefficient) parameters.
Format specification from Table VI B.2: Cols Format Variable Description 1-5 A “ETA “ Parameter identifier (“eta” + 2 spaces) 7 I IFLAGN Flag for parameter ν (0=fixed, 1=vary, 3=PUP) 11-20 F NU Normalization coefficient ν (dimensionless) 21-30 F DNU Uncertainty on NU 31-40 F ENU Energy for which this value applies (eV)
Notes: - If a constant value of NU is wanted, the energy value can be omitted - If more than one ETA line is present, all must be together in increasing energy order - SAMMY will linearly interpolate to obtain values between specified energies
- flag
Flag for varying ν
- type: Card11ParameterType
- classmethod from_lines(lines: List[str]) EtaParameters[source]
Parse ETA parameters from fixed-width format lines.
- Parameters:
lines – List of input lines (expects single line for ETA parameters)
- Returns:
Parsed parameters
- Return type:
- Raises:
ValueError – If format is invalid or required values missing
- to_lines() List[str][source]
Convert parameters to fixed-width format line.
- Returns:
List containing single formatted line
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pleiades.sammy.parameters.misc.FinitParameters(*, type: Card11ParameterType = Card11ParameterType.FINIT, incident_attenuation: float, incident_uncertainty: float | None = None, exit_attenuation: float, exit_uncertainty: float | None = None, incident_flag: VaryFlag = VaryFlag.NO, exit_flag: VaryFlag = VaryFlag.NO)[source]
Bases:
Card11ParameterContainer for FINIT (finite-size corrections) parameters.
Format specification from Table VI B.2: Cols Format Variable Description 1-5 A “FINIT” Parameter identifier 7 I IFLAGI Flag for ATTNI 9 I IFLAGO Flag for ATTNO 11-20 F ATTNI Incident-particle attenuation (atoms/barn) 21-30 F DTTNI Uncertainty on ATTNI 31-40 F ATTNO Exit-particle attenuation (atom/b) 41-50 F DTTNO Uncertainty on ATTNO
Notes: - Repeat once for each angle - If only one line, same attenuations used for all angles
- incident_flag
Flag for incident attenuation
- exit_flag
Flag for exit attenuation
- type: Card11ParameterType
- classmethod from_lines(lines: List[str]) FinitParameters[source]
Parse FINIT parameters from fixed-width format lines.
- Parameters:
lines – List of input lines (expects single line for FINIT parameters)
- Returns:
Parsed parameters
- Return type:
- Raises:
ValueError – If format is invalid or required values missing
- to_lines() List[str][source]
Convert parameters to fixed-width format line.
- Returns:
List containing single formatted line
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pleiades.sammy.parameters.misc.GammaParameters(*, type: Card11ParameterType = Card11ParameterType.GAMMA, spin_group: Annotated[int, Gt(gt=0)], width: float, uncertainty: float | None = None, flag: VaryFlag = VaryFlag.NO)[source]
Bases:
Card11ParameterContainer for GAMMA (radiation width) parameters.
Format specification from Table VI B.2: Cols Format Variable Description 1-5 A “GAMMA” Parameter identifier 6-7 I IG Spin group number 8-9 I IFG Flag for GAMGAM (0=fixed, 1=vary, 3=PUP) 11-20 F GAMGAM Radiation width Γγ for all resonances in spin group 21-30 F DGAM Uncertainty on GAMGAM
Notes: - If used for any spin group, must be given for every spin group
- flag
Flag for varying width
- type: Card11ParameterType
- classmethod from_lines(lines: List[str]) GammaParameters[source]
Parse GAMMA parameters from fixed-width format lines.
- Parameters:
lines – List of input lines (expects single line for GAMMA parameters)
- Returns:
Parsed parameters
- Return type:
- Raises:
ValueError – If format is invalid or required values missing
- to_lines() List[str][source]
Convert parameters to fixed-width format line.
- Returns:
List containing single formatted line
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pleiades.sammy.parameters.misc.TzeroParameters(*, type: Card11ParameterType = Card11ParameterType.TZERO, t0_value: float, t0_uncertainty: float | None = None, l0_value: float, l0_uncertainty: float | None = None, flight_path_length: float | None = None, t0_flag: VaryFlag = VaryFlag.NO, l0_flag: VaryFlag = VaryFlag.NO)[source]
Bases:
Card11ParameterContainer for TZERO (time offset) parameters.
Format specification from Table VI B.2: Cols Format Variable Description 1-5 A “TZERO” Parameter identifier 7 I IFTZER Flag for t 9 I IFLZER Flag for L 11-20 F TZERO t (μs) 21-30 F DTZERO Uncertainty on t (μs) 31-40 F LZERO L (dimensionless) 41-50 F DLZERO Uncertainty on L 51-60 F FPL Flight-path length (m)
- t0_flag
Flag for varying t
- l0_flag
Flag for varying L
- type: Card11ParameterType
- classmethod from_lines(lines: List[str]) TzeroParameters[source]
Parse TZERO parameters from fixed-width format lines.
- Parameters:
lines – List of input lines (expects single line for TZERO parameters)
- Returns:
Parsed parameters
- Return type:
- Raises:
ValueError – If format is invalid or required values missing
- to_lines() List[str][source]
Convert parameters to fixed-width format line.
- Returns:
List containing single formatted line
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pleiades.sammy.parameters.misc.SiabnParameters(*, type: Card11ParameterType = Card11ParameterType.SIABN, abundances: Annotated[List[float], MinLen(min_length=1), MaxLen(max_length=3)], uncertainties: Annotated[List[float | None], MaxLen(max_length=3)], flags: Annotated[List[VaryFlag], MaxLen(max_length=3)])[source]
Bases:
Card11ParameterContainer for SIABN (self-indication abundance) parameters.
Format specification from Table VI B.2: Cols Format Variable Description 1-5 A “SIABN” Parameter identifier 7 I IF1 Flag for SIABN(1) 9 I IF2 Flag for SIABN(2) 10 I IF3 Flag for SIABN(3) 11-20 F SIABN(1) Abundance for nuclide #1 21-30 F DS(1) Uncertainty on SIABN(1) 31-40 F SIABN(2) Abundance for nuclide #2 41-50 F DS(2) Uncertainty on SIABN(2) 51-60 F SIABN(3) Abundance for nuclide #3 61-70 F DS(3) Uncertainty on SIABN(3)
Notes: - Nuclides must be defined in card set 10 before card set 11 - At least one abundance must be provided - Number of flags must match number of abundances
- type: Card11ParameterType
- validate_list_lengths() SiabnParameters[source]
Validate that all lists have matching lengths.
- classmethod from_lines(lines: List[str]) SiabnParameters[source]
Parse SIABN parameters from fixed-width format lines.
- Parameters:
lines – List of input lines (expects single line for SIABN parameters)
- Returns:
Parsed parameters
- Return type:
- Raises:
ValueError – If format is invalid or required values missing
- to_lines() List[str][source]
Convert parameters to fixed-width format line.
- Returns:
List containing single formatted line
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pleiades.sammy.parameters.misc.SelfiParameters(*, type: Card11ParameterType = Card11ParameterType.SELFI, temperature: float, temperature_uncertainty: float | None = None, thickness: float, thickness_uncertainty: float | None = None, temperature_flag: VaryFlag = VaryFlag.NO, thickness_flag: VaryFlag = VaryFlag.NO)[source]
Bases:
Card11ParameterContainer for SELFI (self-indication temperature/thickness) parameters.
Format specification from Table VI B.2: Cols Format Variable Description 1-5 A “SELFI” Parameter identifier 7 I IFTEMP Flag for temperature 9 I IFTHCK Flag for thickness 11-20 F SITEM Effective temperature (K) 21-30 F dSITEM Uncertainty on SITEM 31-40 F SITHC Thickness (atoms/barn) 41-50 F dSITHC Uncertainty on SITHC
- temperature_flag
Flag for varying temperature
- thickness_flag
Flag for varying thickness
- type: Card11ParameterType
- classmethod from_lines(lines: List[str]) SelfiParameters[source]
Parse SELFI parameters from fixed-width format lines.
- Parameters:
lines – List of input lines (expects single line for SELFI parameters)
- Returns:
Parsed parameters
- Return type:
- Raises:
ValueError – If format is invalid or required values missing
- to_lines() List[str][source]
Convert parameters to fixed-width format line.
- Returns:
List containing single formatted line
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pleiades.sammy.parameters.misc.EfficParameters(*, type: Card11ParameterType = Card11ParameterType.EFFIC, capture_efficiency: float, fission_efficiency: float, capture_uncertainty: float | None = None, fission_uncertainty: float | None = None, capture_flag: VaryFlag = VaryFlag.NO, fission_flag: VaryFlag = VaryFlag.NO)[source]
Bases:
Card11ParameterContainer for EFFIC (detection efficiency) parameters.
Format specification from Table VI B.2: Cols Format Variable Description 1-5 A “EFFIC” Parameter identifier 7 I IFCAPE Flag for capture efficiency 9 I IFFISE Flag for fission efficiency 11-20 F EFCAP Efficiency for detecting capture events 21-30 F EFFIS Efficiency for detecting fission events 31-40 F dEFCAP Uncertainty on EFCAP 41-50 F dEFFIS Uncertainty on EFFIS
- capture_flag
Flag for varying capture efficiency
- fission_flag
Flag for varying fission efficiency
- type: Card11ParameterType
- classmethod from_lines(lines: List[str]) EfficParameters[source]
Parse EFFIC parameters from fixed-width format lines.
- Parameters:
lines – List of input lines (expects single line for EFFIC parameters)
- Returns:
Parsed parameters
- Return type:
- Raises:
ValueError – If format is invalid or required values missing
- to_lines() List[str][source]
Convert parameters to fixed-width format line.
- Returns:
List containing single formatted line
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pleiades.sammy.parameters.misc.DelteParameters(*, type: Card11ParameterType = Card11ParameterType.DELTE, e_coefficient: float, e_uncertainty: float | None = None, constant_term: float, constant_uncertainty: float | None = None, log_coefficient: float, log_uncertainty: float | None = None, e_flag: VaryFlag = VaryFlag.NO, constant_flag: VaryFlag = VaryFlag.NO, log_flag: VaryFlag = VaryFlag.NO)[source]
Bases:
Card11ParameterContainer for DELTE (energy-dependent delta E) parameters.
Format specification from Table VI B.2: Cols Format Variable Description 1-5 A “DELTE” Parameter identifier 7 I IFLAG1 Flag for DELE1 9 I IFLAG0 Flag for DELE0 10 I IFLAGL Flag for DELEL 11-20 F DELE1 Coefficient of E (m/eV) 21-30 F DD1 Uncertainty on DELE1 31-40 F DELE0 Constant term (m) 41-50 F DD0 Uncertainty on DELE0 51-60 F DELEL Coefficient of log term (m/ln(eV)) 61-70 F DDL Uncertainty on DELEL
- e_flag
Flag for varying E coefficient
- constant_flag
Flag for varying constant term
- log_flag
Flag for varying log coefficient
- type: Card11ParameterType
- classmethod from_lines(lines: List[str]) DelteParameters[source]
Parse DELTE parameters from fixed-width format lines.
- Parameters:
lines – List of input lines (expects single line for DELTE parameters)
- Returns:
Parsed parameters
- Return type:
- Raises:
ValueError – If format is invalid or required values missing
- to_lines() List[str][source]
Convert parameters to fixed-width format line.
- Returns:
List containing single formatted line
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pleiades.sammy.parameters.misc.DrcapParameters(*, type: Card11ParameterType = Card11ParameterType.DRCAP, coefficient: float, coefficient_uncertainty: float | None = None, nuclide_number: Annotated[int, Gt(gt=0)], flag: VaryFlag = VaryFlag.NO)[source]
Bases:
Card11ParameterContainer for DRCAP (direct capture component) parameters.
Format specification from Table VI B.2: Cols Format Variable Description 1-5 A “DRCAP” Parameter identifier 7 I IFLAG1 Flag to vary COEF 9 I NUC Nuclide Number 11-20 F COEF Coefficient of DRC file value 21-30 F dCOEF Uncertainty on COEF
Notes: - May be included multiple times, once per nuclide - Numerical direct capture component is read from DRC file - COEF multiplies the value from DRC file
- flag
Flag for varying coefficient
- type: Card11ParameterType
- classmethod from_lines(lines: List[str]) DrcapParameters[source]
Parse DRCAP parameters from fixed-width format lines.
- Parameters:
lines – List of input lines (expects single line for DRCAP parameters)
- Returns:
Parsed parameters
- Return type:
- Raises:
ValueError – If format is invalid or required values missing
- to_lines() List[str][source]
Convert parameters to fixed-width format line.
- Returns:
List containing single formatted line
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pleiades.sammy.parameters.misc.NonunParameters(*, type: Card11ParameterType = Card11ParameterType.NONUN, radii: Annotated[List[float], MinLen(min_length=2)], thicknesses: Annotated[List[float], MinLen(min_length=2)], uncertainties: Annotated[List[float | None], MinLen(min_length=2)])[source]
Bases:
Card11ParameterContainer for NONUN (non-uniform sample thickness) parameters.
Format specification from Table VI B.2: Cols Format Variable Description 1-5 A “NONUN” Parameter identifier 21-30 F R Radius at which thickness is given 31-40 F Z Positive value for sample thickness at radius 41-50 F dZ Uncertainty on thickness
Notes: - At least two lines must be given (center and outer edge) - First line must have zero radius (center) - Last line must be at outer edge - Lines must be in increasing radius order - No fitting parameters yet permitted
- type: Card11ParameterType
- validate_arrays() NonunParameters[source]
Validate array lengths and values.
- classmethod from_lines(lines: List[str]) NonunParameters[source]
Parse NONUN parameters from fixed-width format lines.
- Parameters:
lines – List of input lines (minimum 2 lines required)
- Returns:
Parsed parameters
- Return type:
- Raises:
ValueError – If format is invalid or required values missing
- to_lines() List[str][source]
Convert parameters to fixed-width format lines.
- Returns:
List containing formatted lines for each radius point
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].