LabTools3 1.1.3.17__tar.gz → 1.1.3.18__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.17 → labtools3-1.1.3.18}/LT/box.py +53 -0
- {labtools3-1.1.3.17 → labtools3-1.1.3.18/LabTools3.egg-info}/PKG-INFO +3 -1
- {labtools3-1.1.3.17/LabTools3.egg-info → labtools3-1.1.3.18}/PKG-INFO +3 -1
- {labtools3-1.1.3.17 → labtools3-1.1.3.18}/README.md +3 -1
- {labtools3-1.1.3.17 → labtools3-1.1.3.18}/setup.py +1 -1
- {labtools3-1.1.3.17 → labtools3-1.1.3.18}/LICENSE +0 -0
- {labtools3-1.1.3.17 → labtools3-1.1.3.18}/LT/MCA.py +0 -0
- {labtools3-1.1.3.17 → labtools3-1.1.3.18}/LT/__init__.py +0 -0
- {labtools3-1.1.3.17 → labtools3-1.1.3.18}/LT/datafile.py +0 -0
- {labtools3-1.1.3.17 → labtools3-1.1.3.18}/LT/get_precision.py +0 -0
- {labtools3-1.1.3.17 → labtools3-1.1.3.18}/LT/parameterfile.py +0 -0
- {labtools3-1.1.3.17 → labtools3-1.1.3.18}/LT/pdatafile.py +0 -0
- {labtools3-1.1.3.17 → labtools3-1.1.3.18}/LT/plotting.py +0 -0
- {labtools3-1.1.3.17 → labtools3-1.1.3.18}/LT_Fit/__init__.py +0 -0
- {labtools3-1.1.3.17 → labtools3-1.1.3.18}/LT_Fit/gen_fit.py +0 -0
- {labtools3-1.1.3.17 → labtools3-1.1.3.18}/LT_Fit/linear_fit.py +0 -0
- {labtools3-1.1.3.17 → labtools3-1.1.3.18}/LT_Fit/parameters.py +0 -0
- {labtools3-1.1.3.17 → labtools3-1.1.3.18}/LabTools3.egg-info/SOURCES.txt +0 -0
- {labtools3-1.1.3.17 → labtools3-1.1.3.18}/LabTools3.egg-info/dependency_links.txt +0 -0
- {labtools3-1.1.3.17 → labtools3-1.1.3.18}/LabTools3.egg-info/top_level.txt +0 -0
- {labtools3-1.1.3.17 → labtools3-1.1.3.18}/setup.cfg +0 -0
|
@@ -915,7 +915,60 @@ class histo:
|
|
|
915
915
|
print('Chi sq./DoF = ', self.F.chi2_red)
|
|
916
916
|
print('----------------------------------------------------------------------')
|
|
917
917
|
self.calc_fit_plot()
|
|
918
|
+
|
|
919
|
+
|
|
920
|
+
def plot_guess(self, xmin = None, xmax = None):
|
|
921
|
+
"""
|
|
922
|
+
Plot the fit function with the guessed parameters
|
|
918
923
|
|
|
924
|
+
Keyword arguments are:
|
|
925
|
+
|
|
926
|
+
============ =====================================================
|
|
927
|
+
Keyword Meaning
|
|
928
|
+
============ =====================================================
|
|
929
|
+
xmin lower fit limit
|
|
930
|
+
xmax upper fit limit
|
|
931
|
+
|
|
932
|
+
"""
|
|
933
|
+
# is there a range given, or is a window set
|
|
934
|
+
sel_all = np.ones_like(self.bin_center, dtype = 'bool')
|
|
935
|
+
if (xmin is None) and (xmax is None):
|
|
936
|
+
# check if a window is set
|
|
937
|
+
if self.window_set:
|
|
938
|
+
# if so use the set window limits
|
|
939
|
+
sel = (self.win_min <= self.bin_center) & (self.bin_center <= self.win_max)
|
|
940
|
+
self.fit_indx, = np.where ( sel )
|
|
941
|
+
else:
|
|
942
|
+
# if not use all data
|
|
943
|
+
self.fit_indx, = np.where(sel_all)
|
|
944
|
+
elif (xmin is None):
|
|
945
|
+
sel = (self.bin_center <= xmax)
|
|
946
|
+
if self.window_set:
|
|
947
|
+
# if so check which is smaller
|
|
948
|
+
sel_w = (self.bin_center <= self.win_max) & sel
|
|
949
|
+
self.fit_indx, = np.where(sel_w)
|
|
950
|
+
else:
|
|
951
|
+
self.fit_indx, = np.where(sel)
|
|
952
|
+
elif (xmax is None):
|
|
953
|
+
sel = (xmin <= self.bin_center)
|
|
954
|
+
if self.window_set:
|
|
955
|
+
# if so check which is larger
|
|
956
|
+
sel_w = (self.win_min <= self.bin_center) & sel
|
|
957
|
+
self.fit_indx, = np.where(sel_w)
|
|
958
|
+
else:
|
|
959
|
+
self.fit_indx, = np.where(sel)
|
|
960
|
+
else:
|
|
961
|
+
sel = (xmin <= self.bin_center) & ( self.bin_center <= xmax)
|
|
962
|
+
if self.window_set:
|
|
963
|
+
# if so check the set window limits
|
|
964
|
+
sel_w = (self.win_min <= self.bin_center) & ( self.bin_center <= self.win_max) & sel
|
|
965
|
+
# use the tighter limits
|
|
966
|
+
self.fit_indx, = np.where(sel_w)
|
|
967
|
+
else:
|
|
968
|
+
self.fit_indx, = np.where(sel)
|
|
969
|
+
self.calc_fit_plot()
|
|
970
|
+
self.plot_fit()
|
|
971
|
+
|
|
919
972
|
def fit_view(self, init = True):
|
|
920
973
|
"""
|
|
921
974
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: LabTools3
|
|
3
|
-
Version: 1.1.3.
|
|
3
|
+
Version: 1.1.3.18
|
|
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
|
|
@@ -56,3 +56,5 @@ Version 1.1.3.15: contination lines enabled in parameter file by endine line wit
|
|
|
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
57
|
|
|
58
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.
|
|
59
|
+
|
|
60
|
+
Version 1.1.3.18: Added plot_guess function to histo. This makes it easy to plot fit functions with guessed parameters.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: LabTools3
|
|
3
|
-
Version: 1.1.3.
|
|
3
|
+
Version: 1.1.3.18
|
|
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
|
|
@@ -56,3 +56,5 @@ Version 1.1.3.15: contination lines enabled in parameter file by endine line wit
|
|
|
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
57
|
|
|
58
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.
|
|
59
|
+
|
|
60
|
+
Version 1.1.3.18: Added plot_guess function to histo. This makes it easy to plot fit functions with guessed parameters.
|
|
@@ -41,4 +41,6 @@ Version 1.1.3.15: contination lines enabled in parameter file by endine line wit
|
|
|
41
41
|
|
|
42
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
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.
|
|
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.
|
|
45
|
+
|
|
46
|
+
Version 1.1.3.18: Added plot_guess function to histo. This makes it easy to plot fit functions with guessed parameters.
|
|
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
|