Exemplo n.º 1
0
if catalog == 'WHSP_Blazars':
    submitter.memory = 25
elif catalog == 'SwiftBAT70m' or catalog == '2LAC':
    submitter.memory = 22
else:
    submitter.memory = 13

# figure out what dir we're in, and get the path to the actual job script
this_dir = os.path.dirname(os.path.abspath(__file__))
job_script = this_dir + '/calculate_sensitivity.py'

# get the metaproject path
env_shell = os.getenv('I3_BUILD') + '/env-shell.sh'

# build the lists of commands and labels
commands, labels = [], []
## However, I don't know how I'd split this up, so I'm just gonna hope that I can do it all at once...

bins = 1
gammarange = np.linspace(2.0, 2.0, bins)

for gamma in gammarange:
    commands.append(
        '{0} {1} --cat {2} --llhweight {3} --injweight {4} --n {5} --gamma {6} --fom {7} --sirin {8} --mhuber {9}'
        .format(env_shell, job_script, catalog, llhweight, injweight, n, gamma,
                fom, sirin, mhubertest))
    labels.append('handle_sensitivity_gamma_{}'.format(gamma))

# submit! This will return several batches of background events. I'll have to synthesize these together afterwards.
submitter.submit_npx4(commands, labels)
Exemplo n.º 2
0
    submitter_sens.memory = 22
    submitter_disc.memory = 22
else:
    submitter_sens.memory = 13
    submitter_disc.memory = 13

# figure out what dir we're in, and get the path to the actual job script
this_dir = os.path.dirname(os.path.abspath(__file__))
job_script = this_dir + '/calculate_sensdisc.py'

# get the metaproject path
env_shell = os.getenv('I3_BUILD') + '/env-shell.sh'

# build the lists of commands and labels
commands_sens, commands_disc, labels_sens, labels_disc = [], [], [], []
bins = 1
gammarange = np.linspace(2.0, 2.0, bins)

for gamma in gammarange:
    opts_list = '{0} {1} --cat {2} --llhweight {3} --injweight {4} --n {5} --gamma {6} --fom {7} --sirin {8} --mhuber {9} --mese {10}'.format(
        env_shell, job_script, catalog, llhweight, injweight, n, gamma, fom,
        sirin, mhubertest, mese)
    commands_sens.append(opts_list)
    labels_sens.append('handle_sensitivity_gamma_{}'.format(gamma))
    commands_disc.append(opts_list + ' --disc 1')
    labels_disc.append('handle_disc_gamma_{}'.format(gamma))

# submit! This will return several batches of background events. I'll have to synthesize these together afterwards.
submitter_sens.submit_npx4(commands_sens, labels_sens)
submitter_disc.submit_npx4(commands_disc, labels_disc)