fixed several issues and added computation of lat/lon values for picks upon saving, - #4
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
There are confirmed correctness/robustness issues (vector evaluation of Interpolations objects and mutation during iteration in clear_panel!) plus dependency hygiene problems that should be resolved before merging.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the picker tool to attach approximate geographic coordinates (lon/lat) to saved picks, alongside a few UI tweaks and some experimental/layout utility work.
Changes:
- Compute lon/lat for picks on save via linear interpolation between profile endpoints.
- Adjust field-data control panel initialization ordering and update comparison-pick plotting styling.
- Add a playground script and update package dependencies/compat entries.
File summaries
| File | Description |
|---|---|
src/utils.jl |
Adds a commented-out draft clear_panel! utility block. |
src/test_playground.jl |
Introduces a GLMakie playground/demo script including clear_panel! and figure construction. |
src/AdA_VizPickTool_V1.jl |
Adds Interpolations-based lon/lat computation on pick save; minor UI and plot styling adjustments. |
Project.toml |
Adds new dependencies/compat entries (Interpolations, GridLayoutBase, Makie, Revise). |
Review details
Suppressed comments (1)
src/AdA_VizPickTool_V1.jl:491
- This
printlnis another noisy debug statement in the save path; it will print on every save and doesn't add much beyond the existing "saved" message at the end.
println("lon and lat added to pickarray")
- Files reviewed: 3/4 changed files
- Comments generated: 5
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+482
to
+487
| interp_linear_lon = linear_interpolation(xtmp, lontmp) | ||
| interp_linear_lat = linear_interpolation(xtmp, lattmp) | ||
| println("interpolators generated") | ||
| lon_pick = interp_linear_lon(pickarray[:,1]) | ||
| lat_pick = interp_linear_lat(pickarray[:,1]) | ||
| println("lon and lat generated") |
Comment on lines
+5
to
+13
| function clear_panel!(panel::GridLayout) | ||
| for child in panel.children | ||
| if child isa GridLayout | ||
| clear_panel!(child) | ||
| end | ||
| delete!(panel, child) | ||
| end | ||
| return nothing | ||
| end |
Comment on lines
+472
to
+480
| profile_info = (start_lonlat = data.start_lonlat,end_lonlat = data.end_lonlat) # profile information | ||
| println("profile information generated") | ||
| # interpolate the lat and lon from the profile end points to the picked points | ||
| xtmp = [minimum(data.VolData.fields.x_profile), maximum(data.VolData.fields.x_profile)] | ||
| println("xtmp generated") | ||
| lontmp = [data.start_lonlat[1], data.end_lonlat[1]] | ||
| println("lontmp generated") | ||
| lattmp = [data.start_lonlat[2], data.end_lonlat[2]] | ||
| println("lattmp generated") |
Comment on lines
+1
to
+3
|
|
||
| using GLMakie | ||
|
|
Comment on lines
+30
to
+39
| # # function to clear a GridLayout unit (I call it panel) by recursively deleting all its children | ||
| # function clear_panel!(panel::GridLayout) | ||
| # for child in panel.children | ||
| # if child isa GridLayout | ||
| # clear_panel!(child) | ||
| # end | ||
| # delete!(panel, child) | ||
| # end | ||
| # return nothing | ||
| # end No newline at end of file |
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.
No description provided.