A package for filtering triggers from radio astronomical matched template pulse searches.
Project description
astro-trigger-filter
A Python package for filtering radio astronomical pulse matched template searches.
Installation
pip install astro-trigger-filter
Usage
First generate a set of random triggers, sorten on time:
import random
N = 1000
# Generate random trigger data
start_times = [random.uniform(0.0, 1.0) for _ in range(N)]
widths = [random.uniform(0.00, 0.01) for _ in range(N)]
DMs = [random.uniform(0.0, 100.0) for _ in range(N)]
SNRs = [random.uniform(5.0, 10.0) for _ in range(N)]
# Reformat data into a list of tuples
triggers = [t for t in zip(start_times, widths,DMs, SNRs)]
# Make sure the list is sorted on start time
# aditional reverse sorting on DM improves the effiency
triggers.sort(key=lambda tup: (tup[0], -tup[2]))
Now filter the triggers:
from astrotf.radio_pulse import RadioPulseFilterGen
freq_lo_mhz = 1249.8
freq_hi_mhz = 1549.8
# Itialize the filter generator
gen = RadioPulseFilterGen(freq_lo_mhz, freq_hi_mhz)
# Apply the filter to the list of triggers and print results
for filtered_trigger in gen(triggers):
print(filtered_trigger)
print('Filtered {} triggers out of a set of {}'.format(gen.num_out, gen.num_in))
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
Close
Hashes for astro-trigger-filter-0.1.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cd042ffc0a343171cb0b4f2739b800c32c8ce98de1c39bf00f6d76d886d8d98 |
|
MD5 | ac8d7f9a26bcf97c8321c2288a7e9242 |
|
BLAKE2b-256 | 4f98b2eb4a37474c836c37771e4c08ad30069351d6c5694250f318960c93c2f5 |
Close
Hashes for astro_trigger_filter-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51f881162ddbc3015e0e16bb2c1e700151464b30820860bca93419507121b625 |
|
MD5 | d03f4863c975faa5a70572ee94baae0f |
|
BLAKE2b-256 | 333685874009e1e2c2f5a528a396f740f0b434a5d18f370d63986657802bc5da |