Skip to main content
Ctrl+K
LSST Science Pipelines - Home LSST Science Pipelines - Home
  • Getting started with the LSST Science Pipelines
  • Installing the LSST Science Pipelines
  • Data access and pipeline middleware
  • lsst.afw.cameraGeom
  • lsst.afw.coord
    • lsst.afw.detection
    • lsst.afw.display
    • lsst.afw.fits
    • lsst.afw.formatters
    • lsst.afw.geom
    • lsst.afw.image
    • lsst.afw.math
    • lsst.afw.table
    • lsst.afw.typehandling
    • lsst.alert.packet
    • lsst.analysis.ap
    • lsst.analysis.tools
    • lsst.ap.association
    • lsst.ap.pipe
    • lsst.ap.verify
    • lsst.base
    • lsst.cbp
    • lsst.cell_coadds
    • lsst.coadd.utils
    • lsst.cp.pipe
    • lsst.ctrl.bps.htcondor
    • lsst.ctrl.bps.panda
    • lsst.ctrl.bps.parsl
    • lsst.ctrl.bps
    • lsst.ctrl.mpexec
    • lsst.daf.butler
    • lsst.dax.apdb
    • lsst.dax.images.cutout
    • lsst.display.ds9
    • lsst.display.firefly
    • lsst.drp.pipe
    • lsst.drp.tasks
    • lsst.faro.base
    • lsst.faro.measurement
    • lsst.faro.preparation
    • lsst.faro.summary
    • lsst.faro.utils
    • lsst.faro
    • lsst.fgcmcal
    • lsst.gauss2d.fit
    • lsst.gauss2d
    • lsst.geom
    • lsst.images
    • lsst.ip.diffim
    • lsst.ip.isr
    • lsst.jointcal
    • lsst.log
    • lsst.meas.algorithms
    • lsst.meas.astrom
    • lsst.meas.base
    • lsst.meas.deblender
    • lsst.meas.extensions.gaap
    • lsst.meas.extensions.multiprofit
    • lsst.meas.extensions.photometryKron
    • lsst.meas.extensions.piff
    • lsst.meas.extensions.psfex
    • lsst.meas.extensions.scarlet
    • lsst.meas.extensions.shapeHSM
    • lsst.meas.extensions.simpleShape
    • lsst.meas.extensions.trailedSources
    • lsst.meas.modelfit
    • lsst.meas.transiNet
    • lsst.modelfit.parameters
    • lsst.multiprofit
    • lsst.obs.base
    • lsst.obs.cfht
    • lsst.obs.decam
    • lsst.obs.lsst
    • lsst.pex.config
    • lsst.pex.exceptions
    • lsst.pipe.base
    • lsst.pipe.tasks
    • lsst.resources
    • lsst.sconsUtils
    • lsst.sdm.tools
    • lsst.shapelet
    • lsst.skymap
    • lsst.source.injection
    • lsst.utils
    • lsst.verify
    • lsstDebug
    • verify_metrics
    • Release History
    • Known Issues
    • Characterization Metric Reports
    • Tasks
    • Rubin docs
  • GitHub
  • Getting started with the LSST Science Pipelines
  • Installing the LSST Science Pipelines
  • Data access and pipeline middleware
  • lsst.afw.cameraGeom
  • lsst.afw.coord
  • lsst.afw.detection
  • lsst.afw.display
  • lsst.afw.fits
  • lsst.afw.formatters
  • lsst.afw.geom
  • lsst.afw.image
  • lsst.afw.math
  • lsst.afw.table
  • lsst.afw.typehandling
  • lsst.alert.packet
  • lsst.analysis.ap
  • lsst.analysis.tools
  • lsst.ap.association
  • lsst.ap.pipe
  • lsst.ap.verify
  • lsst.base
  • lsst.cbp
  • lsst.cell_coadds
  • lsst.coadd.utils
  • lsst.cp.pipe
  • lsst.ctrl.bps.htcondor
  • lsst.ctrl.bps.panda
  • lsst.ctrl.bps.parsl
  • lsst.ctrl.bps
  • lsst.ctrl.mpexec
  • lsst.daf.butler
  • lsst.dax.apdb
  • lsst.dax.images.cutout
  • lsst.display.ds9
  • lsst.display.firefly
  • lsst.drp.pipe
  • lsst.drp.tasks
  • lsst.faro.base
  • lsst.faro.measurement
  • lsst.faro.preparation
  • lsst.faro.summary
  • lsst.faro.utils
  • lsst.faro
  • lsst.fgcmcal
  • lsst.gauss2d.fit
  • lsst.gauss2d
  • lsst.geom
  • lsst.images
  • lsst.ip.diffim
  • lsst.ip.isr
  • lsst.jointcal
  • lsst.log
  • lsst.meas.algorithms
  • lsst.meas.astrom
  • lsst.meas.base
  • lsst.meas.deblender
  • lsst.meas.extensions.gaap
  • lsst.meas.extensions.multiprofit
  • lsst.meas.extensions.photometryKron
  • lsst.meas.extensions.piff
  • lsst.meas.extensions.psfex
  • lsst.meas.extensions.scarlet
  • lsst.meas.extensions.shapeHSM
  • lsst.meas.extensions.simpleShape
  • lsst.meas.extensions.trailedSources
  • lsst.meas.modelfit
  • lsst.meas.transiNet
  • lsst.modelfit.parameters
  • lsst.multiprofit
  • lsst.obs.base
  • lsst.obs.cfht
  • lsst.obs.decam
  • lsst.obs.lsst
  • lsst.pex.config
  • lsst.pex.exceptions
  • lsst.pipe.base
  • lsst.pipe.tasks
  • lsst.resources
  • lsst.sconsUtils
  • lsst.sdm.tools
  • lsst.shapelet
  • lsst.skymap
  • lsst.source.injection
  • lsst.utils
  • lsst.verify
  • lsstDebug
  • verify_metrics
  • Release History
  • Known Issues
  • Characterization Metric Reports
  • Tasks
  • Rubin docs
  • GitHub

Section Navigation

  • lsst-images v30.0.6 (2026-04-07)
  • Core API Reference
    • get_legacy_deep_coadd_mask_planes
    • get_legacy_visit_image_mask_planes
    • AbsoluteSliceProxy
    • Bounds
    • BoundsError
    • Box
    • BoxSliceFactory
    • CameraFrameSet
    • CameraFrameSetSerializationModel
    • ColorImage
    • DetectorFrame
    • FieldAngleFrame
    • FocalPlaneFrame
    • Frame
    • FrameLookupError
    • FrameSet
    • GeneralFrame
    • GeneralizedImage
    • Image
    • ImageSerializationModel
    • Interval
    • IntervalSliceFactory
    • LocalSliceProxy
    • Mask
    • MaskPlane
    • MaskPlaneBit
    • MaskSchema
    • MaskSerializationModel
    • MaskedImage
    • MaskedImageSerializationModel
    • NoOverlapError
    • ObservationSummaryStats
    • Polygon
    • Projection
    • ProjectionAstropyView
    • ProjectionSerializationModel
    • Region
    • RegionSerializationModel
    • SkyFrame
    • TractFrame
    • Transform
    • TransformCompositionError
    • TransformSerializationModel
    • VisitImage
    • VisitImageSerializationModel
    • XY
    • YX
  • Cell-Based Coadds
    • CellCoadd
    • CellCoaddSerializationModel
    • CellGrid
    • CellGridBounds
    • CellIJ
    • CellPointSpreadFunction
    • CellPointSpreadFunctionSerializationModel
    • CoaddProvenance
    • CoaddProvenanceSerializationModel
    • PatchDefinition
  • PSF Models
    • GaussianPSFSerializationModel
    • GaussianPointSpreadFunction
    • LegacyPointSpreadFunction
    • PSFExSerializationModel
    • PSFExWrapper
    • PiffSerializationModel
    • PiffWrapper
    • PointSpreadFunction
  • Calculated 2-d Fields
    • field_from_legacy
    • field_from_legacy_background
    • BaseField
    • ChebyshevField
    • ChebyshevFieldSerializationModel
    • ProductField
    • ProductFieldSerializationModel
    • SplineField
    • SplineFieldSerializationModel
    • SumField
    • SumFieldSerializationModel
  • Camera Descriptions
    • Amplifier
    • AmplifierCalibrations
    • AmplifierRawGeometry
    • Detector
    • DetectorAttributes
    • DetectorSerializationModel
    • DetectorType
    • Orientation
    • ReadoutCorner
  • Aperture Corrections
    • aperture_corrections_from_legacy
    • aperture_corrections_to_legacy
    • ApertureCorrectionMapSerializationModel
  • Serialization
    • is_integer
    • no_header_updates
    • ArchiveReadError
    • ArchiveTree
    • ArrayReferenceModel
    • ArrayReferenceQuantityModel
    • ButlerInfo
    • InlineArrayModel
    • InlineArrayQuantityModel
    • InputArchive
    • JsonRef
    • NestedOutputArchive
    • NumberType
    • OpaqueArchiveMetadata
    • OutputArchive
    • QuantityModel
    • ReadResult
    • TableColumnModel
    • TableModel
    • TimeModel
    • UnsupportedTableError
    • IntegerType
    • MetadataValue
    • SignedIntegerType
    • UnsignedIntegerType
  • FITS I/O
    • add_offset_wcs
    • read
    • strip_butler_cards
    • strip_legacy_exposure_cards
    • strip_wcs_cards
    • write
    • ExtensionKey
    • FitsCompressionAlgorithm
    • FitsCompressionOptions
    • FitsDitherAlgorithm
    • FitsInputArchive
    • FitsOpaqueMetadata
    • FitsOutputArchive
    • FitsQuantizationOptions
    • InvalidFitsArchiveError
    • PointerModel
    • PrecompressedImage
    • ExtensionHDU
    • FITS_SOURCE_REGEX
    • JSON_COLUMN
    • JSON_EXTNAME
  • JSON I/O
    • read
    • write
    • JsonInputArchive
    • JsonOutputArchive
  • Starlink NDF I/O
    • archive_path_to_hdf5_path
    • archive_path_to_hdf5_path_components
    • read
    • write
    • NdfInputArchive
    • NdfOutputArchive
    • NdfPointerModel
  • Test Utilities
    • arrays_to_legacy_points
    • assert_close
    • assert_equal_allow_nan
    • assert_images_equal
    • assert_masked_images_equal
    • assert_masks_equal
    • assert_projections_equal
    • assert_psfs_equal
    • check_astropy_wcs_interface
    • check_projection
    • check_transform
    • compare_amplifier_to_legacy
    • compare_aperture_corrections_to_legacy
    • compare_cell_coadd_to_legacy
    • compare_detector_to_legacy
    • compare_field_to_legacy
    • compare_image_to_legacy
    • compare_mask_to_legacy
    • compare_masked_image_to_legacy
    • compare_observation_summary_stats_to_legacy
    • compare_projection_to_legacy_wcs
    • compare_psf_to_legacy
    • compare_visit_image_to_legacy
    • legacy_coords_to_astropy
    • legacy_points_to_xy_array
    • make_random_projection
    • make_test_formatter
    • RoundtripFits
    • RoundtripJson
    • RoundtripNdf
    • TemporaryButler
  • lsst.images
  • Starlink NDF I/O

Starlink NDF I/O#

This is an experimental HDF5 serialization backend to demonstrate that the package can be used to write files in formats other than FITS. It does write files in HDF5 format that can be read by the Starlink software. We do not recommend you use it in a production environment at this time to create archival products.

lsst.images.ndf Package#

Archive implementations that write HDS-on-HDF5 files compatible with the Starlink N-Dimensional Data Format (NDF) data model.

Files written by this archive are valid NDF files readable by applications and libraries from the Starlink Software Collection (KAPPA, hdstrace, CUPID, etc.) although the LSST data model adds extensions that are not known to the Starlink tooling.

The NDF data model is described in Jenness et al (2015).

For a lsst.images.MaskedImage the data and variance arrays map to the standard NDF equivalents. Any FITS headers are stored in the standard .MORE.FITS extension and the WCS is stored as a serialized AST FrameSet, modified to include a GRID frame in addition to a PIXEL frame, in the .WCS component. Starlink tools only allow 8-bit masks so the mask is stored directly as a QUALITY component when only 8 bits are needed but if more bits are required the full mask is stored in the .MORE.LSST.MASK extension as a 3-D unsigned byte NDF where the third dimension matches the internal representation of the 3-D mask. The QUALITY component includes a collapsed version of the full mask to enable Starlink software to apply a coarse mask. In the future the collapsing is intending to be more granular to allow mask planes to be combined based on their related concepts. Since the NDF data model has a subset that is compatible with the MaskedImage data model, an NDF can be read as a MaskedImage with full data, variance, mask, WCS, and FITS header support, although of course any extensions will be ignored.

For more complex image types such as lsst.images.VisitImage the LSST components are stored in the .MORE.LSST extension, including the JSON component containing the Pydantic models. Data arrays are represented as NDFs in the .MORE.LSST extension and referenced by path from the JSON. Tabular data is not supported by the NDF data model and is not currently representable. It is expected that they would become individual columns in an extension, all with the same length.

These files use HDF5 format and can be read by any HDF5 tooling such as h5dump or the Python h5py, although the data model includes group attributes to allow it to be read by the Starlink libraries that add additional semantic meaning to data structures. The HDS-on-HDF5 format is described in Jenness (2015).

HDF5 files are not generally usable for remote access of components through cloud storage. There is no facility to store byte offsets to components in any of the data structures.

Functions#

archive_path_to_hdf5_path(archive_path)

Translate a serialization archive path to an NDF HDF5 path.

archive_path_to_hdf5_path_components(...)

Return HDS-compatible path components for an archive path.

read(cls, path, **kwargs)

Read an object from an NDF (HDS-on-HDF5) file.

write(obj[, filename, metadata, ...])

Write a serializable object to an NDF (HDS-on-HDF5) file.

Classes#

NdfInputArchive(file)

Reads HDS-on-HDF5 NDF files written by NdfOutputArchive.

NdfOutputArchive(file[, ...])

An OutputArchive implementation that writes HDS-on-HDF5 files compatible with the Starlink NDF data model.

NdfPointerModel(*, path)

Reference to an NDF-archive sub-tree by HDF5 path.

previous

JsonOutputArchive

next

archive_path_to_hdf5_path

On this page
  • lsst.images.ndf Package
    • Functions
    • Classes
Edit on GitHub

© Copyright 2015-2026 Association of Universities for Research in Astronomy, Inc. (AURA).

Created using Sphinx 8.1.3.

Built with the PyData Sphinx Theme 0.16.1.