now plotting out fit digests authored by Lee McCuller's avatar Lee McCuller
# fit_sequence_v1
> `fit_sequence_v1`
Version 1 smart fitter in IIRrational library. Uses SVD method with high order over fitting, then switches to nonlinear fits with heuristics to remove poles and zeros down to a reasonable system order.
## `1` initial
### `1.1` initial_poles
> `fit_poles_mod_zeros`
Performs the SVD for a rough initial guess
![Fitttt](plot-1-1.png)
### `1.2` initial_zeros
> `fit_poles_mod_zeros`
Performs the SVD for a rough initial guess
![Fitttt](plot-1-2.png)
### `1.3` choose poles
> `if`
Chose the Poles SVD fitter as it had the smaller residual of 1.91e+02 vs. 1.93e+04 for the zeros
### `1.4` seq_iter_1
> `IIRrational.fit_poles, IIRrational.fit_zeros`
First iterations, enforcing mindelay and stabilized poles residual of 6.33e+03
![Fitttt](plot-1-4.png)
### `1.5` seq_iter_2
> `IIRrational.fit_poles, IIRrational.fit_zeros`
First iterations, enforcing stabilized poles residual of 1.51e+04
![Fitttt](plot-1-5.png)
### `1.6` seq_iter_3
> `IIRrational.fit_poles, IIRrational.fit_zeros`
First iterations, enforcing stabilized poles residual of 1.19e+02
![Fitttt](plot-1-6.png)
### `1.7` seq_iter_4
> `IIRrational.fit_poles, IIRrational.fit_zeros`
First iterations, enforcing stabilized poles residual of 8.89e+01
![Fitttt](plot-1-7.png)
### `1.8` nyquist_move
> `IIRrational.nyquist_move`
Moves to intended nyquist, clipping negative real poles/zeros likely caused by phase defects of low nyquist
![Fitttt](plot-1-8.png)
### `1.9` Final
> `SVD_method`
Uses SVD to create initial guess of fit for data, followed by several iterative fits
(see reference ???).
* It is a linear method, finding global optimum (nonlocal). This makes it get stuck if systematics are bad. To prevent this,
it requires gratuitous overfitting to reliably get good fits.
* It requires a nyquist frequency that is very low, near the last data point. This can cause artifacts due to phasing discontinuity near the nyquist.
* The provided nyquist frequency is shifted up at the end, removing the real poles/zeros that are typically due to phasing discontinuity
![Fitttt](plot-1-9.png)
## `2` optimize nonlinear
> `MultiReprFilter.optimize`
Optimizes using nonlinear parameterizations,
TODO: describe as used
![Fitttt](plot-2.png)
## `3` order_reduce 1
### `3.1` duals_ID_1
> `MultiReprFilter.optimize`
ID Pairs for order reduction
![Fitttt](plot-3-1.png)
### `3.2` seq_order_reduce_opt_1
> `MultiReprFilter.optimize`
Optimize again after order reduction
![Fitttt](plot-3-2.png)
### `3.3` duals_ID_2
> `MultiReprFilter.optimize`
ID Pairs for order reduction
![Fitttt](plot-3-3.png)
### `3.4` seq_order_reduce_opt_2
> `MultiReprFilter.optimize`
Optimize again after order reduction
![Fitttt](plot-3-4.png)
### `3.5` duals_ID_3
> `MultiReprFilter.optimize`
ID Pairs for order reduction
![Fitttt](plot-3-5.png)
## `4` flip mindelay
## `5` order_reduce 2
### `5.1` duals_ID_1
> `MultiReprFilter.optimize`
ID Pairs for order reduction
![Fitttt](plot-5-1.png)