Interactive launcher with mineral controls, navigation, and net-pay statistics#13
Open
dougchristie wants to merge 2 commits into
Open
Interactive launcher with mineral controls, navigation, and net-pay statistics#13dougchristie wants to merge 2 commits into
dougchristie wants to merge 2 commits into
Conversation
main.py (GUI launcher): - Expose mineral on/off toggles (Quartz/Calcite/Dolomite) in the calculation dialog, so sandstone/shale wells are no longer forced into a quartz+calcite+dolomite solve that produced bad mineralogy. - Backfill zeroed curves for deselected minerals so the viewer's mineralogy track renders them as 0 instead of prompting. - Wrap the workflow in a loop with a "what next?" menu (change template, re-run calculations, open another file, quit) so you can iterate without restarting and re-picking the file. petropy/graphs.py: add Recalc / Template / Open File toolbar buttons (with icons) that hand control back to the launcher loop; falls back to the menu if the window is closed directly. run_petropy.bat: launch from this folder using the isolated "petropy" conda environment. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
New "Net pay & statistics..." entry in the "what next?" menu, plus three new functions in main.py: - select_pay_cutoffs: dialog for PHIE/SW/VCLAY/RESDEEP cutoffs (blank = skip), pay-flag name, and per-formation checkboxes. - compute_pay_statistics: calls add_pay_flag + summations + statistics and shows the table. - show_statistics_table: ttk.Treeview with Formation, Gross (ft), Net Pay (ft), N/G, Avg phi (pay), Avg Sw (pay), Avg Vclay (pay), HC pore-ft (pay), and OIP/GIP (pay). Save CSV button uses pandas to_csv. run_calculations now auto-runs summations() on OIP/GIP/GIP_FREE/GIP_ADS/ PHIE/BVH/BVW when tops are loaded, so the multimin_oil_sum and multimin_gas_sum templates render their OIP/GIP overlay tracks instead of prompting for missing _SUM curves. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Adds a standalone interactive launcher (
main.py+run_petropy.bat) plus viewer/toolbar additions inpetropy/graphs.py. No changes tolog.py.main.py— launcher appV*curves.Loaded log + calculations stay in memory, so template switches and re-runs don't make you re-pick the file.
PHIE ≥,SW ≤,VCLAY ≤,RESDEEP ≥— blanks skip a cutoff) with per-formation checkboxes driveslog.add_pay_flag+log.summations+log.statistics. Displays attk.Treeviewtable with Formation, Gross (ft), Net Pay (ft), N/G, Avg φ (pay), Avg Sw (pay), Avg Vclay (pay), HC pore-feet (pay), OIP/GIP (pay) and a Save CSV button.run_calculationsnow auto-runslog.summations()onOIP/GIP/GIP_FREE/GIP_ADS/PHIE/BVH/BVWwhenever tops are loaded, so themultimin_oil_sum/multimin_gas_sumtemplates render their OIP/GIP overlay tracks without prompting for missing*_SUMcurves.petropy/graphs.py— viewer toolbar additionsrun_petropy.batWindows launcher targeting an isolated conda environment so dependencies don't share with other projects.
Note on companion fixes
This PR is independent of #12 (which proposes three correctness fixes in
log.py: Simandoux Sw exponent, mud-filtrate Rmf field, and thenanmeanBuckles parameter fix). The launcher works against the currentlog.py, but the cumulative POROSITY track will only render correctly once #12 is also merged — without that fix,BVWI/BVWFcome out NaN and poison the stack.🤖 Generated with Claude Code