Source code for pleiades.sammy.parameters.det_efficiency

#!/usr/bin/env python
"""Parsers and containers for SAMMY's Card Set 15 detector efficiency parameters.

This module implements parsers and containers for Card Set 15 detector efficiency parameters
which can appear in either the PARameter or INPut file.

Format specification from Table VI B.2:
Card Set 15 contains detector efficiency parameters for specific spin groups.
Each efficiency value can be assigned to multiple spin groups, with any unassigned
groups taking the final efficiency in the list.

Currently unimplemented - placeholder for future development.
"""

from typing import List

from pydantic import BaseModel


[docs] class DetectorEfficiencyParameters(BaseModel): """Container for Card Set 15 detector efficiency parameters. Currently unimplemented - placeholder for future development. Format specification from Table VI B.2: Cols Format Variable Description 1-80 A WHAT "DETECtor efficiencies" Followed by one or more efficiency definitions: 1-10 F PARDET Detector efficiency 11-20 F DELDET Uncertainty on efficiency 21-22 I IFLDET Flag to vary efficiency 23-24 I IGRDET First spin group number 25-26 I IGRDET Second spin group number ...etc. Notes: - If more than 29 spin groups needed, insert "-1" in cols 79-80 and continue on next line - When more than 99 spin groups total, use 5 columns per group number - Any spin groups not included use the final efficiency in the list Attributes: efficiencies: List of efficiency values uncertainties: List of uncertainty values flags: List of vary flags group_assignments: List of lists containing group numbers for each efficiency """
[docs] @classmethod def from_lines(cls, lines: List[str]) -> "DetectorEfficiencyParameters": """Parse detector efficiency parameters from fixed-width format lines. Args: lines: List of input lines for efficiency parameters Raises: NotImplementedError: This class is not yet implemented """ # TODO: Implement Card Set 15 detector efficiency parameter parsing raise NotImplementedError("Card Set 15 detector efficiency parameter parsing is not yet implemented")
[docs] def to_lines(self) -> List[str]: """Convert parameters to fixed-width format lines. Raises: NotImplementedError: This class is not yet implemented """ # TODO: Implement Card Set 15 detector efficiency parameter formatting raise NotImplementedError("Card Set 15 detector efficiency parameter formatting is not yet implemented")