Skip to content

Commit dd3764d

Browse files
committed
Update process_aurora.py
1 parent 8f7c546 commit dd3764d

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

mtpy/processing/aurora/process_aurora.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def create_kernel_dataset(
192192
run_summary = self.get_run_summary()
193193

194194
if sample_rate is not None:
195-
run_summary = self.run_summary.set_sample_rate(sample_rate)
195+
run_summary = run_summary.set_sample_rate(sample_rate)
196196

197197
self.from_run_summary(
198198
run_summary,
@@ -339,8 +339,10 @@ def process(
339339
kernel_dataset=pdict["kernel_dataset"],
340340
)
341341
if mt_obj is not None:
342-
tf_processed[sr]["processed"] = True
343-
tf_processed[sr]["tf"] = mt_obj
342+
tf_processed[key][
343+
"processed"
344+
] = mt_obj.has_transfer_function()
345+
tf_processed[key]["tf"] = mt_obj
344346

345347
processed = self._validate_tf_processed_dict(tf_processed)
346348
if len(processed.keys()) > 1:
@@ -420,6 +422,10 @@ def _validate_tf_processed_dict(self, tf_dict):
420422
for key, p_dict in tf_dict.items():
421423
if p_dict["processed"]:
422424
new_dict[key] = p_dict
425+
else:
426+
self.logger.warning(
427+
f"Sample rate {key} was not processed correctly. Check log."
428+
)
423429

424430
if new_dict == {}:
425431
raise ValueError("No Transfer Functions were processed.")

0 commit comments

Comments
 (0)