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

Commit a107fea

Browse files
fix single spec file input, fix plot function for single spectrum
1 parent f2ded3e commit a107fea

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

PythonGUI_apps/Spectrum_analysis/Spectra_plot_fit.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def open_file(self):
139139
try:
140140
self.file = np.loadtxt(self.single_spec_filename[0], skiprows = 1, delimiter=" ")
141141
except:
142-
np.loadtxt(self.single_spec_filename[0], skiprows = 16, delimiter='\t')
142+
self.file = np.loadtxt(self.single_spec_filename[0], skiprows = 16, delimiter='\t')
143143
except:
144144
self.file = np.genfromtxt(self.single_spec_filename[0], skip_header=1, skip_footer=3, delimiter='\t')
145145
self.opened_from_flim = False
@@ -324,8 +324,10 @@ def plot(self):
324324
else:
325325
self.x = self.file[:,0]
326326
self.y = self.file[:,1]
327+
328+
self.check_loaded_files()
327329

328-
if self.check_loaded_files == True: #check the following conditions if all required files have been provided
330+
if self.check_loaded_files() == True: #check the following conditions if all required files have been provided
329331
if self.ui.subtract_bck_radioButton.isChecked() == True and self.ui.WLRef_checkBox.isChecked() == False:
330332
bck_y = self.bck_file[:,1]
331333
self.y = self.y - bck_y

0 commit comments

Comments
 (0)