Skip to content

Commit

Permalink
Change the beam centering to row/col rather than x/y. This keeps the …
Browse files Browse the repository at this point in the history
…convention the same within DuSC. For exmaple, the corner of a ROI box is printed in the status bar as row/col.
  • Loading branch information
Peter Ercius ncem-gauss jupyter committed Aug 10, 2024
1 parent ed2b890 commit 14a542c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions DuSC_explorer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def close_Metadata_popup(self):
self.wavelength = float(self.setting1.text())
self.camera_length_mm = float(self.setting2.text())
self.physical_pixel_size_mm = float(self.setting3.text())
self.centerx = int(self.setting4.text())
self.centerx = int(self.setting4.text())
self.centery = int(self.setting5.text())

self.popUp.close()
Expand Down Expand Up @@ -362,8 +362,10 @@ def SMV_popup(self):
popUpLayout.addRow('Wavelength (angstroms)', self.setting1)
popUpLayout.addRow('Camera length (mm)', self.setting2)
popUpLayout.addRow('Physical pixel size (mm)', self.setting3)
popUpLayout.addRow('Beam center x (pixels)', self.setting4)
popUpLayout.addRow('Beam center y (pixels)', self.setting5)

# Use row / col formatting for
popUpLayout.addRow('Beam center row (pixels)', self.setting5)
popUpLayout.addRow('Beam center column (pixels)', self.setting4)
save_button = QPushButton('Save')
save_button.clicked.connect(self.close_SMV_popup)
popUpLayout.addWidget(save_button)
Expand All @@ -376,8 +378,8 @@ def close_SMV_popup(self):
self.wavelength = self.setting1.text()
self.CL = self.setting2.text()
self.pixelsize = self.setting3.text()
self.centerx = self.setting4.text()
self.centery = self.setting5.text()
self.centerx = self.setting4.text() # col
self.centery = self.setting5.text() # row

self.popUp.close()

Expand Down

0 comments on commit 14a542c

Please sign in to comment.