@@ -108,22 +108,26 @@ def test_calc_fov_lon_lat():
108108 from ctapipe .reco .telescope_event_handling import calc_fov_lon_lat
109109
110110 prefix = "disp"
111+ sign_score_limit = 0.85
111112 tel_table = Table (
112113 {
113114 "hillas_fov_lon" : [1 , 2 , 3 ] * u .deg ,
114115 "hillas_fov_lat" : [4 , 5 , 6 ] * u .deg ,
115116 "hillas_psi" : [0 , 45 , 90 ] * u .deg ,
116117 f"{ prefix } _parameter" : [1 , 2.5 , 3 ] * u .deg ,
118+ f"{ prefix } _sign_score" : [0.7 , 0.8 , 0.9 ],
117119 }
118120 )
119121
120- lon , lat = calc_fov_lon_lat (tel_table , prefix )
122+ lon , lat , dist_weights = calc_fov_lon_lat (tel_table , sign_score_limit , prefix )
121123
122124 exp_lon = np .array ([[0.0 , 2.0 ], [0.23223305 , 3.76776695 ], [3.0 , 3.0 ]])
123125 exp_lat = np .array ([[4.0 , 4.0 ], [3.23223305 , 6.76776695 ], [3.0 , 9.0 ]])
126+ exp_dist_weights = np .array ([[1 , 1 ], [1 , 1 ], [1 , 1 / (1 + 0.9 )]])
124127
125128 assert np .allclose (lon , exp_lon )
126129 assert np .allclose (lat , exp_lat )
130+ assert np .allclose (dist_weights , exp_dist_weights )
127131
128132
129133def test_create_combs_array ():
0 commit comments