S1 slice number from filename?

In the context of a batch processing script, I would like to group S1 files into different directories by relative orbits and slices. The formula to calculate relative orbits from absolute orbits given in the filename was just what I was looking for: Sentinel 1 relative orbit from filename

Is there a similar approach to determine the slice number of a scene?


Hi, the S1A/B filename does not contain the slice number. However the parameter is available in the manifest.safe file and in the product annotation file. A full description can be found in the product specification document (https://sentinels.copernicus.eu/documents/247904/349449/Sentinel-1_Product_Specification) - search for SliceNumber.

The filename does include a data take ID (the last but one set of values) which might be useful. For example product IW_SLC__1SDV_20170913T061434_20170913T061501_018353_01EE32_2E6C.SAFE has a data take of 01EE32 (a hex value). There will still be several products in each data take but it does go some way to separating products.

Hi Peter,
Thanks for the hints. I was hoping to be able to unzip files directly into a ‘relativeorbit_slice’-like directory structure. Awking and greping through the manifest/annotation files of extracted scenes and moving them around subsequently will work, too, of course, but I find that quite inconvenient.

Calculating the slice number from from the data take id was just what I had in mind, it would be really cool if that was possible …

I’m not sure that would be a good idea presently as the slicing is not synchronised on the ground, but it depends on the acquisition start time. In other words your target area can end up in a different slice when the acquisition plan is changed.