ControlStream
- class openpkpd.parser.control_stream.ControlStream(source_text, records=<factory>, source_path=None)[source]
Bases:
objectTop-level parsed representation of a NONMEM control stream.
- get_all_typed(record_type, cls)[source]
Type-safe accessor returning a list of specific record class.
- classmethod from_file(path)[source]
Load and parse a NONMEM control stream from a file.
- Return type:
- Parameters:
path (str)
- classmethod from_string(text)[source]
Parse a NONMEM control stream from a string.
- Return type:
- Parameters:
text (str)
- to_string()[source]
Serialize the entire control stream to NONMEM .ctl text.
Each record is rendered via its
to_string()method. Structured records (THETA, OMEGA, SIGMA, ESTIMATION, …) reconstruct from their parsed attributes so programmatic modifications are preserved. All other records reproduce their originalraw_text.- Return type: