code: def process_full_data(fname, rhomin, mass1, mass2, lo_mchirp, hi_mchirp):
      
      with h5py.File(fname, 'r') as bulk:
  
          id_bkg = bulk['background_exc/template_id'][:]
          id_fg = bulk['foreground/template_id'][:]
  
          mchirp_bkg = mchirp_from_mass1_mass2(mass1[id_bkg], mass2[id_bkg])
          bound = np.sign((mchirp_bkg - lo_mchirp) * (hi_mchirp - mchirp_bkg))
          idx_bkg = np.where(bound == 1)
          mchirp_fg = mchirp_from_mass1_mass2(mass1[id_fg], mass2[id_fg])
          bound = np.sign((mchirp_fg - lo_mchirp) * (hi_mchirp - mchirp_fg))
          idx_fg = np.where(bound == 1)
  
          zerolagstat = bulk['foreground/stat'][:][idx_fg]
          cstat_back_exc = bulk['background_exc/stat'][:][idx_bkg]
          dec_factors = bulk['background_exc/decimation_factor'][:][idx_bkg]
  
      return {'zerolagstat': zerolagstat[zerolagstat > rhomin],
             'dec_factors': dec_factors[cstat_back_exc > rhomin],
             'cstat_back_exc': cstat_back_exc[cstat_back_exc > rhomin]}
docs: Read the zero-lag and time-lag triggers identified by templates in
         a specified range of chirp mass.
  
         Parameters
         ----------
         hdfile:
                File that stores all the triggers
         rhomin: float
                Minimum value of SNR threhold (will need including ifar)
         mass1: array
                First mass of the waveform in the template bank
         mass2: array
                Second mass of the waveform in the template bank
         lo_mchirp: float
                Minimum chirp mass for the template
         hi_mchirp: float
                Maximum chirp mass for the template
  
         Returns
         -------
         dictionary
                containing foreground triggers and background information