Lunching the first script write_dl1.py with the files from the new divergent simulations I get the following error due to astropy when creating reco_result
:
Traceback (most recent call last):
File "i/protopipe/protopipe/scripts/write_dl1.py", line 442, in <module>
main()
File "/protopipe/protopipe/scripts/write_dl1.py", line 222, in main
) in preper.prepare_event(source, save_images=args.save_images):
File "/protopipe/protopipe/pipeline/event_preparer.py", line 1163, in prepare_event
for tel_id in point_altitude_dict.keys()
File "/protopipe/protopipe/pipeline/event_preparer.py", line 1163, in <dictcomp>
for tel_id in point_altitude_dict.keys()
File "/miniconda3/envs/protopipe/lib/python3.7/site-packages/astropy/coordinates/sky_coordinate.py", line 257, in __init__
frame_cls(**frame_kwargs), args, kwargs)
File "/miniconda3/envs/protopipe/lib/python3.7/site-packages/astropy/coordinates/sky_coordinate_parsers.py", line 244, in _parse_coordinate_data
valid_components.update(_get_representation_attrs(frame, units, kwargs))
File "/miniconda3/envs/protopipe/lib/python3.7/site-packages/astropy/coordinates/sky_coordinate_parsers.py", line 589, in _get_representation_attrs
valid_kwargs[frame_attr_name] = repr_attr_class(value, unit=unit)
File "/miniconda3/envs/protopipe/lib/python3.7/site-packages/astropy/coordinates/angles.py", line 618, in __new__
self.wrap_angle = wrap_angle
File "/miniconda3/envs/protopipe/lib/python3.7/site-packages/astropy/coordinates/angles.py", line 654, in wrap_angle
self._wrap_internal()
File "/miniconda3/envs/protopipe/lib/python3.7/site-packages/astropy/coordinates/angles.py", line 645, in _wrap_internal
super().__setitem__((), value)
File "/miniconda3/envs/protopipe/lib/python3.7/site-packages/astropy/units/quantity.py", line 1060, in __setitem__
self.view(np.ndarray).__setitem__(i, self._to_own_unit(value))
File "/miniconda3/envs/protopipe/lib/python3.7/site-packages/astropy/units/quantity.py", line 1372, in _to_own_unit
raise TypeError("cannot convert value type to array type "
TypeError: cannot convert value type to array type without precision loss
If I use a file from the old simulations the script run without error. Both the simulations were done using the same CORSIKA and SIMTEL version, only difference is the add of a TELESCOPE 0 in the simtel conflict file that correspond to the array pointing. I checked and this should not interfere, I have 19 telescope with ID from 1 to 19.
The value of point_azimuth_dict[tel_id]
and point_altitude_dict[tel_id]
are both float32. One difference with the old simulation is that I have some negative value for the azimuth.
point_altitude_dict[tel_id]: 1.2257447242736816 rad float32
point_azimuth_dict[tel_id]: -3.0990066528320312 rad float32