Skip to content

Commit 916d834

Browse files
committed
Update function description in file functions.py
Remove old artefact from scope.py
1 parent d86d1da commit 916d834

File tree

2 files changed

+12
-30
lines changed

2 files changed

+12
-30
lines changed

pysignalscope/functions.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -38,29 +38,29 @@ def fft(period_vector_t_i: Union[List[List[float]], np.ndarray], sample_factor:
3838
>>> out = pss.fft(example_waveform, plot=True, mode='rad', f0=25000, title='ffT input current')
3939
4040
:param period_vector_t_i: numpy-array [[time-vector[,[current-vector]]. One period only
41-
:type period_vector_t_i: np.array
42-
:param sample_factor: f_sampling/f_period, defaults to 1000
41+
:type period_vector_t_i: np.array or List[List[float]
42+
:param sample_factor: f_sampling/f_period with default = 1000 (optional parameter)
4343
:type sample_factor: int
44-
:param plot: insert anything else than "no" or 'False' to show a plot to visualize input and output
44+
:param plot: insert anything else than "no" or 'False' to show a plot to visualize input and output (optional parameter)
4545
:type plot: str
46-
:param mode: 'rad'[default]: full period is 2*pi, 'deg': full period is 360°, 'time': time domain.
46+
:param mode: 'rad'[default]: full period is 2*pi, 'deg': full period is 360°, 'time': time domain. (optional parameter)
4747
:type mode: str
48-
:param f0: fundamental frequency. Needs to be set in 'rad'- or 'deg'-mode
48+
:param f0: fundamental frequency. Needs to be set in 'rad'- or 'deg'-modewith (optional parameter)
4949
:type f0: float
50-
:param title: plot window title, defaults to 'ffT'
50+
:param title: plot window title, defaults to 'ffT' (optional parameter)
5151
:type title: str
52-
:param filter_type: 'factor'[default] or 'harmonic' or 'disabled'.
52+
:param filter_type: 'factor'[default] or 'harmonic' or 'disabled'. (optional parameter)
5353
:type filter_type: str
54-
:param filter_value_factor: filters out amplitude-values below a certain factor of max. input amplitude.
54+
:param filter_value_factor: filters out amplitude-values below a certain factor of max. input amplitude. (optional parameter)
5555
Should be 0...1, default to 0.01 (1%)
5656
:type filter_value_factor: float
57-
:param filter_value_harmonic: filters out harmonics up to a certain number. Default value is 100.
57+
:param filter_value_harmonic: filters out harmonics up to a certain number with default = 100 (optional parameter)
5858
Note: count 1 is DC component, count 2 is the fundamental frequency
5959
:type filter_value_harmonic: int
60-
:param figure_directory: full path with file extension
61-
:type figure_directory: Tuple
62-
:param figure_size: None for auto-fit; fig_size for matplotlib (width, length)
60+
:param figure_size: None for auto-fit; fig_size for matplotlib (width, length) (optional parameter)
6361
:type figure_size: Tuple
62+
:param figure_directory: full path with file extension (optional parameter)
63+
:type figure_directory: Tuple
6464
6565
:return: numpy-array [[frequency-vector],[amplitude-vector],[phase-vector]]
6666
:rtype: npt.NDArray[list]

pysignalscope/scope.py

-18
Original file line numberDiff line numberDiff line change
@@ -1732,24 +1732,6 @@ def square(channel: Channel) -> Channel:
17321732

17331733
return channel_modified
17341734

1735-
@staticmethod
1736-
def save_figure(figure: plt.figure, fig_name: str):
1737-
"""
1738-
Save the given figure object as pdf.
1739-
1740-
:param figure: figure object
1741-
:type figure: matplotlib.pyplot.figure
1742-
:param fig_name: figure name for pdf file naming
1743-
:type fig_name: str
1744-
"""
1745-
if isinstance(fig_name, str):
1746-
figure.savefig(f"{fig_name}.pdf")
1747-
else:
1748-
raise TypeError("figure name must be of type str.")
1749-
1750-
# Log flow control
1751-
logging.debug(f"{class_modulename} :Name of file to save={fig_name}.pdf")
1752-
17531735
@staticmethod
17541736
def save(channel: Channel, filepath: str) -> None:
17551737
"""

0 commit comments

Comments
 (0)