simonsobs / Pixell.jl

next-generation sky map manipulation on rectangular pixels
MIT License
3 stars 1 forks source link

extract skybox with wrapping safety #36

Open guanyilun opened 2 years ago

guanyilun commented 2 years ago

Extracting a skybox from a map needs to be safe when wrapping is involved.

xzackli commented 2 years ago

The most common situation involves wrapping over RA, so that can be the first thing to support. Handling the poles is slightly more involved.

The way we've chosen dimensions, RA is the first dimension and thus rings have stride=1 (good for SHTs). That means that a fast extraction should be something like

  1. identify where the RA seam is, by doing sky2pix on each RA of the x-axis
  2. generate two slices corresponding to "left of seam" and "right of seam".
  3. copy over those two pieces