Skip to content

lincc-frameworks/skymap-convert

Repository files navigation

Template GitHub Workflow Status

Skymap Convert

A dependency-light package for skymap operations: use the LSST skymap without the LSST stack.

Quick start

  1. Install the package.
git clone https://github.com/lincc-frameworks/skymap-convert.git
cd skymap-convert
pip install .
  1. Import a skymap reader.
import skymap-convert

reader = skymap_convert.ConvertedSkymapReader(converted_skymap_path)
  1. 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:               converted_skymap
# Generated:          2025-07-01T18:11:20.873149Z
# ...
  1. Use get_tract_vertices and get_patch_vertices to access the data.
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]]
  1. To plot, call plot_patches.
    (See Skymap plotting methods.ipynb for more details.)
reader.plot_patches(
    [
        (60, 0),
        (61, 8)
    ],
    tract_outer_boundaries=60
)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •