stingray
stingray copied to clipboard
FAD documentation misleading.
segment_size: float
The final Fourier products are averaged over many segments of the
input light curves. This is the length of each segment being averaged.
Note that the light curve must be long enough to have at least 30
segments, as the result gets better as one averages more and more
segments.
This leads people to use many short segments to calculate the FAD. In reality, the FAD uses a default 3Hz resolution for smoothing: this means that if people use 1-s segments, they will only average over 3 bins, invalidating the method. We should give a much better rule of thumb, to ensure a minimum good resolution.
Thanks to Xiaobo Li for reporting the issue.
If I got the problem correctly, I want to propose a solution for it:
In the method specified in your post, we can try something like:
acceptable_values = list(range(3, any desired range))
if segement_size in acceptable_values:
#continue with program
else:
#return error saying that the FAD uses a default 3Hz resolution for smoothing and that you repeat input in the range(3, any desired range)
I can work on it as a future task if you are okay with this solution, professor @matteobachetti
@mohamedmostafadawood I just think that we have to improve the docs :)
@mohamedmostafadawood I just think that we have to improve the docs :)
Okay, thanks.
@matteobachetti , I think that a good rule of thumb would be to put the segment_size atleast 16 as then for the default 3bins/Hz, we average on close to 50 bins for smoothening. I also tried this empirically for the example given on FAD_notebook.
Fixed in https://github.com/StingraySoftware/notebooks/commit/b7f390843a700631d00e2799ab495b6dc915f989