Coverage for python / lsst / images / fits / __init__.py: 100%
3 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-05-07 08:34 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-05-07 08:34 +0000
1# This file is part of lsst-images.
2#
3# Developed for the LSST Data Management System.
4# This product includes software developed by the LSST Project
5# (https://www.lsst.org).
6# See the COPYRIGHT file at the top-level directory of this distribution
7# for details of code ownership.
8#
9# Use of this source code is governed by a 3-clause BSD-style
10# license that can be found in the LICENSE file.
12"""Archive implementations for the FITS file format.
14The archives in this package define a FITS-based meta format with the
15following layout:
17- A no-data primary HDU with the special header cards ``INDXADDR``,
18 ``INDXSIZE``, ``JSONADDR``, and ``JSONSIZE``, which provide the offsets to
19 and sizes of two special HDUs at the end of the file (see below). The
20 primary header may also hold arbitrary cards exported by the top-level type
21 being serialized or propagated as opaque metadata from a previous read.
23- Any number of "normal" image, compressed-image, and binary table HDUs. These
24 have unique ``EXTNAME`` values that are the all-caps variants of a JSON
25 Pointer (IETF RFC 6901) path in the special JSON HDU (see below), with no
26 ``EXTVER`` or ``EXTLEVEL``.
28- A special binary table HDU holding JSON data. This binary table has a single
29 variable-length array byte column (i.e. ``TFORM='PB'``) that holds UTF-8 JSON
30 data. There is always at least one row, which holds the JSON representation
31 of the top-level object being serialized. Additional rows may be present to
32 hold additional JSON blocks that are logically nested within the main one,
33 but have been moved outside it to keep the main block more compact (the main
34 JSON block will have pointers back to these).
36- A special binary table HDU that acts as an index into all others, by holding
37 byte offsets and sizes for all preceding HDUs along with their ``EXTNAME``,
38 ``XTENSION``, and ``ZIMAGE`` header values.
40When images and tables are saved to a `FitsOutputArchive`, "normal" HDUs are
41added to hold their binary data, and a small Pydantic model is returned
42with a reference to that HDU for inclusion in the JSON tree.
43"""
45from ._common import *
46from ._input_archive import *
47from ._output_archive import *