Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

MRC-InSAR-Common-0.0.6.tar.gz (1.5 kB view details)

Uploaded Source

Built Distribution

MRC_InSAR_Common-0.0.6-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file MRC-InSAR-Common-0.0.6.tar.gz.

File metadata

  • Download URL: MRC-InSAR-Common-0.0.6.tar.gz
  • Upload date:
  • Size: 1.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.22.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.12

File hashes

Hashes for MRC-InSAR-Common-0.0.6.tar.gz
Algorithm Hash digest
SHA256 98a210d4339152e0afaf9314c43a2accbecdf7c6c202ff0dd36a2a4c99bd927c
MD5 a1c5a22ca88ff367f027994ae5bf70b4
BLAKE2b-256 c70858ce7169325bfbef2b300dd89a3db809ce354aabadcc0f440fbc6b7ba435

See more details on using hashes here.

File details

Details for the file MRC_InSAR_Common-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: MRC_InSAR_Common-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.22.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.12

File hashes

Hashes for MRC_InSAR_Common-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f5f74267f5223dd47de98cb84b6eb0b92db88a63176e0c554a55f0a23462257b
MD5 343916b05d4b24e332b2f0d10832a07b
BLAKE2b-256 b50c27dc184f952092693792d2746dff9ffe0092f8ca05c1f7feaca376de66c1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page