Skip to content

Commit

Permalink
Add an nbin option to photonphase
Browse files Browse the repository at this point in the history
Allow photonphase to plot a pulse profile with a custom number of bins, while maintaining the current value as default
  • Loading branch information
matteobachetti authored Nov 19, 2024
1 parent 725400d commit b9d1e71
Showing 1 changed file with 4 additions and 1 deletion.
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

0 comments on commit b9d1e71

Please sign in to comment.