pointer_pd['num_ctrl_spots_ft'] = [len(ctrl_pd_ft)] * len(pointer_pd)
        data_log['num_ctrl_spots'] = len(ctrl_pd_ft)

        print("### Image analysis: photobleaching correction ...")
        # photobleaching factor calculation
        if len(ctrl_pd_ft) != 0:
            pointer_pd = ble.frap_pb_correction(pointer_pd, ctrl_pd_ft)
            # normalize frap curve and measure mobile fraction and t-half based on curve itself
            frap_pd = ble.frap_analysis(pointer_pd, max_t,
                                        acquire_time_tseries, real_time,
                                        frap_start_delay, frap_start_mode)
            pointer_pd = pd.concat([pointer_pd, frap_pd], axis=1)

            # frap curve fitting
            print("### Imaging analysis: curve fitting ...")
            pointer_pd = ble.frap_curve_fitting(pointer_pd)
            pointer_pd['pos'] = [pos] * len(pointer_pd)
            pointer_ft_pd = pointer_pd[pointer_pd['frap_filter_%s' %
                                                  fitting_mode] == 1]
            data_log['num_frap_curves'] = [len(pointer_ft_pd)]
            print("%d spots passed filters for FRAP curve quality control." %
                  data_log['num_frap_curves'][0])

            # --------------------------
            # OUTPUT
            # --------------------------
            print("### Export data ...")

            storage_path = save_path
            if not os.path.exists(storage_path):
                os.makedirs(storage_path)
Exemplo n.º 2
0
        len(ctrl_nuclear_bg_pd_ft)
    ] * len(pointer_nuclear_bg_pd)
    data_log['num_ctrl_spots_nuclear_bg'] = len(ctrl_nuclear_bg_pd_ft)

print("### Image analysis: photobleaching correction ...")
# photobleaching factor calculation
if len(ctrl_pd_ft) != 0:
    pointer_pd = ble.frap_pb_correction(pointer_pd, ctrl_pd_ft)
    # normalize frap curve and measure mobile fraction and t-half based on curve itself
    frap_pd = ble.frap_analysis(pointer_pd, max_t, acquire_time_tseries,
                                real_time, frap_start_delay, frap_start_mode)
    pointer_pd = pd.concat([pointer_pd, frap_pd], axis=1)

    # frap curve fitting
    print("### Imaging analysis: curve fitting ...")
    pointer_pd = ble.frap_curve_fitting(pointer_pd)
    pointer_pd['pos'] = [pos] * len(pointer_pd)
    pointer_ft_pd = pointer_pd[pointer_pd['frap_filter_%s' %
                                          fitting_mode] == 1]
    data_log['num_frap_curves'] = [len(pointer_ft_pd)]
    print("%d spots passed filters for FRAP curve quality control." %
          data_log['num_frap_curves'][0])

    # --------------------------
    # OUTPUT
    # --------------------------
    print("### Export data ...")

    storage_path = save_path
    if not os.path.exists(storage_path):
        os.makedirs(storage_path)