Commit 293bc5b0 authored by Pierre Paleo's avatar Pierre Paleo
Browse files

Prepare write_results

parent ce99de44
...@@ -227,12 +227,18 @@ class FlatFieldLoader: ...@@ -227,12 +227,18 @@ class FlatFieldLoader:
See Nexus Format specification, NXtomo, "image_key". See Nexus Format specification, NXtomo, "image_key".
lookup_files: list of DataUrl, optional lookup_files: list of DataUrl, optional
List of paths (DataUrl) to inspect to load existing "final" flats/darks. List of paths (DataUrl) to inspect to load existing "final" flats/darks.
If something is found one of these URL, the data will be loaded from there.
results_file: DataUrl, optional
File path where to write the results. By default nothing is saved.
Mind the difference with `lookup_files`: this parameter is for writing.
If the file already exists, its data will be overwritten !
logger: Logger object, optional logger: Logger object, optional
Logging object Logging object
""" """
self.data_url = data_url self.data_url = data_url
self.image_keys = image_keys self.image_keys = image_keys
self.lookup_files = lookup_files or [] self.lookup_files = lookup_files or []
self.results_file = results_file
self.logger = LoggerOrPrint(logger) self.logger = LoggerOrPrint(logger)
...@@ -333,6 +339,12 @@ class FlatFieldLoader: ...@@ -333,6 +339,12 @@ class FlatFieldLoader:
return self.reduction_function(volume, axis=0) return self.reduction_function(volume, axis=0)
def write_results(self, data):
if self.results_file is None:
return
writer = NXProcessWriter(self.results_file, entry=None, overwrite=True)
def get_final_images(self): def get_final_images(self):
""" """
Main function of this class. Main function of this class.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment