Commit b7de02ac authored by Thomas Vincent's avatar Thomas Vincent

major rework of FitH5 and writer

parent 0c7978b0
This diff is collapsed.
......@@ -155,23 +155,22 @@ class FitResult(object):
else:
raise RuntimeError('Unknown Fit Type')
with FitH5Writer(fit_h5, mode=mode) as fitH5:
fitH5.create_entry(fit_name)
fitH5.create_process(fit_name, result_name)
fitH5.set_sample_positions(fit_name, self.sample_x, self.sample_y)
fitH5.set_qspace_dimension_values(
fit_name, *self.qspace_dimension_values)
fitH5.set_background_mode(fit_name, self.background_mode)
with FitH5Writer(fit_h5,
entry=fit_name,
axis_names=self.qspace_dimension_names,
background_mode=self.background_mode,
mode=mode) as fitH5:
fitH5.create_process(result_name)
fitH5.set_sample_positions(self.sample_x, self.sample_y)
fitH5.set_qspace_dimension_values(*self.qspace_dimension_values)
for dimension, array in enumerate(self._fit_results):
for name in self.available_result_names:
results = self.get_results(dimension, name, copy=False)
if name == 'Status':
fitH5.set_status(fit_name, dimension, results)
fitH5.set_status(dimension, results)
else:
fitH5.set_result(
fit_name, result_name, dimension, name, results)
fitH5.set_result(result_name, dimension, name, results)
class PeakFitter(object):
......
Markdown is supported
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