Skip to main content

Scatfit: Scattering fits of time domain radio signals (Fast Radio Bursts or pulsars)

PyPI latest release Documentation GitHub issues License - MIT Paper link arXiv link

This repository contains code to fit Fast Radio Burst or pulsar profiles to measure scattering and other parameters. The code is mainly developed for Python 3, but Python 2 from version 2.7 onwards should work fine.

Author

The software is primarily developed and maintained by Fabian Jankowski. For more information feel free to contact me via: fabian.jankowski at cnrs-orleans.fr.

Paper

The corresponding paper (Jankowski et al. 2023, MNRAS) is available via this NASA ADS link.

Citation

If you make use of the software, please add a link to this repository and cite our corresponding paper. See above and the CITATION and CITATION.bib files.

The code is also listed in the Astrophysics Source Code Library (ASCL).

Installation

The easiest and recommended way to install the software is through pip from the central PyPI index by running:

pip install scatfit

This will install the latest release and all its dependencies. If you need a more recent version of the software, install it directly from its GitHub software repository. For instance, to install the master branch of the code, use the following command:

pip install git+https://github.com/fjankowsk/scatfit.git@master

This will also automatically install all dependencies.

Please verify that your installation works as expected by downloading a pre-generated SIGPROC filterbank file with synthetic data that comes bundled with the GitHub repository:

wget https://github.com/fjankowsk/scatfit/raw/master/extra/fake_burst_500_DM.fil

Then run the main analysis on the filterbank data file like this:

scatfit-fitfrb fake_burst_500_DM.fil 500.0 --fitscatindex --fscrunch 128 --fast

You should see several diagnostic windows open. The terminal output should show an updated DM close to 500 pc cm$^{-3}$, a scattering index near -4.0, and a scattering time at 1 GHz of about 20 ms.

Documentation

Further documentation of the software is available on our dedicated Read the docs website.

Usage

$ scatfit-fitfrb -h
usage: scatfit-fitfrb [-h] [--compare] [--binburst bin] [--fscrunch factor] [--tscrunch factor] [--fast] [--fitrange start end]
                      [--fitscatindex]
                      [--smodel {unscattered,scattered_isotropic_analytic,scattered_isotropic_convolving,scattered_isotropic_bandintegrated,scattered_isotropic_afb_instrumental,scattered_isotropic_dfb_instrumental}]
                      [--showmodels] [--snr snr] [--publish] [-z start end]
                      filename dm

Fit a scattering model to FRB data.

positional arguments:
  filename              The name of the input filterbank file.
  dm                    The dispersion measure of the FRB.

options:
  -h, --help            show this help message and exit
  --compare             Fit an unscattered Gaussian model for comparison. (default: False)
  --binburst bin        Specify the burst location bin manually. (default: None)
  --fscrunch factor     Integrate this many frequency channels. (default: 256)
  --tscrunch factor     Integrate this many time samples. (default: 1)
  --fast                Enable fast processing. This reduces the number of MCMC steps drastically. (default: False)
  --fitrange start end  Consider only this time range of data in the fit. Increase the region for wide or highly-scattered bursts.
                        Ensure that most of the scattering tail is included in the fit. (default: [-200.0, 200.0])
  --fitscatindex        Fit the scattering times and determine the scattering index. (default: False)
  --smodel {unscattered,scattered_isotropic_analytic,scattered_isotropic_convolving,scattered_isotropic_bandintegrated,scattered_isotropic_afb_instrumental,scattered_isotropic_dfb_instrumental}
                        Use the specified scattering model. (default: scattered_isotropic_analytic)
  --showmodels          Show comparison plot of scattering models. (default: False)
  --snr snr             Only consider sub-bands above this S/N threshold. (default: 3.8)
  --publish             Output plots suitable for publication. (default: False)
  -z start end, --zoom start end
                        Zoom into this time region. (default: [-50.0, 50.0])
$ scatfit-simpulse -h
usage: scatfit-simpulse [-h]

Simulate scattered pulses.

options:
  -h, --help  show this help message and exit

Profile scattering models

Several profile scattering models, i.e. pulse broadening functions and instrumental contributions, are implemented and others can easily be added. The image below shows a selection of them.

Implemented profile scattering models

Example output

The images below show some example output from the program obtained when fitting simulated filterbank data.

Profile fit

Width scaling

Correlations

Metadata

Release files for scatfit 0.2.21

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

Source distribution (sdist)

Source distribution for scatfit 0.2.21
File Size Uploaded
scatfit-0.2.21.tar.gz 24.3 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for scatfit 0.2.21
File
scatfit-0.2.21-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
scatfit-0.2.21-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
scatfit-0.2.21-cp310-cp310-macosx_13_0_arm64.whl CPython 3.10 CPython 3.10 macOS 13.0+ ARM64 Details
scatfit-0.2.21-cp310-cp310-macosx_12_0_x86_64.whl CPython 3.10 CPython 3.10 macOS 12.0+ x86-64 Details
scatfit-0.2.21-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
scatfit-0.2.21-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details
scatfit-0.2.21-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 Details

Total release size: 2.7 MB

Release files / scatfit-0.2.21.tar.gz

Download URL scatfit-0.2.21.tar.gz
Size 24.3 kB
Tags Source
SHA-256 checksum
How to use checksums
eb3559be8a1ee7c765fd09f8f9bee9776b7e8fcd933b4d78c52495d3656ed3e1
BLAKE2b-256 checksum
How to use checksums
0840ff59c7efe9c824e5102d6fdba15e957b695463780eba6425c1e44f2cc510
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.13

Release files / scatfit-0.2.21-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL scatfit-0.2.21-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 519.2 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
788f32f162472888d760510d631cb000ceb60da9cf23600f0436c0730bfd3196
BLAKE2b-256 checksum
How to use checksums
3d423c6e66a98ef0f220304745e77498e534f8c3e56c575cf554188244d75d72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / scatfit-0.2.21-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL scatfit-0.2.21-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 481.9 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
fceadb969f01474257f5232ecde9db0285aa8f5be7da368cabc234b1c06a555c
BLAKE2b-256 checksum
How to use checksums
8a046f4b2c32d7af4103291a1ec6f200e938234d9cb71c5a42ea3da1ca5fbe8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / scatfit-0.2.21-cp310-cp310-macosx_13_0_arm64.whl

Download URL scatfit-0.2.21-cp310-cp310-macosx_13_0_arm64.whl
Size 101.1 kB
Tags CPython 3.10 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
ccad67fbdccbf46fc6e9b139e2a520bef7073ea41d2adaf8e26fd22e9ff5fcc0
BLAKE2b-256 checksum
How to use checksums
d7f933c89119995f4a4effd22688a8c2f6d9596af0397120788bc5011026afe9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.13

Release files / scatfit-0.2.21-cp310-cp310-macosx_12_0_x86_64.whl

Download URL scatfit-0.2.21-cp310-cp310-macosx_12_0_x86_64.whl
Size 105.8 kB
Tags CPython 3.10 macOS 12.0+ x86-64
SHA-256 checksum
How to use checksums
1e00152faab2f43a58bc0ccbc26082ef03abb9cfb731cbd30f43fb269a3b666f
BLAKE2b-256 checksum
How to use checksums
7c68cff7f0b790ffc75855503f3ad087eec623a1238d15687b8a53c58de81815
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.13

Release files / scatfit-0.2.21-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL scatfit-0.2.21-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 484.4 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
c9c9324df55d7b4489254f7e2f33ba775b355c41f1dcc5aeb89f28ea1494ed97
BLAKE2b-256 checksum
How to use checksums
b14d5ad7d65e4259b8576758ddfcc4d59c46ceae1d890cc9d3b135c361e31f6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / scatfit-0.2.21-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL scatfit-0.2.21-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 488.9 kB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
4ff6d2ead0e7379aafb47d069dfee9c884964b1feb8778cd6512d8bf6040af30
BLAKE2b-256 checksum
How to use checksums
d247f29c9b1e066efc75a33b9ecbbc22377219758b124403297071fae3c494a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / scatfit-0.2.21-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL scatfit-0.2.21-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 455.8 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
60fcf77b4036906b719191effd8fae5a78ab5f6a07989ac0ca512f3fa56f6d6f
BLAKE2b-256 checksum
How to use checksums
e91e6703f7639393b86376bd2bb7366be9d1984becb6d1b15cc32ac33985ae78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.2.21 This release

8 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