Skip to content

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.

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

@abhisrkckl
Copy link
Contributor

Shall I merge this? The changes look OK to me.

@abhisrkckl abhisrkckl merged commit fd147b2 into nanograv:master Nov 14, 2024
6 checks passed
@devbhakt devbhakt deleted the designmatrix_eo branch December 17, 2024 15:44
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