Skip to main content

"Sweet, sweet candy-dates!"

Project description

The candies logo.

The font used in the above logo is Candyday by Billy Argel.


License Version

Python versions Interrogate

Stars Downloads Issues

Gitmoji Code style: black

Contents

Rationale

The SPOTLIGHT project is a multibeam, commensal survey for FRBs and pulsars soon to be undertaken at the GMRT. It is estimated that it will produce almost 1 PB worth of data per day[^1]. Therefore, it is obviously impossible for a mere human being, or even a group of them, to sift through and classify all the millions and billions of resulting FRB candidates. Thus, we plan to use FETCH, a ML/DL-based classifier. However, every classifier requires some features per candidate, for both training and classification. FETCH requires two features to classify candidates: their dedispersed dynamic spectrum, and their DM transform (DMT). The authors of FETCH recommend using utility scripts packaged with their associated library, your, to generate them: your_candmaker.py and your_h5plotter.py. However, these scripts were developed and tested using data taken from high-frequency telescopes, such as the VLA. Thus, for low-frequency data obtained via the GMRT, the features generated by these scripts proved to be sub-optimal (see the plot below). The scripts were also much slower than real time despite using the GPU.


DMT variation at the GMRT

Fig: Variation of the DM transform (DMT) over different frequency bands at the GMRT. From left to right, we are going from lower to higher frequency. For real signals, we expect a bow-tie pattern in the DMT, which becomes more and more difficult to observe at lower frequencies. Plots in the first row were created using your's your_candmaker.py, while plots in the second row were created via candies for the same exact bursts.


Thus, we decided to develop candies, our feature extraction library for FRB candidates. Primarily developed by me as a part of my (ongoing) PhD (and with the help of engineers from NVIDIA), it hopes to be a better and faster variant of your's scripts used for the same thing.

Features

candies plans to introduce the following features:

  • Zooming into the DMT (see plots above).
  • Dealing with band-limited bursts.
  • Support for GMRT's shared memory based ring buffers.

Currently, we only support processing data stored in the SIGPROC filterbank format, but support for additional formats might be added if there is any interest from the community at large.

Installation

candies is on PyPI, and hence can be installed by simply running:

pip install candies

In case you are interested in the cutting edge, you can also git clone and install it directly via Github:

git clone https://github.com/astrogewgaw/candies
cd candies
pip install -e .

where the -e flag is for an editable install; that is, any changes to the source code will reflect directly in your installation. If you don't want that, just remove the flag, or you can go ahead and use the more direct method:

pip install git+https://github.com/astrogewgaw/candies

Note: To get plotting working in candies, you will have to install proplot. It is recommended that you do not do so via PyPI (that is, do not do pip install proplot). Instead, use the following command to install proplot (for matplotlib v3.6 and above):

pip install git+https://github.com/proplot-dev/proplot.git@refs/pull/459/head

or (for matplotlib v3.5 and below):

pip install git+https://github.com/proplot-dev/proplot

This is due to several issues with the main branch of proplot (see #461, #451, #453, #451, #432, #418, and #309), which is incompatible with the latest versions of matplotlib and other packages. Installing from the as-of-yet-unmerged pull request above solves this issue. For matplotlib versions below v3.5, the main branch works fine. In case proplot is not installed, plotting will fail, and raise an error.

Quick Guide

For help with how to use candies, just type and run candies or candies --help. To process a list of FRB candidates stored as a CSV file, just use the command:

candies make /path/to/candidate/list

To see what additional options you can use, just type candies make --help. To plot one or several HDF5 files generated as output, just run:

candies plot /path/to/HDF5/files

Once more, type candies plot --help to see what options are available to you. Note that the plotting command will only work if you have proplot installed; see the note above regarding the same. You can also generate a list of candidates on the terminal, via:

candies list /path/to/HDF5/files

This command is useful is you just have a bunch of HDF5 files generated via candies, and you want to have a quick look at their details. You can also save these details as a CSV file, for later use.

[^1]: This is roughly equivalent to India's per day internet traffic!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

candies-0.1.1.tar.gz (944.5 kB view details)

Uploaded Source

Built Distribution

candies-0.1.1-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file candies-0.1.1.tar.gz.

File metadata

  • Download URL: candies-0.1.1.tar.gz
  • Upload date:
  • Size: 944.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for candies-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c17ffc1acecefce476501f41e80081202a2eea3aee5d0265d17d17bacf6c5dc7
MD5 8cbf43d8864d75ca2d1320f9896ac4b1
BLAKE2b-256 c6c7ff8c54fab8bd4d784f56739a39a51c34142bf512ab4cdf904e732a7f9179

See more details on using hashes here.

File details

Details for the file candies-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: candies-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for candies-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c2e58f2a4becb89b0f75a4a5c4b0700d59cea02f4f210f8500bc49571fc16393
MD5 b0ff3b24dbb7affb0e4b4899346cf369
BLAKE2b-256 412a9b0c3c4a86698d75a90e3d6607f8024acca6aadf90a6fc758fbfd5fd13c7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page