-
Notifications
You must be signed in to change notification settings - Fork 167
Shift and add #849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shift and add #849
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #849 +/- ##
==========================================
+ Coverage 96.08% 96.11% +0.03%
==========================================
Files 48 48
Lines 9292 9371 +79
==========================================
+ Hits 8928 9007 +79
Misses 364 364 ☔ View full report in Codecov by Sentry. |
Other than the minor docstring comment, it is not immediately obvious to me (even from reading Mariano's paper) how exactly the new frequency axis is defined - e.g. in your example the new Frequency bins end up being [0.05 0.15 0.25 0.35 0.45] and I don't quite understand why. Maybe clarify that in the docstring (e.g. from "Array of output frequencies" to "array of output frequencies defined so and so"). Other than that, I think this is the kind of feature that should be documented explicitely in the dynamical powerspectrum section of the readthedocs. |
@matteolucchini1 I fixed the docstrings are requested. I also opened an Issue in the notebooks repository in order to add the tutorial in the the dynamical power spectrum notebook: StingraySoftware/notebooks#104 |
I have no further comments (other than the obvious fix of the broken link in the automatic doc checks). Before merging I would prefer if we could update the docs though. Can we think of a "standard" NICER/NuSTAR observation to get started? |
3d703bb
to
fc6d568
Compare
@matteolucchini1 there you go: StingraySoftware/notebooks#105 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM no further comments
Basic implementation of the shift-and-add technique from Mendez+1998
Guide for review: the basic mechanism is in
fourier.py
, the examples in the doctests should be self-explanatory. InDynamicalCrossspectrum
andDynamicalPowerspectrum
, I just wrap the same functionality in convenient methods that unpack the relevant information from the dynamical spectra and use the function infourier.py
.Example: if a QPO is changing its frequency during our observation

we can think of tracing its maximum (e.g. with

dcs.trace_maximum()
, here I did it by hand):and then applying shift_and_add to improve signal-to-noise and, maybe, detect a second QPO:
