Loading csst_mci_sim/support/shao.py +20 −20 Original line number Diff line number Diff line Loading @@ -19,8 +19,8 @@ def onOrbitObsPosition(path, input_ra_list, input_dec_list, input_pmra_list, inp input_parallax_list, input_nstars, input_x, input_y, input_z, input_vx, input_vy, input_vz, input_epoch, input_date_str, input_time_str): # Check input parameters if isinstance(type(input_nstars), type(1)): # type(input_nstars) != type(1): raise TypeError("Parameter 7 is not int!", input_nstars) # if isinstance(type(input_nstars), type(1)): # type(input_nstars) != type(1): # raise TypeError("Parameter 7 is not int!", input_nstars) # checkInputList(input_ra_list, input_nstars) # checkInputList(input_dec_list, input_nstars) Loading Loading @@ -65,15 +65,15 @@ def onOrbitObsPosition(path, input_ra_list, input_dec_list, input_pmra_list, inp input_year = int(tmp[0]) input_month = int(tmp[1]) input_day = int(tmp[2]) if not (input_year >= 1900 and input_year <= 2100): raise TypeError( "Parameter 15 year range error [1900 ~ 2100]!", input_year) if not (input_month >= 1 and input_month <= 12): raise TypeError( "Parameter 15 month range error [1 ~ 12]!", input_month) if not (input_day >= 1 and input_day <= 31): raise TypeError( "Parameter 15 day range error [1 ~ 31]!", input_day) # if not (input_year >= 1900 and input_year <= 2100): # raise TypeError( # "Parameter 15 year range error [1900 ~ 2100]!", input_year) # if not (input_month >= 1 and input_month <= 12): # raise TypeError( # "Parameter 15 month range error [1 ~ 12]!", input_month) # if not (input_day >= 1 and input_day <= 31): # raise TypeError( # "Parameter 15 day range error [1 ~ 31]!", input_day) if isinstance(type(input_time_str), type("20:15:15.15")): # type(input_time_str) != type("20:15:15.15"): Loading @@ -90,15 +90,15 @@ def onOrbitObsPosition(path, input_ra_list, input_dec_list, input_pmra_list, inp input_hour = int(tmp[0]) input_minute = int(tmp[1]) input_second = float(tmp[2]) if not (input_hour >= 0 and input_hour <= 23): raise TypeError( "Parameter 16 hour range error [0 ~ 23]!", input_hour) if not (input_minute >= 0 and input_minute <= 59): raise TypeError( "Parameter 16 minute range error [0 ~ 59]!", input_minute) if not (input_second >= 0 and input_second < 60.0): raise TypeError( "Parameter 16 second range error [0 ~ 60)!", input_second) # if not (input_hour >= 0 and input_hour <= 23): # raise TypeError( # "Parameter 16 hour range error [0 ~ 23]!", input_hour) # if not (input_minute >= 0 and input_minute <= 59): # raise TypeError( # "Parameter 16 minute range error [0 ~ 59]!", input_minute) # if not (input_second >= 0 and input_second < 60.0): # raise TypeError( # "Parameter 16 second range error [0 ~ 60)!", input_second) # Inital dynamic lib import os Loading Loading
csst_mci_sim/support/shao.py +20 −20 Original line number Diff line number Diff line Loading @@ -19,8 +19,8 @@ def onOrbitObsPosition(path, input_ra_list, input_dec_list, input_pmra_list, inp input_parallax_list, input_nstars, input_x, input_y, input_z, input_vx, input_vy, input_vz, input_epoch, input_date_str, input_time_str): # Check input parameters if isinstance(type(input_nstars), type(1)): # type(input_nstars) != type(1): raise TypeError("Parameter 7 is not int!", input_nstars) # if isinstance(type(input_nstars), type(1)): # type(input_nstars) != type(1): # raise TypeError("Parameter 7 is not int!", input_nstars) # checkInputList(input_ra_list, input_nstars) # checkInputList(input_dec_list, input_nstars) Loading Loading @@ -65,15 +65,15 @@ def onOrbitObsPosition(path, input_ra_list, input_dec_list, input_pmra_list, inp input_year = int(tmp[0]) input_month = int(tmp[1]) input_day = int(tmp[2]) if not (input_year >= 1900 and input_year <= 2100): raise TypeError( "Parameter 15 year range error [1900 ~ 2100]!", input_year) if not (input_month >= 1 and input_month <= 12): raise TypeError( "Parameter 15 month range error [1 ~ 12]!", input_month) if not (input_day >= 1 and input_day <= 31): raise TypeError( "Parameter 15 day range error [1 ~ 31]!", input_day) # if not (input_year >= 1900 and input_year <= 2100): # raise TypeError( # "Parameter 15 year range error [1900 ~ 2100]!", input_year) # if not (input_month >= 1 and input_month <= 12): # raise TypeError( # "Parameter 15 month range error [1 ~ 12]!", input_month) # if not (input_day >= 1 and input_day <= 31): # raise TypeError( # "Parameter 15 day range error [1 ~ 31]!", input_day) if isinstance(type(input_time_str), type("20:15:15.15")): # type(input_time_str) != type("20:15:15.15"): Loading @@ -90,15 +90,15 @@ def onOrbitObsPosition(path, input_ra_list, input_dec_list, input_pmra_list, inp input_hour = int(tmp[0]) input_minute = int(tmp[1]) input_second = float(tmp[2]) if not (input_hour >= 0 and input_hour <= 23): raise TypeError( "Parameter 16 hour range error [0 ~ 23]!", input_hour) if not (input_minute >= 0 and input_minute <= 59): raise TypeError( "Parameter 16 minute range error [0 ~ 59]!", input_minute) if not (input_second >= 0 and input_second < 60.0): raise TypeError( "Parameter 16 second range error [0 ~ 60)!", input_second) # if not (input_hour >= 0 and input_hour <= 23): # raise TypeError( # "Parameter 16 hour range error [0 ~ 23]!", input_hour) # if not (input_minute >= 0 and input_minute <= 59): # raise TypeError( # "Parameter 16 minute range error [0 ~ 59]!", input_minute) # if not (input_second >= 0 and input_second < 60.0): # raise TypeError( # "Parameter 16 second range error [0 ~ 60)!", input_second) # Inital dynamic lib import os Loading