Distribution fitting tools.
Project description
FitPDF: Distribution fitting tools
This repository contains software to fit complex distribution models to observational data. This is useful for modelling pulse-energy distributions of radio pulsars or repeating fast radio bursts (FRBs). However, the software can fit any distribution data.
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 is currently in preparation.
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.
Installation
The easiest and recommended way to install the software is via the Python command pip directly from the fitpdf GitHub software repository. For instance, to install the master branch of the code, use the following command:
pip install git+https://github.com/fjankowsk/fitpdf.git@master
This will automatically install all dependencies. Depending on your Python installation, you might want to replace pip with pip3 in the above command.
The latest stable version of the code should also be available on the Python package index PyPI.
Usage
$ fitpdf-compare -h
usage: fitpdf-compare [-h] [-o] files [files ...]
Compare fits.
positional arguments:
files Names of files to process. The input files must be InferenceData files produced by fitpdf-fit.
options:
-h, --help show this help message and exit
Output formatting:
-o, --output Output plots to file rather than to screen. (default: False)
$ fitpdf-fit -h
usage: fitpdf-fit [-h] [--fast] [--labels name [name ...]] [--mean value] [--meanthresh value] [--model {NL,NN,NNL}] [--ccdf] [--log] [--nbin value] [-o] [--title text] filename
Fit distribution data.
positional arguments:
filename Name of file to process. The input file must be produced by the fluence time series option of plot-profilestack.
options:
-h, --help show this help message and exit
--fast Enable fast processing. This reduces the number of MCMC steps drastically. (default: False)
--labels name [name ...]
The labels to use for each input file. (default: None)
--mean value The global mean fluence to divide the histograms by. (default: 1.0)
--meanthresh value Ignore fluence data below this mean fluence threshold, i.e. select only data where fluence / mean > meanthresh. (default: -3.0)
--model {NL,NN,NNL} Use the specified distribution model, where N denotes a Normal and L a Lognormal component. For instance, the default NNL model consists of two Normal and one Lognormal distributions.
(default: NNL)
--title text Set a custom figure title. (default: None)
Output formatting:
--ccdf Show the CCDF (cumulative counts) instead of the PDF (differential counts). (default: False)
--log Show histograms in double logarithmic scale. (default: False)
--nbin value The number of histogram bins to use. (default: 50)
-o, --output Output plots to file rather than to screen. (default: False)
$ fitpdf-simulate -h
usage: fitpdf-simulate [-h] [--nsamp value] [-o]
Simulate distributions.
options:
-h, --help show this help message and exit
--nsamp value Number of random samples to draw from the simulated distribution. (default: 10000)
Output formatting:
-o, --output Output plots to file rather than to screen. (default: False)
Example output
The images below show some example output from the program obtained when fitting simulated test data.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fitpdf-0.4.2.tar.gz.
File metadata
- Download URL: fitpdf-0.4.2.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9642d20ed3bf92856b350e1755f32bdee2d6bcd1d205ed841cb5faf16621cbff
|
|
| MD5 |
28bcce6aa269c16b2bce1ca64dc6b430
|
|
| BLAKE2b-256 |
b1270f3d494f85f5915b9ac8ea48528ae3917e40a55737523f6d8e09ab3623cf
|
File details
Details for the file fitpdf-0.4.2-py3-none-any.whl.
File metadata
- Download URL: fitpdf-0.4.2-py3-none-any.whl
- Upload date:
- Size: 22.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a63f341c73dfd5ade7b9309d6d9317e6440e8081e4fbc3c0b3a293e4a75ec81
|
|
| MD5 |
bed39ab2637654bbc86def7b5661307e
|
|
| BLAKE2b-256 |
662b389b8117f13d37bed547308b2e28f7e5cef7650a542cb9eab376cb4db3c9
|