-
Notifications
You must be signed in to change notification settings - Fork 294
smallbaselinApp: generate maskObs.h5 & use it while plotting geometry
#1448
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
base: main
Are you sure you want to change the base?
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
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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