Commit 1ffa986c authored by Yan Zhaojun's avatar Yan Zhaojun
Browse files

Replace shao.py

parent c5ca2363
Pipeline #7897 failed with stage
in 0 seconds
from ctypes import *
def checkInputList(input_list, n):
if type(input_list) != type([1, 2, 3]):
raise TypeError("Input type is not list!", input_list)
for i in input_list:
if type(i) != type(1.1):
if type(i) != type(1):
raise TypeError("Input list's element is not float or int!", input_list)
if len(input_list) != n:
raise RuntimeError("Length of input list is not equal to stars' number!", input_list)
#def checkInputList(input_list, n):
# if type(input_list) != type([1, 2, 3]):
# raise TypeError("Input type is not list!", input_list)
# for i in input_list:
# if type(i) != type(1.1):
# if type(i) != type(1):
# raise TypeError("Input list's element is not float or int!", input_list)
# if len(input_list) != n:
# raise RuntimeError("Length of input list is not equal to stars' number!", input_list)
def onOrbitObsPosition(path, input_ra_list, input_dec_list, input_pmra_list, input_pmdec_list, input_rv_list, \
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 type(input_nstars) != type(1):
raise TypeError("Parameter 7 is not int!", input_nstars)
# Check input parameters
# if 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)
# checkInputList(input_pmra_list, input_nstars)
......
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