Esempio n. 1
0
                                key_y,
                                eventids=eventids_airplane,
                                cmap=cmap,
                                include_roi=False,
                                lognorm=lognorm)
                        #fig.savefig(key_x + key_y + '.svg', bbox_inches=0, transparent=False)
                        fig.savefig('run%i_' % run + key_x + key_y + '.svg',
                                    bbox_inches=0,
                                    transparent=False)
                        #import pdb; pdb.set_trace()
            else:
                ds = dataSlicer(runs, impulsivity_dset_key, time_delays_dset_key, map_direction_dset_key,\
                        curve_choice=0, trigger_types=trigger_types,included_antennas=[0,1,2,3,4,5,6,7],include_test_roi=False,\
                        cr_template_n_bins_h=200,cr_template_n_bins_v=200,\
                        impulsivity_n_bins_h=200,impulsivity_n_bins_v=200,\
                        time_delays_n_bins_h=150,time_delays_n_bins_v=150,min_time_delays_val=-200,max_time_delays_val=200,\
                        std_n_bins_h=200,std_n_bins_v=200,max_std_val=9,\
                        p2p_n_bins_h=128,p2p_n_bins_v=128,max_p2p_val=128,\
                        snr_n_bins_h=200,snr_n_bins_v=200,max_snr_val=35,\
                        n_phi=n_phi, range_phi_deg=range_phi_deg, n_theta=n_theta, range_theta_deg=range_theta_deg)

                plot_param_pairs = [['phi_best_h', 'elevation_best_h'],
                                    ['impulsivity_h', 'impulsivity_v']]

                for key_x, key_y in plot_param_pairs:
                    print('Generating %s plot' % (key_x + ' vs ' + key_y))
                    fig, ax = ds.plotROI2dHist(key_x,
                                               key_y,
                                               cmap=cmap,
                                               include_roi=False,
                                               lognorm=lognorm)
    impulsivity_dset_key = 'LPf_100.0-LPo_8-HPf_None-HPo_None-Phase_1-Hilb_0-corlen_65536-align_0-shortensignals-0-shortenthresh-0.70-shortendelay-10.00-shortenlength-90.00-sinesubtract_1'
    time_delays_dset_key = 'LPf_100.0-LPo_8-HPf_None-HPo_None-Phase_1-Hilb_0-corlen_65536-align_0-shortensignals-0-shortenthresh-0.70-shortendelay-10.00-shortenlength-90.00-sinesubtract_1'
    map_direction_dset_key = 'LPf_100.0-LPo_8-HPf_None-HPo_None-Phase_1-Hilb_0-upsample_32768-maxmethod_0-sinesubtract_1-deploy_calibration_15'  #'LPf_100.0-LPo_8-HPf_None-HPo_None-Phase_1-Hilb_0-upsample_32768-maxmethod_0-sinesubtract_1-deploy_calibration_22-scope_belowhorizon'#'LPf_100.0-LPo_8-HPf_None-HPo_None-Phase_1-Hilb_0-upsample_32768-maxmethod_0-sinesubtract_1-deploy_calibration_15'

    trigger_types = [2]  #[2]
    plot_maps = True

    sources_ENU, data_slicer_cut_dict = info.loadValleySourcesENU(
    )  #Plot all potential sources
    try:
        if False:
            ds = dataSlicer(runs, impulsivity_dset_key, time_delays_dset_key, map_direction_dset_key,\
                    curve_choice=0, trigger_types=trigger_types,included_antennas=[0,1,2,3,4,5,6,7],include_test_roi=False,\
                    cr_template_n_bins_h=200,cr_template_n_bins_v=200,\
                    impulsivity_n_bins_h=200,impulsivity_n_bins_v=200,\
                    time_delays_n_bins_h=500,time_delays_n_bins_v=500,min_time_delays_val=-140,max_time_delays_val=-90,\
                    std_n_bins_h=200,std_n_bins_v=200,max_std_val=9,\
                    p2p_n_bins_h=128,p2p_n_bins_v=128,max_p2p_val=128,\
                    snr_n_bins_h=200,snr_n_bins_v=200,max_snr_val=35)

            for source_key, cut_dict in data_slicer_cut_dict.items():
                if source_key in include_sources:
                    ds.addROI(source_key, cut_dict)

            ds.trackROICounts(roi_keys=None,
                              time_bin_width_s=3600,
                              plot_run_start_times=True)
            ds.trackROICounts(roi_keys=None,
                              time_bin_width_s=3600,
                              plot_run_start_times=False)