def METHOD_NAME(rise_times):
    """
    and determine the trapezoid parameters that minimize
    the FWHM of the peak (fitting to the peakshape function).
    """
    from pygama.dsp.base import Intercom
    from pygama.io.tier1 import ProcessTier1
    import pygama.io.decoders.digitizers as pgd
    ds_num = 3
    ds = DataSet(ds_num, md="runDB.json")
    first_run = ds.runs[0]
    # specify temporary I/O locations
    out_dir = os.path.expanduser('~') + "/Data/cage"
    t1_file = f"{out_dir}/cage_ds3_t1.h5"
    t2_file = f"{out_dir}/cage_ds3_t2.h5"
    opt_file = f"{out_dir}/cage_ds3_optimize.h5"
    if os.path.exists(opt_file):
        os.remove(opt_file)
    # check the windowed file
    tmp = pd.read_hdf(t1_file)
    nevt = len(tmp)
    rc_decay = 72
    for i, rt in enumerate(rise_times):
        # custom tier 1 processor list -- very minimal
        proc_list = {
            "clk" : 100e6,
            "fit_bl" : {"ihi":500, "order":1},
            "blsub" : {},
            "trap" : [
                {"wfout":"wf_etrap", "wfin":"wf_blsub", 
                 "rise":rt, "flat":2.5, "decay":rc_decay},
                {"wfout":"wf_atrap", "wfin":"wf_blsub", 
                 "rise":0.04, "flat":0.1, "fall":2}
                ],
            "get_max" : [{"wfin":"wf_etrap"}, {"wfin":"wf_atrap"}],
            # "ftp" : {"test":1}
            "ftp" : {}
        }
        proc = Intercom(proc_list)
        dig = pgd.SIS3302Decoder
        dig.decoder_name = "df_windowed"
        dig.class_name = None
        ProcessTier1(t1_file, proc, output_dir=out_dir, overwrite=True, 
                     verbose=False, multiprocess=True, nevt=np.inf, ioff=0, 
                     chunk=ds.config["chunksize"], run=first_run, 
                     t2_file=t2_file, digitizers=[dig])
        # load the temporary file and append to the main output file
        df_key = f"opt_{i}"
        t2df = pd.read_hdf(t2_file)
        t2df.to_hdf(opt_file, df_key)