Skip to content

Commit

Permalink
ensure non-ragged array is uint32 dtype (#30)
Browse files Browse the repository at this point in the history
Co-authored-by: Peter Ercius ncem-gauss jupyter <percius.lbl.gov>
  • Loading branch information
ercius authored Aug 15, 2024
1 parent 6dc3be4 commit 0bf8a44
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions DuSC_explorer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,8 @@ def setData(self, fPath):
print('Full memory requirement = {} GB'.format(3 * self.fr_full.nbytes / 1e9))

# Find the row and col for each electron strike
self.fr_rows = (self.fr_full // self.frame_dimensions[0]).reshape(self.scan_dimensions[0] * self.scan_dimensions[1], self.num_frames_per_scan, mm)
self.fr_cols = (self.fr_full % self.frame_dimensions[1]).reshape(self.scan_dimensions[0] * self.scan_dimensions[1], self.num_frames_per_scan, mm)
self.fr_rows = (self.fr_full // int(self.frame_dimensions[0])).reshape(self.scan_dimensions[0] * self.scan_dimensions[1], self.num_frames_per_scan, mm)
self.fr_cols = (self.fr_full % int(self.frame_dimensions[1])).reshape(self.scan_dimensions[0] * self.scan_dimensions[1], self.num_frames_per_scan, mm)

self.dp = np.zeros(self.frame_dimensions[0] * self.frame_dimensions[1], np.uint32)
self.rs = np.zeros(self.scan_dimensions[0] * self.scan_dimensions[1], np.uint32)
Expand All @@ -565,6 +565,7 @@ def setData(self, fPath):
# 5 rings, distance between each ring is around 50 pixels
# Attempting to incorporate a scale bar into both real space and diffraction space images
# Method I utilized to generate a picture of the scale bar

def generate_picture(self, length, height, label, color, font_size):
picture = QtGui.QPicture()
painter = QtGui.QPainter(picture)
Expand Down

0 comments on commit 0bf8a44

Please sign in to comment.