Skip to main content

Type III Radio Burst Automatic Recognition Algorithm

The automatic recognition of the Type III radio burst using Hough Transform.

Installation

Python

install from pypi

pip install type3detect

install from git

git clone https://github.com/peijin94/type3detect.git
cd src/python
python pip install .

Matlab:

git clone https://github.com/peijin94/type3detect.git
cd src/matlab

Example

Read fits file and detect type III radio bursts in dynamic spectrum.

import matplotlib.dates as mdates
import matplotlib.pyplot as plt
import numpy as np

from type3detect import detectRadioburst as drb
from type3detect import radioTools as rt

fname  = './LOFAR_20220701_070000_LBA_OUTER_S0.fits'

# preprocess
(dyspec,t_fits,f_fits,hdu) = drb.read_fits(fname) # read LOFAR dynspec fits
(dyspec,f_fits) = drb.cut_low(dyspec,f_fits,f_low_cut_val=30) # remove below freq (RFI)
(data_fits_new,data_fits_new_smooth) = drb.preproc(dyspec,gauss_sigma=1.5)

# binarization
bmap = drb.binarization(data_fits_new,N_order=6,peak_r=1.002)

# detect verticle features
lines = drb.hough_detect(bmap,dyspec,threshold=40,line_gap=10,line_length=30,
            theta=np.linspace(np.pi/2-np.pi/8,np.pi/2-1/180*np.pi,300))
line_sets = drb.line_grouping(lines)

# get electron beam information from radio bursts
(v_beam, f_range_burst, t_range_burst, model_curve_set,
     t_set_arr_set,f_set_arr_set,t_model_arr,f_model_arr
    )= drb.get_info_from_linegroup(line_sets,t_fits,f_fits)

# detailed demo in ./type3detect_demo.ipynb

Example: Implementation with for LOFAR dynamic spectrum.

Demo Notebook: type3detect_demo.ipynb

img

Binarization

Use several ways to transform the flux intensity data into binary. (LocalMax(matlab)) (binarization(Python))

Active-Contour method for Backbone

The Active Contour Method for the backbone of the radio burst (ACBone)

Take the result of the Hough transform as a initail position and iteratively move the line to find the backbone position. The demo code : (ACBone-Matlab, ACBone-Python)

img

Eventually, we can obtain the centerline of a Type III radio burst.

Citation

Make sure to cite the paper if you use the idea or code in this repo: A type III radio burst automatic analysis system and statistic results for a half solar cycle with Nançay Decameter Array data Peijin Zhang. A&A 2018.10

bibtex:

@article{zhang2018type,
  title={A type III radio burst automatic analysis system and statistic results for a half solar cycle with Nan{\c{c}}ay Decameter Array data},
  author={Zhang, PJ and Wang, Chuan Bing and Ye, Lin},
  journal={Astronomy \& Astrophysics},
  volume={618},
  pages={A165},
  year={2018},
  publisher={EDP Sciences}
}

Release files for type3detect 0.0.3

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

Source distribution (sdist)

Source distribution for type3detect 0.0.3
File Size Uploaded
type3detect-0.0.3.tar.gz 7.2 kB Details

Release files / type3detect-0.0.3.tar.gz

Download URL type3detect-0.0.3.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
62c2eed2fa2855837ab80ddf225864b57b29299ff0f28bdf58ce00bd4322dbe4
BLAKE2b-256 checksum
How to use checksums
9b551e7ef84441ec8b7693933e5a5e05abb7ad13ac87096d453008f3d36f259b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file

0.0.2

1 release file

0.0.1

1 release file

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