Commit 26093469 authored by Wei Shoulin's avatar Wei Shoulin
Browse files

add hp

parent 5daa4f71
......@@ -74,3 +74,5 @@ SLS_DECTECTORS2FILTER = {
}
MSC_SCI_OBS_TYPE = 'SCI'
SCI_OBS_TYPES = [MSC_SCI_OBS_TYPE]
\ No newline at end of file
......@@ -6,6 +6,7 @@ from astropy.io import fits
from astropy import wcs
import numpy as np
import healpy as hp
def get_header_value(key: str, headers, default_value = None):
try:
ret_value = None
......@@ -55,6 +56,9 @@ def fits_of_healpix_ids(filepath, nside=256):
:return: a numpy.ndarray (n,)
"""
with fits.open(filepath) as hdulist:
return hdul_of_healpix_ids(hdulist, nside)
def hdul_of_healpix_ids(hdulist, nside=256):
nx = get_header_value('NAXIS1', hdulist, 0)
ny = get_header_value('NAXIS2', hdulist, 0)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment