Beispiel #1
0
def add_args(parser):
    """
    Args:
        parser (argparse.ArgumentParser): the command-line parser
    """
    arguments.add_gcdfile(parser)
    arguments.add_inputfilelist(parser)
    arguments.add_outputfile(parser)
    arguments.add_summaryfile(parser)
    arguments.add_enablehistogram(parser)
    arguments.add_histogramfilename(parser)

    arguments.add_nproc(parser)
    arguments.add_procnum(parser)
    arguments.add_seed(parser)
    arguments.add_usegslrng(parser)

    arguments.add_icemodellocation(parser)
    arguments.add_icemodel(parser)
    arguments.add_holeiceparametrization(parser)
    arguments.add_oversize(parser)
    arguments.add_efficiency(parser)

    arguments.add_proposalparams(parser)
    arguments.add_propagatemuons(parser, True)

    arguments.add_photonseriesname(parser)
    arguments.add_gpu(parser)
    arguments.add_usegpus(parser, True)

    parser.add_argument("--no-RunMPHitFilter", dest="runmphitfilter",
                        default=True, action="store_false", required=False,
                        help="Don't run polyplopia's mphitfilter")
    parser.add_argument("--gpulib", dest="gpulib",
                        default="opencl", type=str, required=False,
                        help="set gpu library to load (defaults to cuda)")
    parser.add_argument("--no-volumecyl", dest="volumecyl",
                        default=True, action="store_false", required=False,
                        help="Don't set volume to regular cylinder (set flag for 300m spacing from the DOMs)")
    parser.add_argument("--MCTreeName", dest="mctreename",
                        default="I3MCTree", type=str, required=False,
                        help="Name of MCTree frame object")
    parser.add_argument("--KeepEmptyEvents", dest="keepemptyevents",
                        default=False, action="store_true", required=False,
                        help="Don't discard events with no MCPEs")
    parser.add_argument("--TempDir", dest="tempdir",
                        default=None, type=str, required=False,
                        help='Temporary working directory with the ice model')
Beispiel #2
0
def add_args(parser):
    """
    Args:
        parser (argparse.ArgumentParser): the command-line parser
    """
    arguments.add_outputfile(parser)
    arguments.add_histogramfilename(parser)

    arguments.add_seed(parser)

    arguments.add_nevents(parser)

    parser.add_argument("--FromEnergy", dest="fromenergy",
                        default=1.*I3Units.TeV, type=float, required=False,
                        help='Minimum energy')
    parser.add_argument("--ToEnergy", dest="toenergy",
                        default=10.*I3Units.PeV, type=float, required=False,
                        help='Maximum energy')
def add_args(parser):
    """
    Args:
        parser (argparse.ArgumentParser): the command-line parser
    """
    arguments.add_gcdfile(parser)
    arguments.add_inputfile(parser)
    arguments.add_outputfile(parser)
    arguments.add_histogramfilename(parser)

    arguments.add_nproc(parser)
    arguments.add_procnum(parser)
    arguments.add_seed(parser)
    arguments.add_usegslrng(parser)

    arguments.add_icemodellocation(parser)
    arguments.add_icemodel(parser)
    arguments.add_holeiceparametrization(parser)
    arguments.add_oversize(parser)
    arguments.add_efficiency(parser)

    arguments.add_proposalparams(parser)

    arguments.add_photonseriesname(parser)

    arguments.add_gpu(parser)
    arguments.add_usegpus(parser, True)

    parser.add_argument("--backgroundfile", dest="backgroundfile",
                        default='', type=str, required=False,
                        help='Background filename')
    parser.add_argument("--backgroundrate", dest="backgroundrate",
                        default=float('nan'), type=float, required=False,
                        help='Background rate (Hz) (don\'t use with corsika)')
    parser.add_argument("--mctype", dest="mctype",
                        default='corsika', type=str, required=False,
                        help='Type of primary simulation')
    parser.add_argument("--UsePPC", dest="useppc",
                        default=False, action="store_true", required=False,
                        help="Use PPC for photon propagation instead of CLSim.")
    parser.add_argument("--TimeWindow", dest="timewindow",
                        default=40. * I3Units.microsecond, type=float, required=False,
                        help='Coincidence time window')
Beispiel #4
0
def add_args(parser):
    """
    Args:
        parser (argparse.ArgumentParser): the command-line parser
    """
    arguments.add_gcdfile(parser)
    arguments.add_outputfile(parser)
    arguments.add_summaryfile(parser)

    arguments.add_seed(parser)

    arguments.add_nevents(parser)
    
    parser.add_argument("--Detector", dest="detector",
                        default="IC86:2011", type=str, required=False,
                        help="detector to simulate")
    parser.add_argument("--RunId", dest="runid",
                        default=0, type=int, required=False,
                        help="Configure run ID")
Beispiel #5
0
def add_args(parser):
    """
    Args:
        parser (argparse.ArgumentParser): the command-line parser
    """
    arguments.add_gcdfile(parser, required=False)
    arguments.add_outputfile(parser)
    arguments.add_summaryfile(parser)
    arguments.add_enablehistogram(parser)
    arguments.add_histogramfilename(parser)

    arguments.add_nproc(parser)
    arguments.add_procnum(parser)
    arguments.add_seed(parser)
    arguments.add_usegslrng(parser)

    arguments.add_nevents(parser)

    arguments.add_proposalparams(parser)
    arguments.add_propagatemuons(parser, False)

    parser.add_argument("--runid",
                        dest="runid",
                        default=None,
                        type=int,
                        required=False,
                        help='Run number to use in S-Frame')
    parser.add_argument("--SimMode",
                        dest="simmode",
                        default='FULL',
                        type=str,
                        required=False,
                        help='simulation mode')
    parser.add_argument("--VTXGenMode",
                        dest="vtxgenmode",
                        default='NuGen',
                        type=str,
                        required=False,
                        help='currently supports only NuGen')
    parser.add_argument("--InjectionMode",
                        dest="injectionmode",
                        default='Surface',
                        type=str,
                        required=False,
                        help='injection mode')
    parser.add_argument(
        "--CylinderParams",
        dest="cylinderparams",
        default=[0, 0, 0, 0, 0],
        type=arguments.float_comma_list,
        required=False,
        help='For CIRCLE[radius, active_height_before, active_height_after],'
        ' for SURFACE[radius, length, center_x, center_y, center_z]')
    parser.add_argument(
        "--no-AutoExtendMuonVolume",
        dest="autoextendmuonvolume",
        default=True,
        action="store_false",
        required=False,
        help=
        "Don't use detection volume extension (set flag for starting events)")
    parser.add_argument("--NuFlavor",
                        dest="nuflavor",
                        default='',
                        type=str,
                        required=False,
                        help='Use Legacy injector : Neutrino Flavor')
    parser.add_argument(
        "--NuTypes",
        dest="nutypes",
        default=dict(),
        type=json.loads,
        required=False,
        help=
        'Use new injector. Set dictionary of neutrino types and ratio. e.g. {NuMu:1, NuMuBar:1, NuEBar:1}'
    )
    parser.add_argument("--Polyplopia",
                        dest="polyplopia",
                        default=False,
                        action="store_true",
                        required=False,
                        help='Produce coincident showers')
    parser.add_argument("--gamma",
                        dest="gamma",
                        default=2.0,
                        type=float,
                        required=False,
                        help='Gamma index')
    parser.add_argument("--FromEnergy",
                        dest="fromenergy",
                        default=1. * I3Units.TeV,
                        type=float,
                        required=False,
                        help='Minimum energy')
    parser.add_argument("--ToEnergy",
                        dest="toenergy",
                        default=10. * I3Units.PeV,
                        type=float,
                        required=False,
                        help='Maximum energy')
    parser.add_argument("--ZenithMin",
                        dest="zenithmin",
                        default=0.,
                        type=float,
                        required=False,
                        help='min zenith')
    parser.add_argument("--ZenithMax",
                        dest="zenithmax",
                        default=180. * I3Units.degree,
                        type=float,
                        required=False,
                        help='max zenith')
    parser.add_argument("--AzimuthMin",
                        dest="azimuthmin",
                        default=0.,
                        type=float,
                        required=False,
                        help='min azimuth')
    parser.add_argument("--AzimuthMax",
                        dest="azimuthmax",
                        default=360. * I3Units.degree,
                        type=float,
                        required=False,
                        help='max azimuth')
    parser.add_argument("--ZenithSamplingMode",
                        dest="zenithsamplingmode",
                        default='ANGEMU',
                        type=str,
                        required=False,
                        help='zenith sampling mode')
    parser.add_argument("--UseDifferentialXsection",
                        dest="usedifferentialxsection",
                        default=False,
                        action="store_true",
                        required=False,
                        help='Do you use differential cross sections?')
    parser.add_argument("--CrossSections",
                        dest="crosssections",
                        default='csms',
                        type=str,
                        required=False,
                        help='cross section files')
    parser.add_argument("--CrossSectionsPath",
                        dest="crosssectionspath",
                        default='',
                        type=str,
                        required=False,
                        help='cross section tables path')
    parser.add_argument("--ParamsMap",
                        dest="paramsmap",
                        default=dict(),
                        type=json.loads,
                        required=False,
                        help='any other parameters')
    parser.add_argument("--BackgroundFile",
                        dest="backgroundfile",
                        default="",
                        type=str,
                        required=False,
                        help='pre-generated coincident showers file')
def add_args(parser):
    """
    Args:
        parser (argparse.ArgumentParser): the command-line parser
    """
    arguments.add_gcdfile(parser)
    arguments.add_inputfile(parser)
    arguments.add_outputfile(parser)
    arguments.add_summaryfile(parser)
    arguments.add_enablehistogram(parser)
    arguments.add_histogramfilename(parser)

    arguments.add_nproc(parser)
    arguments.add_procnum(parser)
    arguments.add_seed(parser)
    arguments.add_usegslrng(parser)

    parser.add_argument("--MCType",
                        dest="mctype",
                        default='corsika_weighted',
                        type=str,
                        required=False,
                        help='Generator particle type')
    parser.add_argument("--UseLinearTree",
                        dest="uselineartree",
                        default=False,
                        action="store_true",
                        required=False,
                        help='Use I3LinearizedMCTree for serialization')
    parser.add_argument(
        "--MCPrescale",
        dest="mcprescale",
        default=100,
        type=int,
        required=False,
        help='Prescale for keeping additional Monte Carlo info in the frame')
    parser.add_argument("--IceTop",
                        dest="icetop",
                        default=False,
                        action="store_true",
                        required=False,
                        help='Do IceTop Simulation?')
    parser.add_argument("--Genie",
                        dest="genie",
                        default=False,
                        action="store_true",
                        required=False,
                        help='Assume separate Genie MCPEs and BG MCPEs')
    parser.add_argument("--no-FilterTrigger",
                        dest="filtertrigger",
                        default=True,
                        action="store_false",
                        required=False,
                        help="Don't filter untriggered events")
    parser.add_argument("--no-Trigger",
                        dest="trigger",
                        default=True,
                        action="store_false",
                        required=False,
                        help="Don't run trigger simulation")
    parser.add_argument("--LowMem",
                        dest="lowmem",
                        default=False,
                        action="store_true",
                        required=False,
                        help='Low Memory mode')
    parser.add_argument("--no-BeaconLaunches",
                        dest="beaconlaunches",
                        default=True,
                        action="store_false",
                        required=False,
                        help="Don't simulate beacon launches")
    parser.add_argument("--TimeShiftSkipKeys",
                        dest="timeshiftskipkeys",
                        default=[],
                        type=arguments.str_comma_list,
                        required=False,
                        help='Skip keys in the triggersim TimeShifter')
    parser.add_argument(
        "--SampleEfficiency",
        dest="sampleefficiency",
        default=0.0,
        type=float,
        required=False,
        help='Resample I3MCPESeriesMap for different efficiency')
    parser.add_argument("--GeneratedEfficiency",
                        dest="generatedefficiency",
                        default=0.0,
                        type=float,
                        required=False,
                        help='Generated efficiency for resampling')
    parser.add_argument("--RunID",
                        dest="runid",
                        default=0,
                        type=int,
                        required=False,
                        help='Run ID')
    parser.add_argument("--MCPESeriesName",
                        dest="mcpeseriesname",
                        default='I3MCPESeriesMap',
                        type=str,
                        required=False,
                        help='Name of MCPESeriesMap in frame')
    parser.add_argument("--DetectorName",
                        dest="detectorname",
                        default='IC86',
                        type=str,
                        required=False,
                        help='Name of detector')
    parser.add_argument("--SkipKeys",
                        dest="skipkeys",
                        default=[],
                        type=arguments.str_comma_list,
                        required=False,
                        help='Skip keys for the writer')
Beispiel #7
0
def add_args(parser):
    """
    Args:
        parser (argparse.ArgumentParser): the command-line parser
    """
    arguments.add_gcdfile(parser)
    arguments.add_inputfilelist(parser)
    arguments.add_outputfile(parser)
    arguments.add_summaryfile(parser)

    arguments.add_nproc(parser)
    arguments.add_procnum(parser)
    arguments.add_seed(parser)
    arguments.add_usegslrng(parser)

    arguments.add_propagatemuons(parser, True)

    parser.add_argument("--samples",
                        dest="samples",
                        default=1,
                        type=int,
                        required=False,
                        help='Number of samples of the same CORSIKA shower')
    parser.add_argument("--RunId",
                        dest="runid",
                        default=None,
                        type=str,
                        required=False,
                        help='RunId (or dataset)')
    parser.add_argument("--x",
                        dest="x",
                        default=0.,
                        type=float,
                        required=False,
                        help='Core is place in a disk around (x,y)')
    parser.add_argument("--y",
                        dest="y",
                        default=0.,
                        type=float,
                        required=False,
                        help='Core is place in a disk around (x,y)')
    parser.add_argument(
        "--r",
        dest="r",
        default=0.,
        type=float,
        required=False,
        help=
        'The radius of the disk whithin wich the core is randomly chosen (usually energy-dependent, something like 800 + 600*(log10(E/GeV) - 5) meters'
    )
    parser.add_argument(
        "--unthin-r",
        dest="unthin_r",
        default=0. * I3Units.meter,
        type=float,
        required=False,
        help=
        "Radius of sampling region for CORSIKA unthinning. Usually energy-dependent, something like -693.4 + 360.4*log10(E/GeV) -60.4*(log10(E/GeV))^2 +3.34*(log10(E/GeV))^3 (hey, don't ask me...)"
    )
    parser.add_argument("--dump",
                        dest="dump",
                        default=False,
                        action="store_true",
                        required=False,
                        help="Dump frame contentes to screen")
    parser.add_argument(
        "--tank-response",
        dest="tank_response",
        default='g4',
        type=str,
        required=False,
        help='g4 or param. Use Geant4 or parametrized propagation')
    parser.add_argument(
        "--tank-sampling-radius",
        dest="tank_sampling_radius",
        default=25. * I3Units.meter,
        type=float,
        required=False,
        help=
        'default 25 m (for standard MC, for thinned, should be larger or equal than UnThinRadius)'
    )
    parser.add_argument(
        "--raise-observation-level",
        dest="raise_observation_level",
        default=0.,
        type=float,
        required=False,
        help=
        "Tweak the altitude (in meters) where corsika particles are injected (just in case the corsika observation plane is below the top of the snow)"
    )
Beispiel #8
0
def add_args(parser):
    """
    Args:
        parser (argparse.ArgumentParser): the command-line parser
    """
    arguments.add_gcdfile(parser)
    arguments.add_inputfilelist(parser)
    arguments.add_outputfile(parser)
    arguments.add_summaryfile(parser)
    arguments.add_enablehistogram(parser)
    arguments.add_histogramfilename(parser)

    arguments.add_nproc(parser)
    arguments.add_procnum(parser)
    arguments.add_seed(parser)
    arguments.add_usegslrng(parser)

    arguments.add_icemodellocation(parser)
    arguments.add_icemodel(parser)
    arguments.add_holeiceparametrization(parser)
    arguments.add_oversize(parser)
    arguments.add_efficiency(parser)

    arguments.add_proposalparams(parser)
    arguments.add_propagatemuons(parser, True)

    arguments.add_photonseriesname(parser)

    arguments.add_gpu(parser)
    arguments.add_usegpus(parser, False)

    parser.add_argument("--no-RunMPHitFilter",
                        dest="runmphitfilter",
                        default=True,
                        action="store_false",
                        required=False,
                        help="Don't run polyplopia's mphitfilter")
    parser.add_argument("--MCTreeName",
                        dest="mctreename",
                        default="I3MCTree",
                        type=str,
                        required=False,
                        help="Name of MCTree frame object")
    parser.add_argument("--RawPhotonSeriesName",
                        dest="rawphotonseriesname",
                        default=None,
                        type=str,
                        required=False,
                        help="Raw Photon Series Name")
    parser.add_argument("--UseGeant4",
                        dest="usegeant4",
                        default=False,
                        action="store_true",
                        required=False,
                        help="Enable Geant4 propagation")
    parser.add_argument("--no-KeepMCTree",
                        dest="keepmctree",
                        default=True,
                        action="store_false",
                        required=False,
                        help='Delete propagated MCTree')
    parser.add_argument("--keep-pure-background",
                        dest="keeppurebackground",
                        default=False,
                        action="store_false",
                        required=False,
                        help='Keep events without primary hits')
Beispiel #9
0
def add_args(parser):
    """
    Args:
        parser (argparse.ArgumentParser): the command-line parser
    """
    arguments.add_gcdfile(parser)
    arguments.add_outputfile(parser)
    arguments.add_summaryfile(parser)
    arguments.add_enablehistogram(parser)
    arguments.add_histogramfilename(parser)

    arguments.add_nproc(parser)
    arguments.add_procnum(parser)
    arguments.add_seed(parser)
    arguments.add_usegslrng(parser)

    arguments.add_nevents(parser)

    arguments.add_icemodellocation(parser)
    arguments.add_icemodel(parser)
    arguments.add_holeiceparametrization(parser)
    arguments.add_oversize(parser)
    arguments.add_efficiency(parser)

    arguments.add_propagatemuons(parser, True)

    arguments.add_photonseriesname(parser)

    arguments.add_gpu(parser)
    arguments.add_usegpus(parser, False)

    parser.add_argument("--model",
                        dest="model",
                        default="Hoerandel5_atmod12_SIBYLL",
                        type=str,
                        required=False,
                        help="primary cosmic-ray flux parametrization")
    parser.add_argument("--gamma",
                        dest="gamma",
                        default=2.,
                        type=float,
                        required=False,
                        help="power law spectral index")
    parser.add_argument("--offset",
                        dest="offset",
                        default=700.,
                        type=float,
                        required=False,
                        help="power law offset in GeV")
    parser.add_argument("--emin",
                        dest="emin",
                        default=1e4,
                        type=float,
                        required=False,
                        help="mininum generated energy in GeV")
    parser.add_argument("--emax",
                        dest="emax",
                        default=1e7,
                        type=float,
                        required=False,
                        help="maximum generated energy in GeV")
    parser.add_argument("--length",
                        dest="length",
                        default=1600.,
                        type=float,
                        required=False,
                        help="cylinder length in m")
    parser.add_argument("--radius",
                        dest="radius",
                        default=800.,
                        type=float,
                        required=False,
                        help="cylinder radius in m")
    parser.add_argument("--x",
                        dest="x",
                        default=0.,
                        type=float,
                        required=False,
                        help="cylinder x-position in m")
    parser.add_argument("--y",
                        dest="y",
                        default=0.,
                        type=float,
                        required=False,
                        help="cylinder y-position in m")
    parser.add_argument("--z",
                        dest="z",
                        default=0.,
                        type=float,
                        required=False,
                        help="cylinder z-position in m")
    parser.add_argument("--length-dc",
                        dest="length_dc",
                        default=500.,
                        type=float,
                        required=False,
                        help="inner cylinder length in m")
    parser.add_argument("--radius-dc",
                        dest="radius_dc",
                        default=150.,
                        type=float,
                        required=False,
                        help="inner cylinder radius in m")
    parser.add_argument("--x-dc",
                        dest="x_dc",
                        default=46.3,
                        type=float,
                        required=False,
                        help="inner cylinder x-position in m")
    parser.add_argument("--y-dc",
                        dest="y_dc",
                        default=-34.9,
                        type=float,
                        required=False,
                        help="inner cylinder y-position in m")
    parser.add_argument("--z-dc",
                        dest="z_dc",
                        default=-300.,
                        type=float,
                        required=False,
                        help="inner cylinder z-position in m")
    parser.add_argument("--deepcore",
                        dest="deepcore",
                        default=False,
                        action="store_true",
                        required=False,
                        help="use inner cylinder")
    parser.add_argument("--no-propagate-photons",
                        dest="propagate_photons",
                        default=True,
                        action="store_false",
                        required=False,
                        help="Don't run ClSim.")
    parser.add_argument("--natural-rate",
                        dest="natural_rate",
                        default=False,
                        action="store_true",
                        required=False,
                        help="Sample natural rate muon bundles")
    parser.add_argument("--UseOnlyDeviceNumber",
                        dest="useonlydevicenumber",
                        default=0,
                        type=int,
                        required=False,
                        help="Use only this device.")
    parser.add_argument("--RawPhotonSeriesName",
                        dest="rawphotonseriesname",
                        default=None,
                        type=str,
                        required=False,
                        help="Raw Photon Series Name")
    parser.add_argument("--no-KeepMCTree",
                        dest="keepmctree",
                        default=True,
                        action="store_false",
                        required=False,
                        help='Delete propagated MCTree')