Skip to content

Commit

Permalink
save when also for ext
Browse files Browse the repository at this point in the history
  • Loading branch information
cfuselli committed Oct 24, 2024
1 parent 073ed08 commit 8b172e6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion amstrax/auto_processing_new/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def __init__(self, args):
self.production = args.production
self.amstrax_path = args.amstrax_path
self.is_online = args.is_online
self.fix_targets = args.fix_targets

if self.amstrax_path:
self.amstrax_path = self.amstrax_path.rstrip("/")
Expand Down Expand Up @@ -262,7 +263,9 @@ def process_remaining_targets(self):
)
st.storage += [strax.DataDirectory(raw_records_folder, readonly=True)]

st = self.infer_special_modes(st)

if not self.fix_targets:
st = self.infer_special_modes(st)

self.st = st

Expand Down Expand Up @@ -297,6 +300,8 @@ def parse_args():
parser.add_argument("--amstrax_path", type=str, default=None, help="Version of amstrax to use.")
parser.add_argument("--production", action="store_true", help="Update the production database.")
parser.add_argument("--is_online", action="store_true", help="Process online data.")
parser.add_argument("--fix_targets", action="store_true", help="Fix the targets to process, do not allow special modes.")

return parser.parse_args()


Expand Down
2 changes: 2 additions & 0 deletions amstrax/plugins/led_calibration/records_led.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class RecordsLED(strax.Plugin):
compressor = 'zstd'
parallel = 'process'
rechunk_on_save = False

save_when = strax.SaveWhen.TARGET

def setup(self):

Expand Down
4 changes: 1 addition & 3 deletions amstrax/plugins/records_ext/pulse_processing_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ class PulseProcessingEXT(strax.Plugin):
provides = 'records_ext'
data_kind = 'records_ext'

# I think in amstrax we can save everything
# default is ALWAYS
# save_when = strax.SaveWhen.TARGET
save_when = strax.SaveWhen.TARGET

def infer_dtype(self):
record_length = strax.record_length_from_dtype(
Expand Down

0 comments on commit 8b172e6

Please sign in to comment.