Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Zhang Xin
ImSim_Pointing
Commits
f7995079
Commit
f7995079
authored
Apr 23, 2023
by
xin
Browse files
in getInputPointing.py add output rotation angle
parent
d0a5deb4
Changes
2
Hide whitespace changes
Inline
Side-by-side
getInputPointing.py
View file @
f7995079
...
...
@@ -193,17 +193,29 @@ def getSelectPointingList(center = [60,-40], radius = 2):
return
p_result
def
findPointingbyChipID
(
chipID
=
8
,
ra
=
60.
,
dec
=
-
40.
):
"""_summary_
Args:
chipID (int, optional): Chip ID.
ra (_type_, optional): Chip center ra.
dec (_type_, optional): Chip center dec.
Returns:
_type_: [ra, dec, rotation angle]
"""
chip_center
=
[
ra
,
dec
]
p_list
=
getSelectPointingList
(
center
=
chip_center
)
pchip
=
Chip
(
chipID
)
p_num
=
p_list
.
shape
[
0
]
min_d
=
1000000000
max_value
=
1000000000
min_d
=
max_value
r_ra
=
ra
r_dec
=
dec
r_rot
=
0.
for
i
in
np
.
arange
(
0
,
p_num
,
1
):
ra_n
=
p_list
[
i
,
0
]
dec_n
=
p_list
[
i
,
1
]
...
...
@@ -222,8 +234,12 @@ def findPointingbyChipID(chipID = 8, ra = 60., dec = -40.):
min_d
=
d
r_ra
=
ra_n
r_dec
=
dec_n
r_rot
=
rot
.
deg
if
min_d
==
max_value
:
print
(
"RA:%f,Dec:%f不在指向范围内,请于巡天规划序列比对!!!!!"
%
(
ra
,
dec
))
return
galsim
.
CelestialCoord
(
ra
=
r_ra
*
galsim
.
degrees
,
dec
=
r_dec
*
galsim
.
degrees
)
return
[
r_ra
,
r_dec
,
r_rot
]
...
...
@@ -231,7 +247,7 @@ def findPointingbyChipID(chipID = 8, ra = 60., dec = -40.):
if
__name__
==
"__main__"
:
pointing
=
findPointingbyChipID
()
pointing
=
findPointingbyChipID
(
chipID
=
8
,
ra
=
60.
,
dec
=
-
40.
)
# chipID = 8
# pchip = Chip(chipID)
...
...
getPointingList.py
View file @
f7995079
...
...
@@ -277,10 +277,11 @@ def producePointingList3(out = '' , center = [60,-40], radius = 5, survey_file =
if
__name__
==
"__main__"
:
isRealSurvey
=
True
survey_file
=
'skyMapOrSurveyList/E17.5_b17.5_beta_11.6_opt_transtime_1_CMG_1_dp_2_0.25_da_10_Texp_1.5_DEC60_500_0.1_800_1000_+5deg.dat'
outFileName
=
'pointing_test_NGP_1
.
.dat'
radi
=
1.
2
outFileName
=
'pointing_test_NGP_
246.5_40_
1.dat'
radi
=
1.
3
center_pos
=
[
192.8595
,
27.1283
]
# center_pos = [192.8595, 27.1283]
center_pos
=
[
246.5
,
40
]
if
isRealSurvey
:
producePointingList3
(
out
=
outFileName
,
center
=
center_pos
,
radius
=
radi
,
survey_file
=
survey_file
)
else
:
...
...
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