HDRL C → PyHDRL¶
This page is the front door for developers who already know HDRL or CPL in C.
Indexing and ownership¶
Pixel indexing is 0-based with order
(y, x), matching PyCPL.Rectangular HDRL regions (for example overscan regions) and the fixed-pattern noise DC-mask dimensions retain the C/FITS 1-based convention where documented.
hdrl.core.Imageholds a data plane and an error plane. Arithmetic methods that end in_createreturn a new image; methods without that suffix modify in place.hdrl.core.Spectrum1Dfollows the same pattern.There is no
hdrl.core.Image.load. Load FITS withcpl.core.Image.load(or related PyCPL I/O), then copy the data and error planes intohdrl.core.Image(data, error). Construction copies both planes: later changes to the original PyCPL images do not affect the HDRL image. The error-plane bad-pixel mask is ignored; the data-plane mask becomes the HDRL image mask.hdrl.func.Flat.computefollows the HDRL C memory-saving contract: it consumes the inputImageListand leaves its contents undefined.
Types¶
HDRL / CPL C |
PyHDRL / PyCPL |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Algorithm classes and |
Errors¶
CPL error codes raised from HDRL are translated to subclasses of
hdrl.core.Error. See Errors for the full table. They are the
same codes as in CPL; only the Python namespace differs from PyCPL.
Algorithm name map¶
Factory / compute style (preferred for most algorithms):
HDRL C (typical) |
PyHDRL |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Bias and dark chapters in the HDRL manual have no dedicated PyHDRL
classes; use hdrl.func.Collapse (and optionally Overscan) as in the
High-level algorithms.
Fixed-pattern noise is intentionally a module function
(hdrl.func.fpn_compute) rather than a class, matching the single-shot C
API.
What is not bound¶
PyHDRL focuses on the high-level HDRL API used by pipeline recipes, but it
also exposes selected experimental interfaces. In particular,
Spectrum1DResampleMethod.FitWindowed,
Spectrum1D.resample_windowed_fit and
Efficiency.compute_response_core correspond to HDRL interfaces whose C API
is not guaranteed to be stable. The HDRL manual recommends that windowed
spectrum fitting not be used in production.
Interfaces not currently bound include:
recipe parameter-list creation/parsing helpers (
*_create_parlistand*_parse_parlist);low-level imagelist views, frame iterators and multi-iterators;
EOP download/conversion helpers such as
hdrl_download_url_to_bufferandhdrl_eop_data_totable;private airmass helpers such as
hdrl_get_zenith_distanceandhdrl_get_airmass_*; andHDRL APIs without an agreed stable Python design.
The High-level algorithms list is the supported high-level algorithm set for this release; hdrl.core additionally documents the bound core and spectrum operations.