pytroll / satpy

Python package for earth-observing satellite data processing
http://satpy.readthedocs.org/en/latest/
GNU General Public License v3.0
1.05k stars 289 forks source link

sar-c reader swath identifier #1735

Open ptcongbk opened 3 years ago

ptcongbk commented 3 years ago

In sar-c_safe.yaml, it is defined the pattern as '{fmissionid:3s}{fsarmode:2s}{fproducttype:3s}{fresolution:1s}{fprocessing_level:1s}{fproductclass:1s}{fpolarization:2s}{fstarttime:%Y%m%dT%H%M%S}{fendtime:%Y%m%dT%H%M%S}{forbitnumber:6d}{fmission_data_takeid:6s}{fproduct_unique_id:4s}.SAFE/measurement/{missionid:3s}-**{swathid:2s}**-{product_type:3s}-{polarization:2s}-{start_time:%Y%m%dt%H%M%S}-{end_time:%Y%m%dt%H%M%S}-{orbit_number:6d}-{mission_data_take_id:6s}-{image_number:3s}.tiff'

But based on the level-1 product formatting (https://sentinel.esa.int/web/sentinel/technical-guides/sentinel-1-sar/products-algorithms/level-1-product-formatting), the swath identifier can be 2 or 3 characters which made it impossible to read if the files have 3 characters.

Am I wrong or we should modify the yaml file in this case?

mraspaud commented 3 years ago

@ptcongbk good catch, thanks for reporting this! You are absolutely right, the pattern now forces only 2 characters, so it should be fixed. Do you think you can open a PR for this?

ptcongbk commented 3 years ago

@mraspaud many thanks for your clarification. Could you please help me with this PR since I am not quite sure what is the best way to fix it?