Skip to content

Commit

Permalink
allow centering in pypav
Browse files Browse the repository at this point in the history
  • Loading branch information
mtlam committed Apr 24, 2023
1 parent cb2bb9e commit e9edf9f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -16,7 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Removed unnecessary reference to `scipy.fftpack`, which is in legacy.
- Default behavior of `DynamicSpectrum`'s `getData()` now has `remove_baseline=False` and the internal data array is returned as is.
- Improved error handling on loading a PSRFITS file. PyPulse first checks to see if the file exists, then if it fails in `pyfits.open()`, raises an exception noting the problem lies internally there.

- `pypav` script allows for centering of the pulse in the format of `pav` with the `-C` flag.

### Added

Expand Down
10 changes: 6 additions & 4 deletions pypulse/scripts/pypav
Expand Up @@ -25,14 +25,15 @@ parser.add_argument('-T',action='store_true',
parser.add_argument('-p',action='store_true',
help='Add all polarizations together')


parser.add_argument('-C',action='store_true',
help='Center the pulse at a phase of 0.5')

parser.add_argument("filename",
help='Filename required')


args = parser.parse_args()
print args
print(args)

ar = Archive(args.filename,prepare=False)
# Pre-processing
Expand All @@ -45,6 +46,9 @@ if args.T:
if args.F:
ar.fscrunch()

if args.C:
ar.center()

# Plotting
if args.D:
ar.plot()
Expand All @@ -54,5 +58,3 @@ elif args.Y:
ar.pavplot()
elif args.waterfall:
ar.waterfall()


0 comments on commit e9edf9f

Please sign in to comment.