예제 #1
0
import time
import numpy as np
from optparse import OptionParser

from icecube.umdtools.submitter import Submitter

# get unique job id
job_id = '{0}_nixtime_{2:.0f}_job_{1}'.format(socket.gethostname(),
                                              os.getpid(), time.time())

# set up submitter
submitter = Submitter(
    job_dir=
    '/data/user/brelethford/Output/stacking_sensitivity/30youngSNR/jobs/{0}'.
    format(job_id))
submitter.memory = 3
# 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:
예제 #2
0
print("The llhweight is: {}".format(llhweight))
print("The injweight is: {}".format(injweight))

# get unique job id
job_id = '{0}_nixtime_{2:.0f}_job_{1}_{3}inj'.format(socket.gethostname(),
                                                     os.getpid(), time.time(),
                                                     injweight)

# set up submitter
submitter = Submitter(
    job_dir=
    '/data/user/brelethford/Output/stacking_sensitivity/{0}/mstacking_{1}yr/jobs/{2}_{3}'
    .format(catalog, str(n), job_id, llhweight))
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...
예제 #3
0
# get unique job id
job_id = '{0}_nixtime_{2:.0f}_job_{1}'.format(socket.gethostname(),
                                              os.getpid(), time.time())
if mese:
    jobdir = misc.ensure_dir(
        '/data/user/brelethford/Output/{0}/stacking_sensitivity/{1}/{2}yr_mese/jobs/'
        .format(datatype, catalog, str(n)))
else:
    jobdir = misc.ensure_dir(
        '/data/user/brelethford/Output/{0}/stacking_sensitivity/{1}/{2}yr/jobs/'
        .format(datatype, catalog, str(n)))
# set up submitter
submitter = Submitter(job_dir=jobdir + '{0}_{1}'.format(job_id, llhweight))

if catalog == 'SwiftBAT70m':
    submitter.memory = 18
elif n > 1:
    submitter.memory = 8

# 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 + '/background_trials.py'

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

# build the lists of commands and labels
commands, labels = [], []
## For this we'll need to do background trials in batches of 1000. So...
batchsize = 10
total_bckg_trials = 1000
예제 #4
0
job_id = '{0}_nixtime_{2:.0f}_job_{1}'.format(socket.gethostname(),
                                              os.getpid(), time.time())
# set up submitter
if catalog:
    jobdir = misc.ensure_dir(
        '/data/user/brelethford/Output/fast/stacking_sensitivity/{0}yr/{1}/jobs/'
        .format(str(n), catalog))
else:
    jobdir = misc.ensure_dir(
        '/data/user/brelethford/Output/fast/allsky_sensitivity/{0}yr/jobs/'.
        format(str(n)))
submitter = Submitter(job_dir=jobdir + '{0}_{1}'.format(job_id, weight))

if catalog == 'SwiftBAT70m':
    if int(n) == 7:
        submitter.memory = 30
    else:
        submitter.memory = 20
elif catalog == 'teststack300':
    submitter.memory = 20
elif catalog == 'blackhole':
    submitter.memory = 14
else:
    submitter.memory = 8

if not catalog:
    submitter.memory = 2

# 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 + '/background_catalog.py'
예제 #5
0
print("The injweight is: {}".format(injweight))

# get unique job id
job_id = '{0}_nixtime_{2:.0f}_job_{1}'.format(socket.gethostname(),
                                              os.getpid(), time.time())

jobdir = misc.ensure_dir(
    '/data/user/brelethford/Output/stacking_sensitivity/{0}/jstacking_{1}yr/jobs/'
    .format(catalog, n_year))
# set up submitter
submitter_sens = Submitter(job_dir=jobdir +
                           'sens_{0}_{1}'.format(job_id, llhweight))
submitter_disc = Submitter(job_dir=jobdir +
                           'disc_{0}_{1}'.format(job_id, llhweight))

submitter_sens.memory = 6
submitter_disc.memory = 6

# 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 = [], [], [], []

## For this we'll need to do background trials in batches of 1000. So...
bins = 1
gammarange = np.linspace(2.0, 2.0, bins)
예제 #6
0
# get unique job id
job_id = '{0}_nixtime_{2:.0f}_job_{1}_{3}inj'.format(socket.gethostname(),
                                                     os.getpid(), time.time(),
                                                     injweight)
# set up submitter
jobdir = misc.ensure_dir(
    '/data/user/brelethford/Output/stacking_sensitivity/{0}/mstacking_{1}yr/jobs/'
    .format(catalog, str(n)))
submitter_sens = Submitter(job_dir=jobdir +
                           'sens_{0}_{1}'.format(job_id, llhweight))
submitter_disc = Submitter(job_dir=jobdir +
                           'disc_{0}_{1}'.format(job_id, llhweight))

if catalog == 'WHSP_Blazars':
    submitter_sens.memory = 25
    submitter_disc.memory = 25
elif catalog == 'SwiftBAT70m':
    submitter_sens.memory = 28
    submitter_disc.memory = 28
elif catalog == '2LAC':
    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'
예제 #7
0
print ("The weight is: {}".format (weight))

# get unique job id
job_id = '{0}_nixtime_{2:.0f}_job_{1}'.format (
        socket.gethostname (), os.getpid (), time.time ())
# set up submitter
if catalog:
  jobdir = misc.ensure_dir ('/data/user/brelethford/Output/fast/stacking_sensitivity/{0}yr/{1}/jobs/'.format (str(n), catalog))
else:
  jobdir = misc.ensure_dir ('/data/user/brelethford/Output/fast/allsky_sensitivity/{0}yr/jobs/'.format (str(n)))
submitter = Submitter (job_dir=jobdir+'{0}_{1}'.format (job_id, weight))


if catalog == 'SwiftBAT70m':
  submitter.memory = 31
elif catalog == '4yr_Starburst': 
  submitter.memory = 22
elif catalog == 'teststack300': 
  submitter.memory = 20
elif catalog == 'blackhole':
  submitter.memory = 22
else:
  submitter.memory = 8

if not catalog:
  submitter.memory = 2


# 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__))
예제 #8
0
# get unique job id
job_id = '{0}_nixtime_{2:.0f}_job_{1}_{3}inj'.format(socket.gethostname(),
                                                     os.getpid(), time.time(),
                                                     injweight)
# set up submitter
jobdir = misc.ensure_dir(
    '/data/user/brelethford/Output/{0}/stacking_sensitivity/{1}/{2}yr/jobs/'.
    format(datatype, catalog, str(n)))
submitter_sens = Submitter(job_dir=jobdir +
                           'sens_{0}_{1}'.format(job_id, llhweight))
submitter_disc = Submitter(job_dir=jobdir +
                           'disc_{0}_{1}'.format(job_id, llhweight))

if catalog == 'SwiftBAT70m':
    submitter_sens.memory = 18
    submitter_disc.memory = 18
elif catalog == 'teststack300' or catalog == 'blackhole':
    submitter_sens.memory = 18
    submitter_disc.memory = 18
else:
    submitter_sens.memory = 8
    submitter_disc.memory = 8

# 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'
예제 #9
0
print ("The llhweight is: {}".format (llhweight))
print ("The injweight is: {}".format (injweight))



# get unique job id
job_id = '{0}_nixtime_{2:.0f}_job_{1}'.format (
        socket.gethostname (), os.getpid (), time.time ())
if mese:
  jobdir = misc.ensure_dir ('/data/user/brelethford/Output/stacking_sensitivity/{0}/mstacking_{1}yr_mese/jobs/'.format (catalog, str(n)))
else:
  jobdir = misc.ensure_dir ('/data/user/brelethford/Output/stacking_sensitivity/{0}/mstacking_{1}yr/jobs/'.format (catalog, str(n)))
# set up submitter
submitter = Submitter (job_dir=jobdir+'{0}_{1}'.format (job_id, llhweight))
if n>4:
  submitter.memory = 6
else:
  if catalog == 'WHSP_Blazars':
    submitter.memory = 4
  else:
    submitter.memory = 3

# 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 + '/background_trials.py'

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

# build the lists of commands and labels
commands, labels = [], []
예제 #10
0
submitter = Submitter(job_dir=jobdir + '{0}_{1}'.format(job_id, weight))
'''
if catalog == 'SwiftBAT70m':
  submitter_sens.memory = 18
  submitter_disc.memory = 18
elif catalog == 'teststack300' or catalog == 'blackhole':
  submitter_sens.memory = 18
  submitter_disc.memory = 18
else:
  submitter_sens.memory = 8
  submitter_disc.memory = 8
'''

if not catalog:
    if n == '7':
        submitter.memory = 4
    else:
        submitter.memory = 2

# 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 + '/sensitivity_multiyear.py'

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

# build the lists of commands and labels
bins = 35
degdecrange = np.linspace(-85.0, 85.0, bins)
sindecrange = np.sin(np.radians(degdecrange))
예제 #11
0
print("The llhweight is: {}".format(llhweight))
print("The injweight is: {}".format(injweight))

# get unique job id
job_id = '{0}_nixtime_{2:.0f}_job_{1}_{3}inj'.format(socket.gethostname(),
                                                     os.getpid(), time.time(),
                                                     injweight)

# set up submitter
submitter = Submitter(
    job_dir=
    '/data/user/brelethford/Output/stacking_sensitivity/{0}/mstacking_{1}yr/jobs/{2}_{3}'
    .format(catalog, str(n), job_id, llhweight))

if catalog == 'WHSP_Blazars':
    submitter.memory = 32
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_disc.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...