PyPulse
A pure-Python package for handling and analyzing PSRFITS files.
Read the documentation here.
This is an alternate code base from PSRCHIVE.
Requires:
python 2.7 or 3.X
numpy
scipy
matplotlib
astropy
Archive
A class for loading PSRFITS files
Usage:
ar = Archive(FILENAME) #loads archive, dedispersed and polarization averaged by default
ar.tscrunch() #averages the pulse in time
data = ar.getData() #returns the numpy data array for use by you
ar.imshow() #plots frequency vs phase for the pulses
SinglePulse
A class for handling calculations on single pulses
Usage:
sp = SinglePulse(data,windowsize=256) #will auto-calculate an offpulse region of length 256 bins
print sp.getFWHM() #prints the FWHM of the pulse
print sp.getSN() #prints a crude S/N of the pulse
print sp.fitPulse(template_array)[5] #prints a better S/N of the pulse using a template array
DynamicSpectrum
A class for handling dynamic spectra
Usage:
ds = DynamicSpectrum(FILENAME) #takes a 2D data array or a string to a .npz file for now
acf2d = ds.acf2d() #calculates the 2D ACF of the dynamic spectrum
ds.imshow() #plots the dynamic spectrum
ds.save(NEWFILENAME) #saves to a .npz file, which can then be loaded again with the first line
Par
A class for parsing pulsar parameter files
Usage:
p = Par(FILENAME)
print p.getPeriod() #prints the period in the par file (does not calculate for a specific MJD for now)
t,dmx,dmxerr = p.getDMseries() #returns the DM parameters in a nice time-series. Note that errors are those given in the par file, which may not be the "correct" ones (more info to be provided later)
print p.get("PX") #prints the parallax
print p.get("PX",error=True) #prints the error on the parallax
Tim
A class for parsing pulsar TOA files
Usage:
t = Tim(FILENAME) #automatically parses each TOA with the TOA() class
print t.toas[0].getMJD() #prints the MJD of the first TOA as a python Decimal
print t.toas[0].get('snr') #prints the value of the -snr flag of the TOA if it is available
Citations
See http://ascl.net/1706.011. You can cite as:
Lam, M. T., 2017, PyPulse, Astrophysics Source Code Library, record ascl:1706.011
Metadata
Release files for PyPulse 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pypulse-0.1.2.tar.gz | 62.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pypulse-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 125.9 kB
Release files / pypulse-0.1.2.tar.gz
| Download URL | pypulse-0.1.2.tar.gz |
|---|---|
| Size | 62.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4904d46557426625b374a9c87d96c31f0c25258c74696d944d2371ea30877b8b
|
|
BLAKE2b-256 checksum How to use checksums |
77b7b5ae334aec54387bce166c1e98941bcbdf66eabca2c49ca15475ec72d5f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.2
|
Release files / pypulse-0.1.2-py3-none-any.whl
| Download URL | pypulse-0.1.2-py3-none-any.whl |
|---|---|
| Size | 63.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e09c01c217d25f82211cc8349548f686290268dc715566b01632ea001e002a41
|
|
BLAKE2b-256 checksum How to use checksums |
b809126e456a9a96113c135c281d1085e45ce6fab8a851e6a93bd4292160b6a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.2
|