pleiades.sammy.io.card_formats.inp03_constants module

Card Set 3 (Physical Constants) for SAMMY INP files.

This module provides the Card03 class for parsing and generating the physical constants line in SAMMY input files. This card appears after the element information and defines temperature, flight path, and resolution parameters.

Format specification (Card Set 3 - Physical Constants):

The line contains five floating-point values with variable spacing: - TEMP: Temperature (K) - FPL: Flight path length (m) - DELTAL: Spread in flight-path length (m) - DELTAG: Gaussian resolution width (μs) - DELTAE: e-folding width of exponential resolution (μs)

Example

  1. 200.0000 0.182233 0.0 0.002518

class pleiades.sammy.io.card_formats.inp03_constants.PhysicalConstants(*, temperature: Annotated[float, Gt(gt=0)], flight_path_length: Annotated[float, Gt(gt=0)], delta_l: Annotated[float, Ge(ge=0)] = 0.0, delta_g: Annotated[float, Ge(ge=0)] = 0.0, delta_e: Annotated[float, Ge(ge=0)] = 0.0)[source]

Bases: BaseModel

Pydantic model for physical constants in Card Set 3.

temperature

Temperature in Kelvin

Type:

float

flight_path_length

Flight path length in meters

Type:

float

delta_l

Spread in flight-path length in meters

Type:

float

delta_g

Gaussian resolution width in microseconds

Type:

float

delta_e

e-folding width of exponential resolution in microseconds

Type:

float

temperature: float
flight_path_length: float
delta_l: float
delta_g: float
delta_e: float
model_config = {}

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

class pleiades.sammy.io.card_formats.inp03_constants.Card03[source]

Bases: BaseModel

Class representing Card Set 3 (physical constants) in SAMMY INP files.

This card defines temperature, flight path, and resolution parameters for the analysis.

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

Parse physical constants from Card Set 3 line.

Parameters:

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

Returns:

Parsed physical constants

Return type:

PhysicalConstants

Raises:

ValueError – If format is invalid or required values missing

classmethod to_lines(constants: PhysicalConstants) List[str][source]

Convert physical constants to Card Set 3 formatted line.

Parameters:

constants – PhysicalConstants object containing parameter data

Returns:

List containing single formatted line for Card Set 3

model_config = {}

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