Previous topic

pycrtools.crdatabase

Next topic

pycrtools.footprint

This Page

pycrtools.dedispersion

dedisperse_array(dynspec, DM, frequencies, ...) Dedipserse an array.
dedisperse_fitsimage(filename, DM, outfilename) Dedipserse a fits image.
freq_to_delay(DM, freq[, timeresolution]) This is a docstring, each function should have one.

This module provides function to do (incoherent) dedispersion.

pycrtools.dedispersion.dedisperse_array(dynspec, DM, frequencies, timeresolution)

Dedipserse an array. Returns an array with dedispersed values of the same length as the timeaxis of the array. Data will be dedispersed to the original time axis of the highest frequency.

dynspec Two dimensional numpy array. First axis frequency,
second axis time

DM Dispersion for which to dedisperse the data (in cm/pc^3) frequencies numpy array of frequency values of the frequency axis

of the dynspec

timeresolution Resolution of the time axis of the array

returns array with dedispersed data values

pycrtools.dedispersion.dedisperse_fitsimage(filename, DM, outfilename, nfreq_bands=1, integrationtime=1, rfimitigation=0, fstart=0, fend=None)

Dedipserse a fits image. Writes the dedispersed image to the 3rd argument. values of the same length as the timeaxis of the array. Data will be dedispersed to the original time axis of the highest frequency. Time axis should contain keyword “TIME” and be given in seconds, Frequency axis should contain keyword “FREQ”. “CTYPE#”, “CRVAL#” , “CRPIX#”, “CUNIT” and “CDELT#” are used to specify coordinates.

filename Name of image to dedisperse DM Dispersion for which to dedisperse the data (in cm/pc^3) outfilename Name to save the image to nfreq_bands Number of frequency bands for the dedisperse data integrationtime * Number of samples to integrate the image over *rfimitigation Cut values above (rfimitagation*mean_value ). Default = 0 means off. fstart Frequency number from which to start dedispersion (default=0) fend Frequency number up to which dedispersion should be performed (default=None, means till end)

>>> example:

filename=’/Users/STV/Astro/data/TBB/Crab/pulseNov2010/crab_pulse_image-20101104.fits’ outfilename=’/Users/STV/Astro/data/TBB/Crab/pulseNov2010/crab_pulse_movie_2.fits’ DM=56.8 nfrequencybands=3 # Makes 3 bands integrationtime=4 # samples rfimitigationlevel=4 # Cut off values above 4 * mean ( image ) fstart=0 fend=None

import dedispersion as dd

dd.dedisperse_fitsimage(filename,DM,outfilename,nfrequencybands,integrationtime, rfimitigationlevel, fstart, fend)

pycrtools.dedispersion.freq_to_delay(DM, freq, timeresolution=1)

This is a docstring, each function should have one.

DM Dispersion measure in cm / pc^3 freq Numpy vector of frequencies in Hz timeresolution Time resolution in seconds (default 1 sec) Examples (also for doctests): Returns list of delays in units of the provided timeresolution

>>> example_function(1,2)
(1, 2)