Skip to content

Commit

Permalink
API: Invert each scan axes for LYNX dataloaders (#73)
Browse files Browse the repository at this point in the history
Inverting the axes (multiply the scan positions by -1) matches the
exisiting reconstruction conventions/expections for foldslice. Generally, inverting the axes should cause a rotation of the diffraction pattern by 180, so I'm not sure why this hasn't been an obvious bug.
  • Loading branch information
carterbox authored Feb 21, 2024
1 parent 2d97660 commit cc49202
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ptychodus/plugins/lynxOrchestraScanFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ def read(self, filePath: Path) -> Scan:

data_point = int(row[self.DATA_POINT_COLUMN])
point = ScanPoint(
x=float(row[self.X_COLUMN]) * self.MICRONS_TO_METERS,
y=float(row[self.Y_COLUMN]) * self.MICRONS_TO_METERS,
x=-float(row[self.X_COLUMN]) * self.MICRONS_TO_METERS,
y=-float(row[self.Y_COLUMN]) * self.MICRONS_TO_METERS,
)
pointSeqMap[data_point].append(point)

Expand Down
4 changes: 2 additions & 2 deletions ptychodus/plugins/lynxSoftGlueZynqScanFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ def read(self, filePath: Path) -> Scan:

detector_count = int(row[DETECTOR_COUNT])
point = ScanPoint(
x=float(row[X]) * LYNXSoftGlueZynqScanFileReader.MICRONS_TO_METERS,
y=float(row[Y]) * LYNXSoftGlueZynqScanFileReader.MICRONS_TO_METERS,
x=-float(row[X]) * LYNXSoftGlueZynqScanFileReader.MICRONS_TO_METERS,
y=-float(row[Y]) * LYNXSoftGlueZynqScanFileReader.MICRONS_TO_METERS,
)
pointSeqMap[detector_count].append(point)

Expand Down

0 comments on commit cc49202

Please sign in to comment.