Skip to content

Commit

Permalink
Merge pull request #93 from neutrons/ui-tweaks
Browse files Browse the repository at this point in the history
improve smoothing dialog
  • Loading branch information
mdoucet authored Jun 13, 2024
2 parents 9490ebf + 08500bc commit d11eaee
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions reflectivity_ui/interfaces/smooth_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def drawPlot(self):
# percentage offset of the grid area inside the whole plot area
grid_percentage = 0.05
# percentage of the sigma spot from the whole plot area
sigma_percentage = 0.015
sigma_percentage = 0.005
# default-minimum sigma x,y size
min_sigma_size = 0.0001
k_diff_min = 0.01
Expand All @@ -68,6 +68,7 @@ def drawPlot(self):
# P_0 and P_N are the number of points to cut in TOF on each side
p_0 = item.cross_sections[first_state].configuration.cut_first_n_points
p_n = n_total - item.cross_sections[first_state].configuration.cut_last_n_points

Qx = Qx[:, p_0:p_n]
Qz = Qz[:, p_0:p_n]
ki_z = ki_z[:, p_0:p_n]
Expand All @@ -76,11 +77,11 @@ def drawPlot(self):

Qzmax = max(ki_z.max() * 2.0, Qzmax)
if self.ui.kizmkfzVSqz.isChecked():
plot.pcolormesh((ki_z - kf_z), Qz, I, log=True, imin=1e-6, imax=1.0, shading="gouraud")
plot.pcolormesh((ki_z - kf_z), Qz, I, log=True, imin=1e-6, imax=1.0, cmap="jet", shading="gouraud")
elif self.ui.qxVSqz.isChecked():
plot.pcolormesh(Qx, Qz, I, log=True, imin=1e-6, imax=1.0, shading="gouraud")
plot.pcolormesh(Qx, Qz, I, log=True, imin=1e-6, imax=1.0, cmap="jet", shading="gouraud")
else:
plot.pcolormesh(ki_z, kf_z, I, log=True, imin=1e-6, imax=1.0, shading="gouraud")
plot.pcolormesh(ki_z, kf_z, I, log=True, imin=1e-6, imax=1.0, cmap="jet", shading="gouraud")

if self.ui.kizmkfzVSqz.isChecked():
qz_max = max(Qz[I > 0].max(), qz_max)
Expand Down

0 comments on commit d11eaee

Please sign in to comment.