Skip to content

Commit

Permalink
PEP8
Browse files Browse the repository at this point in the history
  • Loading branch information
saransh13 committed Nov 8, 2024
1 parent 3662ed4 commit d6c9437
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
20 changes: 13 additions & 7 deletions hexrdgui/image_canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@
)
from hexrdgui.utils.tth_distortion import apply_tth_distortion_if_needed

FONTSIZE_LABEL=15
FONTSIZE_TICKS=15
FONTSIZE_LABEL = 15
FONTSIZE_TICKS = 15


class ImageCanvas(FigureCanvas):

Expand Down Expand Up @@ -1089,7 +1090,9 @@ def finish_show_polar(self, iviewer):
HexrdConfig().last_unscaled_azimuthal_integral_data = unscaled

self.azimuthal_integral_axis = axis
axis.set_ylabel(r'Azimuthal Average', fontsize=FONTSIZE_LABEL, family='serif')
axis.set_ylabel(r'Azimuthal Average',
fontsize=FONTSIZE_LABEL, family='serif')

self.update_azimuthal_plot_overlays()
self.update_wppf_plot()

Expand Down Expand Up @@ -1170,13 +1173,15 @@ def finish_show_polar(self, iviewer):
'interpolation': 'none',
}
self.axes_images.append(self.axis.imshow(**kwargs))
self.axis.set_ylabel(r'$\phi$ [deg]', fontsize=FONTSIZE_LABEL, family='serif')
self.axis.set_ylabel(r'$\phi$ [deg]',
fontsize=FONTSIZE_LABEL, family='serif')
else:
rescale_image = False
self.axes_images[0].set_data(img)

# Update the xlabel in case it was modified (via tth distortion)
self.axis.set_xlabel(self.polar_xlabel, fontsize=FONTSIZE_LABEL, family='serif')
self.axis.set_xlabel(self.polar_xlabel,
fontsize=FONTSIZE_LABEL, family='serif')


if rescale_image:
Expand Down Expand Up @@ -1277,8 +1282,9 @@ def polar_x_axis_type(self):

def on_polar_x_axis_type_changed(self):
# Update the x-label
self.azimuthal_integral_axis.set_xlabel(self.polar_xlabel,
fontsize=FONTSIZE_LABEL, family='serif')
self.azimuthal_integral_axis.set_xlabel(
self.polar_xlabel, fontsize=FONTSIZE_LABEL,
family='serif')

# Still need to draw if the x-label was modified
self.draw_idle()
Expand Down
3 changes: 2 additions & 1 deletion hexrdgui/overlays/powder_overlay.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,8 @@ def pinhole_distortion_kwargs(self):
kwargs = self.tth_distortion_kwargs.copy()
if self.pinhole_distortion_type == 'RyggPinholeDistortion':
# Add our absorption length
kwargs['absorption_length'] = HexrdConfig().absorption_length() * 1e-3
kwargs['absorption_length'] = HexrdConfig(
).absorption_length() * 1e-3
return kwargs
# END PolarDistortionObject mixin reroutes

Expand Down

0 comments on commit d6c9437

Please sign in to comment.