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

Add an nbin option to photonphase #1863

Merged
merged 2 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG-unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ the released changes.
### Changed
- Updated the `plot_chains` function in `event_optimize` so that the subplots are a fixed size to prevent the subplots from being condensed in the case of many fit parameters.
### Added
- Added an option `nbin` to `photonphase` to decide how many phase bins to use for the phaseogram
- Added an option `linearize_model` to speed up the photon phases calculation within `event_optimize` through the designmatrix.
- Added AIC and BIC calculation to be written in the post fit parfile from `event_optimize`
- When TCB->TDB conversion info is missing, will print parameter name
Expand Down
5 changes: 4 additions & 1 deletion src/pint/scripts/photonphase.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ def main(argv=None):
help="Logging level",
dest="loglevel",
)
parser.add_argument(
"--nbin", help="Number of phase bins in the phaseogram", default=100, type=int
)
parser.add_argument(
"-v", "--verbosity", default=0, action="count", help="Increase output verbosity"
)
Expand Down Expand Up @@ -254,7 +257,7 @@ def main(argv=None):
print("Htest : {0:.2f} ({1:.2f} sigma)".format(h, h2sig(h)))

if args.plot:
phaseogram_binned(mjds, phases, bins=100, plotfile=args.plotfile)
phaseogram_binned(mjds, phases, bins=args.nbin, plotfile=args.plotfile)

# Compute orbital phases for each photon TOA
if args.addorbphase:
Expand Down
Loading