TolTECA Documentation¶
tolteca
is a Python package developed to handle data taken by the TolTEC
Camera on the Large Millimeter Telescope.
While TolTEC is its main target instrument, the infrastructure and generic workflow are implemented in a instrument agnostic fashion, which allows the functionalities to be extendable to other instruments.
Getting Started¶
Todo
Add details.
Using tolteca
¶
Overview of Workflow¶
RuntimeContext and RuntimeBase
Commandline Interface
Programming Interface
Data File and Data Product Management¶
Data Reduction Pipeline¶
Observation Simulator¶
Web-based Tools¶
Recipes¶
Scripts¶
Reference/API¶
tolteca Package¶
tolteca.cli Package¶
Functions¶
|
The CLI entry point. |
tolteca.common.toltec Package¶
tolteca.common.lmt Package¶
tolteca.datamodels.toltec Package¶
This module implements the TolTEC data model.
The TolTEC data model covers two topics:
Basic Obs Data (BOD)
Basic Obs Data are the data from the telescope/instrument control system (TCS/ICS) and the timely analysis service (TAS).
These data are typically stored on disk on a per-interface basis, and carry full runtime information of the TolTEC instrument.
The name “basic obs” (BO) refers to a continuous file-writing transaction executed by the TCS/ICS. This is different from an “obs request” (OR) which may consist of multiple BOs.
Each basic obs is assigned a unique transaction identifier, consists of a 4-tuple of “master”, “obsnum”, “subobsnum”, and “scannum”. In addition, the basic obs data stream may be relayed (duplicated) to remote destinations and files will be created with the destination local repeat writers. The (repeated) copy of the data files are distinguished by an integer field “repeat”. The original data has “repeat” value of 0.
The TAS monitors newly generated raw obs data and runs various data reduction recipes to create timely view data products to guide the observation. One of the most important output of this is noted as the basic reduced data files for each input raw obs data files.
Both raw obs data and basic reduced data can be handled by the wrapper class
BasicObsData
. By providing a unified interface for access the meta data and data in the data files, this wrapper class hides away the details of handling of interacting with each data storage format for different data kinds, which is implemented in the various subclasses ofDataFileIO
defined intoltec
.More over, the helper class
BasicObsDataset
provides a table-like way to work with a collection of BOD files for carrying out instrument level diagnostics and data analysis.Data Products and the Associations
Data Products (DPs) and Data Product Associations (DPAs) are the core concepts of the TolTEC data management system, which involves both the raw data and the reduced data.
The DP and DPA information are managed using the data product database (DPDB). The modules
db
,dp
, andtoltecdp
implement the database structure, the data product specification/schema, as well as the interface to manage the DP and DPAs.Data analysis tasks run via TolTECA read and write to DPDB to record the inputs, outputs, the associations, as well the runtime context info.
The key element of a data product is an index object (DPIndex), typically stored along with the actual (textual or binary) data files as an standalone YAML (or JSON) file.
One of the key property of a data product is the data product type. The contents of the DPIndex for different data types are constrained by the corresponding schemas.
Some data product types are:
- dp_raw_obs
Simple collection of raw basic obs data files (BODs).
- dp_basic_reduced_obs
Simple collection of basic reduced obs data generated by the TAS, one-to-one mapping to the dp_raw_obs.
- dp_science
Reduced, science-ready maps/catalogs.
The DPs are related to each other through association info noted as DPAs. Each DPA typically has contextual data (meta data) to describe the relations of the DPs.
Classes¶
|
A class that provides unified IO interface to TolTEC basic obs data. |
|
A helper class to access a set of TolTEC basic obs data items. |
This class provides access to TolTEC data product info. |
Class Inheritance Diagram¶
tolteca.datamodels.fs Package¶
tolteca.datamodels.db Package¶
tolteca.datamodels.io Package¶
Functions¶
|
A alias of |
Classes¶
|
"A class to read KIDs model parameters. |
|
A class to read data from TolTEC netCDF files. |
Class Inheritance Diagram¶
tolteca.reduce Package¶
Classes¶
|
The config for |
|
A class to run the data reduction pipeline. |
Raise when errors occur in |
Class Inheritance Diagram¶
tolteca.reduce.engines Package¶
Classes¶
|
A helper class to access a set of TolTEC basic obs data items. |
|
A wrapper class of Citlali, the TolTEC data reduction pipeline engine. |
|
The high-level config for Citlali. |
|
The config class for reduction with Citlali. |
|
A subclass of |
|
Marker for an optional part of the validation Schema. |
|
Utility function to combine validation directives in a OR Boolean fashion. |
|
|
|
Entry point of the library, use this class to instantiate validation schema for the data that will be validated. |
|
A context manager to log to file. |
Class Inheritance Diagram¶
tolteca.reduce.toltec Package¶
Classes¶
|
A helper class to access a set of TolTEC basic obs data items. |
A class to collect TolTEC basic obs dataset from local files. |
|
|
A class describing data managed in local file system. |
|
A mixin class that allows converting object to and from dict. |
Class Inheritance Diagram¶
tolteca.simu Package¶
Classes¶
|
The config for |
|
A class to run the simulator. |
Raise when errors occur in |
Class Inheritance Diagram¶
tolteca.simu.base Module¶
Classes¶
|
Base class for models that transform properties from one frame to another. |
|
An coordinate frame for describing discrete detector attributes. |
Class Inheritance Diagram¶
tolteca.simu.mapping Package¶
Classes¶
|
The available pattern kinds. |
|
The class for to describe trajectories loaded from LMT TCS |
Class Inheritance Diagram¶
tolteca.simu.sources Package¶
Classes¶
|
The class for simulator source specified by catalog. |
|
A subclass of |
|
A schema that can resolve list of dict specified with templates. |
The config class for image source model created from FITS image file. |
|
|
The class for simulator source from FITS image. |
|
|
|
Marker for an optional part of the validation Schema. |
|
Utility function to combine validation directives in a OR Boolean fashion. |
The config class for point source catalog source model created from catalog file. |
|
|
|
|
Entry point of the library, use this class to instantiate validation schema for the data that will be validated. |
Class Inheritance Diagram¶
tolteca.simu.exports Package¶
Classes¶
|
A subclass of |
A class to create LMT OT scripts. |
|
|
The config class for LMT OT script exporter. |
|
Marker for an optional part of the validation Schema. |
|
Entry point of the library, use this class to instantiate validation schema for the data that will be validated. |
|
The year, month and day arguments are required. |
|
Fixed offset from UTC implementation of tzinfo. |
Class Inheritance Diagram¶
tolteca.simu.plots Package¶
Functions¶
|
|
|
Classes¶
|
A subclass of |
The config class for mapping trajectory plot. |
|
|
Marker for an optional part of the validation Schema. |
|
Entry point of the library, use this class to instantiate validation schema for the data that will be validated. |
The config class for visibility plot. |
Class Inheritance Diagram¶
tolteca.simu.toltec Package¶
Classes¶
|
The config class for TolTEC observation simulator. |
|
The config class for TolTEC half-wave plate and the rotator. |
|
The config class to compute the TolTEC detector power loading. |
Class Inheritance Diagram¶
tolteca.utils Package¶
Functions¶
Return the package data path. |
|
|
|
|
Dump |
|
Return a nested dict composed from CLI arguments. |
Classes¶
|
A class to manage configurations. |
|
A base class that consumes |
Raise when error in |
|
|
A helper class to load config files for tolteca. |
Class Inheritance Diagram¶
tolteca.web Package¶
Classes¶
|
The config for |
|
A class that manages the runtime context of web apps. |