Skip to content

Commit

Permalink
fix for deleting dimension info
Browse files Browse the repository at this point in the history
  • Loading branch information
Rama Vasudevan committed Aug 9, 2023
1 parent 5889551 commit ea13f96
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions pyTEMlib/image_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,12 +515,17 @@ def rigid_registration(dataset):
rigid_registered.source = dataset.title
rigid_registered.metadata = {'analysis': 'rigid sub-pixel registration', 'drift': drift,
'input_crop': input_crop, 'input_shape': dataset.shape[1:]}
if hasattr(rigid_registered, 'z'):
del rigid_registered.z
if hasattr(rigid_registered, 'x'):
del rigid_registered.x
if hasattr(rigid_registered, 'y'):
del rigid_registered.y
#if hasattr(rigid_registered, 'z'):
# del rigid_registered.z
#if hasattr(rigid_registered, 'x'):
# del rigid_registered.x
#if hasattr(rigid_registered, 'y'):
# del rigid_registered.y

rigid_registered.del_dimension(0)
rigid_registered.del_dimension(1)
rigid_registered.del_dimension(2)

# rigid_registered._axes = {}
rigid_registered.set_dimension(0, dataset._axes[frame_dim[0]])
rigid_registered.set_dimension(1, dataset._axes[spatial_dim[0]][input_crop[0]:input_crop[1]])
Expand Down

0 comments on commit ea13f96

Please sign in to comment.