>>> Rewriting interactive calls in '.\hu_dataset.py'.
>>> Rewrite done.
>>> Executing '.\hu_dataset.py.'
c:\pyt\pysprint\pysprint\core\bases\dataset.py:1178: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  self.plt.show(block=True)
Dataset
----------
Parameters
----------
Datapoints: 2000
Predicted domain: frequency
Range: from 1.88365 to 3.76730 PHz
Normalized: True
Delay value: Not given
SPP position(s): Not given
----------------------------
Metadata extracted from file
----------------------------
{
    "fontos_adat_amit_be_akarok_allitani": 20
}
Dataset
----------
Parameters
----------
Datapoints: 2000
Predicted domain: frequency
Range: from 1.88365 to 3.76730 PHz
Normalized: True
Delay value: 400 fs
SPP position(s): 2, 3 PHz
----------------------------
Metadata extracted from file
----------------------------
{
    "fontos_adat_amit_be_akarok_allitani": 20
}
Traceback (most recent call last):
  File "test_notebooks.py", line 113, in exec_notebooks
    {"__name__": "__main__"}
  File "out", line 138, in <module>
  File "c:\pyt\pysprint\pysprint\core\bases\dataset.py", line 350, in positions
    f"Cannot set SPP position to {value} since it's not in the dataset's range."
ValueError: Cannot set SPP position to 4000 since it's not in the dataset's range.
>>> Rewriting interactive calls in '.\hu_fft.py'.
>>> Rewrite done.
>>> Executing '.\hu_fft.py.'
Interferogram received.
Applying IFFT...Done
Acquiring gaussian window parameters...Done
c:\pyt\pysprint\pysprint\core\_fft_tools.py:100: UserWarning: The peak is too close to the origin, manual control is advised.
  UserWarning,
A 12 order gaussian window centered at 2670.46925 fs with FWHM 4055.08976 fs was applied.
c:\pyt\pysprint\pysprint\core\bases\dataset.py:1178: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  self.plt.show(block=True)
Applying FFT...Done
Calculating...
GD = 1499.99661 ± 0.00026 fs^1
GDD = 400.01231 ± 0.00093 fs^2
TOD = 400.02410 ± 0.00105 fs^3
FOD = 999.88506 ± 0.00554 fs^4
c:\pyt\pysprint\pysprint\core\_fft_tools.py:100: UserWarning: The peak is too close to the origin, manual control is advised.
  UserWarning,
<class 'pysprint.core.phase.Phase'>
GD = -1499.99867 ± 0.00002 fs^1
GDD = -400.00218 ± 0.00007 fs^2
TOD = -400.02816 ± 0.00008 fs^3
FOD = -999.90775 ± 0.00048 fs^4
c:\pyt\pysprint\pysprint\core\bases\dataset.py:1178: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  self.plt.show(block=True)
GD = -83.98003 ± 0.03976 fs^1
GDD = 167.48826 ± 0.28810 fs^2
TOD = 119.83522 ± 1.75236 fs^3
GD = -83.98003 ± 0.03976 fs^1
GDD = 167.48826 ± 0.28810 fs^2
TOD = 119.83522 ± 1.75236 fs^3
[ fftmethod.py:408 - get_pulse_shape_from_array() ] Shapes were truncated from 2.3226283197396467 to 2.7198388115237 with length 287.
GD = -38.80607 ± 0.08482 fs^1
GDD = 194.88497 ± 0.68237 fs^2
TOD = 111.52580 ± 2.04064 fs^3
>>> Passed .\hu_fft.py.
>>> Rewriting interactive calls in '.\hu_intro.py'.
>>> Rewrite done.
>>> Executing '.\hu_intro.py.'
verzió:  0.12.5-43-g5636083-dirty
szerző:  Leéh Péter

PYSPRINT ANALYSIS TOOL

        SYSTEM
----------------------
python     : 3.7.6.final.0
python-bits: 64
OS         : Windows
OS-release : 10
Version    : 10.0.18362
machine    : AMD64
processor  : Intel64 Family 6 Model 158 Stepping 9, GenuineIntel
byteorder  : little

      DEPENDENCY
----------------------
pysprint   : 0.12.5-43-g5636083-dirty
numpy      : 1.19.2
scipy      : 1.5.2
matplotlib : 3.3.2
pandas     : 1.1.3
pytest     : 6.1.1
lmfit      : 1.0.1
numba      : 0.51.2
IPython    : None
jinja2     : 2.11.2
dask       : 2.30.0

      ADDITIONAL
----------------------
Conda-env  : False
IPython    : None
Spyder     : False
c:\pyt\pysprint\pysprint\core\methods\generator.py:215: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  self.plotwidget.show()
Successfully saved as ifg.txt.
c:\pyt\pysprint\pysprint\core\methods\generator.py:139: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  self.plotwidget.show()
<class 'numpy.ndarray'>
c:\pyt\pysprint\pysprint\core\bases\dataset.py:202: PySprintWarning: Extreme values encountered during normalization.
Nan values: 105
Inf values: 1
  PySprintWarning
Help on method parse_raw in module pysprint.core.bases.dataset:

parse_raw(filename, ref=None, sam=None, skiprows=0, decimal='.', sep=None, delimiter=None, comment=None, usecols=None, names=None, swapaxes=False, na_values=None, skip_blank_lines=True, keep_default_na=False, meta_len=1, errors='raise', callback=None, parent=None) method of pysprint.core.bases._dataset_base._DatasetBase instance
    Dataset object alternative constructor.
    Helps to load in data just by giving the filenames in
    the target directory.
    
    Parameters
    ----------
    filename: `str`
        base interferogram
        file generated by the spectrometer
    ref: `str`, optional
        reference arm's spectra
        file generated by the spectrometer
    sam: `str`, optional
        sample arm's spectra
        file generated by the spectrometer
    skiprows: `int`, optional
        Skip rows at the top of the file. Default is `0`.
    decimal: `str`, optional
        Character recognized as decimal separator in the original dataset.
        Often `,` for European data.
        Default is `.`.
    sep: `str`, optional
        The delimiter in the original interferogram file.
        Default is `,`.
    delimiter: `str`, optional
        The delimiter in the original interferogram file.
        This is preferred over the `sep` argument if both given.
        Default is `,`.
    comment: `str`, optional
        Indicates remainder of line should not be parsed. If found at the beginning
        of a line, the line will be ignored altogether. This parameter must be a
        single character. Default is `'#'`.
    usecols: list-like or callable, optional
        If there a multiple columns in the file, use only a subset of columns.
        Default is [0, 1], which will use the first two columns.
    names: array-like, optional
        List of column names to use. Default is ['x', 'y']. Column marked
        with `x` (`y`) will be treated as the x (y) axis. Combined with the
        usecols argument it's possible to select data from a large number of
        columns.
    swapaxes: bool, optional
        Whether to swap x and y values in every parsed file. Default is False.
    na_values: scalar, str, list-like, or dict, optional
        Additional strings to recognize as NA/NaN. If dict passed, specific
        per-column NA values. By default the following values are interpreted as
        NaN: ‘’, ‘#N/A’, ‘#N/A N/A’, ‘#NA’, ‘-1.#IND’,
        ‘-1.#QNAN’, ‘-NaN’, ‘-nan’, ‘1.#IND’, ‘1.#QNAN’,
        ‘<NA>’, ‘N/A’, ‘NA’, ‘NULL’, ‘NaN’, ‘n/a’, ‘nan’, ‘null’.
    skip_blank_lines: bool
        If True, skip over blank lines rather than interpreting as NaN values.
        Default is True.
    keep_default_na: bool
        Whether or not to include the default NaN values when parsing the data.
        Depending on whether na_values is passed in, the behavior changes. Default
        is False. More information available at:
        https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html
    meta_len: `int`, optional
        The first `n` lines in the original file containing the meta
        information about the dataset. It is parsed to be dict-like.
        If the parsing fails, a new entry will be created in the
        dictionary with key `unparsed`.
        Default is `1`.
    errors: string, optional
        Determines the way how mismatching sized datacolumns behave.
        The default is `raise`, and it will raise on any error.
        If set to `force`, it will truncate every array to have the
        same shape as the shortest column. It truncates from
        the top of the file.
    callback : callable, optional
        The function that notifies parent objects about SPP related
        changes. In most cases the user should leave this empty. The
        default callback is only initialized if this object is constructed
        by the `pysprint.SPPMethod` object.
    parent : any class, optional
        The object which handles the callback function. In most cases
        the user should leave this empty.

CosFitMethod
----------
Parameters
----------
Datapoints: 2633
Predicted domain: wavelength
Range: from 360.50000 to 1200.25000 nm
Normalized: True
Delay value: Not given
SPP position(s): Not given
----------------------------
Metadata extracted from file
----------------------------
{
    "Average": "1 scans",
    "Data measured with spectrometer name": "1107006U1",
    "Integration time": "2,00 ms",
    "Nr of pixels used for smoothing": "0",
    "Wave": "Sample",
    "comment": "m_ifg 8,740",
    "reference_comment": "m_ref 8,740",
    "sample_comment": "m_sam 8,740",
    "unparsed": [
        [
            "Timestamp [10 microsec ticks]256373440"
        ]
    ]
}
m_ifg 8,740
<class 'numpy.ndarray'>
[-0.009973    0.19881073  0.32219592 ...  0.3803739   0.55082753
  0.58969469]
The predicted GD is ± 90.17543 fs based on reference point of 2.35500.
R^2 = 0.95701

GD = 83.91576 ± 0.00000 fs^1
GDD = -169.23559 ± 0.00000 fs^2
TOD = -112.87929 ± 0.00000 fs^3
R^2 = 0.95701
c:\pyt\pysprint\pysprint\core\bases\dataset.py:1178: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  self.plt.show(block=True)

Working... |
Working... /c:\pyt\pysprint\pysprint\core\_optimizer.py:86: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  plt.show()
GD = 83.91564 fs^1
GDD = -169.16239 fs^2
TOD = -113.10974 fs^3
with R^2 = 0.95692.

Working... |
Working... -
Working... /
Working... \
Working... -
Working... \
Working... \
Working... |
Working... \
Working... /
Working... |
Working... -
Working... /
Working... \
Working... -
Working... \
Working... \
Working... |
Working... \
Working... /
Working... |
Working... -
Working... /
Working... \
Working... -
Working... \
Working... \
Working... |
Working... \
Working... /
Working... |
Working... -
Working... /
Working... \
Working... -
Working... \
Working... \
Working... |
Working... \
Working... /
Working... |
Working... -
Working... /
Working... \
Working... -
Working... \
Working... \
Working... |
Working... \
Working... /
Working... |
Working... -
Working... /
Working... \
Working... -
Working... \
Working... \
Working... |
Working... \
Working... /
Working... |
Working... -c:\pyt\pysprint\pysprint\core\_optimizer.py:86: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  plt.show()
Max tries (currently set to 5000) reached without finding a suitable fit.
>>> Passed .\hu_intro.py.
>>> Rewriting interactive calls in '.\hu_minmax.py'.
>>> Rewrite done.
>>> Executing '.\hu_minmax.py.'
c:\pyt\pysprint\pysprint\core\bases\dataset.py:202: PySprintWarning: Extreme values encountered during normalization.
Nan values: 105
Inf values: 1
  PySprintWarning
GD = -109.90494 ± 5.11096 fs^1
GDD = 301.56948 ± 15.13862 fs^2
TOD = -113.76563 ± 18.35335 fs^3
Traceback (most recent call last):
  File "c:\pyt\pysprint\pysprint\__init__.py", line 41, in interactive
    yield
  File "out", line 87, in <module>
  File "c:\pyt\pysprint\pysprint\core\methods\minmax.py", line 96, in init_edit_session
    _editpeak = EditPeak(self.x, self.y_norm, _xm, _ym)
  File "c:\pyt\pysprint\pysprint\mpl_tools\peak.py", line 93, in __init__
    self.figure.canvas.manager.toolbar.add_tool(
AttributeError: 'NoneType' object has no attribute 'add_tool'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "test_notebooks.py", line 113, in exec_notebooks
    {"__name__": "__main__"}
  File "out", line 87, in <module>
  File "C:\Program Files\Python37\lib\contextlib.py", line 130, in __exit__
    self.gen.throw(type, value, traceback)
  File "c:\pyt\pysprint\pysprint\__init__.py", line 47, in interactive
    ) from err
ValueError: Couldn't set backend Agg, you should manually change to an appropriate GUI backend. (Matplotlib 3.3.1 is broken. In that case use backend='TkAgg').
>>> Rewriting interactive calls in '.\hu_misc.py'.
>>> Rewrite done.
>>> Executing '.\hu_misc.py.'
CosFitMethod
----------
Parameters
----------
Datapoints: 14129
Predicted domain: frequency
Range: from 0.99997 to 4.00000 PHz
Normalized: True
Delay value: Not given
SPP position(s): Not given
----------------------------
Metadata extracted from file
----------------------------
{}
The predicted GD is ± 505.74801 fs based on reference point of 3.00000.

Working... |C:\pyt\PySprint\venv\lib\site-packages\scipy\optimize\minpack.py:829: OptimizeWarning: Covariance of the parameters could not be estimated
  category=OptimizeWarning)

Working... /
Working... -
Working... \
Working... \c:\pyt\pysprint\pysprint\core\_optimizer.py:86: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  plt.show()
GD = 500.00000000 fs^1
GDD = 540.00000000 fs^2
with R^2 = 1.00000000.

Working... |C:\pyt\PySprint\venv\lib\site-packages\scipy\optimize\minpack.py:829: OptimizeWarning: Covariance of the parameters could not be estimated
  category=OptimizeWarning)

Working... |
Working... /
Working... /
Working... -
Working... -
Working... \
Working... \
Working... \c:\pyt\pysprint\pysprint\core\_optimizer.py:86: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  plt.show()
GD = 500.00000 fs^1
GDD = 540.00000 fs^2
with R^2 = 1.00000.
1.01200 ± 0.16458
Traceback (most recent call last):
  File "test_notebooks.py", line 113, in exec_notebooks
    {"__name__": "__main__"}
  File "out", line 83, in <module>
NameError: name 'get_ipython' is not defined
>>> Rewriting interactive calls in '.\hu_phase.py'.
>>> Rewrite done.
>>> Executing '.\hu_phase.py.'
GD = 45.00000 ± 0.00000 fs^1
GDD = -6.00000 ± 0.00000 fs^2
TOD = 12.00000 ± 0.00000 fs^3
GD = 47.00000 ± 0.00000 fs^1
GDD = 45.00000 ± 0.00000 fs^2
TOD = -6.00000 ± 0.00000 fs^3
FOD = 12.00000 ± 0.00000 fs^4
3 3
3 4
[ 5.004002    5.01850925  5.03301651 ... 24.96598299 24.98049025
 24.9949975 ] <class 'numpy.ndarray'>
[  403.66076273   406.06328969   408.47722827 ... 30379.17802734
 30431.94288131 30484.76956137] <class 'numpy.ndarray'>
Traceback (most recent call last):
  File "test_notebooks.py", line 113, in exec_notebooks
    {"__name__": "__main__"}
  File "out", line 118, in <module>
  File "c:\pyt\pysprint\pysprint\core\phase.py", line 370, in errors
    raise ValueError("Must fit a curve before requesting errors.")
ValueError: Must fit a curve before requesting errors.
>>> Rewriting interactive calls in '.\hu_spp.py'.
>>> Rewrite done.
>>> Executing '.\hu_spp.py.'
['-200.txt', '-150.txt', '-100.txt', '-50.txt', '0.txt', '50.txt', '100.txt', '150.txt', '200.txt']
9
Progress: 0/9
Dataset
----------
Parameters
----------
Datapoints: 12559
Predicted domain: frequency
Range: from 0.99998 to 3.00000 PHz
Normalized: False
Delay value: Not given
SPP position(s): Not given
----------------------------
Metadata extracted from file
----------------------------
{}
[4.22567237e-08 4.23424876e-08 4.24102757e-08 ... 4.41394357e-08
 4.30227521e-08 4.18888151e-08]
<class 'numpy.ndarray'>
c:\pyt\pysprint\pysprint\mpl_tools\spp_editor.py:49: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  plt.show(block=True)
c:\pyt\pysprint\pysprint\mpl_tools\spp_editor.py:49: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  plt.show(block=True)
c:\pyt\pysprint\pysprint\mpl_tools\spp_editor.py:49: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  plt.show(block=True)
c:\pyt\pysprint\pysprint\mpl_tools\spp_editor.py:49: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  plt.show(block=True)
c:\pyt\pysprint\pysprint\mpl_tools\spp_editor.py:49: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  plt.show(block=True)
c:\pyt\pysprint\pysprint\mpl_tools\spp_editor.py:49: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  plt.show(block=True)
c:\pyt\pysprint\pysprint\mpl_tools\spp_editor.py:49: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  plt.show(block=True)
c:\pyt\pysprint\pysprint\mpl_tools\spp_editor.py:49: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  plt.show(block=True)
c:\pyt\pysprint\pysprint\mpl_tools\spp_editor.py:49: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  plt.show(block=True)
Traceback (most recent call last):
  File "test_notebooks.py", line 113, in exec_notebooks
    {"__name__": "__main__"}
  File "out", line 139, in <module>
  File "c:\pyt\pysprint\pysprint\utils\decorators.py", line 144, in wrapping
    disp, disp_std, stri = f(*args, **kwargs)
  File "c:\pyt\pysprint\pysprint\core\methods\spp_interface.py", line 394, in calculate
    d, ds, s = self.GD._fit(reference_point=reference_point, order=order)
  File "c:\pyt\pysprint\pysprint\core\phase.py", line 256, in _fit
    result = fitmodel.fit(y, x=x, params=pars)
  File "C:\pyt\PySprint\venv\lib\site-packages\lmfit\model.py", line 1013, in fit
    output.fit(data=data, weights=weights)
  File "C:\pyt\PySprint\venv\lib\site-packages\lmfit\model.py", line 1366, in fit
    _ret = self.minimize(method=self.method)
  File "C:\pyt\PySprint\venv\lib\site-packages\lmfit\minimizer.py", line 2285, in minimize
    return function(**kwargs)
  File "C:\pyt\PySprint\venv\lib\site-packages\lmfit\minimizer.py", line 1646, in leastsq
    lsout = scipy_leastsq(self.__residual, variables, **lskws)
  File "C:\pyt\PySprint\venv\lib\site-packages\scipy\optimize\minpack.py", line 414, in leastsq
    raise TypeError('Improper input: N=%s must not exceed M=%s' % (n, m))
TypeError: Improper input: N=3 must not exceed M=0
>>> Rewriting interactive calls in '.\hu_wft.py'.
>>> Rewrite done.
>>> Executing '.\hu_wft.py.'
Traceback (most recent call last):
  File "test_notebooks.py", line 113, in exec_notebooks
    {"__name__": "__main__"}
  File "out", line 64, in <module>
  File "c:\pyt\pysprint\pysprint\utils\decorators.py", line 80, in wrapper
    method(self, *args, **kwds)
  File "c:\pyt\pysprint\pysprint\core\methods\wft.py", line 361, in remove_window_at
    f"There is no window with center {center}. "
ValueError: There is no window with center 2.25. Did you mean 2.24954954954955?
