API reference#
This page provides an auto-generated summary of Pyxel’s API.
Top-level functions#
Configuration#
|
Configuration class. |
|
Save a copy of the input |
Data structures#
|
Scene class defining and storing information of all multi-wavelength photons (unit: ph / (cm2 nm s)). |
|
Photon class designed to handle the storage of monochromatic (unit: ph or multi-wavelength photons (unit ph/nm). |
|
Charge class representing charge distribution (unit: e⁻). |
|
Pixel class defining and storing information of charge packets within pixel (unit: e⁻). |
|
Phase class. |
|
Signal class defining and storing information of detector signal (unit: Volt). |
|
Image class defining and storing information of detector image (unit: adu). |
|
Base Array class. |
Detectors#
|
Charge-Coupled Device class containing all detector attributes and data. |
|
CMOS-based detector class containing all detector attributes and data. |
|
MKID-based detector class containing all detector attributes and data. |
|
CMOS-based detector class containing all detector attributes and data. |
|
Base class for simulating a generic detector (e.g., CCD, CMOS). |
Attributes#
|
Geometrical attributes of the detector (e.g. num of rows, columns...). |
|
Characteristics attributes of the detector (e.g. quantum efficiency...). |
|
Get the current scene being observed by the detector. |
|
Get the information of detected photon (in ph or ph/nm). |
|
Get the charge information of charge distribution (in electron). |
|
Get the pixel information of charge packets within pixel (in electron). |
|
Get the signal information from the detector (in Volt). |
|
Get the image information from the detector (in adu). |
|
Get the structured ata from the detector's processing. |
|
Get the intermediate data used during processing. |
Properties#
|
Environmental attributes of the detector. |
|
Characteristic attributes of the detector. |
|
Geometrical attributes of the detector. |
|
Readout sampling detector properties related to the readout process of a detector. |
|
Geometrical attributes of a CCD detector. |
|
Geometrical attributes of a CMOS-based detector. |
|
Geometrical attributes of a MKID-based detector. |
|
Characteristic attributes of the APD detector. |
|
Geometrical attributes of a APD-based detector. |
Readout time#
|
Set readout sampling properties. |
|
Return current readout sampling properties. |
|
Get the current time within the readout simulation. |
|
TBW. |
|
Get the absolute time relative to the simulation start. |
|
Get the step size used for advancing in the simulation. |
|
Check if the time intervals between readout samples are uniform. |
|
Return the total number of readout steps. |
|
Get the current readout pipeline count. |
|
Check if this is the first readout time. |
|
Check if this is the last readout time. |
|
Get the status of the readout process. |
|
Return if detector is dynamic (time dependent) or not. |
|
Return if detector readout mode is destructive or integrating. |
|
TBW. |
|
TBW. |
|
Recursively calculates object size in bytes using Pympler library. |
|
Calculate and return the memory usage of each component of the detector. |
IO / Conversion#
|
Load a detector object from a filename. |
|
Save a detector object into a filename. |
|
Load a detector object from a HDF5 file. |
|
Write the detector content to a HDF5 file. |
|
Load a detector object from a ASDF file. |
|
Write the detector content to a ASDF file. |
|
Create a new |
|
Convert a Detector to a dict. |
|
Create a new instance of a Detector from a dict. |
Inputs#
|
Load a 2D image. |
|
Load and return header information from a file. |
|
Load a table from a file and returns a pandas dataframe. |
Fitness functions#
|
Calculate the sum of absolute residuals between simulated and target values. |
|
Calculate the sum of squared residuals between simulated and target values. |
|
Compute the reduced chi-square error statistic. |
Plotting#
|
Plot Photon Transfer Curve (PTC) from a dataset containing 'mean' and 'variance' data. |
Notebook#
General#
|
Display detector interactively. |
|
Display object attributes and their types in a HTML table. |
|
Display the scene contained in 'detector' and the size of the detector. |
Displaying calibration inputs and outputs#
|
Display calibration inputs and target data based on configuration file. |
Display simulated and target data from the output dataset. |
|
Display best champion parameter and overall fitness vs evolution. |
|
Return a dataframe of best parameters. |
|
|
Plot a heatmap of champion parameters vs fitness. |
Utility functions#
|
Download and save examples from Pyxel Data Gitlab repository in the working directory. |
|
Recursively calculates object size in bytes using Pympler library. |
|
Calculate the memory usage of an object. |
|
Time a single pipeline. |
|
Fit input array into an output array of specified output shape. |
Deprecated / Pending deprecation#
|
Run an 'exposure' pipeline. |
|
Run an 'observation' pipeline. |
|
Run a 'calibration' pipeline. |
Advanced API#
Pipelines#
|
Represent a pipeline of detection models organized into different groups. |
|
Represent a processor that execute pipeline. |
|
Manage a collection of model functions. |
|
Create a wrapper function around a Model function. |
Exposure#
|
TBW. |
Observation#
|
Observation class. |
Calibration#
|
TBW. |
|
Result class for calibration class. |
|
User-defined Archipelago. |
|
TBW. |
Outputs#
|
Collection of methods to save the data buckets from a Detector for an Exposure pipeline. |
|
Collection of methods to save the data buckets from a Detector for an Observation pipeline. |
|
Collection of methods to save the data buckets from a Detector for a Calibration pipeline. |