pleiades.sammy.io.card_formats.par07a_radii module

pleiades.sammy.io.card_formats.par07a_radii.parse_flag_values(flag_str, n=2)[source]

Parse up to n flag values from a string, return as list of int/str.

class pleiades.sammy.io.card_formats.par07a_radii.Card07a[source]

Bases: BaseModel

Class representing the Card 7a format for radii parameters in the SAMMY parameter file. This class is used to extract radii information based on a key-word format

classmethod is_header_line(line: str) bool[source]

Check if line is a valid header line.

Parameters:

line – Input line to check

Returns:

True if the first 5 characters of the line are ‘ISOTO’

Return type:

bool

classmethod from_lines(lines: List[str], fit_config: FitConfig = None) None[source]

Parse a complete isotope parameter card set from lines.

Parameters:
  • lines – List of input lines including header and blank terminator

  • FitConfig – FitConfig object to read isotopes into.

Raises:

ValueError – If no valid header found or invalid format

classmethod to_lines(fit_config: FitConfig = None) List[str][source]

Convert the radius parameters to lines for output.

Parameters:

fit_config – FitConfig object containing isotopes and their radius parameters.

Returns:

Lines representing the radius parameters.

Return type:

List[str]

model_config = {}

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