Select Git revision
README.md 3.13 KiB
GSPR TDOA Hyper resolution
gsrp_tdoa_hyperres.py
is a python script made to compute the time difference of arrival (TDOA)
using the geometric steered response power (GSRP) method.
This script also produces TDOA with a resolution higher than the initial sampling rate by interpolating
the GSPR loss function with a second-order polynomial.
Prerequisite
This program uses the following libraries (other versions might work):
Usage
usage: gsrp_tdoa_hyperres.py [-h] [-c CHANNELS] [-i INVERSE] [-f FRAME_SIZE] [-s HOP_SIZE] [-m MAX_TDOA] [-l LOW] [-u UP] [-d DECIMATE] [-t] [-e] [--start SECONDS] [--end SECONDS] infile outfile
Arguments
positional arguments:
infile The sound file to process.
outfile The text or npy file to write results to. Each row
gives the position (in samples), cross-correlation
product, the independent TDOAs (in samples), and TDOAs
derived from the independent ones. For plots, the
panes give the cross-correlation product, independent
TDOAS and derived TDOAs from top to bottom.
optional arguments:
-h, --help show this help message and exit
-c CHANNELS, --channels CHANNELS
The channels to cross-correlate. Accepts two or more,
but beware of high memory use. To be given as a comma-
separated list of numbers, with 0 referring to the
first channel (default: all channels).
-i INVERSE, --inverse INVERSE
Inverse the channel. To be given as a comma-separated
list of numbers,with 0 referring to the first channel
once channels have been chosen by --channels.
-f FRAME_SIZE, --frame-size FRAME_SIZE
The size of the cross-correlation frames in seconds
(default: 0.2)
-s HOP_SIZE, --hop-size HOP_SIZE
The step between the beginnings of sequential frames
in seconds (default: 0.01), or the postion in second
if csv file path is given.
-m MAX_TDOA, --max-tdoa MAX_TDOA
The maximum TDOA in seconds (default: 0.0011).
-l LOW, --low LOW Bottom cutoff frequency. Disabled by default.
-u UP, --up UP Top cutoff frequency. Disabled by default.
-d DECIMATE, --decimate DECIMATE
Downsample the signal by the given factor. Disabled by
default
-t, --temporal If given, any decimation will be applied in the time
domain instead of the spectral domain.
-e, --erase Erase existing outfile. If outfile existe and --erase
is not provide, the script will exit.
--start SECONDS If given, only analyze from the given position.
--end SECONDS If given, only analyze up to the given position.