def test_h_max_results(): """ creating some planes pointing in different directions (two north-south, two east-west) and that have a slight position errors (+- 0.1 m in one of the four cardinal directions """ p1 = SkyCoord(alt=0 * u.deg, az=45 * u.deg, frame='altaz') p2 = SkyCoord(alt=0 * u.deg, az=45 * u.deg, frame='altaz') circle1 = HillasPlane(p1=p1, p2=p2, telescope_position=[0, 1, 0] * u.m) p1 = SkyCoord(alt=0 * u.deg, az=90 * u.deg, frame='altaz') p2 = SkyCoord(alt=0 * u.deg, az=90 * u.deg, frame='altaz') circle2 = HillasPlane(p1=p1, p2=p2, telescope_position=[1, 0, 0] * u.m) p1 = SkyCoord(alt=0 * u.deg, az=45 * u.deg, frame='altaz') p2 = SkyCoord(alt=0 * u.deg, az=45 * u.deg, frame='altaz') circle3 = HillasPlane(p1=p1, p2=p2, telescope_position=[0, -1, 0] * u.m) p1 = SkyCoord(alt=0 * u.deg, az=90 * u.deg, frame='altaz') p2 = SkyCoord(alt=0 * u.deg, az=90 * u.deg, frame='altaz') circle4 = HillasPlane(p1=p1, p2=p2, telescope_position=[-1, 0, 0] * u.m) # creating the fit class and setting the the great circle member fit = HillasReconstructor() fit.hillas_planes = {1: circle1, 2: circle2, 3: circle3, 4: circle4} # performing the direction fit with the minimisation algorithm # and a seed that is perpendicular to the up direction h_max_reco = fit.estimate_h_max() print("h max fit test minimise:", h_max_reco) # the results should be close to the direction straight up np.testing.assert_allclose(h_max_reco, 0, atol=1e-8)
def test_h_max_results(): """ creating some planes pointing in different directions (two north-south, two east-west) and that have a slight position errors (+- 0.1 m in one of the four cardinal directions """ horizon_frame = HorizonFrame() p1 = SkyCoord(alt=0 * u.deg, az=45 * u.deg, frame=horizon_frame) p2 = SkyCoord(alt=0 * u.deg, az=45 * u.deg, frame=horizon_frame) circle1 = HillasPlane(p1=p1, p2=p2, telescope_position=[0, 1, 0] * u.m) p1 = SkyCoord(alt=0 * u.deg, az=90 * u.deg, frame=horizon_frame) p2 = SkyCoord(alt=0 * u.deg, az=90 * u.deg, frame=horizon_frame) circle2 = HillasPlane(p1=p1, p2=p2, telescope_position=[1, 0, 0] * u.m) p1 = SkyCoord(alt=0 * u.deg, az=45 * u.deg, frame=horizon_frame) p2 = SkyCoord(alt=0 * u.deg, az=45 * u.deg, frame=horizon_frame) circle3 = HillasPlane(p1=p1, p2=p2, telescope_position=[0, -1, 0] * u.m) p1 = SkyCoord(alt=0 * u.deg, az=90 * u.deg, frame=horizon_frame) p2 = SkyCoord(alt=0 * u.deg, az=90 * u.deg, frame=horizon_frame) circle4 = HillasPlane(p1=p1, p2=p2, telescope_position=[-1, 0, 0] * u.m) # creating the fit class and setting the the great circle member fit = HillasReconstructor() fit.hillas_planes = {1: circle1, 2: circle2, 3: circle3, 4: circle4} # performing the direction fit with the minimisation algorithm # and a seed that is perpendicular to the up direction h_max_reco = fit.estimate_h_max() print("h max fit test minimise:", h_max_reco) # the results should be close to the direction straight up np.testing.assert_allclose(h_max_reco.value, 0, atol=1e-8)
def test_estimator_results(): """ creating some planes pointing in different directions (two north-south, two east-west) and that have a slight position errors (+- 0.1 m in one of the four cardinal directions """ p1 = SkyCoord(alt=43 * u.deg, az=45 * u.deg, frame='altaz') p2 = SkyCoord(alt=47 * u.deg, az=45 * u.deg, frame='altaz') circle1 = HillasPlane(p1=p1, p2=p2, telescope_position=[0, 1, 0] * u.m) p1 = SkyCoord(alt=44 * u.deg, az=90 * u.deg, frame='altaz') p2 = SkyCoord(alt=46 * u.deg, az=90 * u.deg, frame='altaz') circle2 = HillasPlane(p1=p1, p2=p2, telescope_position=[1, 0, 0] * u.m) p1 = SkyCoord(alt=44.5 * u.deg, az=45 * u.deg, frame='altaz') p2 = SkyCoord(alt=46.5 * u.deg, az=45 * u.deg, frame='altaz') circle3 = HillasPlane(p1=p1, p2=p2, telescope_position=[0, -1, 0] * u.m) p1 = SkyCoord(alt=43.5 * u.deg, az=90 * u.deg, frame='altaz') p2 = SkyCoord(alt=45.5 * u.deg, az=90 * u.deg, frame='altaz') circle4 = HillasPlane(p1=p1, p2=p2, telescope_position=[-1, 0, 0] * u.m) # creating the fit class and setting the the great circle member fit = HillasReconstructor() fit.hillas_planes = {1: circle1, 2: circle2, 3: circle3, 4: circle4} # performing the direction fit with the minimisation algorithm # and a seed that is perpendicular to the up direction dir_fit_minimise, _ = fit.estimate_direction() print("direction fit test minimise:", dir_fit_minimise) print()
def test_estimator_results(): """ creating some planes pointing in different directions (two north-south, two east-west) and that have a slight position errors (+- 0.1 m in one of the four cardinal directions """ horizon_frame = HorizonFrame() p1 = SkyCoord(alt=43 * u.deg, az=45 * u.deg, frame=horizon_frame) p2 = SkyCoord(alt=47 * u.deg, az=45 * u.deg, frame=horizon_frame) circle1 = HillasPlane(p1=p1, p2=p2, telescope_position=[0, 1, 0] * u.m) p1 = SkyCoord(alt=44 * u.deg, az=90 * u.deg, frame=horizon_frame) p2 = SkyCoord(alt=46 * u.deg, az=90 * u.deg, frame=horizon_frame) circle2 = HillasPlane(p1=p1, p2=p2, telescope_position=[1, 0, 0] * u.m) p1 = SkyCoord(alt=44.5 * u.deg, az=45 * u.deg, frame=horizon_frame) p2 = SkyCoord(alt=46.5 * u.deg, az=45 * u.deg, frame=horizon_frame) circle3 = HillasPlane(p1=p1, p2=p2, telescope_position=[0, -1, 0] * u.m) p1 = SkyCoord(alt=43.5 * u.deg, az=90 * u.deg, frame=horizon_frame) p2 = SkyCoord(alt=45.5 * u.deg, az=90 * u.deg, frame=horizon_frame) circle4 = HillasPlane(p1=p1, p2=p2, telescope_position=[-1, 0, 0] * u.m) # creating the fit class and setting the the great circle member fit = HillasReconstructor() fit.hillas_planes = {1: circle1, 2: circle2, 3: circle3, 4: circle4} # performing the direction fit with the minimisation algorithm # and a seed that is perpendicular to the up direction dir_fit_minimise, _ = fit.estimate_direction() print("direction fit test minimise:", dir_fit_minimise) print()