Adding utils.align_using_ssd (sum of squared differences)

Dimitrios Konstantinos Maniadakis requested to merge dimitri into master

Adding a function where it takes two arrays - signals - pulse profiles and aligns them by finding the minimum of the sum of squared differences (SSD). It slides the second array b over the first array a, computes the SSD at each shift, and fits a Gaussian to the SSD values around the minimum to refine the best shift ( similar to the the get_cross_correlation function). It returns the phase shift.

The extras of this merge request: -Adding the pytest of the above function. -Adding a useful check of warnings for find_sudden_changes, it could potentially be used for all future tests with some modifications + Fixing some mistakes on the tests + removing from the data file of the pytest for find_sudden_changes the first lines, in order to avoid diving by zero.

Edited by Dimitrios Konstantinos Maniadakis

Merge request reports