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:

  1. DELTA - Length-dependent flight path parameters

  2. ETA - Normalization coefficients for ETA data

  3. FINIT - Finite-size corrections for angular distributions

  4. 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]

Bases: str, Enum

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: BaseModel

Base 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:

Card11ParameterType

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: Card11Parameter

Container 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_coefficient

L’₁ coefficient of E (m/eV)

Type:

float

l1_uncertainty

Uncertainty on L’₁ (m/eV)

Type:

float | None

l0_constant

L’₀ constant term (m)

Type:

float

l0_uncertainty

Uncertainty on L’₀ (m)

Type:

float | None

l1_flag

Flag for varying L’₁

Type:

pleiades.utils.helper.VaryFlag

l0_flag

Flag for varying L’₀

Type:

pleiades.utils.helper.VaryFlag

type: Card11ParameterType
l1_coefficient: float
l1_uncertainty: float | None
l0_constant: float
l0_uncertainty: float | None
l1_flag: VaryFlag
l0_flag: VaryFlag
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:

DeltaParameters

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: Card11Parameter

Container 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

nu_value

Normalization coefficient ν (dimensionless)

Type:

float

nu_uncertainty

Uncertainty on ν

Type:

float | None

energy

Energy for which this value applies (eV), optional

Type:

float | None

flag

Flag for varying ν

Type:

pleiades.utils.helper.VaryFlag

type: Card11ParameterType
nu_value: float
nu_uncertainty: float | None
energy: float | None
flag: VaryFlag
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:

EtaParameters

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: Card11Parameter

Container 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_attenuation

Incident-particle attenuation (atoms/barn)

Type:

float

incident_uncertainty

Uncertainty on incident attenuation

Type:

float | None

exit_attenuation

Exit-particle attenuation (atom/b)

Type:

float

exit_uncertainty

Uncertainty on exit attenuation

Type:

float | None

incident_flag

Flag for incident attenuation

Type:

pleiades.utils.helper.VaryFlag

exit_flag

Flag for exit attenuation

Type:

pleiades.utils.helper.VaryFlag

type: Card11ParameterType
incident_attenuation: float
incident_uncertainty: float | None
exit_attenuation: float
exit_uncertainty: float | None
incident_flag: VaryFlag
exit_flag: VaryFlag
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:

FinitParameters

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: Card11Parameter

Container 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

spin_group

Spin group number (must be positive)

Type:

int

width

Radiation width Γγ for all resonances in group

Type:

float

uncertainty

Uncertainty on width (optional)

Type:

float | None

flag

Flag for varying width

Type:

pleiades.utils.helper.VaryFlag

type: Card11ParameterType
spin_group: int
width: float
uncertainty: float | None
flag: VaryFlag
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:

GammaParameters

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: Card11Parameter

Container 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_value

Time offset t (μs)

Type:

float

t0_uncertainty

Uncertainty on t (μs)

Type:

float | None

l0_value

L value (dimensionless)

Type:

float

l0_uncertainty

Uncertainty on L

Type:

float | None

flight_path_length

Flight path length (m), optional

Type:

float | None

t0_flag

Flag for varying t

Type:

pleiades.utils.helper.VaryFlag

l0_flag

Flag for varying L

Type:

pleiades.utils.helper.VaryFlag

type: Card11ParameterType
t0_value: float
t0_uncertainty: float | None
l0_value: float
l0_uncertainty: float | None
flight_path_length: float | None
t0_flag: VaryFlag
l0_flag: VaryFlag
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:

TzeroParameters

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: Card11Parameter

Container 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
abundances: List[float]
uncertainties: List[float | None]
flags: List[VaryFlag]
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:

SiabnParameters

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: Card11Parameter

Container 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

Effective temperature (K) for transmission sample

Type:

float

temperature_uncertainty

Uncertainty on temperature

Type:

float | None

thickness

Sample thickness (atoms/barn)

Type:

float

thickness_uncertainty

Uncertainty on thickness

Type:

float | None

temperature_flag

Flag for varying temperature

Type:

pleiades.utils.helper.VaryFlag

thickness_flag

Flag for varying thickness

Type:

pleiades.utils.helper.VaryFlag

type: Card11ParameterType
temperature: float
temperature_uncertainty: float | None
thickness: float
thickness_uncertainty: float | None
temperature_flag: VaryFlag
thickness_flag: VaryFlag
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:

SelfiParameters

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: Card11Parameter

Container 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_efficiency

Efficiency for detecting capture events

Type:

float

fission_efficiency

Efficiency for detecting fission events

Type:

float

capture_uncertainty

Uncertainty on capture efficiency

Type:

float | None

fission_uncertainty

Uncertainty on fission efficiency

Type:

float | None

capture_flag

Flag for varying capture efficiency

Type:

pleiades.utils.helper.VaryFlag

fission_flag

Flag for varying fission efficiency

Type:

pleiades.utils.helper.VaryFlag

type: Card11ParameterType
capture_efficiency: float
fission_efficiency: float
capture_uncertainty: float | None
fission_uncertainty: float | None
capture_flag: VaryFlag
fission_flag: VaryFlag
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:

EfficParameters

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: Card11Parameter

Container 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_coefficient

Coefficient of E (m/eV)

Type:

float

e_uncertainty

Uncertainty on E coefficient

Type:

float | None

constant_term

Constant term (m)

Type:

float

constant_uncertainty

Uncertainty on constant term

Type:

float | None

log_coefficient

Coefficient of log term (m/ln(eV))

Type:

float

log_uncertainty

Uncertainty on log coefficient

Type:

float | None

e_flag

Flag for varying E coefficient

Type:

pleiades.utils.helper.VaryFlag

constant_flag

Flag for varying constant term

Type:

pleiades.utils.helper.VaryFlag

log_flag

Flag for varying log coefficient

Type:

pleiades.utils.helper.VaryFlag

type: Card11ParameterType
e_coefficient: float
e_uncertainty: float | None
constant_term: float
constant_uncertainty: float | None
log_coefficient: float
log_uncertainty: float | None
e_flag: VaryFlag
constant_flag: VaryFlag
log_flag: VaryFlag
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:

DelteParameters

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: Card11Parameter

Container 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

coefficient

Coefficient of the DRC file value

Type:

float

coefficient_uncertainty

Uncertainty on coefficient

Type:

float | None

nuclide_number

Nuclide number (must be positive)

Type:

int

flag

Flag for varying coefficient

Type:

pleiades.utils.helper.VaryFlag

type: Card11ParameterType
coefficient: float
coefficient_uncertainty: float | None
nuclide_number: int
flag: VaryFlag
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:

DrcapParameters

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: Card11Parameter

Container 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

radii

List of radii values (must start with 0)

Type:

List[float]

thicknesses

List of thickness values at each radius

Type:

List[float]

uncertainties

List of uncertainties on thicknesses (optional)

Type:

List[float | None]

type: Card11ParameterType
radii: List[float]
thicknesses: List[float]
uncertainties: List[float | None]
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:

NonunParameters

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].