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

Geocoded burst stack processor (cont) #53

Merged
merged 56 commits into from
Oct 24, 2022

Conversation

scottstanie
Copy link
Contributor

Creating this PR mostly from Virginia's #18 . I used it last week for 3-4 areas, so it's pretty functional. I came across several things as I was processing, notably

  • the dates in the dataframe/code were integers, but were trying to be filtered using the pandas .str.contains
  • The dates passed to --exclude-dates were actually being included, so I refactored the filter function to allow both exclusions or inclusions (but fixed the logic so --exclude-dates does exclude)

I think I've addressed several of the comments made on #18, so I was just trying to help fix up the final changes others can more easily work on the same code, without merging multiple forked branches.

vbrancat and others added 30 commits April 4, 2022 10:27
cut_ files take up more space than merged

Conflicts:
	src/compass/utils/stitching/stitch_burst.py
@scottstanie
Copy link
Contributor Author

scottstanie commented Oct 18, 2022

@LiangJYu I believe I implemented all the suggestions you had in comments here #18 . The only one I didn't do was moving all pruning calls into the data frame generation, since after profiling, the pandas filtering was actually very quick even with a few thousand bursts.

Also noting that I added a --bbox option so that bursts outside some lat/lon bounding box are skipped, and all runconfigs are changed to have the corresponding bbox (converted to UTM coordinates).

So if there aren't objections, I'll merge this in shortly.

Copy link
Contributor

@LiangJYu LiangJYu left a comment

Choose a reason for hiding this comment

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

LGTM. My comments are all formatting related.

src/compass/s1_geo_stack.py Outdated Show resolved Hide resolved
src/compass/s1_geo_stack.py Outdated Show resolved Hide resolved
src/compass/s1_geo_stack.py Outdated Show resolved Hide resolved
src/compass/s1_geo_stack.py Outdated Show resolved Hide resolved
src/compass/s1_geo_stack.py Outdated Show resolved Hide resolved
src/compass/s1_geo_stack.py Outdated Show resolved Hide resolved
src/compass/s1_geo_stack.py Outdated Show resolved Hide resolved
Copy link
Contributor

@vbrancat vbrancat left a comment

Choose a reason for hiding this comment

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

@scottstanie thanks for all the improvements :). I only have minor comments at this stage. I am planning to test the PR pretty soon and will let you know if anything comes up.

One "big observation" I have is the following. Since we have a burst map, I was wondering whether for the stack processor, we want to use the info in the burst map to populate the runconfig (e.g. epsg, geogrid). We are following this direction for CSLC processing. We will soon have a place holder in the schema for the burst map and extrapolate epsg and geogrid bbox for each burst from the burst map itself. What do you think? We should not address this point in this PR but it would be good to keep in mind.

src/compass/s1_geo_stack.py Outdated Show resolved Hide resolved
src/compass/s1_geo_stack.py Outdated Show resolved Hide resolved
src/compass/s1_geo_stack.py Outdated Show resolved Hide resolved
src/compass/s1_geo_stack.py Outdated Show resolved Hide resolved
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 @scottstanie for restoring this PR. I put in few minor comment. I think it will be useful for us to have an option to use the burst ID database. Maybe it is not bad to allow the current behavior if the burst database is not provided.

Another point is do we want to generate the geocoded bursts only over the common ID among all dates? I think if we force processing over only common busrst IDs among all dates, then we could potentially exclude a lot of busrsts to process. An alternative would be to loop over the zip files and process each burst that statisfies the input constraints (Burst ID list, or bbox). This way we may end up with different number of coregsitered SLCs for different IDs.

src/compass/s1_geo_stack.py Outdated Show resolved Hide resolved
src/compass/s1_geo_stack.py Outdated Show resolved Hide resolved
src/compass/s1_geo_stack.py Outdated Show resolved Hide resolved
src/compass/s1_geo_stack.py Outdated Show resolved Hide resolved
src/compass/utils/helpers.py Outdated Show resolved Hide resolved
@vbrancat
Copy link
Contributor

Another nit-picking consideration. Shall we consider renaming the s1_geo_stack.py function? In the main folder, we opted for explicitly spell the word geocode. May be something like s1_geocoded_cslc_stack_processor? It might be too long but something like that would be helpful.

@scottstanie
Copy link
Contributor Author

scottstanie commented Oct 24, 2022

Another nit-picking consideration. Shall we consider renaming the s1_geo_stack.py function? In the main folder, we opted for explicitly spell the word geocode. May be something like s1_geocoded_cslc_stack_processor? It might be too long but something like that would be helpful.

@vbrancat What about just s1_geocode_stack to match the 3-part names of s1_geocode_slc and s1_geocode_metadata?

@scottstanie scottstanie merged commit 45d325b into opera-adt:main Oct 24, 2022
@vbrancat
Copy link
Contributor

@scottstanie For next time, we do implicitly require that, for each PR, "at least" two people grant approvals. This is fine for now, but please, make sure to follow this rule for your next PR.

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.

4 participants