rta_reconstruction.dl1_reader.filter_dl1

rta_reconstruction.dl1_reader.filter_dl1(dl1_df, filters=None, finite_params=None)[source]

Apply data filtering to a pandas dataframe. Each filtering range is applied if the column name exists in the DataFrame so that (events >= range[0]) & (events <= range[1])

Parameters:
  • events (pandas.DataFrame)

  • filters (dict containing events features names and their filtering range) – example : dict(intensity=[0, np.inf], width=[0, np.inf], r=[0, np.inf])

  • finite_params (optional, None or list of strings) – Column names: any row with a non-finite value in one of those columns will be discarded

Return type:

pandas.DataFrame