Skip to main content

Fix dead time distortion of pulse profiles

docs/images/simulate_corr.jpg

Installation

pip install pulse_deadtime_fix

Or, to install the development version

pip install git+https://github.com/matteobachetti/pulse_deadtime_fix.git

Usage

Here is a simple example of how to correct the dead time distortion of a pulse profile. The data in the example are from the Crab pulsar, observed with NuSTAR (ObsID 10302001004).

Note: This technique will not work if the FITS event list does not have a PRIOR column indicating the livetime since the last event.

The following ephemeris from the Jodrell Bank Observatory is used to fold the data:

PSRJ            J0534+2200
RAJ             05:34:31.973
DECJ            +22:00:52.06
PEPOCH           58011.000000379725
F0               29.6384226073
F1               -3.6865813e-10
F2               9.171123484933526e-21
TZRMJD           58012.000000349
TZRSITE          0
TZRFRQ          0
EPHEM           DE200
UNITS           TDB
CLK             TT(TAI)

At this point, it is sufficient to calculate the folded profile as follows:

And the comparison between the raw and the corrected profile (in arbitrary units) is:

docs/images/crab_deadtime_corr.jpg

License

This project is Copyright (c) Matteo B and licensed under the terms of the BSD 3-Clause license. This package is based upon the Openastronomy packaging guide which is licensed under the BSD 3-clause licence. See the licenses folder for more information.

Contributing

We love contributions! pulse_deadtime_fix is open source, built on open source, and we’d love to have you hang out in our community.

Imposter syndrome disclaimer: We want your help. No, really.

There may be a little voice inside your head that is telling you that you’re not ready to be an open source contributor; that your skills aren’t nearly good enough to contribute. What could you possibly offer a project like this one?

We assure you - the little voice in your head is wrong. If you can write code at all, you can contribute code to open source. Contributing to open source projects is a fantastic way to advance one’s coding skills. Writing perfect code isn’t the measure of a good developer (that would disqualify all of us!); it’s trying to create something, making mistakes, and learning from those mistakes. That’s how we all improve, and we are happy to help others learn.

Being an open source contributor doesn’t just mean writing code, either. You can help out by writing documentation, tests, or even giving feedback about the project (and yes - that includes giving feedback about the contribution process). Some of these contributions may be the most valuable to the project as a whole, because you’re coming to the project with fresh eyes, so you can see the errors and assumptions that seasoned contributors have glossed over.

Note: This disclaimer was originally written by Adrienne Lowe for a PyCon talk, and was adapted by pulse_deadtime_fix based on its use in the README file for the MetPy project.

Metadata

Release files for pulse-deadtime-fix 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pulse-deadtime-fix 0.1
File Size Uploaded
pulse_deadtime_fix-0.1.tar.gz 98.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pulse-deadtime-fix 0.1
File Interpreter ABI Platform
pulse_deadtime_fix-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 199.3 kB

Release files / pulse_deadtime_fix-0.1.tar.gz

Download URL pulse_deadtime_fix-0.1.tar.gz
Size 98.6 kB
Tags Source
SHA-256 checksum
How to use checksums
71cb07394b32e76be371db36a0319bbab51f5a2a74e57a2455f3a8abf1d8a532
BLAKE2b-256 checksum
How to use checksums
65f3e9956f1a52d9870d8ca62c3ea6705653803be34d137c4b11f5716a539de9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / pulse_deadtime_fix-0.1-py3-none-any.whl

Download URL pulse_deadtime_fix-0.1-py3-none-any.whl
Size 100.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed4b90569818de4c1288775c1e102cdc327ceab5e82c8f872c177b522c03d168
BLAKE2b-256 checksum
How to use checksums
32bb85194d606e8e5bf12e4aef21a1c7e943a977677999fdd3e5747a9fb6e730
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page