Palette colors for formations missing from the legend were assigned by position in the per-well zone list, so the same formation could get different colors for different wells. Assign them by order of first appearance in the formations file instead.
* #14889: Do not change main window when importing well picks
* #14889: Fix clipped bottom of plots in dock windows
* #14889: Add Create RFT Correlation Report to Ensemble Correlation Plots menu
* #14889: Show imported observed FMU RFT data as table
* #14889: Use time step from source RFT plot in RFT correlation report
* #14889: Show observed data in RFT cross plot when no RFT samples are available
* #14889: Keep RFT plot zoom when toggling formation in RFT correlation report
* #14889: Do not change main window when importing formations
* #14889: Use general delete for observed data and improve FMU RFT data name
RimWellRftPlot::updateFormationsOnPlot() runs during project load, before the track widgets are created. Skip the annotation update until the widget exists; onLoadDataAndUpdate() draws them later.
Fixes#14897.
* Add Add Well Picks button to well log formation settings
* Expose formation zone colors and shading alpha from RFT track
* Average observed pressures per formation with full min/max range
* Show formation-colored observed pressure and depth filter in RFT correlation plots
* Default new RFT correlation plots to formation filter and ensemble parameter coloring
* Move Qwt code out of RFT correlation Rim classes
* Align RFT correlation depth filter bars and click zones with displayed track formations
New Zonation/Formation Names source WELL_PICKS_NO_TRAJECTORY resolves zone
depths directly from a well-picks file + well name, for tracks without a well
path (e.g. RFT plots without a trajectory). Kept strictly separate from the
existing WELL_PICK_FILTER (well-path-based) source so neither falls back into
the other's resolution path. RFT plots automatically select this source when
no well path exists but a matching well-picks file is found.
Also avoids including RiaWellLogTrackDefines.h from header files; the affected
headers now use opaque enum forward declarations, with the real definitions
included only in the .cpp files that need the enumerator values.
Return values instead of out-parameters, and move the error dialog
from the reader to the importer so the reader can be unit tested.
Fix crash in level detection when erasing while iterating.
The object is immutable after construction and small, so reference
counting via cvf::Object adds nothing. Store it by value and use
std::optional where it may be absent.
- Move depthTypeAbbreviation(), computePressureSamplesPerCase() and
computeMeanPressurePerCase() out of RimParameterRftCrossPlot into a new
standalone RimRftCrossPlotTools namespace, shared by RimParameterRftCrossPlot
and RimRftTornadoPlot (removing duplicated code in the latter).
- Extract pure, reader-independent helpers filterPressuresByDepthRange() and
computeMean() so the depth filtering and averaging logic can be unit tested
without RFT reader/ensemble mocks.
- Add RimRftCrossPlotTools-Test.cpp with gtest cases covering depth range
filtering (disabled, inclusive bounds, out-of-range, mismatched sizes) and
mean computation (empty/normal), plus depth type abbreviation.
Move RimWellLogRftCurve::rftCurveDepthValues into RimRftCrossPlotTools
This static helper's only caller was already RimRftCrossPlotTools::computePressureSamplesPerCase, so move it alongside the other RFT cross plot/tornado plot helpers for consistency.
Propagates the Depth Unit selection from RimRftCorrelationReportPlot to the parameter cross plot and tornado plot depth-range filters, not just the RFT pressure profile sub-plot.
- RimWellLogRftCurve::rftCurveDepthValues now takes a RiaDefines::DepthType parameter and fetches the TVD channel directly when TVD is requested (falling back to MD if unavailable), instead of always preferring MD.
- RimParameterRftCrossPlot and RimRftTornadoPlot gain a depth type field (driven by the parent report plot, hidden in their own UI) and computeMeanPressurePerCase() takes the depth type so the depth-range filter operates on the selected unit.
- Axis labels, group titles, and auto-generated plot titles now show MD/TVD instead of being hardcoded to MD.
Stop silently substituting TVD for MD (or vice versa) in RFT correlation depth filter
rftCurveDepthValues() previously fell back to the other depth type when the requested one (MD or TVD) had no data, causing MD and TVD selections to silently produce identical results. Now it strictly returns only the requested depth type, returning an empty vector if unavailable. This naturally excludes such cases from the correlation cross plot and tornado plot, showing a blank plot instead of misleading data.
* Skip deleted plot widgets in RiuMultiPlotBook::visiblePlotWidgets
* Guard missing calculation in detectCyclicCalculation
* Guard invalid node index in RigFemPart node lookups
* Guard null well path in RimWellLogExtractionCurve::extractGeomData
* Guard unopened case in RimGridCalculation::removeDependentObjects
* Guard empty subset in createLateralAtMeasuredDepth
Remove 95 cvf include lines that the including file does not use. Found by
extracting the symbols declared by every VizFwk header, including symbols they
re-export, and flagging includes where none of those symbols appear anywhere in
the file. Each removal is verified by a full build.
Most of them are cvfVector3.h and cvfObject.h, left behind as the files they
were once needed by changed.
pch.h is left untouched. It includes cvfObject.h and cvfVector3.h on purpose, so
that the files using the precompiled header do not have to.
Note that a clean build after removing an include does not prove the include was
unnecessary, only that the declarations still arrive some other way. That path
can differ between platforms and with RESINSIGHT_ENABLE_UNITY_BUILD, so this
needs a CI round on Linux as well.
Migrate all assert macros in ApplicationLibCode to CAF_ASSERT and remove every
use of cvfAssert.h.
CVF_ASSERT is replaced one to one. CVF_TIGHT_ASSERT is also replaced by
CAF_ASSERT, which is semantically exact: CVF_ENABLE_TIGHT_ASSERTS is 1 only
under _DEBUG, and that is what CAF_ASSERT now does. The two CVF_FAIL_MSG sites
become CAF_ASSERT( false && "message" ), preserving the message with the idiom
already used elsewhere in the code base.
Counts before and after: CVF_ASSERT 1044 to 0, CVF_TIGHT_ASSERT 66 to 0,
CVF_FAIL_MSG 2 to 0, cvfAssert.h references 154 to 0.
Include handling: files that included cvfAssert.h directly now include
cafAssert.h instead, includes left dead by the migration are removed, and files
that were relying on cvfAssert.h transitively get an explicit cafAssert.h. Files
that reach cafAssert.h through another caf header are left unchanged; a missing
include here is a compile error, not a silently disabled assert.
ResultStatisticsCache links only LibCore and therefore had no path to
cafAssert.h. Add the cafPdmCore directory as a private include path rather than
linking the library, since cafAssert.h is header only.
Note that this stops these asserts from firing in Release and RelWithDebInfo,
where CVF_ASSERT was previously active.
The GUI thread deadlocked on a non-recursive QMutex during OSDU well
import. The download-completion slots and DataLoadController::onTaskFinished
held a mutex while triggering progress updates, which call
QApplication::processEvents(). That re-enters the event loop and dispatches
another queued parquet-download-complete event for a different well, whose
handler then blocks trying to lock the same mutex.
Release the mutex before emitting taskDone in the OSDU well path and well
log data loaders, and before calling incrementProgress() in onTaskFinished.
The map access that the mutex protects stays inside the locked scope; the
captured ProgressInfo outlives the call (kept alive by blockUntilDone) and
incrementProgress() is thread-safe via self-marshaling to the GUI thread.
Fixes#14230.
* CMake: Remove dead CODE_HEADER_FILES variable
* CMake: Remove dead COMMAND_CODE_HEADER_FILES and COMMAND_MOC_SOURCE_FILES
* CMake: Remove dead MOC_SOURCE_FILES and FORM_FILES_CPP references
* CMake: Remove dead HEADER_FILES reference
* CMake: Delete unused CustomPCH.cmake superseded by target_precompile_headers
Move the element-type include from each migrated collection header into
its .cpp, leaving only a forward declaration in the header. Follows the
pattern from 9e4d79159 for RimJobCollection, made possible by the
constructor-time PdmObject base check.
Migrated to the templated base, preserving each collection's existing XML
field keyword for project-file backward compatibility:
- RimEnsembleFractureStatisticsCollection
- RimEclipseInputPropertyCollection
- RimPlotDataFilterCollection
- RimGeoMechContourMapViewCollection
- RimIntersectionResultsDefinitionCollection
- RimCustomObjectiveFunctionCollection
- RimStimPlanModelTemplateCollection
- RimEnsembleWellLogsCollection
- RimEclipseContourMapViewCollection
- RimSeismicViewCollection
- RimGridInfoCollection
- RimEclipseStatisticsCaseCollection
- RimWellIASettingsCollection
- RimVfpDataCollection
External callers that accessed the old public/named array fields directly
(RimEclipseInputPropertyCollection::inputProperties,
RimEclipseStatisticsCaseCollection::cases) now use addItem/items() from
the base. RimCustomObjectiveFunction.h replaced its include of the
collection header with a forward declaration to break the new include
cycle introduced by the migration.
Expose well logs attached to a well path through the Python API. A new
`well_path.well_logs()` returns the list of well logs, and each
`WellLog` gains `channel_names()` and `well_log_data()` for reading
channel names, measured depth, optional TVD MSL/RKB, and channel
values.
The read methods are registered on the abstract `RimWellLog` base
class and use the common `RigWellLogData` interface so they work for
imported, LAS and OSDU well logs alike.
Detach m_qwtPlotCurveForLegendText before the viewer check so it is
always detached before deletion. Add null check for curves in
detachPlotCurves, and explicitly call detachPlotCurves from
RimWellLogTrack::detachAllPlotItems to ensure curves are detached
before the track is destroyed.
Remove the redundant wrapper function and update all call sites to use RimWellPathCollection::instance() directly.
Remove unused #include "RimTools.h" from files using RimWellPathCollection::instance() directly
Replace temporary RimWellLogPlot/RimWellLogTrack creation with standalone
RimWellLogExtractionCurve objects that load data and export directly via
RigLasFileExporter, eliminating the need to create and delete dummy plot objects.
- RigWellLogCurveData no longer inherits from cvf::Object; calculateResampledCurveData returns by value
- RimWellLogCurve::curveData() returns const reference instead of pointer; m_curveData stored by value
- RigLasFileExporter: replace cvf::Collection with std::vector<RigWellLogCurveData>; SingleChannelData stores RigWellLogCurveData by value
- Update all callers to use dot notation instead of pointer dereference
- Rename RifColorLegendData to RifFormationNamesReader to better reflect the
class purpose of reading formation names from .lyr files.
- Remove inheritance of cvf::Object
- Improve const correctness
* #12974 Fix zone colors to honor LYR-file specification
- Map formation colors by name instead of palette index in updateFormationNamesOnPlot()
- Map formation colors by categoryValue lookup in updateCellResultLegend(), fixing
incorrect colors when showOnlyVisibleCategoriesInLegend filters the active set
- Add RimColorLegendCollection::createColorLegendFromFormationNames() and call it
from readAllFormationNames() so LYR colors are available after project load
- Auto-assign formation color legend when a formation case is set on a well log track
- Rename fileNameWoPath() to shortName() and switch to baseName() (no extension)
- Remove addCustomColorLegend() from RicImportFormationNamesFeature; logic now lives
in RimColorLegendCollection
- Set formation legend when creating new Well Log Extraction Curve track
Replaced all references to RiaStatisticsTools with RigStatisticsTools across the codebase, including header includes, static method calls, and test files. Updated CMake configuration to remove RiaStatisticsTools and add RigStatisticsTools. Renamed and updated related unit tests. No changes to logic or algorithms; this is a namespace and organizational refactor for consistency. Also added ApplicationLibCode include directories as PRIVATE to relevant targets.
Introduced custom percentile handling for ensemble statistics:
- Added "CUSTOM" statistics type and percentile field to RifEclipseSummaryAddress
- Refactored RimEnsembleStatisticsCase to store and compute arbitrary percentiles
- RimEnsembleStatistics now parses custom percentiles from UI input
- RimEnsembleCurveSet and related interfaces updated to handle custom percentile curves and labels
- Hashing and statistics calculations now include custom percentiles for cache validity
Addresses an issue where color shading for formation annotations was not working as expected due to a null color legend in `RimWellLogTrack`.
Implements a fallback mechanism to use the default legend colors when the color shading legend is not available, ensuring proper visualization of formation annotations.
Related to https://github.com/OPM/ResInsight/issues/12974
* Refactor well log track settings into modular classes
Major refactoring of RimWellLogTrack to delegate property axis, formation, region annotation, and well path attribute settings to dedicated settings classes. Introduces RimWellLogPropertyAxisSettings, RimWellLogFormationSettings, RimWellLogRegionAnnotationSettings, and RimWellLogWellPathAttributeSettings, each encapsulating related fields, UI logic, and option handling. Old fields are retained for migration and backward compatibility. Updates enums and signatures for consistency.
Introduce MSW_SEGMENT to WellPathComponentType enum, assign DARK_CYAN color, update sorting order, and add plotting logic with column features and rectangular marker for visualization.
Proxy fields usually reads and transforms data from other sources, usually other Pdm fields. This commit disables IO for proxy fields in the constructor. If XML serialization is required, this must be set on the proxy field, like this
field.xmlCapability()->setIOWritable(true)
field.xmlCapability()->setIOReadable(true)
* Configures automated spell checking with codespell
Adds GitHub workflows and configuration files for automated spell checking using `codespell`.
This includes:
- A workflow for checking pull requests and preventing new typos
- A workflow for automatically fixing typos in the main codebase
- Configuration files for `codespell` to ignore specific terms and file types
- Documentation on how to use and configure the spell checking workflows.
* Corrects minor spelling and grammar errors.
- Updated Python API to accept measured_depth list and channel_data dictionary
- Modified C++ GRPC implementation to handle CSV-formatted channel mappings
- Replaced single values parameter with dictionary of channels
- Added comprehensive validation for all input parameters
- Updated parameter name from channel_keys_json to channel_keys_csv
- Enhanced tests to cover 16 different scenarios including edge cases
- Updated example to demonstrate new dictionary-based API functionality
Implement comprehensive Python API for importing well log data into ResInsight
well paths using lists of float values.
Core implementation:
- RigImportedWellLogData: Data storage class inheriting from RigWellLogData
- RimImportedWellLog: Scriptable model class for Python GRPC interface
- RimcWellPath_addWellLogInternal: GRPC method using key-value store for data transfer
- well_path.add_well_log(): Python API with validation and error handling
Features:
- Simple API: well_path.add_well_log(name='LogName', values=[1.0, 2.0, 3.0])
- Comprehensive input validation and type checking
- Efficient data transfer via key-value store mechanism
- Proper error handling with cleanup on failure
- Integration with existing well path functionality
Testing:
- 10 comprehensive unit tests covering all functionality
- Validation of input types, error conditions, and edge cases
- Integration testing with well path creation
Usage example included in PythonExamples directory demonstrating
import of gamma ray, porosity, and permeability log data.
* Adds a bounds check on the node index to prevent accessing invalid memory locations.
This prevents potential crashes caused by out-of-bounds access when retrieving summary variable values.
* Updates warning message for incomplete deltas
* Plot based on a single realization from a file set ensemble is not restored correctly on project load
* Populate result addresses if no addresses are present
* Adds CNV_ (convergence) result name
* Avoid include of RiaResultNames.h in header file
Replaces direct PdmField usage for font sizes with the new
RimFontSizeField. This provides a consistent way to manage font
size options across different plot types.
The RimFontSizeField encapsulates the logic for generating font size
options based on the default plot font size from preferences. This
removes redundant code in various plot classes and ensures that font
size settings are synchronized with user preferences.