示例#1
0
def entry():
    args = docopt(__doc__)
    inputs = args['<input_files>']
    output_hist = args['--output_hist']
    delays_ns = convert_list_float(args['--delays_ns'])
    time_range_ns = convert_list_float(args['--time_range_ns'])
    amplitude_range = convert_list_float(args['--amplitude_range'])
    integration_range = convert_list_int(args['--integration_range'])
    charge_range = convert_list_float(args['--charge_range'])
    n_bin = convert_int(args['--n_bin'])
    disable_bar = args['--disable_bar']

    if output_hist is None:
        output_hist = os.path.splitext(inputs[0])[0] + '.fits.gz'
    print('options selected:')
    print('input_files:', inputs)
    print('output_hist:', output_hist)
    print('time_range_ns:', time_range_ns)
    print('amplitude_range:', amplitude_range)
    print('integration_range:', integration_range)
    print('charge_range:', charge_range)
    print('n_bin:', n_bin)
    main(input_files=inputs,
         output_hist=output_hist,
         delays_ns=delays_ns,
         time_range_ns=time_range_ns,
         amplitude_range=amplitude_range,
         integration_range=integration_range,
         charge_range=charge_range,
         n_bin=n_bin,
         disable_bar=disable_bar)
示例#2
0
def entry():
    args = docopt(__doc__)
    hillas_file = args['<INPUT>']
    alphas_min = convert_list_float(args['--alphas_min'])
    plot_scan2d = convert_text(args['--plot_scan2d'])
    plot_showers_center = convert_text(args['--plot_showers_center'])
    plot_hillas = convert_text(args['--plot_hillas'])
    plot_correlation_all = convert_text(args['--plot_correl_all'])
    plot_correlation_selected = convert_text(args['--plot_correl_selected'])
    plot_correlation_cut = convert_text(args['--plot_correl_cut'])
    disable_bar = args['--disable_bar']
    xis = convert_list_float(args['--xis'])
    plot_map_disp = convert_text(args['--plot_map_disp'])
    plot_pipeline(
        hillas_file=hillas_file,
        cut_length_gte=None,  # Whipple:43 # 2017:None
        cut_length_lte=None,  # Whipple:16 # 2017:None
        cut_width_gte=None,  # Whipple:16 # 2017:None
        cut_width_lte=None,  # Whipple:7.3 # 2017:None
        cut_length_over_width_gte=3,  # Whipple:None # 2017:3
        cut_length_over_width_lte=1.5,  # Whipple:None # 2017:1.5
        cut_intensity_gte=None,
        cut_intensity_lte=100,  # Whipple:None # 2017: 100?
        cut_skewness_gte=None,
        cut_skewness_lte=None,
        cut_border_eq=True,
        cut_burst_eq=True,
        cut_saturated_eq=None,
        cut_led_on_eq=True,
        cut_led_blink_eq=True,
        cut_target_ra_gte=85,
        cut_target_ra_lte=82,
        cut_target_dec_gte=23,
        cut_target_dec_lte=21,
        cut_nsb_rate_gte=0.6 ,
        cut_nsb_rate_lte=.1,
        cut_r_gte=None ,
        cut_r_lte=None,
        cut_n_island_gte=2,
        alphas_min=alphas_min,
        plot_scan2d=plot_scan2d,
        plot_showers_center=plot_showers_center,
        plot_hillas=plot_hillas,
        plot_correlation_all=plot_correlation_all,
        plot_correlation_selected=plot_correlation_selected,
        plot_correlation_cut=plot_correlation_cut,
        plot_map_disp=plot_map_disp,
        xis=xis,
        print_events=0,
        disable_bar=disable_bar,
    )
示例#3
0
def entry():
    args = docopt(__doc__)
    files = args['<INPUT>']
    ac_levels = convert_list_int(args['--ac_levels'])
    dc_levels = convert_list_int(args['--dc_levels'])
    if len(dc_levels) == 1:
        dc_levels = [
            dc_levels[0],
        ] * len(ac_levels)
    assert len(ac_levels) == len(files)
    max_events = convert_int(args['--max_events'])
    delay_step_ns = convert_float(args['--delay_step_ns'])
    time_range_ns = convert_list_float(args['--time_range_ns'])
    normalize_range = convert_list_int(args['--normalize_range'])
    sampling_ns = 4
    parameters = convert_text(args['--parameters'])
    template = convert_text(args['--template'])
    output = convert_text(args['--output'])
    if parameters is None:
        parameters = parameters_default
    if template is None:
        template = template_default
    main(files=files,
         ac_levels=ac_levels,
         dc_levels=dc_levels,
         max_events=max_events,
         delay_step_ns=delay_step_ns,
         time_range_ns=time_range_ns,
         sampling_ns=sampling_ns,
         normalize_range=normalize_range,
         parameters=parameters,
         template=template,
         adc_noise=1.,
         output=output)