pyimcom.config
Encapsulation of pyimcom background settings and configuration.
Classes
- Timer
All-purpose timer.
- Settings
pyimcom background settings.
- fpaCoords
some basic data on the Roman FPA coordinates, needed for some of the tests.
- Config
pyimcom configuration, with JSON file interface.
Functions
- format_axis
Format a panel (an axis) of a figure.
Attributes
Classes
All-purpose timer. |
|
pyimcom background settings. |
|
This contains some static data on the FPA coordinate system. |
|
pyimcom configuration, with JSON file interface. |
Functions
|
Format a panel (an axis) of a figure. |
Module Contents
- class Settings[source]
pyimcom background settings.
This class contains assorted Roman WFI data needed for the coadd code.
- class fpaCoords[source]
This contains some static data on the FPA coordinate system.
It also has some associated static methods.
- class Config(cfg_file: str = '', inmode=None)[source]
pyimcom configuration, with JSON file interface.
- Parameters:
cfg_file (str or None, optional) – File path to or text content of a JSON configuration file. The default is ‘’. This uses pyimcom/configs/default_config.json. Set cfg_file=None to build a configuration from scratch.
inmode (str or None, optional) – Directives for special behavior. Right now the only one supported is ‘block’ (meaning the configuration is read from a block output).
- __slots__ = ('cfg_file', 'NsideP', 'n1P', 'n2f', 'obsfile', 'inpath', 'informat', 'use_filter',...[source]
- _from_dict(cfg_dict: dict) None[source]
Build a configuration from a dictionary.
- Parameters:
cfg_dict (dict) – This is a dictionary, usually built from a JSON file.
- Return type:
None
- _get_attrs_wrapper(code: str, newline: bool = True) None[source]
Wrapper for getting an attribute or a set of attributes.
- Parameters:
code (str) – Code segment to execute.
newline (bool, optional) – Whether to print a blank line when finished.
- Return type:
None
- _build_config() None[source]
Terminal interface to build a configuration from scratch.
The prompts are based on comments in old text configuration files. assert statements for further validity checks to be added.
- Return type:
None
- to_file(fname: str = '') None[source]
Save the configuration to a JSON file.
- Parameters:
fname (str or None, optional) – JSON configuration file name to save to. The default is ‘’. This overwrites pyimcom/configs/default_config.json. Set fname=None to get a text version of the configuration.
- Returns:
Text version of the configuration.
- Return type:
str or None