Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-dfs
csst-dfs-commons
Commits
95ae816a
Commit
95ae816a
authored
1 year ago
by
Wei Shoulin
Browse files
Options
Download
Email Patches
Plain Diff
except catch
parent
b4cad597
main
master
1.0.1
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
csst_dfs_commons/utils/fits.py
+6
-3
csst_dfs_commons/utils/fits.py
with
6 additions
and
3 deletions
+6
-3
csst_dfs_commons/utils/fits.py
+
6
-
3
View file @
95ae816a
...
...
@@ -21,9 +21,12 @@ def get_header_value(key: str, headers, default_value = None):
return
default_value
def
get_healpix_id
(
ra
,
dec
,
nside
=
32
):
hp
=
HEALPix
(
nside
=
nside
,
order
=
'nested'
,
frame
=
ICRS
())
coord
=
SkyCoord
(
ra
=
ra
*
u
.
deg
,
dec
=
dec
*
u
.
deg
,
frame
=
'icrs'
)
return
hp
.
skycoord_to_healpix
(
coord
)
try
:
hp
=
HEALPix
(
nside
=
nside
,
order
=
'nested'
,
frame
=
ICRS
())
coord
=
SkyCoord
(
ra
=
ra
*
u
.
deg
,
dec
=
dec
*
u
.
deg
,
frame
=
'icrs'
)
return
hp
.
skycoord_to_healpix
(
coord
)
except
:
return
-
1
def
get_healpix_ids
(
ra
,
dec
,
radius
,
nside
=
32
):
hp
=
HEALPix
(
nside
=
nside
,
order
=
'nested'
,
frame
=
ICRS
())
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets