diff --git a/src/exdf/data_reduction/builtins.py b/src/exdf/data_reduction/builtins.py index a9f3e8884f02d34d34b95bda87fa19f20739e971..965f40197df9b1fb39d6f1ff9774a616b7799119 100644 --- a/src/exdf/data_reduction/builtins.py +++ b/src/exdf/data_reduction/builtins.py @@ -199,7 +199,8 @@ class AgipdGain(ReductionMethod): 'explicit gain sources') return - self.log.info(f'Found {domain}') + self.log.info(f'No detector specified, detected {domain} ' + f'automatically') agipd_sources = f'{domain}/DET/*CH0:xtdf' else: @@ -214,6 +215,8 @@ class AgipdGain(ReductionMethod): # Unfortunately HED uses a different domain for # its AGIPD control devices, hardcode it here # for convenience. + # TODO: This could also be solved via a CalCat + # query. domain = domain.replace('_DET_', '_EXP_') control_source = f'{domain}/MDL/FPGA_COMP' diff --git a/src/exdf/data_reduction/writer.py b/src/exdf/data_reduction/writer.py index e095fbda45b2555ac8da9a0567f5f1d4ae83bd73..33b6d94c42756eb89211093b1518339345147f0d 100644 --- a/src/exdf/data_reduction/writer.py +++ b/src/exdf/data_reduction/writer.py @@ -31,8 +31,8 @@ def apply_by_key(op_name): def op_handler(self): for source_glob, key_glob, *args in self._filter_ops(op_name): for source in fnmatch.filter(self._sources, source_glob): - keys = self._custom_keys.get(source, - set(self._data[source].keys())) + keys = self._custom_keys.get( + source, set(self._data[source].keys())) for key in fnmatch.filter(keys, key_glob): op_func(source, key, *args) @@ -82,8 +82,8 @@ class ReduceWriter(SourceDataWriter): self._ops = sum(methods.values(), []) if not self._ops: - self.log.warning('Sum of reduction methods yielded no operations ' - 'to apply') + self.log.warning('Sum of reduction methods yielded ' + 'no operations to apply') self._sources = sorted(data.all_sources) self._touched_sources = set() @@ -117,7 +117,6 @@ class ReduceWriter(SourceDataWriter): 'Source may not be affected by both select-entries and ' 'select-xtdf operations') - if self._rechunked_keys.keys() & self._compressed_keys.keys(): raise ReduceMethodError('Key may not be affected by both ' 'compress-keys and rechunk-keys')