Draft: EDF: improve flexibility of the bliss / HDF5 collect part (description of what needs to be done)
If at one point we intend to create other classes than NXtomo it would be wise to add some meta handling of a structure defined in settings.py like:
MAPPING = {
# could be used to provide more generic code and improve flexibility.
# at least for HDF5
# root attributes
"start_time": None, # TODO for now the user cannot provide them...
"end_time": None, # TODO for now the user cannot provide them...
"title": None, # TODO for now the user cannot provide them...
# sample attributes
"sample.rotation_angle": ROT_ANGLE_KEYS,
"sample.x_translation": X_TRANS_KEYS,
"sample.y_translation": Y_TRANS_KEYS,
"sample.z_translation": Z_TRANS_KEYS,
# instrument attributes
"instrument.detector.data": VALID_CAMERA_NAMES, # fit also automatically the frame type
"instrument.detector.estimated_cor_from_motor": Y_ROT_KEY,
"instrument.detector.count_time": ACQ_EXPO_TIME_KEYS,
"instrument.detector.x_pixel_size": X_PIXEL_SIZE,
"instrument.detector.y_pixel_size": Y_PIXEL_SIZE,
"instrument.detector.distance": DISTANCE_KEYS,
"instrument.detector.field_of_view": None, # TODO for now the user cannot provide them...
"instrument.detector.tomo_n": None, # TODO for now the user cannot provide them...
"instrument.diode.data": DIODE_KEYS,
"instrument.source.name": None, # TODO for now the user cannot provide them...
"instrument.source.type": None, # TODO for now the user cannot provide them...
"instrument.beam.incident_energy": None, # TODO for now the user cannot provide them...
}
which would define all the mapping to be done from the bliss file (the value is the name of the dataset in the file) to nexus file (key is the property to set)
Edited by payno