Skip to content

Commit

Permalink
Removed useless function in contexts (#49)
Browse files Browse the repository at this point in the history
* overwrite depends_on for PulseProcessing

* updated init

* use saltax_mode as a context config

* removed records

* bump s_peaklets version

* saltax_mode in strax config

* remove unused import

* put back strax.config

* track saltax_mode

* removed useless

* debug

* bump version

* modified channel_range to byypass bugs in peaklet_classification

* removed useless function
  • Loading branch information
FaroutYLq authored Aug 24, 2023
1 parent 0954178 commit 5269b8e
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions saltax/contexts.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@


# saltax configuration overrides
SCHANNEL_STARTS_AT = -494
SCHANNEL_STARTS_AT = 3000
XNT_COMMON_CONFIG_OVERRIDE = dict(
channel_map=immutabledict(
# (Minimum channel, maximum channel)
Expand Down Expand Up @@ -57,23 +57,6 @@ def get_generator(generator_name):
generator_func = eval('saltax.generator_'+generator_name)
return generator_func

def get_rr_chunk_ranges(st, runid):
"""
Return the chunk ranges for raw_records.
:param st: strax context
:param runid: run number in string
:return: chunk ranges in list, e.g. [[0, 1000000], [1000000, 2000000], ...]
"""
if type(runid) == int:
runid = str(runid).zfill(6)
assert st.is_stored(runid, 'raw_records'), "%s must be stored! \
Put it into your output_folder please. "%(st.key_for(runid, 'raw_records'))
metadata = st.get_metadata(runid, 'raw_records')
chunk_ranges = []
for chunk in metadata['chunks']:
chunk_ranges.append([chunk['start'], chunk['end']])
return chunk_ranges

def xenonnt_salted(runid,
saltax_mode='salt',
output_folder='./strax_data',
Expand Down

0 comments on commit 5269b8e

Please sign in to comment.