Commit 2e3aec48 authored by Yan Zhaojun's avatar Yan Zhaojun
Browse files

Replace shao.py

parent 59d64b96
Pipeline #7903 failed with stage
in 0 seconds
......@@ -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)
......
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