LabTools3 1.1.3.16__tar.gz → 1.1.3.17__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {labtools3-1.1.3.16 → labtools3-1.1.3.17}/LT/box.py +21 -4
- {labtools3-1.1.3.16 → labtools3-1.1.3.17/LabTools3.egg-info}/PKG-INFO +3 -1
- {labtools3-1.1.3.16/LabTools3.egg-info → labtools3-1.1.3.17}/PKG-INFO +3 -1
- {labtools3-1.1.3.16 → labtools3-1.1.3.17}/README.md +3 -1
- {labtools3-1.1.3.16 → labtools3-1.1.3.17}/setup.py +1 -1
- {labtools3-1.1.3.16 → labtools3-1.1.3.17}/LICENSE +0 -0
- {labtools3-1.1.3.16 → labtools3-1.1.3.17}/LT/MCA.py +0 -0
- {labtools3-1.1.3.16 → labtools3-1.1.3.17}/LT/__init__.py +0 -0
- {labtools3-1.1.3.16 → labtools3-1.1.3.17}/LT/datafile.py +0 -0
- {labtools3-1.1.3.16 → labtools3-1.1.3.17}/LT/get_precision.py +0 -0
- {labtools3-1.1.3.16 → labtools3-1.1.3.17}/LT/parameterfile.py +0 -0
- {labtools3-1.1.3.16 → labtools3-1.1.3.17}/LT/pdatafile.py +0 -0
- {labtools3-1.1.3.16 → labtools3-1.1.3.17}/LT/plotting.py +0 -0
- {labtools3-1.1.3.16 → labtools3-1.1.3.17}/LT_Fit/__init__.py +0 -0
- {labtools3-1.1.3.16 → labtools3-1.1.3.17}/LT_Fit/gen_fit.py +0 -0
- {labtools3-1.1.3.16 → labtools3-1.1.3.17}/LT_Fit/linear_fit.py +0 -0
- {labtools3-1.1.3.16 → labtools3-1.1.3.17}/LT_Fit/parameters.py +0 -0
- {labtools3-1.1.3.16 → labtools3-1.1.3.17}/LabTools3.egg-info/SOURCES.txt +0 -0
- {labtools3-1.1.3.16 → labtools3-1.1.3.17}/LabTools3.egg-info/dependency_links.txt +0 -0
- {labtools3-1.1.3.16 → labtools3-1.1.3.17}/LabTools3.egg-info/top_level.txt +0 -0
- {labtools3-1.1.3.16 → labtools3-1.1.3.17}/setup.cfg +0 -0
|
@@ -646,9 +646,16 @@ class histo:
|
|
|
646
646
|
of.write('#\ title = %s\n'%(self.title))
|
|
647
647
|
of.write('#\ xlabel = %s\n'%(self.xlabel))
|
|
648
648
|
of.write('#\ ylabel = %s\n'%(self.ylabel))
|
|
649
|
-
#
|
|
649
|
+
# fit limits used when the last fit was made
|
|
650
650
|
of.write('#\ fit_index_min = %d\n'%(self.fit_index_min))
|
|
651
651
|
of.write('#\ fit_index_max = %d\n'%(self.fit_index_max))
|
|
652
|
+
# window settings
|
|
653
|
+
of.write('#\ window_min = %d\n'%(self.win_min))
|
|
654
|
+
of.write('#\ window_max = %d\n'%(self.win_max))
|
|
655
|
+
if self.window_set:
|
|
656
|
+
of.write('#\ window_set = True\n')
|
|
657
|
+
else:
|
|
658
|
+
of.write('#\ window_set = False\n')
|
|
652
659
|
# now write the current fit parameters
|
|
653
660
|
for key in self.fit_par:
|
|
654
661
|
name = key + ' = %r'
|
|
@@ -662,7 +669,7 @@ class histo:
|
|
|
662
669
|
of.write ("%r %r %r \n"%( bc, self.bin_content[i], self.bin_error[i]) )
|
|
663
670
|
of.close()
|
|
664
671
|
|
|
665
|
-
def load(self, file='histo.data'):
|
|
672
|
+
def load(self, file='histo.data', clear_window = False):
|
|
666
673
|
"""
|
|
667
674
|
|
|
668
675
|
read the histogram data from :mod:`~LT.pdatafile`
|
|
@@ -680,6 +687,15 @@ class histo:
|
|
|
680
687
|
self.title = data.par.get_value('title', str)
|
|
681
688
|
self.xlabel = data.par.get_value('xlabel', str)
|
|
682
689
|
self.ylabel = data.par.get_value('ylabel', str)
|
|
690
|
+
# window parameters
|
|
691
|
+
try :
|
|
692
|
+
win_min = data.par.get_value('window_min')
|
|
693
|
+
win_max = data.par.get_value('window_max')
|
|
694
|
+
self.set_window(win_min, win_max)
|
|
695
|
+
self.window_set = data.par.get_value('window_set')
|
|
696
|
+
except:
|
|
697
|
+
print('no histogram window information, skipping !')
|
|
698
|
+
clear_window = True
|
|
683
699
|
# now the fit limits (if they exist)
|
|
684
700
|
try:
|
|
685
701
|
fi_min = data.par.get_value('fit_index_min')
|
|
@@ -700,7 +716,8 @@ class histo:
|
|
|
700
716
|
self.__get_histogram()
|
|
701
717
|
self.bins = self.res[1]
|
|
702
718
|
self.__prepare_histo_plot()
|
|
703
|
-
|
|
719
|
+
if clear_window:
|
|
720
|
+
self.clear_window()
|
|
704
721
|
# plot the fit
|
|
705
722
|
x = np.linspace(self.bins[0], self.bins[-1:][0], 100)
|
|
706
723
|
self.fit_dict['xpl'] = x
|
|
@@ -2089,7 +2106,7 @@ def get_spectrum(file, calibration = None):
|
|
|
2089
2106
|
"""
|
|
2090
2107
|
sp = mcsp.MCA(file)
|
|
2091
2108
|
sp_title = sp.spectrum['$DATE_MEA'] + \
|
|
2092
|
-
" live time
|
|
2109
|
+
" live time: %6.1f s, total time: %6.1f s"%(sp.spectrum['$MEAS_TIM'][0],\
|
|
2093
2110
|
sp.spectrum['$MEAS_TIM'][1])
|
|
2094
2111
|
# create histogram
|
|
2095
2112
|
if calibration is None:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: LabTools3
|
|
3
|
-
Version: 1.1.3.
|
|
3
|
+
Version: 1.1.3.17
|
|
4
4
|
Summary: Python 3 Package of modules for typical analysis tasks analyzing physics data
|
|
5
5
|
Home-page: http://wanda.fiu.edu/LabTools3
|
|
6
6
|
Author: Werner Boeglin
|
|
@@ -54,3 +54,5 @@ Version 1.1.3.14: error calcualtion for filling histograms with weights include
|
|
|
54
54
|
Version 1.1.3.15: contination lines enabled in parameter file by endine line with "\" or ",""
|
|
55
55
|
|
|
56
56
|
Version 1.1.3.16: Corrected bug in histo.rebin. gen_fit allows control of relative step size using the diff_step keyword. It is also possible to supply a list of functions to calculate the parameter derivatives. This helps with numerical accuracy in the minimization process (see gen_fit documentation)
|
|
57
|
+
|
|
58
|
+
Version 1.1.3.17: Histogram window settings are now also saved to data file. Replace equal sign with colon in histogram title in get_spectrum.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: LabTools3
|
|
3
|
-
Version: 1.1.3.
|
|
3
|
+
Version: 1.1.3.17
|
|
4
4
|
Summary: Python 3 Package of modules for typical analysis tasks analyzing physics data
|
|
5
5
|
Home-page: http://wanda.fiu.edu/LabTools3
|
|
6
6
|
Author: Werner Boeglin
|
|
@@ -54,3 +54,5 @@ Version 1.1.3.14: error calcualtion for filling histograms with weights include
|
|
|
54
54
|
Version 1.1.3.15: contination lines enabled in parameter file by endine line with "\" or ",""
|
|
55
55
|
|
|
56
56
|
Version 1.1.3.16: Corrected bug in histo.rebin. gen_fit allows control of relative step size using the diff_step keyword. It is also possible to supply a list of functions to calculate the parameter derivatives. This helps with numerical accuracy in the minimization process (see gen_fit documentation)
|
|
57
|
+
|
|
58
|
+
Version 1.1.3.17: Histogram window settings are now also saved to data file. Replace equal sign with colon in histogram title in get_spectrum.
|
|
@@ -39,4 +39,6 @@ Version 1.1.3.14: error calcualtion for filling histograms with weights include
|
|
|
39
39
|
|
|
40
40
|
Version 1.1.3.15: contination lines enabled in parameter file by endine line with "\" or ",""
|
|
41
41
|
|
|
42
|
-
Version 1.1.3.16: Corrected bug in histo.rebin. gen_fit allows control of relative step size using the diff_step keyword. It is also possible to supply a list of functions to calculate the parameter derivatives. This helps with numerical accuracy in the minimization process (see gen_fit documentation)
|
|
42
|
+
Version 1.1.3.16: Corrected bug in histo.rebin. gen_fit allows control of relative step size using the diff_step keyword. It is also possible to supply a list of functions to calculate the parameter derivatives. This helps with numerical accuracy in the minimization process (see gen_fit documentation)
|
|
43
|
+
|
|
44
|
+
Version 1.1.3.17: Histogram window settings are now also saved to data file. Replace equal sign with colon in histogram title in get_spectrum.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|