I was reading "Time-Series Anomaly Detection Service at Microsoft" (https://arxiv.org/pdf/1906.03821.pdf) in these days, and I got some problems for the programming part.
The first picture shows the algorithm, the general idea is to perform the fast fourier transform for a time series sequence, calculate the spectral residual and perform inverse fast fourier transform at the end. When I checked the official code of this paper, before performing the inverse fast fourier transform, the transformed signal ('trans' in the code) was multiplied by the spectral residual and then divided by its amplitude (line 212 - 215 in the second picture) which is confused. If someone can explain about this part? Thanks.