Skip to content

Commit

Permalink
Fix scan_step_size in ImporterDM4
Browse files Browse the repository at this point in the history
  • Loading branch information
xpwu01 committed Oct 14, 2024
1 parent b0d1a88 commit 8945a6d
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions FourDExplorer/lib/ImporterDM4.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,12 +412,16 @@ def __init__(self, item_name: str, item_parent_path: str, parent: QObject = None
'/Acquisition/Camera/pixel_number_j': 1024,
'/Acquisition/Camera/pixel_size_i': 15e-6,
'/Acquisition/Camera/pixel_size_j': 15e-6,
'/Acquisition/Camera/accelerating_voltage': 300000,
'/Acquisition/Camera/camera_length': 0.0,
'/Acquisition/Camera/step_size_i': 1.0,
'/Acquisition/Camera/step_size_j': 1.0,
'/Calibration/Space/dp_i': 1024,
'/Calibration/Space/dp_j': 1024,
'/Calibration/Space/du_i': 1.0,
'/Calibration/Space/du_j': 1.0,
'/Calibration/Space/du_dr_i': 1.0,
'/Calibration/Space/du_dr_j': 1.0,
'/Calibration/Space/scan_dr_i': 1.0,
'/Calibration/Space/scan_dr_j': 1.0,
}

@property
Expand Down Expand Up @@ -513,12 +517,16 @@ def parseDM4(self, dm4_path: str):
self.meta['/Acquisition/Camera/pixel_number_j'] = active_size[1]
self.meta['/Acquisition/Camera/pixel_size_i'] = camera_pixel_size[0] * 1e-6
self.meta['/Acquisition/Camera/pixel_size_j'] = camera_pixel_size[1] * 1e-6
self.meta['/Acquisition/Camera/accelerating_voltage'] = voltage
self.meta['/Acquisition/Camera/camera_length'] = camera_length
self.meta['/Acquisition/Camera/step_size_i'] = horizontal_spacing * 1e-9
self.meta['/Acquisition/Camera/step_size_j'] = vertical_spacing * 1e-9
self.meta['/Calibration/Space/dp_i'] = self._dp_i
self.meta['/Calibration/Space/dp_j'] = self._dp_j
self.meta['/Calibration/Space/du_i'] = camera_pixel_size[0] * 1e-6 / (camera_length * 1e-3 * wavelength)
self.meta['/Calibration/Space/du_j'] = camera_pixel_size[1] * 1e-6 / (camera_length * 1e-3 * wavelength)
self.meta['/Calibration/Space/du_dr_i'] = horizontal_spacing * 1e-9
self.meta['/Calibration/Space/du_dr_j'] = vertical_spacing * 1e-9
self.meta['/Calibration/Space/scan_dr_i'] = horizontal_spacing * 1e-9
self.meta['/Calibration/Space/scan_dr_j'] = vertical_spacing * 1e-9

def loadData(self):
"""
Expand Down

0 comments on commit 8945a6d

Please sign in to comment.