Program Manuals¶
Under development
ft_inject_pulsar¶
usage: ft_inject_pulsar [-h] -o OUTPUT [-p PULSE] [-S FLUX] [-i SIDX]
[--sidx-reffreq SIDX_REFFREQ] [-E PULSE_SIGMA]
[--pred PRED] [--f0 F0] [--f1 F1] [--f2 F2]
[--accn ACCN] [--pepoch PEPOCH] [-D DM] [-x]
[-c SCATTER_TIME] [-X SCATTER_INDEX]
[--scatter-reffreq SCATTER_REFFREQ] [-T SITE]
[--gain GAIN] [--tsys TSYS] [--rms RMS]
[--offset OFFSET]
input
Inject a pulsar signal into a filterbank file
positional arguments:
input Input filterbank file
optional arguments:
-h, --help show this help message and exit
-o OUTPUT, --output OUTPUT
Output file name
Pulse profile settings:
-p PULSE, --pulse PULSE
Pulse model type (sin, delta), or profile file to load
-S FLUX, --flux FLUX Phase averatge flux density (Jy)
-i SIDX, --sidx SIDX Spectral index
--sidx-reffreq SIDX_REFFREQ
Spectral index reference frequency (1400 MHz)
-E PULSE_SIGMA, --pulse-sigma PULSE_SIGMA
'sigma' for log-normal pulse intensity distribution
Pulse period settings:
--pred PRED Predictor or polyco for pulsar
--f0 F0 Pulse frequency for simple spin model
--f1 F1 Pulse freq 1st derivative for simple spin model
--f2 F2 Pulse freq 2nd derivative for simple spin model
--accn ACCN Pulse accelerationfor simple spin model (overrides F1)
--pepoch PEPOCH Epoch of somple spin model (default=centre)
Propagtion settings:
-D DM, --dm DM DM of injected pulsar
-x, --no-intra-chan-dm
Disable intra-channel DM
-c SCATTER_TIME, --scatter-time SCATTER_TIME
Scattering timescale
-X SCATTER_INDEX, --scatter-index SCATTER_INDEX
Scattering index
--scatter-reffreq SCATTER_REFFREQ
Scattering index reference frequency (default=1400MHz)
Telescope settings:
-T SITE, --site SITE Telescope description to use.
--gain GAIN Simulated telescope gain (K/Jy)
--tsys TSYS Simulated telescope tsys (K)
--rms RMS RMS in input data (default=auto)
--offset OFFSET Offset in input data default=auto)
usage: ft_inject_pulsar [-h] -o OUTPUT [-p PULSE] [-S FLUX] [-i SIDX]
[--sidx-reffreq SIDX_REFFREQ] [-E PULSE_SIGMA]
[--pred PRED] [--precision-pred] [--f0 F0] [--f1 F1]
[--f2 F2] [--accn ACCN] [--pepoch PEPOCH] [-D DM] [-x]
[-c SCATTER_TIME] [-X SCATTER_INDEX]
[--scatter-reffreq SCATTER_REFFREQ] [-T SITE]
[--gain GAIN] [--tsys TSYS] [--rms RMS]
[--offset OFFSET]
input
Inject a pulsar signal into a filterbank file
positional arguments:
input Input filterbank file
optional arguments:
-h, --help show this help message and exit
-o OUTPUT, --output OUTPUT
Output file name
Pulse profile settings:
-p PULSE, --pulse PULSE
Pulse model type (sin, delta), or profile file to load
-S FLUX, --flux FLUX Phase averatge flux density (Jy)
-i SIDX, --sidx SIDX Spectral index
--sidx-reffreq SIDX_REFFREQ
Spectral index reference frequency (1400 MHz)
-E PULSE_SIGMA, --pulse-sigma PULSE_SIGMA
'sigma' for log-normal pulse intensity distribution
Pulse period settings:
--pred PRED Predictor or polyco for pulsar
--precision-pred Call t2pred for every phase computation - slow
--f0 F0 Pulse frequency for simple spin model
--f1 F1 Pulse freq 1st derivative for simple spin model
--f2 F2 Pulse freq 2nd derivative for simple spin model
--accn ACCN Pulse accelerationfor simple spin model (overrides F1)
--pepoch PEPOCH Epoch of somple spin model (default=centre)
Propagtion settings:
-D DM, --dm DM DM of injected pulsar
-x, --no-intra-chan-dm
Disable intra-channel DM
-c SCATTER_TIME, --scatter-time SCATTER_TIME
Scattering timescale
-X SCATTER_INDEX, --scatter-index SCATTER_INDEX
Scattering index
--scatter-reffreq SCATTER_REFFREQ
Scattering index reference frequency (default=1400MHz)
Telescope settings:
-T SITE, --site SITE Telescope description to use.
--gain GAIN Simulated telescope gain (K/Jy)
--tsys TSYS Simulated telescope tsys (K)
--rms RMS RMS in input data (default=auto)
--offset OFFSET Offset in input data default=auto)
ft_scrunch¶
usage: ft_scrunch [-h] [-b BITS] [-N NORMALISE] [-c CHANS] [-s SAMPLES]
[-F FACTOR] [-D DC] [-O OFFSET] [-d DM] [-B BLOCKSIZE]
input output
'Scrunch' channels and/or samples in the input filterbank.
Output is scaled acording to the normalisation method and the supplied
scale factor. If scrunching by 's' samples and 'c' channels, with a
scale factor 'F', the result is
out[i] = sum(in[i:i+s][i:i+c]) * F / g + o
where:
g = c*s for 'mean' normalisation
g = sqrt(c*s) for 'sqrt' normalisation
g = 1.0 for 'sum' normalisation
and 'o' is a term to remove the addition of the DC offset, defined by
o = D - c*s*D*F/g
Note that o=0 if D=0, or in the case of mean normalisation (with F=1).
Generally mean normalisation is best to prevent overflowing small data
types, but 'sqrt' may better preserve weaker signals.
The values s,c,F,D can be set by the -s, -c, -F and -D options respectively.
This can also be useful to simply re-scale the data with c=1 and s=1.
If reducing number of bits, the output DC offset can also be set using the -O
option. E.g. to convert to 8-bit data to 2-bit data, one might try
$ ft_scrunch -F 0.02 -b 2 -O 1.5 8bit.fil 2bit.fil
to write 2-bit data with the mean at 1.5 and scaling by a factor of 0.02
positional arguments:
input Input filterbank file
output Output filterbank file
optional arguments:
-h, --help show this help message and exit
-b BITS, --bits BITS Output number of bits (default=same as input)
-N NORMALISE, --normalise NORMALISE
Normalisation method (default=mean)
-c CHANS, --chans CHANS
Number of adjacent channels to scrunch (default=1)
-s SAMPLES, --samples SAMPLES
Number of adjacent samples to scrunch (default=1)
-F FACTOR, --factor FACTOR
Scale factor (default=1)
-D DC, --dc DC DC offset (default=estimate)
-O OFFSET, --offset OFFSET
Output DC offset (default=input)
-d DM, --dm DM Remove DM before scrunching channels (default=don't)
-B BLOCKSIZE, --blocksize BLOCKSIZE
Set read block size
ft_scrunch_threads¶
usage: ft_scrunch_threads [-h] [-b BITS] [-N NORMALISE] [-c CHANS]
[-s SAMPLES] [-F FACTOR] [-D DC] [-O OFFSET] [-d DM]
[-B BLOCKSIZE] [-t THREADS]
[--thread-chunk-size THREAD_CHUNK_SIZE] [--no-refdm]
input output
'Scrunch' channels and/or samples in the input filterbank.
Output is scaled acording to the normalisation method and the supplied
scale factor. If scrunching by 's' samples and 'c' channels, with a
scale factor 'F', the result is
out[i] = sum(in[i:i+s][i:i+c]) * F / g + o
where:
g = c*s for 'mean' normalisation
g = sqrt(c*s) for 'sqrt' normalisation
g = 1.0 for 'sum' normalisation
and 'o' is a term to remove the addition of the DC offset, defined by
o = D - c*s*D*F/g
Note that o=0 if D=0, or in the case of mean normalisation (with F=1).
Generally mean normalisation is best to prevent overflowing small data
types, but 'sqrt' may better preserve weaker signals.
The values s,c,F,D can be set by the -s, -c, -F and -D options respectively.
This can also be useful to simply re-scale the data with c=1 and s=1.
If reducing number of bits, the output DC offset can also be set using the -O
option. E.g. to convert to 8-bit data to 2-bit data, one might try
$ ft_scrunch_threads -F 0.02 -b 2 -O 1.5 8bit.fil 2bit.fil
to write 2-bit data with the mean at 1.5 and scaling by a factor of 0.02
** This version is optimised for multi-threaded output **
positional arguments:
input Input filterbank file
output Output filterbank file
optional arguments:
-h, --help show this help message and exit
-b BITS, --bits BITS Output number of bits (default=same as input)
-N NORMALISE, --normalise NORMALISE
Normalisation method (default=mean)
-c CHANS, --chans CHANS
Number of adjacent channels to scrunch (default=1)
-s SAMPLES, --samples SAMPLES
Number of adjacent samples to scrunch (default=1)
-F FACTOR, --factor FACTOR
Scale factor (default=1)
-D DC, --dc DC DC offset (default=estimate)
-O OFFSET, --offset OFFSET
Output DC offset (default=input)
-d DM, --dm DM Remove DM before scrunching channels (default=don't)
-B BLOCKSIZE, --blocksize BLOCKSIZE
Set read block size
-t THREADS, --threads THREADS
Number of threads
--thread-chunk-size THREAD_CHUNK_SIZE
Number of blocks to process per thread
--no-refdm Don't set the REFDM header field when dedispersing
ft_convert_signed_to_unsigned¶
usage: ft_convert_signed_to_unsigned [-h] [-S] input output
Fix a filterbank style file that is encoded as signed data to unsigned data.
This program is intended to fix cases where a filterbank file has been written
by some external program as *signed* 8-bit values rather than the typical
unsigned 8-bit values. The new file is written as unsigned.
positional arguments:
input Input filterbank file, containing signed 8-bit numbers
output Output filterbank file, writen as unsigned 8-bit numbers
optional arguments:
-h, --help show this help message and exit
-S, --no-signed Don't write an UNSIGNED entry in the output file
ft_freqstack¶
usage: ft_freqstack [-h] [--output OUTPUT] [-B BLOCKSIZE] input [input ...]
Stack filterbank files in the frequency direction.
The output file will start at the latest start time of the input files and end at the earliest end time.
The output file will be padded with zeros for channels not included in the input files.
Note that behaviour is not defined if the input data overlaps or the channel bandwidths vary between files!
positional arguments:
input Input filterbank files
optional arguments:
-h, --help show this help message and exit
--output OUTPUT, -o OUTPUT
Output filterbank file
-B BLOCKSIZE, --blocksize BLOCKSIZE
Set read block size