pleiades.sammy.io.card_formats.inp02_element module

Card Set 2 (Element Information) for SAMMY INP files.

This module provides the Card02 class for parsing and generating the element information line in SAMMY input files. This card appears early in the INP file and defines the sample element, atomic weight, and energy range.

Format specification (Card Set 2):

Cols Format Variable Description 1-10 A ELMNT Sample element’s name (left-aligned) 11-20 F AW Atomic weight (amu) 21-30 F EMIN Minimum energy for dataset (eV) 31-40 F EMAX Maximum energy (eV) 41-45 I NEPNTS Points in artificial energy grid 46-50 I ITMAX Maximum iterations for Bayes’ solution 51-52 I ICORR Correlation threshold x100 53-55 I NXTRA Extra points between experimental points 56-57 I IPTDOP Grid enhancement for Doppler broadening 59-60 I IPTWID Grid enhancement for resonance tails 61-70 I IXXCHN Channel skip or ZA for ENDF output 71-72 I NDIGIT Digits for compact covariance output 73-74 I IDROPP Percent threshold for zeroing covariances 75-80 I MATNUM ENDF material number

Example

Si 27.976928 300000. 1800000.

class pleiades.sammy.io.card_formats.inp02_element.ElementInfo(*, element: Annotated[str, MaxLen(max_length=10)], atomic_weight: Annotated[float, Gt(gt=0)], min_energy: Annotated[float, Ge(ge=0)], max_energy: Annotated[float, Gt(gt=0)], nepnts: int | None = None, itmax: int | None = None, icorr: int | None = None, nxtra: int | None = None, iptdop: int | None = None, iptwid: int | None = None, ixxchn: int | None = None, ndigit: int | None = None, idropp: int | None = None, matnum: int | None = None)[source]

Bases: BaseModel

Pydantic model for element information in Card Set 2.

element

Sample element’s name (up to 10 characters)

Type:

str

atomic_weight

Atomic weight in amu

Type:

float

min_energy

Minimum energy for dataset in eV

Type:

float

max_energy

Maximum energy in eV

Type:

float

nepnts

Points in artificial energy grid

Type:

int | None

itmax

Maximum iterations for Bayes’ solution

Type:

int | None

icorr

Correlation threshold x100

Type:

int | None

nxtra

Extra points between experimental points

Type:

int | None

iptdop

Grid enhancement for Doppler broadening

Type:

int | None

iptwid

Grid enhancement for resonance tails

Type:

int | None

ixxchn

Channel skip or ZA for ENDF output

Type:

int | None

ndigit

Digits for compact covariance output

Type:

int | None

idropp

Percent threshold for zeroing covariances

Type:

int | None

matnum

ENDF material number

Type:

int | None

element: str
atomic_weight: float
min_energy: float
max_energy: float
nepnts: int | None
itmax: int | None
icorr: int | None
nxtra: int | None
iptdop: int | None
iptwid: int | None
ixxchn: int | None
ndigit: int | None
idropp: int | None
matnum: int | None
model_post_init(_ElementInfo__context) None[source]

Validate that max_energy > min_energy.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class pleiades.sammy.io.card_formats.inp02_element.Card02[source]

Bases: BaseModel

Class representing Card Set 2 (element information) in SAMMY INP files.

This card defines the sample element, atomic weight, and energy range for the analysis.

classmethod from_lines(lines: List[str]) ElementInfo[source]

Parse element information from Card Set 2 line.

Parameters:

lines – List of input lines (expects single line for Card 2)

Returns:

Parsed element information

Return type:

ElementInfo

Raises:

ValueError – If format is invalid or required values missing

classmethod to_lines(element_info: ElementInfo) List[str][source]

Convert element information to Card Set 2 formatted line.

Parameters:

element_info – ElementInfo object containing element data

Returns:

List containing single formatted line for Card Set 2

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].