Skip to content
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

Implement Well-log viewer module MVP #794

Merged
merged 16 commits into from
Dec 4, 2024

Conversation

Anders2303
Copy link
Collaborator

@Anders2303 Anders2303 commented Nov 4, 2024

This PR is equivalent to #702; this is copy-branch to resolve some stuff that broke during some rebases

Branch dependencies

This uses the readout box and sortable list components introduced in other PRs, those should be reviewed and merged first

(Partially) resolves issue #683

Adds a wrapper module for the Subsurface WellLogViewer component. The component renders out well-log data along a given wellbore's MD/TVD values. Note that this implementation is a simpler MVP, an is therefore not feature-complete; more features will be introduced in separate PRs.

Features:

  • Fetch data from well/log_curve_data and well/wellbore_log_curve_headers API endpoint
    • (Aka, the SSDL wellbore-curve APIs)
  • Show continuous data plots
    • Line, area, gradient, dot, and differental plots are supported
  • Show vertical lines for Well-picks
  • Synced settings:
    • Global Hover MD
    • Wellbore
    • Vertical Scaling
  • Export/import JSON file of track config
  • Persistent setting across reloads

Future Work

  • Add support for discrete (or "stacked") plots
    • Implemented in a local branch, PR to come
  • More graph data sources:
    • Geology and Stratigraphy on SMDA
      • Implemented in local branch, PR to come
    • HAZI, DEVI, DSL curves
      • See SSDL "wellbore survey" for these
  • More settings for visuals
    • Plot domain (visual min-max)
    • Color settings
    • Stacked graph settings

* Supports continuous curves from SSDL endpoint
* Settings are persisted across reloads
@Anders2303 Anders2303 added the enhancement New feature or request label Nov 4, 2024
@Anders2303 Anders2303 requested a review from rubenthoms November 4, 2024 08:05
@Anders2303 Anders2303 self-assigned this Nov 4, 2024
@Anders2303 Anders2303 mentioned this pull request Nov 4, 2024
31 tasks
Copy link
Collaborator

@rubenthoms rubenthoms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! 👍

Admittedly, I have quite a few comments and suggestions but this is mostly due to the PR having gotten quite large.

By the way, it seems you added the preview image to the old branch.

frontend/src/framework/utils/arrays.ts Outdated Show resolved Hide resolved
frontend/src/framework/utils/arrays.ts Outdated Show resolved Hide resolved
frontend/src/framework/utils/arrays.ts Outdated Show resolved Hide resolved
frontend/src/framework/utils/arrays.ts Outdated Show resolved Hide resolved
frontend/src/modules/WellLogViewer/view/ReadoutWrapper.tsx Outdated Show resolved Hide resolved
Copy link
Collaborator

@rubenthoms rubenthoms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some remarks, otherwise good to go 👍

});

// TODO, do an offsett or something, so they dont always start on the same color?
const colorSet = React.useRef<ColorSet>(new ColorSet(CURVE_COLOR_PALETTE));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be a constant outside this function?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, originally wanted each track to maintain their own internal color iteration, but it actually makes more sense that they all take from the same instance; that way, colors dont repeat as you add tracks and plots (unless you loop the entire palette, of course)

<Dropdown
value={props.plot.type}
options={PLOT_TYPE_OPTIONS}
onChange={(v) => handlePlotChange({ type: v as TemplatePlotTypes })}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as TemplatePlotTypes does not seem to be necessary.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Also could get rid of the one used on "addPlot" aswell, just needed to update the AddItemButton comp to pass the type

@Anders2303 Anders2303 merged commit 44ba1d9 into equinor:main Dec 4, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants