Skip to content

Conversation

@vbrancat
Copy link
Contributor

The ISCE2 Sentinel stack processor generates a VRT file for each of the secondary co-registered SLC of the processed stack. Each VRT points to the individual bursts forming the single co-registered SLC.

At the moment, the script tops2vrt.py looks for the binary files of full/merged co-registered SLCs of the stack and tries to generate VRT files out of them. This step is not necessary, as the VRT generation for the full secondary co-registered SLCs is already taken into account by the ISCE2 Sentinel stack processor. Also, when tops2vrt.py looks for the binaries of the co-registered secondary SLCs, no SLC is found.

This PR removes the individual full-coregistered SLC VRT generation from tops2vrt.py. Instead, the VRT stack file (slcs_base.vrt) is generated to directly pointing to the VRTs of the individual full-coregistered secondary SLCs generated by the ISCE2 stack processor.

The PR also:

  • Improves documentation
  • Removes unused imports
  • Format the code to abide by the pep8 notation

Copy link
Contributor

@hfattahi hfattahi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @vbrancat. Great clean up. I have few minor comments which may further improve this script.

###Get ann list and slc list
slclist = glob.glob(os.path.join(inps.indir,'SLC','*','*.slc.full'))
# Get a list of co-registered full SLC VRTs
slclist = glob.glob(os.path.join(inps.indir, 'SLC', '*', '*.slc.full.vrt'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about making "SLC" and ".slc.full.vart" also input arguments with default values as we have here?
In principle any slc that is readable by GDAL should work down the line with fringe core modules.

print('write vrt file for stack directory')

# Allocate wavelength for Sentinel
wavelength = 0.05546576
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it has been there from before. Would you please make this an input argument default to Sentinel-1 wavelength.

os.path.join(inps.indir,
'geom_reference',
val + '.rdr.full.vrt')),
linewidth=width * 8))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To increase readability shall we define a variable (e.g, PixelOffset=8 # bytes) and then change this line to

linewidth=width * PixelOffset))

Copy link
Contributor

@hfattahi hfattahi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @vbrancat.

@hfattahi hfattahi merged commit 439c1ee into isce-framework:master Jul 21, 2021
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

Successfully merging this pull request may close these issues.

3 participants