Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

devbhakt
Copy link
Contributor

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 within event_optimize. This parameter is an internal parameter that serves as analogous to absolute phase and does not effect the timing model.
J1231_compare_samps_triangle
J2028_compare_samps_triangle

Comment on lines 702 to 708
parser.add_argument(
"--calc_phase",
help="Calculates the phase at each MCMC step using the designmatrix",
default=False,
action="store_true",
dest="calc_phase",
)
Copy link
Contributor

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.

@@ -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
Copy link
Contributor

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

@abhisrkckl
Copy link
Contributor

Please add a CHANGELOG entry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants