-
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
design matrix uses a fixed F0 #1331
Comments
I seem to recall a number of issues like this. I feel like I fixed one or two, but I definitely didn't look exhaustively. There's the |
There can be headaches in fitting when uncertainties are converted between phase and time using fitted parameters F0, F1, ... - for one thing our derivatives of chi-squared with respect to these parameters become wrong. Convergence can also get weird - if twiddling a parameter rescales the errors, well, maybe there's a way to make the errors super small. But of course Paul is right that when the spin frequency changes substantially over the observation span we need to be more careful which value we use. There was a suggestion that a "reference F0" could be in the par file and used for some calculations but not modified during fitting. Possibly this could be extended to include reference values of F1, ... . There might also be performance implications - an accurate calculation of the pulsar spin frequency at a certain time could be expensive if it's supposed to be the observed frequency - do we include the Doppler shifts from orbital motion? I do think it makes sense to have a single function for converting phase to frequency, that accepts options for several possibilities (use a reference F0, use full observed spin frequency, ...). Then at least we could easily audit the places it was used and discuss carefully what the right option was for each of those cases. |
There was some earlier discussion here: #866 |
|
But I think that function should be moved to |
Indeed, what you need for a |
Just to let people know, I'm going to move and improve |
I'm working on updating random models to use the design matrix and while testing that, I noticed small differences with the current "exact" calculation which subtracts residuals.
In
timing_model.py
, thedesignmatrix()
method, which we use in our fitters, currently converts from phase to time simply by dividing bym.F0.value
. For MSPs, this is likely fine, but for young pulsars, as @paulray has mentioned in the past, this can cause fairly large differences.Anyone know if there is a reason why the design matrix is this way? Is this compatible with Enterprise's use of the design matrix?
I'm happy to fix this (and potentially give the user an option of return the matrix in term of phase or time) if we agree that it is not the behavior that we should have.
The text was updated successfully, but these errors were encountered: