Run apply RF script on both real and simulated data
At the moment, apply_rfs.py
cannot be run over the real and simulated data without running it twice and commenting in the lines where MC specific operations are performed. An example taken from apply_rfs.py
is here below:
shower_data = shower_data.query('tel_alt < 1.5707963267948966')
#original_mc_data = original_mc_data.reset_index()
#original_mc_data.set_index(['obs_id', 'event_id', 'tel_id'], inplace=True)
#original_mc_data.sort_index(inplace=True)
# Computing the event "multiplicity"
shower_data['multiplicity'] = shower_data['intensity'].groupby(level=['obs_id', 'event_id']).count()
#original_mc_data['multiplicity'] = original_mc_data['true_energy'].groupby(level=['obs_id', 'event_id']).count()
Of course, commenting in every time one has to run over MC data becomes painful. Therefore, it is useful to modify apply_rfs.py
to let the user process real and simulated data running the script only once.
To achieve this it is sufficient to comment in the lines related to MC stuff and to insert some if
statements so that those lines are used only when MC data is processed.