Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not convert Synspective StriX CEOS format into SICD. #573

Open
syu-tan opened this issue Dec 13, 2024 · 1 comment
Open

Can not convert Synspective StriX CEOS format into SICD. #573

syu-tan opened this issue Dec 13, 2024 · 1 comment

Comments

@syu-tan
Copy link

syu-tan commented Dec 13, 2024

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.

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'
@syu-tan
Copy link
Author

syu-tan commented Dec 13, 2024

I'm sharing this because the provider's CEOS value is sometimes empty.
https://github.com/ngageoint/sarpy/blob/dad0ba758c2ceae59137908e6ab18c22ad17d0dc/sarpy/io/complex/palsar2.py

  • num_fac_data_rec
  • fac_data_len
  • rec_gain_like_pol
  • rec_gain_cross_pol
  • dc_bias_i
  • dc_bias_q
  • gain_imbalance
  • elec_bores
  • mech_bores
  • ant_beam_2way_el
  • ant_beam_2way_az
  • num_look_az
  • num_look_rng
  • bw_per_look_az
  • bw_per_look_rng
  • incidence_ang
  • at_pos_err
  • ct_pos_err
  • rad_pos_err
  • at_vel_err
  • ct_vel_err
  • rad_vel_err
  • pts_pos
  • pts_vel
  • tx_distortion
  • rcv_distortion
  • at_misreg_err
  • ct_misreg_err
  • ac_seq_num
  • num_low_res_rec
  • low_res

Geometry and transmit/receive signal information is missing.
You can force create SICD ignoring these values, but geospatial projection processing will not work.
Are there plans to support the format in the future?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant