tomwer.core.process.edit.nxtomoeditor.NXtomoEditorTask#

class tomwer.core.process.edit.nxtomoeditor.NXtomoEditorTask(varinfo=None, inputs=None, node_id=None, node_attrs=None, execinfo=None)#

task to edit a couple of field of a NXtomo

Y_AND_Z_flip_MATRIX = array([[ 1.0000000e+00,  1.2246469e-16,  1.2246469e-16],        [ 1.2246469e-16, -1.0000000e+00,  0.0000000e+00],        [ 1.2246469e-16,  1.4997599e-32, -1.0000000e+00]], dtype=float32)#
Y_FLIP_MATRIX = array([[-1.0000000e+00,  0.0000000e+00,  1.2246469e-16],        [ 0.0000000e+00,  1.0000000e+00,  0.0000000e+00],        [-1.2246469e-16,  0.0000000e+00, -1.0000000e+00]], dtype=float32)#
Z_FLIP_MATRIX = array([[-1.0000000e+00, -1.2246469e-16,  0.0000000e+00],        [ 1.2246469e-16, -1.0000000e+00,  0.0000000e+00],        [ 0.0000000e+00,  0.0000000e+00,  1.0000000e+00]], dtype=float32)#
static build_mapping(nexus_version, n_frames)#

for the different field that can be edited we provide an instance of _EditorFieldInfo with all metadata needed to save this particular field.

Note: X_flip and y_flip are saved differently as the two parameters are coupled we want either to save both or none of it.

Return type:

dict[NXtomoEditorKeys, _EditorFieldInfo]

static get_detector_transformations(scan_entry, x_flip, y_flip, nexus_version)#
Return type:

dict

static isFieldValueDifferent(dataset, new_value, units)#

return False if the given value is the same as the one stored.

This is a small improvement to avoid rewrite field if we can avoid it. The reason behind is that the orange widget will update the field when it receive a scan (of the unlock field). But then users can edit any field. As we don’t want to bother with complex stuff like for each field keep track if It has been modified or not the orange widget will always require to modify all possible field even is not modified.

Return type:

bool

run()#

To be implemented by the derived classes