ngageoint / sarpy

A basic Python library to demonstrate reading, writing, display, and simple processing of complex SAR data using the NGA SICD standard.
MIT License
248 stars 85 forks source link

Reading of ICEYE complex product results with an error #138

Closed llamentowski closed 4 years ago

llamentowski commented 4 years ago

One of the latest changes in the BaseChipper class introduced different set of arguments to __init__ member of the class. The subclass ICEYEChipper is still using old 'complex_type' named argument in its own __init__ method:

    def __init__(self, file_name, data_size, symmetry, complex_type=True, real_group='s_i', imaginary_group='s_q'):
        self._file_name = file_name
        self._real_group = real_group
        self._imaginary_group = imaginary_group
        super(ICEYEChipper, self).__init__(data_size, symmetry=symmetry, complex_type=complex_type)

This results with an error every time ICEYEChipper is used:

File "(...)\sarpy\io\complex\iceye.py", line 469, in init super(ICEYEChipper, self).init(data_size, symmetry=symmetry, complex_type=complex_type) TypeError: init() got an unexpected keyword argument 'complex_type'

I believe the correct version should be:

    def __init__(self, file_name, data_size, symmetry, transform_data='complex', real_group='s_i', imaginary_group='s_q'):
        self._file_name = file_name
        self._real_group = real_group
        self._imaginary_group = imaginary_group
        super(ICEYEChipper, self).__init__(data_size, symmetry=symmetry, transform_data=transform_data)

This fixed the problem for me, but I can't push to the repo.

thomasmccullough commented 4 years ago

Many thanks for your participation! Have a great week. Please feel free to contact me directly at thomas.mccullough@tenica-gs.com if that's more convenient.