terra_dsp.DataSource package

Submodules

terra_dsp.DataSource.datasource_base module

class terra_dsp.DataSource.datasource_base.DataSource(fs, chunk_length)

Bases: object

Generic DataSource class. This is used for abstracting different radios, testing inputs, etc.

get_chunk()

Fetch a chunk of samples

Returns:

np.array: Samples

samples_available()

Check if there are samples available from this datasource

Returns:

bool: True if there are samples available.

start()

Start data collection.

stop()

Stop data collection.

class terra_dsp.DataSource.datasource_base.FileSource(filename, fs, fc, chunk_length=20000000)

Bases: DataSource

DataSource that draws from a raw (IQ) file, like those from GQRX.

flush()
get_chunk()

Fetch a chunk of samples

Returns:

np.array: Samples

samples_available()

Check if there are samples available from this datasource.

Returns:

bool: True if there are samples available.

terra_dsp.DataSource.datasource_random module

class terra_dsp.DataSource.datasource_random.RandomSource(fs, fc, chunk_length=20000000, seed=37, stations=None, ref_location=None, zerodelay=False)

Bases: DataSource

A random data that accurately simulates propagation.

c_air_ns = 0.299702458
flush()

Clear all chunks in the buffer, so that the next chunk matches the current server time.

Returns:

int: Number of dropped chunks

get_chunk()

Fetch a chunk of samples

Returns:

np.array: Samples

samples_available()

Check if there are samples available from this datasource.

Returns:

bool: True if there are samples available.

terra_dsp.DataSource.iio module

class terra_dsp.DataSource.iio.PlutoSource(fs, fc, chunk_length=20000000, **kwargs)

Bases: DataSource

Datasource for PlutoSDR (IIO) devices.

flush()
get_chunk()

Fetch a chunk of samples

Returns:

np.array: Samples

samples_available()

Check if there are samples available from this datasource

Returns:

bool: True if there are samples available.

start()

Start data collection.

stop()

Stop data collection.

terra_dsp.DataSource.iio.get_uri()

terra_dsp.DataSource.soapy module

class terra_dsp.DataSource.soapy.SoapySource(fs, fc, chunk_length=20000000, **kwargs)

Bases: DataSource

Datasource for SoapySDR devices.

flush()
get_chunk()

Fetch a chunk of samples

Returns:

np.array: Samples

samples_available()

Check if there are samples available from this datasource

Returns:

bool: True if there are samples available.

start()

Start data collection.

stop()

Stop data collection.

terra_dsp.DataSource.uhd module

class terra_dsp.DataSource.uhd.USRPSource(fs, fc, chunk_length=20000000, **kwargs)

Bases: DataSource

Datasource for USRP (UHD) devices.

flush()
get_chunk()

Fetch a chunk of samples

Returns:

np.array: Samples

samples_available()

Check if there are samples available from this datasource

Returns:

bool: True if there are samples available.

start()

Start data collection.

stop()

Stop data collection.

Module contents