only do multi swath product check when processing multiple swaths #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
At the beginning of the Top Sar Split Operation, there are some checks to validate the structure of the product.
Once check is looking for all subswaths (
checkIfMultiSwathTOPSARProduct). If there is only one swath and associated metadata in the product folder it will fail.PROBLEM:
I am running a pipeline where processing time is very important, so I am only downloading and processing single swaths. I don't want to have the extra overhead for the other swaths if I don't even need them.
Currently the Top Sar Split Operation will fail because it expects a folder with all swaths.
SOLUTION:
Just do the multi swath check if we are indeed processing multiple swaths. I think this is also more logic, because why should we check for multiple swaths if we only want to process one of them.
This PR adds an if clause to only run the check when its actually needed.