The SparSpec algorithm and the application to the detection of spatial periodicities in tokamaks: using memory with relaxation**[Note: This work is partially based on a 4th year bachelor project by one of the authors (LMP), performed while being a student at the SPC-EPFL under the supervision of the corresponding author (DTA)]. (28th April 2021)