# Import system modules and check out ArcGIS Image Analyst extension license
import arcpy
import os
arcpy.CheckOutExtension("ImageAnalyst")
# Set local variables
arcpy.env.workspace = r"C:\Data\SAR\S1"
username = "esaUsername"
password = "esaPassword"
# Execute
raster_names = arcpy.ListRasters()
for raster_name in raster_names:
name, ext = os.path.splitext(raster_name)
in_radar = arcpy.Raster(os.path.join(arcpy.env.workspace, raster_name,'manifest.safe'))
arcpy.ia.DownloadOrbitFile(in_radar, "SENTINEL_PRECISE", username, password)
arcpy.ia.ApplyOrbitCorrection(in_radar,"")