A dependency-light package for skymap operations--use the LSST skymap without the LSST stack.
Made for use within lsdb-rubin; can also be used on its own.
- Install the package.
pip install skymap-convert
- Import a skymap reader.
import skymap_convert
reader = skymap_convert.ConvertedSkymapReader(preset="lsst_skymap")
- Optionally, call
summarize
to take a peek at the convents of the converted skymap.
reader.summarize()
# Prints:
#
# Skymap Summary
# ----------------------------------------
# Path: /path/to/skymap-convert/converted_skymaps/lsst_skymap
# Name: lsst_skymap
# Generated: 2025-07-01T18:11:20.873149Z
# ...
- Use
get_tract_vertices
andget_patch_vertices
to access the data.
(See Reading and using a converted skymap.ipynb for more details.)
reader.get_tract_vertices(42)
# Returns:
#
# [[86.16241626810654, -88.63764259611838],
# [92.73276185933494, -88.5876043887882],
# [90.57872844947276, -88.43062126829582],
# [84.63000467541433, -88.47549635501055]]
reader.get_patch_vertices(1234, 56)
# Returns:
#
# [[353.19436746094334, -61.733705740129906],
# [353.5462936615678, -61.73505840062234],
# [353.54818789227375, -61.568395336612376],
# [353.19815518019567, -61.567052069980534]]
- To plot, call
plot_patches
.
(See Skymap plotting methods.ipynb for more details.)
reader.plot_patches(
[
(60, 0),
(61, 8)
],
tract_outer_boundaries=60
)
- Finally, clean up the reader's temp files:
reader.cleanup()
In its simplest form, Skymap Convert requires no LSST-stack dependences.
This means that users may read and use the built-in LSST skymap (or any other pre-converted skymaps) with just the core version of this package (which can be obtained via pip install skymap-convert
, or cloning the repo and running pip install .
).
Users who wish to convert their own skymap from the lsst.skymap RingsSkyMap type will need to install additional dependencies. These may be installed by:
git clone https://github.com/lincc-frameworks/skymap-convert.git
cd skymap-convert
pip install '.[dev]'
See Skymaps overview.