smallbaselinApp: generate maskObs.h5 & use it while plotting geometry#1448
Open
yunjunz wants to merge 2 commits intoinsarlab:mainfrom
Open
smallbaselinApp: generate maskObs.h5 & use it while plotting geometry#1448yunjunz wants to merge 2 commits intoinsarlab:mainfrom
smallbaselinApp: generate maskObs.h5 & use it while plotting geometry#1448yunjunz wants to merge 2 commits intoinsarlab:mainfrom
Conversation
+ smallbaselineApp: - generate maskObs.h5, in addition to maskConnComp.h5 file, in reference_point step - use `-m maskObs.h5` while plotting geometry at the end to get rid of the zero values in the incidence/azimuthAngle and lat/lon data for a more meaningful display + modify_network: print # of acquisitions to keep
Contributor
Reviewer's GuideThis PR teaches smallbaselineApp to generate a new observation mask from the geometry file and use it when plotting geometry products, and enhances modify_network to print the number of acquisitions kept, improving diagnostic output and visualization quality. Sequence diagram for generating and using maskObs.h5 in smallbaselineAppsequenceDiagram
participant app as smallbaselineApp
participant ut as ut
participant gm as generate_mask
participant ta as temporal_average
participant viewer as view_command
app->>ut: check_loaded_dataset(workDir, print_msg=False)
ut-->>app: stack_file, geom_file
app->>gm: main([stack_file, --nonzero, -o maskConnComp.h5, --update])
app->>ta: main([stack_file, --dataset, phase, -o avgSpatialCoh.h5])
app->>ta: main([stack_file, --dataset, phase, -o avgSpatialSNR.h5])
app->>gm: main([geom_file, incidenceAngle, --nonzero, -o maskObs.h5, --update])
app->>viewer: plot_result(print_aux=True)
viewer->>viewer: relpath(stack_file, geom_file, maskObs.h5, maskTempCoh.h5)
viewer->>viewer: build geometry view args [geom_file, -m, maskObs.h5]
viewer-->>app: geometry plotted without zero valued observations
Updated class diagram for smallbaselineApp and modify_networkclassDiagram
class smallbaselineApp {
workDir
generate_ifgram_aux_file()
run_reference_point(step_name)
plot_result(print_aux)
}
class modify_network {
get_date12_to_drop(inps)
}
smallbaselineApp : maskConnComp_h5
smallbaselineApp : maskObs_h5
smallbaselineApp : avgSpatialCoh_h5
smallbaselineApp : avgSpatialSNR_h5
smallbaselineApp : geo_dir
smallbaselineApp : pic_dir
modify_network : date_to_keep
modify_network : date_to_drop
modify_network : print number of acquisitions to remove
modify_network : print number of acquisitions to keep
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- In
generate_ifgram_aux_file, you assumegeom_fileis present and contains anincidenceAngledataset; consider guarding this block (e.g., checkgeom_fileis not None and thatincidenceAngleexists) to avoid runtime errors in workflows without geometry. - In
plot_result,maskObs.h5is always passed as-mto the geometry view command, but it may not exist ifgenerate_ifgram_aux_filewasn’t run or geometry is missing; consider checking for the file’s existence and falling back to plotting without-mwhen it’s unavailable.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `generate_ifgram_aux_file`, you assume `geom_file` is present and contains an `incidenceAngle` dataset; consider guarding this block (e.g., check `geom_file` is not None and that `incidenceAngle` exists) to avoid runtime errors in workflows without geometry.
- In `plot_result`, `maskObs.h5` is always passed as `-m` to the geometry view command, but it may not exist if `generate_ifgram_aux_file` wasn’t run or geometry is missing; consider checking for the file’s existence and falling back to plotting without `-m` when it’s unavailable.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of proposed changes
smallbaselineApp:
-m maskObs.h5while plotting geometry at the end to get rid of the zero values in the incidence/azimuthAngle and lat/lon data for a more meaningful displaymodify_network: print # of acquisitions to keep
Reminders