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
csst-sims
csst_mci_sim
Commits
2e3aec48
Commit
2e3aec48
authored
Jan 24, 2025
by
Yan Zhaojun
Browse files
Replace shao.py
parent
59d64b96
Pipeline
#7903
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
csst_mci_sim/support/shao.py
View file @
2e3aec48
...
...
@@ -59,9 +59,9 @@ def onOrbitObsPosition(path, input_ra_list, input_dec_list, input_pmra_list, inp
raise
TypeError
(
"Parameter 15 format error (1)!"
,
input_date_str
)
else
:
tmp
=
input_date_str
.
split
(
"-"
)
if
len
(
tmp
)
!=
3
:
raise
TypeError
(
"Parameter 15 format error (2)!"
,
input_date_str
)
#
if len(tmp) != 3:
#
raise TypeError(
#
"Parameter 15 format error (2)!", input_date_str)
input_year
=
int
(
tmp
[
0
])
input_month
=
int
(
tmp
[
1
])
input_day
=
int
(
tmp
[
2
])
...
...
@@ -84,9 +84,9 @@ def onOrbitObsPosition(path, input_ra_list, input_dec_list, input_pmra_list, inp
raise
TypeError
(
"Parameter 16 format error (1)!"
,
input_time_str
)
else
:
tmp
=
input_time_str
.
split
(
":"
)
if
len
(
tmp
)
!=
3
:
raise
TypeError
(
"Parameter 16 format error (2)!"
,
input_time_str
)
#
if len(tmp) != 3:
#
raise TypeError(
#
"Parameter 16 format error (2)!", input_time_str)
input_hour
=
int
(
tmp
[
0
])
input_minute
=
int
(
tmp
[
1
])
input_second
=
float
(
tmp
[
2
])
...
...
@@ -140,8 +140,8 @@ def onOrbitObsPosition(path, input_ra_list, input_dec_list, input_pmra_list, inp
DAT
,
byref
(
p3
),
byref
(
v3
),
input_year_c
,
input_month_c
,
input_day_c
,
input_hour_c
,
input_minute_c
,
input_second_c
,
byref
(
output_ra
),
byref
(
output_dec
))
if
rs
!=
0
:
raise
RuntimeError
(
"Calculate error!"
)
#
if rs != 0:
#
raise RuntimeError("Calculate error!")
output_ra_list
.
append
(
output_ra
.
value
)
output_dec_list
.
append
(
output_dec
.
value
)
...
...
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