Skip to main content

tools to process the lofar solar data

Project description

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}
}

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

type3detect-0.0.3.tar.gz (7.2 kB view details)

Uploaded Source

File details

Details for the file type3detect-0.0.3.tar.gz.

File metadata

  • Download URL: type3detect-0.0.3.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for type3detect-0.0.3.tar.gz
Algorithm Hash digest
SHA256 62c2eed2fa2855837ab80ddf225864b57b29299ff0f28bdf58ce00bd4322dbe4
MD5 564664823547663788b51be735ea8bc7
BLAKE2b-256 9b551e7ef84441ec8b7693933e5a5e05abb7ad13ac87096d453008f3d36f259b

See more details on using hashes here.

Provenance

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