fixed evil tab/spaces

This commit is contained in:
Markus Rosenstihl 2014-11-26 13:19:23 +00:00
parent 059c059de7
commit aed38c1c89
2 changed files with 96 additions and 83 deletions

View File

@ -5,9 +5,14 @@ import autophase
class DamarisFFT: class DamarisFFT:
def clip(self, start=None, stop=None): def clip(self, start=None, stop=None):
""" """
Method for clipping data, only the timesignal between start and stop :param float start: beginning of clipping
:param float stop: end of clipping
Method for clipping data, returns only the timesignal
between start and stop
is returned. is returned.
start and stop can be either time or frequency. The unit is automatically determined start and stop can be either time or frequency.
The unit is automatically determined
""" """
# check if start/stop order is properly # check if start/stop order is properly
if start > stop: if start > stop:
@ -15,12 +20,12 @@ class DamarisFFT:
# TODO swap values? # TODO swap values?
raise raise
# if one uses clip as a "placeholder" # if one uses clip as a "placeholder"
if start==None and stop==None: if start == None and stop == None:
return self return self
if start==None: if start == None:
start = 0 start = 0
if stop==None: if stop == None:
stop = -1 stop = -1
# check if data is fft which changes the start/stop units # check if data is fft which changes the start/stop units
# TODO should get nicer(failsafe), i.e. flags in the object? # TODO should get nicer(failsafe), i.e. flags in the object?
@ -50,6 +55,8 @@ class DamarisFFT:
Correct the baseline of your data by subtracting the mean of the Correct the baseline of your data by subtracting the mean of the
last_part fraction of your data. last_part fraction of your data.
:param float last_part: last section of your timesignal used to calculate baseline
last_part defaults to 0.1, i.e. last 10% of your data last_part defaults to 0.1, i.e. last 10% of your data
""" """
# TODO baselinecorrection for spectra after: # TODO baselinecorrection for spectra after:
@ -80,7 +87,14 @@ class DamarisFFT:
""" """
def exp_window(self, line_broadening=10): def exp_window(self, line_broadening=10):
""" """
exponential window Exponential window function
:param float line_broadening: Applies apodization to time signal
.. math::
\\exp\\left(-\\pi\\cdot \\textsf{line_broadening} \\cdot t\\right)
""" """
apod = numpy.exp(-self.x*numpy.pi*line_broadening) apod = numpy.exp(-self.x*numpy.pi*line_broadening)
for i in range(2): for i in range(2):

View File

@ -2625,11 +2625,11 @@ class MonitorWidgets:
# descriptions = in_result.common_descriptions # descriptions = in_result.common_descriptions
# elif isinstance(in_result, ADC_Result): # elif isinstance(in_result, ADC_Result):
# descriptions = in_result.description # descriptions = in_result.description
# else: pass # else: pass
# actual_config = self.config.get() # actual_config = self.config.get()
# if (descriptions is not None) : #--markusro # if (descriptions is not None) : #--markusro
# print actual_config['pretty_descriptions'] # print actual_config['pretty_descriptions']
# pass # pass
# description_string = "" # description_string = ""
# for key in descriptions.keys(): # for key in descriptions.keys():
# description_string += "%s = %s\n" % (key,descriptions[key]) # description_string += "%s = %s\n" % (key,descriptions[key])
@ -2639,7 +2639,6 @@ class MonitorWidgets:
# va='top', # va='top',
# backgroundcolor='white') # backgroundcolor='white')
# #
# Draw it! # Draw it!
self.matplot_canvas.draw_idle() self.matplot_canvas.draw_idle()
del in_result del in_result