Skip to content

Commit

Permalink
adding rate into computation context
Browse files Browse the repository at this point in the history
  • Loading branch information
FaroutYLq committed Mar 30, 2024
1 parent 2347c85 commit 7959d2a
Showing 1 changed file with 49 additions and 20 deletions.
69 changes: 49 additions & 20 deletions jobs/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,23 @@
print('====================')
print("Finished importing and config loading, now start to load context.")
print("Now starting %s context for run %d"%(saltax_mode, runid))
st = saltax.contexts.sxenonnt(runid = runid,
saltax_mode = saltax_mode,
output_folder = output_folder,
faxconf_version = faxconf_version,
generator_name = generator_name,
recoil = recoil,
mode = mode)
if rate is None:
st = saltax.contexts.sxenonnt(runid = runid,
saltax_mode = saltax_mode,
output_folder = output_folder,
faxconf_version = faxconf_version,
generator_name = generator_name,
recoil = recoil,
mode = mode)
else:
st = saltax.contexts.sxenonnt(runid = runid,
saltax_mode = saltax_mode,
output_folder = output_folder,
faxconf_version = faxconf_version,
generator_name = generator_name,
recoil = recoil,
mode = mode,
rate = rate)
if len(storage_to_patch) and storage_to_patch[0] != "":
for d in storage_to_patch:
st.storage.append(strax.DataDirectory(d, readonly=True))
Expand Down Expand Up @@ -92,12 +102,21 @@
print("Since you specified saltax_mode = salt, \
we will also compute simulation-only and data-only.")
print("Now starting data-only context for run %d"%(runid))
st = saltax.contexts.sxenonnt(runid = runid, saltax_mode = 'data',
output_folder = output_folder,
faxconf_version = faxconf_version,
generator_name = generator_name,
recoil = recoil,
mode = mode)
if rate is None:
st = saltax.contexts.sxenonnt(runid = runid, saltax_mode = 'data',
output_folder = output_folder,
faxconf_version = faxconf_version,
generator_name = generator_name,
recoil = recoil,
mode = mode)
else:
st = saltax.contexts.sxenonnt(runid = runid, saltax_mode = 'data',
output_folder = output_folder,
faxconf_version = faxconf_version,
generator_name = generator_name,
recoil = recoil,
mode = mode,
rate = rate)
if len(storage_to_patch) and storage_to_patch[0] != "":
for d in storage_to_patch:
st.storage.append(strax.DataDirectory(d, readonly=True))
Expand All @@ -123,13 +142,23 @@
if process_simu:
print('====================')
print("Now starting simu-only context for run %d"%(runid))
st = saltax.contexts.sxenonnt(runid = runid,
saltax_mode = 'simu',
output_folder = output_folder,
faxconf_version = faxconf_version,
generator_name = generator_name,
recoil = recoil,
mode = mode)
if rate is None:
st = saltax.contexts.sxenonnt(runid = runid,
saltax_mode = 'simu',
output_folder = output_folder,
faxconf_version = faxconf_version,
generator_name = generator_name,
recoil = recoil,
mode = mode)
else:
st = saltax.contexts.sxenonnt(runid = runid,
saltax_mode = 'simu',
output_folder = output_folder,
faxconf_version = faxconf_version,
generator_name = generator_name,
recoil = recoil,
mode = mode,
rate = rate)
if len(storage_to_patch) and storage_to_patch[0] != "":
for d in st.storage:
st.storage.append(strax.DataDirectory(d, readonly=True))
Expand Down

0 comments on commit 7959d2a

Please sign in to comment.