From 8906158815378c055952f9c6a4f6ea4027ed6f69 Mon Sep 17 00:00:00 2001 From: YoshikiOhtani Date: Thu, 13 Oct 2022 15:10:27 +0000 Subject: [PATCH] Convert the `combo_type` and `multiplicity` variables to int after calculating their mean values --- magicctapipe/io/io.py | 1 + 1 file changed, 1 insertion(+) diff --git a/magicctapipe/io/io.py b/magicctapipe/io/io.py index 838e36bbd..aa71c3255 100644 --- a/magicctapipe/io/io.py +++ b/magicctapipe/io/io.py @@ -178,6 +178,7 @@ def get_dl2_mean(event_data, weight_type="simple", group_index=["obs_id", "event params = ["combo_type", "multiplicity", "timestamp"] event_data_mean = event_data[params].groupby(group_index).mean() + event_data_mean = event_data_mean.astype({"combo_type": int, "multiplicity": int}) # Calculate the mean pointing direction pnt_az_mean, pnt_alt_mean = calculate_mean_direction(