def setUp(self): t_init = 0 # 1/24/60 t_end = t_init + 1 / 24 / 60 # 365*5 my_dt = 1 / 24 / 60 / 10 # [days] spline_degree = 3 gaia = Satellite(ti=t_init, tf=t_end, dt=my_dt, k=spline_degree) self.gaia = gaia my_times = np.linspace(t_init, t_end, num=100, endpoint=False) real_sources = [] calc_sources = [] for t in my_times: alpha, delta = af.generate_observation_wrt_attitude( gaia.func_attitude(t)) real_src_tmp = Source(str(t), np.degrees(alpha), np.degrees(delta), 0, 0, 0, 0) calc_src_tmp = Calc_source('calc_' + str(t), [t], real_src_tmp.get_parameters()[0:5], real_src_tmp.get_parameters()[5]) real_sources.append(real_src_tmp) calc_sources.append(calc_src_tmp) # test if source and calc source are equal (as they should be) np.testing.assert_array_almost_equal( np.array(real_sources[0].get_parameters()[0:5]), calc_sources[0].s_params) # create Solver self.Solver = Agis( gaia, calc_sources, real_sources, attitude_splines=[gaia.s_w, gaia.s_x, gaia.s_y, gaia.s_z], spline_degree=spline_degree, attitude_regularisation_factor=1e-3)