Skip to content

Commit

Permalink
remove hard coded frame dimensions (#29)
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 12, 2024
1 parent fe5baa0 commit 5026b9a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 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 // 576).reshape(self.scan_dimensions[0] * self.scan_dimensions[1], self.num_frames_per_scan, mm)
self.fr_cols = (self.fr_full % 576).reshape(self.scan_dimensions[0] * self.scan_dimensions[1], self.num_frames_per_scan, mm)
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.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 Down Expand Up @@ -807,11 +807,11 @@ def getImage_jit(rows, cols, left, right, bot, top):
Parameters
----------
rows : 2D ndarray, (M, num_frames, N)
The row of the electron strike location. Floor divide by 576. M is
The row of the electron strike location. Floor divide by frame_dimenions[0]. M is
the raveled scan_dimensions axis and N is the zero-padded electron
strike position location.
cols : 2D ndarray, (M, num_frames, N)
The column of the electron strike locations. Modulo divide by 576
The column of the electron strike locations. Modulo divide by frame_dimensions[1]
left, right, bot, top : int
The locations of the edges of the boxes
Expand Down

0 comments on commit 5026b9a

Please sign in to comment.