-
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
Phases calculation using the Designmatrix feature #1850
Conversation
src/pint/scripts/event_optimize.py
Outdated
parser.add_argument( | ||
"--calc_phase", | ||
help="Calculates the phase at each MCMC step using the designmatrix", | ||
default=False, | ||
action="store_true", | ||
dest="calc_phase", | ||
) |
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.
I suggest changing this option to "--linearize_model" or something like that. I don't think "--calc_phase" accurately reflects what it is doing.
src/pint/scripts/event_optimize.py
Outdated
@@ -862,6 +882,9 @@ def main(argv=None): | |||
# This way, one walker should always be in a good position | |||
pos[0] = ftr.fitvals | |||
|
|||
# How phase will be calculated at each step (either with the designmatrix or ) | |||
ftr.calc_phase = True if args.calc_phase else False |
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.
This can just be ftr.calc_phase = args.calc_phase
Please add a CHANGELOG entry |
Shall I merge this? The changes look OK to me. |
This adds in a calculation that using the designmatrix to calculate the phases of each photon during each step of the MCMC run in
event_optimize
. This leads to a dramatic speed up in the MCMC run.Here are some test runs I have done with real gamma-ray data. The samples line up well with the exception of the internal
PHASE
parameter that is written into the fitter withinevent_optimize
. This parameter is an internal parameter that serves as analogous to absolute phase and does not effect the timing model.