pleiades.sammy.parameters.user_resolution module

Parser for SAMMY’s Card Set 16 (User-Defined Resolution Function) parameters.

Format specification from Table VI B.2: Card Set 16 defines user-defined resolution functions with the following components:

  1. Header line (“USER-Defined resolution function”)

  2. Optional BURST line for burst width parameters

  3. Optional CHANN lines for channel-dependent parameters

  4. Required FILE= lines specifying data files

Each section has specific fixed-width format requirements.

class pleiades.sammy.parameters.user_resolution.Card16ParameterType(value)[source]

Bases: str, Enum

Enumeration of Card 16 parameter types.

USER = 'USER'
BURST = 'BURST'
CHANN = 'CHANN'
FILE = 'FILE='
class pleiades.sammy.parameters.user_resolution.UserResolutionParameters(*, type: Card16ParameterType = Card16ParameterType.USER, burst_width: float | None = None, burst_uncertainty: float | None = None, burst_flag: VaryFlag = VaryFlag.NO, channel_energies: List[float] = <factory>, channel_widths: List[float] = <factory>, channel_uncertainties: List[float | None] = <factory>, channel_flags: List[VaryFlag] = <factory>, filenames: List[str] = <factory>)[source]

Bases: BaseModel

Container for User-Defined Resolution Function parameters.

type

Parameter type identifier (always “USER”)

Type:

pleiades.sammy.parameters.user_resolution.Card16ParameterType

burst_width

Square burst width value (ns), optional

Type:

float | None

burst_uncertainty

Uncertainty on burst width, optional

Type:

float | None

burst_flag

Flag for varying burst width

Type:

pleiades.utils.helper.VaryFlag

channel_energies

List of energies for channel widths

Type:

List[float]

channel_widths

List of channel width values

Type:

List[float]

channel_uncertainties

List of uncertainties on channel widths

Type:

List[float | None]

channel_flags

List of flags for varying channel widths

Type:

List[pleiades.utils.helper.VaryFlag]

filenames

List of data file names

Type:

List[str]

type: Card16ParameterType
burst_width: float | None
burst_uncertainty: float | None
burst_flag: VaryFlag
channel_energies: List[float]
channel_widths: List[float]
channel_uncertainties: List[float | None]
channel_flags: List[VaryFlag]
filenames: List[str]
classmethod from_lines(lines: List[str]) UserResolutionParameters[source]

Parse user resolution parameters from fixed-width format lines.

to_lines() List[str][source]

Convert parameters to fixed-width format lines.

model_config = {}

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