Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
45f21ef
Update plot.py
thelampire Nov 19, 2019
c05bfb3
Update tools.py
thelampire Nov 19, 2019
fd6861e
Update plot.py
thelampire Nov 19, 2019
9dd4c06
Path and contour overplotting
thelampire Nov 20, 2019
91e7664
Merge branch 'thelampire-patch-3' of https://github.com/fusion-flap/f…
thelampire Nov 20, 2019
5187a58
Overplotting, equal axes and axes visibility options
thelampire Nov 21, 2019
838042a
Multiple new option implementation
thelampire Nov 21, 2019
239fe02
Image like plot unit bugfix
thelampire Nov 22, 2019
e445625
Hanning window is working
thelampire Nov 22, 2019
82b5fc4
Misc mods
thelampire Nov 22, 2019
89c91d3
Bugfix
thelampire Nov 22, 2019
d5ab0f7
Bugfixes
thelampire Nov 25, 2019
0052b6e
Bugfixes
thelampire Nov 27, 2019
9edac82
Bugfixes
thelampire Nov 28, 2019
6b48804
Bugfix
thelampire Dec 2, 2019
ca6a961
Bugfix for hanning window
thelampire Dec 2, 2019
28b8386
Typo fixes
thelampire Dec 18, 2019
b9cb1b5
Misc fixes
thelampire Jan 22, 2020
2a79041
Spectral analysis 2D temporary solution and plot bugfix
thelampire Jan 27, 2020
8a38c52
Slicing bugfix
thelampire Jan 27, 2020
b73c486
Substantial modification
thelampire May 27, 2021
a911d8d
Deleting commented parts
thelampire May 27, 2021
fb5209f
Merge branch 'development' into thelampire-patch-3
thelampire May 27, 2021
385978a
Bugfix
thelampire May 27, 2021
d4f1aea
Added adjustable fitting range for the photon peak subtraction
thelampire May 27, 2021
4cd77c4
Added documentation for the ACF peak fitting.
thelampire May 27, 2021
caa5b7b
Added arrow plotting to plot.py
thelampire Jun 3, 2021
42c6d4a
Update __init__.py
thelampire Jun 2, 2022
84ad5d8
Update .gitignore
thelampire Aug 19, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,5 @@ venv.bak/

# VSCOde
.vs*
flap_mdsplus/
flap_nstx/
2 changes: 2 additions & 0 deletions flap/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
global VERBOSE
VERBOSE = True
if (VERBOSE):
print("Importing flap")
from .tools import *
from .coordinate import *
from .data_object import *
Expand Down
16 changes: 8 additions & 8 deletions flap/data_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ def _plot_error_ranges(self, index=None):
else:
return self.error[_index].flatten()

def _plot_coord_ranges(self,coord, c_data, c_low, c_high):
def _plot_coord_ranges(self, coord, c_data, c_low, c_high):
""" Helper function to return error low and high limits from coordiniate data
in the format needed by matplotlib
"""
Expand Down Expand Up @@ -1401,7 +1401,7 @@ def slice_data(self,slicing=None,summing=None,options=None):
Dictionary with keys referring to coordinates and values as processing strings. If
the processed coordinate changes along multiple dimensions those dimensions will be flattened.

For mean and avereage data errors are calculated as error of independent variables, that is taking the square
For mean and average data errors are calculated as error of independent variables, that is taking the square
root of the squared sum of errors. For coordinates the mean of the ranges is taken.

Processing strings are the following:
Expand Down Expand Up @@ -1478,7 +1478,7 @@ def check_multi_slice(slicing, coord_dim):
return False
else:
return True
raise TypeError("Invalid slicing description.")
raise TypeError("Invalid slicing description, its type is: "+str(type(slicing)))

def simple_slice_index(slicing, slicing_coord, data_shape, _options):
""" Returns index array which can be used for indexing the selected elements in the
Expand Down Expand Up @@ -1513,8 +1513,8 @@ def simple_slice_index(slicing, slicing_coord, data_shape, _options):
coord_obj.step[0])
if ((type(slicing) is flap.coordinate.Intervals)
# Regular slice is possible only with a single interval
and ((slicing.step is None) and (len(slicing.start) == 1) or
(slicing.step is not None) and (slicing.number == 1))):
and ((slicing.step is None) and (len(slicing.start) == 1) or
(slicing.step is not None) and (slicing.number == 1))):
if (slicing_coord.step[0] > 0):
regular_slice = slice(slicing.start[0], slicing.stop[0], slicing_coord.step[0])
else:
Expand Down Expand Up @@ -1599,7 +1599,7 @@ def simple_slice_index(slicing, slicing_coord, data_shape, _options):
start_index = int(round((regular_slice.start - range_coord[0]) / abs(slicing_coord.step[0])))
step_index = int(round(regular_slice.step / abs(slicing_coord.step[0])))
stop_index = int((regular_slice.stop - range_coord[0]) / abs(slicing_coord.step[0]))
return slice(start_index, stop_index, step_index)
return slice(start_index, stop_index+1, step_index)
else:
# slice object could not be created for data array
# Creating flattened coordinate data array
Expand Down Expand Up @@ -3709,7 +3709,7 @@ def get_data_object(self,name,exp_id='*'):
nlist.append(n)
if len(nlist) == 0:
raise KeyError("Data object " + name
+ "(exp_id:" + str(exp_id) + ") does not exists.")
+ "(exp_id:" + str(exp_id) + ") does not exist.")
if (len(nlist) > 1):
raise KeyError("Multiple data objects found for name "
+ name + "(exp_id:" + str(exp_id) + ").")
Expand All @@ -3728,7 +3728,7 @@ def get_data_object_ref(self,name,exp_id='*'):
nlist.append(n)
if len(nlist) == 0:
raise KeyError("Data object " + name
+ "(exp_id:" + str(exp_id) + ") does not exists.")
+ "(exp_id:" + str(exp_id) + ") does not exist.")
if (len(nlist) > 1):
raise KeyError("Multiple data objects found for name "
+ name + "(exp_id:" + str(exp_id) + ").")
Expand Down
Loading