Skip to content
Snippets Groups Projects

[Generic] Injection code for DynamicFF corrections

Merged Philipp Schmidt requested to merge feat/shimadzu-injection into feat/shimadzu-correction
All threads resolved!
1 file
+ 7
5
Compare changes
  • Side-by-side
  • Inline
@@ -184,15 +184,17 @@ def inject_ccv(const_src, ccv_root, report_to):
@@ -184,15 +184,17 @@ def inject_ccv(const_src, ccv_root, report_to):
}
}
}
}
resp = CalibrationClient.inject_new_calibration_constant_version(calibration_client(), inject_h)
if not resp['success']:
raise RuntimeError(resp)
const_dest = _get_default_caldb_root() / const_rel_path / const_filename
const_dest = _get_default_caldb_root() / const_rel_path / const_filename
const_dest.parent.mkdir(parents=True, exist_ok=True)
const_dest.parent.mkdir(parents=True, exist_ok=True)
copyfile(const_src, const_dest)
copyfile(const_src, const_dest)
 
resp = CalibrationClient.inject_new_calibration_constant_version(
 
calibration_client(), inject_h)
 
 
if not resp['success']:
 
const_dest.unlink() # Delete already copied CCV file.
 
raise RuntimeError(resp)
 
def inject_ccv_legacy(in_folder, metadata_folder, runs, calibration, cond,
def inject_ccv_legacy(in_folder, metadata_folder, runs, calibration, cond,
pdu, const_input, begin_at):
pdu, const_input, begin_at):
Loading