Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit 9989212

Browse files
set colorbar values based on min max of data
1 parent 95d5606 commit 9989212

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

PythonGUI_apps/FLIM_analysis/FLIM_plot.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,8 @@ def on_analyze_lifetime(self):
270270

271271
def export_window(self):
272272
self.export_window = ExportFigureWindow()
273+
self.export_window.ui.vmin_spinBox.setValue(np.min(self.intensity_sums))
274+
self.export_window.ui.vmax_spinBox.setValue(np.max(self.intensity_sums))
273275
self.export_window.export_fig_signal.connect(self.save_intensities_image)
274276

275277
def save_intensities_image(self):
@@ -286,7 +288,10 @@ def save_intensities_image(self):
286288
label = str(self.export_window.ui.cbar_label.text())
287289
else:
288290
label = "PL Intensity (a.u.)"
289-
cpm.plot_confocal(self.intensity_sums, FLIM_adjust=False, stepsize=np.abs(self.x_step_size),cmap=colormap, cbar_label=label,vmin=self.export_window.ui.vmin_spinBox.value(), vmax=self.export_window.ui.vmax_spinBox.value())
291+
cpm.plot_confocal(self.intensity_sums, FLIM_adjust=False,
292+
stepsize=np.abs(self.x_step_size),cmap=colormap,
293+
cbar_label=label, vmin=self.export_window.ui.vmin_spinBox.value(),
294+
vmax=self.export_window.ui.vmax_spinBox.value())
290295
plt.savefig(save_to, bbox_inches='tight', dpi=300)
291296
except Exception as e:
292297
print(format(e))

PythonGUI_apps/Spectrum_analysis/Spectra_plot_fit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ def pub_ready_plot_export(self):
528528
param_selection = str(self.ui.comboBox.currentText())
529529
if param_selection == 'pk_pos': label = 'PL Peak Position (n.m.)'
530530
elif param_selection == 'fwhm': label = 'PL FWHM (n.m.)'
531-
cpm.plot_confocal(self.img, figsize=(10,10), stepsize = data['Scan Parameters']['X step size (um)'], cmap=colormap, cbar_label=label,
531+
cpm.plot_confocal(self.img, stepsize = data['Scan Parameters']['X step size (um)'], cmap=colormap, cbar_label=label,
532532
vmin=self.export_window.ui.vmin_spinBox.value(), vmax=self.export_window.ui.vmax_spinBox.value())
533533
elif str(self.export_window.ui.dataChannel_comboBox.currentText()) == "Raw":
534534
cpm.plot_confocal(self.sums, figsize=(10,10), stepsize = data['Scan Parameters']['X step size (um)'], cmap=colormap,

0 commit comments

Comments
 (0)