No project description provided
Project description
mrc_insar_common
InSAR common util functions
pip install MRC-InSAR-Common
Usage
def test_read_write_float():
dummy_float = np.random.normal(size=[500,500]).astype('>f4')
data_reader.writeBin(fileName='/tmp/dummy.bin', data=dummy_float, dataType='float')
dummy_float_read_crop = data_reader.readBin(fileName='/tmp/dummy.bin', width=500, dataType='float', crop=[50,50,100,100])
assert np.array_equal(dummy_float[50:50+100, 50:50+100], dummy_float_read_crop)
def test_read_write_floatComplex():
dummy_float = np.random.normal(size=[500,500]).astype('>c8')
data_reader.writeBin(fileName='/tmp/dummy.bin', data=dummy_float, dataType='floatComplex')
dummy_float_read_crop = data_reader.readBin(fileName='/tmp/dummy.bin', width=500, dataType='floatComplex', crop=[50,50,100,100])
assert np.array_equal(dummy_float[50:50+100, 50:50+100], dummy_float_read_crop)
def test_read_write_shortComplex():
dummy_float = np.random.normal(size=[500,500]).astype(np.complex).view(np.float).astype('>i2').astype(np.float).view(np.complex).reshape(500,500)
data_reader.writeBin(fileName='/tmp/dummy.bin', data=dummy_float, dataType='shortComplex')
dummy_float_read_crop = data_reader.readBin(fileName='/tmp/dummy.bin', width=500, dataType='shortComplex', crop=[50,50,100,100])
assert np.array_equal(dummy_float[50:50+100, 50:50+100], dummy_float_read_crop)
Test
python -m pytest
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
File details
Details for the file MRC-InSAR-Common-0.1.2.tar.gz
.
File metadata
- Download URL: MRC-InSAR-Common-0.1.2.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.2 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | da55fb48f8093d2786858799124bb1640e8671365ee729ad59f8aa26f0763fc4 |
|
MD5 | 9b572f5fabb6107192d459f03001cb2f |
|
BLAKE2b-256 | a60a0cf3432226f6435611d217ed09e685791128445228bce924d1b25028242c |
File details
Details for the file MRC_InSAR_Common-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: MRC_InSAR_Common-0.1.2-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.2 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a3d33cf687b696b02854cb4a253d2975091eeaf35d419df435ea72d8eea9d18 |
|
MD5 | b7efc3f7e7f02ec6fa01a60eadc4ef28 |
|
BLAKE2b-256 | a12e12f4420d246578cc21fccf4d8078ee38237cdd7afee00b4d11a63f53a755 |