-
Notifications
You must be signed in to change notification settings - Fork 101
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
Chromatic delay similar to dispersion delay #1616
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1616 +/- ##
==========================================
- Coverage 69.43% 69.17% -0.26%
==========================================
Files 107 107
Lines 24925 25028 +103
Branches 4430 4455 +25
==========================================
+ Hits 17306 17314 +8
- Misses 6510 6591 +81
- Partials 1109 1123 +14 ☔ View full report in Codecov by Sentry. |
Should there be a DMX version of this? |
Yes. I am also planning to do a piecewise model (like DMX), a Fourier model (like DMWaveX). and a GP model (like PLDMNoise). |
Good. Will those be separate or part of this? |
I'll do them separately. |
OK... I have compared the code carefully with TEMPO2 and it matches as far as I can tell. Unfortunately, I couldn't actually do the comparison with tempo2 due to what I suspect is a bug in tempo2. Basically, the post-fit values for CM are not displayed on the terminal or written into an output par file. I have raised this issue in the IPTA slack. For the time being I think this is ready for review. |
Also, I have removed the chromatic index fitting code since it was not working consistently. This is probably because there is too much covariance with DM when the chromatic index is allowed to vary. |
Looks good. I don't see a test with a fit for CM1, though. Is that possible? Similarly, would it make sense to do a fit for CM with alpha=-2 and show that it reproduces the DM fit? |
Added both. |
@dlakaplan I am done unless there is any other suggestion. |
This PR defines a chromatic delay (
ChromaticCM
) using CM, CM1, CM2, etc. similar toDispersionDM
.The delay is given by the following expression (consistent with tempo2):
cm * DMconst * (freq / 1 MHz)**(-alpha)
The chromatic index alpha is called TNCHROMIDX and it is a constant in time in this model.
I have also defined an abstract base class
Chromatic
similar toDispersion
so that piecewise-constant CM similar toDispersionDMX
can be implemented in the future.Partially implements #1661