-
Notifications
You must be signed in to change notification settings - Fork 103
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Description
Synspective StriX SAR Satellite
Sample Data: https://synspective.com/jp/gallery/mount-lewotobi-laki-laki-indonesia/
Although it is not mentioned in the README, the PALSAR2 code contains the word Strix, so please check.
from CEOS into SICD converter.
sarpy/sarpy/io/complex/palsar2.py
Line 1280 in dad0ba7
| elif self._led_element.data.scene_id.startswith('STRIX'): |
Code sharing for reproducibility
from sarpy.io.complex.converter import open_complex
# open a sicd type file
reader = open_complex(PATH_NTF)error log
['data/synspective/Mount Lewotobi Laki Laki_STRIX_202411-00357_20241115T192220Z_ST1_SLC_CEOS/LED-STRIX3-20241115T192220Z-STSLC']
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/var/folders/vg/3f79b2x54mz7ny6lbm1bfhrw0000gn/T/ipykernel_66332/3105492214.py in <module>
1 # open a sicd type file
2
----> 3 reader = open_complex(PATH_NTF)
4 # see the sizes of all image segments
5 print(reader.get_data_size_as_tuple())
~/anaconda3/envs/ai/lib/python3.8/site-packages/sarpy/io/complex/converter.py in open_complex(file_name)
104 # see if we can find a reader though trial and error
105 for opener in _openers:
--> 106 reader = opener(file_name)
107 if reader is not None:
108 return reader
~/anaconda3/envs/ai/lib/python3.8/site-packages/sarpy/io/complex/palsar2.py in is_a(file_name)
1678
1679 try:
-> 1680 palsar_details = PALSARDetails(file_name)
1681 logger.info('File {} is determined to be a PALSAR ALOS2 file.'.format(file_name))
1682 return PALSARReader(palsar_details)
~/anaconda3/envs/ai/lib/python3.8/site-packages/sarpy/io/complex/palsar2.py in __init__(self, file_name)
1180 self._trl_element = None # type: Union[None, _TRL_Elements]
1181 self._vol_element = None # type: Union[None, _VOL_Elements]
-> 1182 self._validate_filename(file_name)
1183 for entry in self._img_elements:
1184 if entry.is_scansar:
~/anaconda3/envs/ai/lib/python3.8/site-packages/sarpy/io/complex/palsar2.py in _validate_filename(self, file_name)
1239 print(led_files)
1240 self._img_elements = tuple([_IMG_Elements(entry) for entry in img_files])
-> 1241 self._led_element = _LED_Elements(led_files[0])
1242 self._trl_element = _TRL_Elements(trl_files[0]) if len(trl_files) > 0 else None
1243 self._vol_element = _VOL_Elements(vol_files[0]) if len(vol_files) > 0 else None
~/anaconda3/envs/ai/lib/python3.8/site-packages/sarpy/io/complex/palsar2.py in __init__(self, file_name)
971 self._file_name = file_name # type: str
972 with open(self._file_name, 'rb') as fi:
--> 973 _CommonElements3.__init__(self, fi, 5)
974 fi.seek(230, os.SEEK_CUR) # skip reserved fields
975 self.data = _LED_Data(fi) # type: _LED_Data
~/anaconda3/envs/ai/lib/python3.8/site-packages/sarpy/io/complex/palsar2.py in __init__(self, fi, facility_count)
235 for i in range(facility_count):
236 num_fac_data_rec.append(int(fi.read(6)))
--> 237 fac_data_len.append(int(fi.read(8)))
238 self.num_fac_data_rec = tuple(num_fac_data_rec) # type: Tuple[int]
239 self.fac_data_len = tuple(fac_data_len) # type: Tuple[int]
ValueError: invalid literal for int() with base 10: b' 5000\x00\x00'
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request