Пример #1
0
    # set up the configuration
    configure = hlr_utils.Configure()

    if options.output:
        configure.output = hlr_utils.fix_filename(options.output)
    else:
        configure.output = "pixel_mask.dat"

    # set the list of bank IDs
    if options.bank_ids is not None:
        configure.bank_ids = options.bank_ids.split(",")
    else:
        parser.error("Must provide a list of bank ids via the --bank-ids " + "flag.")

    # set the list of horizontal pixel range pairs
    if options.h_ranges is not None:
        configure.h_ranges = hlr_utils.create_id_pairs(options.h_ranges, options.bank_ids)
    else:
        parser.error("Must provide a list of horizontal pixel ranges via the " + "--h-ranges flag.")

    # set the list of vertical pixel range pairs
    if options.v_ranges is not None:
        configure.v_ranges = hlr_utils.create_id_pairs(options.v_ranges, options.bank_ids)
    else:
        parser.error("Must provide a list of vertical pixel ranges via the " + "--v-ranges flag.")

    configure.append = options.append

    run(configure)
Пример #2
0
    configure = hlr_utils.Configure()

    # Call the configuration setter for InstOptions
    hlr_utils.InstConfiguration(parser, configure, options, args)

    # Set the ROI file
    if hlr_utils.cli_provide_override(configure, "roi_file", "--roi-file"):
        configure.roi_file = hlr_utils.determine_files(options.roi_file,
                                                       one_file=True)

    # set the starting ids
    if hlr_utils.cli_provide_override(configure, "starting_ids",
                                      "--starting-ids"):
        if options.starting_ids is not None:
            configure.starting_ids = hlr_utils.create_id_pairs(\
            options.starting_ids,\
            options.data_paths)
        else:
            configure.starting_ids = options.starting_ids

    # set the ending ids
    if hlr_utils.cli_provide_override(configure, "ending_ids", "--ending-ids"):
        if options.ending_ids is not None:
            configure.ending_ids = hlr_utils.create_id_pairs(\
                options.ending_ids,
                options.data_paths,
                inc=True)
        else:
            configure.ending_ids = options.ending_ids

    # set the dump all TOF pixel information
Пример #3
0
    if options.output:
        configure.output = hlr_utils.fix_filename(options.output)
    else:
        configure.output = "pixel_mask.dat"

    # set the list of bank IDs
    if options.bank_ids is not None:
        configure.bank_ids = options.bank_ids.split(',')
    else:
        parser.error("Must provide a list of bank ids via the --bank-ids "\
                     +"flag.")

    # set the list of horizontal pixel range pairs
    if options.h_ranges is not None:
        configure.h_ranges = hlr_utils.create_id_pairs(\
            options.h_ranges,
            options.bank_ids)
    else:
        parser.error("Must provide a list of horizontal pixel ranges via the "\
                     +"--h-ranges flag.")

    # set the list of vertical pixel range pairs
    if options.v_ranges is not None:
        configure.v_ranges = hlr_utils.create_id_pairs(\
            options.v_ranges,
            options.bank_ids)
    else:
        parser.error("Must provide a list of vertical pixel ranges via the "\
                     +"--v-ranges flag.")

    configure.append = options.append