stingray icon indicating copy to clipboard operation
stingray copied to clipboard

Issue in QPO phase lag function implementation

Open Gaurav17Joshi opened this issue 2 years ago • 4 comments

I was reading up the paper Ingram 2016, where the formula for finding the phase offsets of the first two harmonics of a QPO (for some energy band E), was given as: $\phi_1 (E) = \phi_1+ \Delta_1(E)$ , $\phi_2 (E) = 2(\phi_1 + \psi) + \Delta_2(E)$ , In our implementation in stingray, we are using a different formulae which replaces the second equation with $\phi_2 (E) = 2(\phi_1 (E) + \psi) + \Delta_2(E)$ , this was the equation given in the paper Ingram 2015 , but it is claimed in Ingram 2016 (page 4), that there is a mistake in the Ingram 2015 paper's equation.

@matteobachetti , @dhuppenkothen, please look into it and clarify if it is an error or a deliberate implementation decision.

This is implemented in spectroscopy.py. I have tested the code for the new equation and it produces significantly different waveforms than the current implementation.

Gaurav17Joshi avatar Mar 10 '23 21:03 Gaurav17Joshi

I'd be happy to work on this - I've checked Ingram 2016 and they do say that the equation from Ingram 2015 is incorrect.

noirzette avatar Mar 31 '23 08:03 noirzette

@noirzette, thanks, but I think @Gaurav17Joshi has already started working on it

matteobachetti avatar Mar 31 '23 13:03 matteobachetti

Hi, @matteobachetti , the fix for this issue is just a trivial two line change, but my main issue is whether this is required in the stingray library, or was the choice to use Ingram 2015 papers formulae over the latest one a deliberate design decision.

Gaurav17Joshi avatar Mar 31 '23 13:03 Gaurav17Joshi

This was part of a previous GSoC program, and I think it was just a matter of not realizing the formula had changed in a subsequent paper.

matteobachetti avatar Mar 31 '23 13:03 matteobachetti