Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
189 commits
Select commit Hold shift + click to select a range
e616288
Start of renaming process
rubenthoms Apr 2, 2025
7cd85e8
wip
rubenthoms Apr 2, 2025
20f1cef
wip
rubenthoms Apr 2, 2025
f122703
wip
rubenthoms Apr 2, 2025
1e88d1f
Merge remote-tracking branch 'equinor/main' into dpf-adjustments
rubenthoms Apr 2, 2025
1782516
wip
rubenthoms Apr 2, 2025
0c8a5bb
wip
rubenthoms Apr 3, 2025
8ea766e
wip
rubenthoms Apr 3, 2025
efbd19d
wip
rubenthoms Apr 3, 2025
3c9ff39
Merge remote-tracking branch 'equinor/main' into dpf-adjustments
rubenthoms Apr 3, 2025
1438849
wip
rubenthoms Apr 3, 2025
40e379d
wip
rubenthoms Apr 3, 2025
7a3a16e
Renaming
rubenthoms Apr 4, 2025
1ef5f9d
Some missed renaming
rubenthoms Apr 4, 2025
849e800
Added `type` to import
rubenthoms Apr 4, 2025
94c6d90
Merge remote-tracking branch 'equinor/main' into dpf-adjustments
rubenthoms Apr 4, 2025
6b67f0f
Adjustment after hack to get main merged in
rubenthoms Apr 4, 2025
52d350f
Merge remote-tracking branch 'equinor/main' into dpf-adjustments
rubenthoms Apr 4, 2025
b1ea01f
Implementation of updaters for settings attributes (enable, visible)
rubenthoms Apr 4, 2025
a21aaf9
Adjustments to names
rubenthoms Apr 7, 2025
344d4e9
Merge remote-tracking branch 'equinor/main' into dpf-settings-rework
rubenthoms Apr 7, 2025
efe7999
Fixes after merge
rubenthoms Apr 7, 2025
3617143
wip
rubenthoms Apr 7, 2025
ef9a795
wip
rubenthoms Apr 7, 2025
997fd3c
wip
rubenthoms Apr 8, 2025
79c6772
wip
rubenthoms Apr 8, 2025
c83c68e
wip
rubenthoms Apr 8, 2025
64a18ad
wip
rubenthoms Apr 8, 2025
7343778
wip
rubenthoms Apr 8, 2025
9710813
wip
rubenthoms Apr 8, 2025
ac070bc
wip
rubenthoms Apr 10, 2025
43ba9c3
Switched from shared array buffers to transfer of regular buffers
rubenthoms Apr 11, 2025
8adb89b
wip
rubenthoms Apr 11, 2025
5d6e617
fix
rubenthoms Apr 22, 2025
024535f
fix: linting issues
rubenthoms Apr 22, 2025
458d0a7
Merge branch 'dpf-fix-import-issue' into dpf-2d-fix-colorlegend
rubenthoms Apr 22, 2025
7994a6e
fix
rubenthoms Apr 22, 2025
6951bca
Merge remote-tracking branch 'equinor/main' into dpf-3dviewer
rubenthoms Apr 23, 2025
ac68148
wip
rubenthoms Apr 23, 2025
9055b9e
Merge remote-tracking branch 'origin/dpf-2d-fix-colorlegend' into dpf…
rubenthoms Apr 23, 2025
f8b30a7
Merge remote-tracking branch 'equinor/main' into dpf-3dviewer
rubenthoms Apr 23, 2025
1eaf40d
wip
rubenthoms Apr 23, 2025
ef71161
wip
rubenthoms Apr 24, 2025
9dcb541
wip
rubenthoms May 2, 2025
a685de9
fix: api
rubenthoms May 2, 2025
3b803cc
wip
rubenthoms May 2, 2025
84f1092
wip
rubenthoms May 2, 2025
2cc806e
Adjustments to api types
rubenthoms May 5, 2025
967772f
Minor fixes
rubenthoms May 5, 2025
6c826e0
fixes
rubenthoms May 6, 2025
dcf0e0b
fixes
rubenthoms May 7, 2025
ffbd84d
Immutability
rubenthoms May 7, 2025
ec56a6f
Added attribute dependencies to groups
rubenthoms May 7, 2025
38f4ba3
fix: import order
rubenthoms May 8, 2025
45bceb7
Merge remote-tracking branch 'equinor/main' into dpf-improve-dep-tree
rubenthoms May 8, 2025
69ee7b6
wip
rubenthoms May 8, 2025
6265dd9
wip
rubenthoms May 8, 2025
18acaf9
wip
rubenthoms May 8, 2025
b8e8ac0
wip
rubenthoms May 8, 2025
87fbedf
fix: committed by mistake
rubenthoms May 8, 2025
13e87cc
fix: color legend titles becoming invisible
rubenthoms May 8, 2025
a3f9b84
Fixes related to static settings and rerendering
rubenthoms May 9, 2025
506dfee
Removed immutability for now
rubenthoms May 9, 2025
9e7ff69
Merge branch 'main' into dpf-improve-dep-tree
rubenthoms May 9, 2025
e1c4a68
fix: resetting shared settings
rubenthoms May 9, 2025
3c8b3dd
Merge branch 'main' into dpf-improve-dep-tree
rubenthoms May 12, 2025
4262a10
wip
rubenthoms May 12, 2025
08a98a5
fix: 2D viewer annotations
rubenthoms May 12, 2025
2ce53e1
Adjustments to global settings
rubenthoms May 12, 2025
f774746
wip
rubenthoms May 12, 2025
de51aab
wip - not working yet
rubenthoms May 12, 2025
5a095e6
Implemented logic for multiple shared settings
rubenthoms May 13, 2025
eb251e6
Merge remote-tracking branch 'equinor/main' into dpf-3dviewer
rubenthoms May 13, 2025
97cc73b
wip
rubenthoms May 13, 2025
b9d89ec
wip
rubenthoms May 14, 2025
55c3dae
Merge branch 'dpf-improve-dep-tree' into dpf-3dviewer
rubenthoms May 14, 2025
5cbdb59
wip
rubenthoms May 14, 2025
7db3afd
fix: Premature set loading leading to updates before new value is set
rubenthoms May 14, 2025
62166a1
wip
rubenthoms May 14, 2025
0e4a7e7
Merge branch 'dpf-improve-dep-tree' into dpf-3dviewer
rubenthoms May 14, 2025
f5ac608
fix: settings resetting when changing items
rubenthoms May 15, 2025
99efe17
fix: settings resetting when changing items
rubenthoms May 15, 2025
fe97a9d
fix: check not taking into consideration all types of groups
rubenthoms May 15, 2025
1fc1c8e
fix: bug in sortable list and non-updated checks in group delegate
rubenthoms May 15, 2025
e8bd41c
Merge branch 'dpf-improve-dep-tree' into dpf-3dviewer
rubenthoms May 15, 2025
df5ed61
wip
rubenthoms May 15, 2025
6bc9e1a
Minor adjustments
rubenthoms May 15, 2025
0dfb7ee
fix: added cloning when initializing global settings
rubenthoms May 15, 2025
0f2b46c
change: `undefined` to `null` for undefined global settings
rubenthoms May 15, 2025
9058a6c
Merge remote-tracking branch 'equinor/main' into dpf-improve-dep-tree
rubenthoms May 15, 2025
414fd88
fix: order after merging
rubenthoms May 15, 2025
3d7fe8b
Merge branch 'dpf-improve-dep-tree' into dpf-3dviewer
rubenthoms May 15, 2025
a573047
fix: issues
rubenthoms May 15, 2025
b08ee6a
Merge branch 'dpf-improve-dep-tree' into dpf-3dviewer
rubenthoms May 15, 2025
bf36958
fix: do not throw errors on initialization
rubenthoms May 15, 2025
5eba5d9
Merge branch 'dpf-improve-dep-tree' into dpf-3dviewer
rubenthoms May 15, 2025
0971549
wip
rubenthoms May 15, 2025
a8ac7f1
wip
rubenthoms May 16, 2025
b22118e
fix: reducer functions
rubenthoms May 16, 2025
a47a614
fix: apply most recent shared setting value to setting on unregister
rubenthoms May 16, 2025
f9ab8d4
Merge branch 'dpf-improve-dep-tree' into dpf-3dviewer
rubenthoms May 16, 2025
db1fc0c
wip
rubenthoms May 16, 2025
23691d4
wip
rubenthoms May 16, 2025
56d1528
Merge remote-tracking branch 'equinor/main' into dpf-3dviewer
rubenthoms May 19, 2025
762fa83
wip
rubenthoms May 19, 2025
b36c031
wip
rubenthoms May 19, 2025
bdc4cae
Merge remote-tracking branch 'equinor/main' into dpf-3dviewer
rubenthoms May 20, 2025
12b2f55
wip
rubenthoms May 20, 2025
4db334a
wip
rubenthoms May 21, 2025
61b1c16
wip
rubenthoms May 21, 2025
26af193
wip
rubenthoms May 22, 2025
08630bd
wip
rubenthoms May 22, 2025
e3b308f
wip
rubenthoms May 22, 2025
46d95ed
wip
rubenthoms May 23, 2025
f8021ad
wip
rubenthoms May 23, 2025
66c1513
wip
rubenthoms May 26, 2025
d0dfbd9
Adjusted hover visualization transformer definition and added hook
rubenthoms May 26, 2025
1393891
Adjustments
rubenthoms May 26, 2025
9ce0b31
linting
rubenthoms May 26, 2025
272affc
fix
rubenthoms May 26, 2025
bbedeb4
Adjusted names
rubenthoms May 26, 2025
bbdb7c0
Merge branch 'dpf-improved-hover-transformation' into dpf-3dviewer
rubenthoms May 26, 2025
5d0a8e3
wip
rubenthoms May 26, 2025
b4d31a1
wip
rubenthoms May 26, 2025
1816914
wip
rubenthoms May 26, 2025
fc9cc36
wip
rubenthoms May 28, 2025
b1ad0b7
Merge remote-tracking branch 'equinor/main' into dpf-3dviewer
rubenthoms May 28, 2025
aba00cf
wip
rubenthoms May 28, 2025
bb0cd6e
wip
rubenthoms May 30, 2025
719f39d
wip
rubenthoms May 30, 2025
8e9729b
wip
rubenthoms Jun 2, 2025
0d3c5b9
wip
rubenthoms Jun 2, 2025
6c982ba
wip
rubenthoms Jun 3, 2025
d7a6a8d
wip
rubenthoms Jun 4, 2025
b5207ba
wip
rubenthoms Jun 4, 2025
5ce4535
Merge remote-tracking branch 'equinor/main' into dpf-3dviewer
rubenthoms Jun 4, 2025
aaff273
wip
rubenthoms Jun 4, 2025
3fe3f05
wip
rubenthoms Jun 4, 2025
3a7d44f
wip
rubenthoms Jun 4, 2025
2cb0eca
wip
rubenthoms Jun 4, 2025
d735448
wip
rubenthoms Jun 4, 2025
20a6278
wip
rubenthoms Jun 5, 2025
e51a245
wip
rubenthoms Jun 5, 2025
ce38c5d
wip
rubenthoms Jun 10, 2025
389954d
wip
rubenthoms Jun 10, 2025
d8f77e1
Merge remote-tracking branch 'equinor/main' into dpf-3dviewer
rubenthoms Jun 10, 2025
f0dce39
fix: toggleButton
rubenthoms Jun 10, 2025
fa39bd3
wip
rubenthoms Jun 10, 2025
643ddae
fixes
rubenthoms Jun 10, 2025
4bd4066
linting
rubenthoms Jun 10, 2025
7ca4ede
linting
rubenthoms Jun 10, 2025
36a7f65
fix
rubenthoms Jun 10, 2025
c7fb792
Minor fix
rubenthoms Jun 10, 2025
07dfe99
Multiple minor fixes
rubenthoms Jun 11, 2025
bb414fb
Changed order of layers
rubenthoms Jun 11, 2025
b98d5b0
Merge branch 'review' into dpf-3dviewer
rubenthoms Jun 11, 2025
05d32c8
Added bounding box calculation for well layers and added memoization
rubenthoms Jun 11, 2025
b5bbc63
Fixed linting and unit test
rubenthoms Jun 11, 2025
c552edb
Removed console debug
rubenthoms Jun 11, 2025
1cdf9ce
Better component separation
rubenthoms Jun 11, 2025
68e9d55
fix: vertical scale issue with Wells and adjusted vertical scale default
rubenthoms Jun 12, 2025
2e3954d
fix: import as type
rubenthoms Jun 12, 2025
a5f1be7
Removed unused dependency
rubenthoms Jun 16, 2025
2204319
Removed unused dependencies
rubenthoms Jun 16, 2025
a0728ed
Merge remote-tracking branch 'equinor/main' into dpf-3dviewer
rubenthoms Jul 21, 2025
2dc27b4
Fix missing type
rubenthoms Jul 21, 2025
514b971
Working on review adjustments
rubenthoms Jul 21, 2025
3ec4ee7
Adjusted to review comments
rubenthoms Jul 22, 2025
471f2fd
fix: bugs when creating/editing polylines
rubenthoms Jul 22, 2025
e719e8c
Further adjustments according to review comments
rubenthoms Jul 23, 2025
3292d76
fix: bbox for wells layer
rubenthoms Jul 23, 2025
bfab11c
Improved number formatting
rubenthoms Jul 23, 2025
4c705c0
Merge remote-tracking branch 'equinor/main' into dpf-3dviewer
rubenthoms Jul 23, 2025
89fde0f
fix: vertical scale not respected when dragging polyline points
rubenthoms Jul 23, 2025
9792e17
Merge remote-tracking branch 'equinor/main' into dpf-3dviewer
rubenthoms Jul 23, 2025
49f129a
fix: readout z coordinate not respecting vertical scale
rubenthoms Jul 23, 2025
715eea1
Changed threshold for K suffix
rubenthoms Jul 28, 2025
54efd3f
Merge branch 'main' into dpf-3dviewer
rubenthoms Aug 14, 2025
7eb39be
Merge branch 'main' into dpf-3dviewer
rubenthoms Aug 15, 2025
ab29f93
fix: linting and dependency issues
rubenthoms Aug 15, 2025
da94271
fix: dependency violations
rubenthoms Aug 15, 2025
559e5e2
fix: re-generated api sdk
rubenthoms Aug 15, 2025
8657bae
Merge branch 'main' into dpf-3dviewer
rubenthoms Aug 15, 2025
aff7839
Merge remote-tracking branch 'equinor/main' into dpf-3dviewer
rubenthoms Sep 12, 2025
3b4de98
fix: multiple bugs related to wellbores
rubenthoms Sep 12, 2025
870616b
fixed: renaming backend
rubenthoms Sep 12, 2025
99194dd
Merge branch 'main' into dpf-3dviewer
rubenthoms Sep 18, 2025
db59ee6
fix: add scaling of bi-cone center point
rubenthoms Sep 19, 2025
484c74a
Merge remote-tracking branch 'equinor/main' into dpf-3dviewer
rubenthoms Sep 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 55 additions & 7 deletions backend_py/primary/primary/routers/seismic/router.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import List, Optional
from typing import List, Optional, Tuple

from fastapi import APIRouter, Body, Depends, HTTPException, Query
from webviz_pkg.core_utils.b64 import b64_encode_float_array_as_float32
Expand Down Expand Up @@ -41,7 +41,7 @@ async def get_inline_slice(
seismic_attribute: str = Query(description="Seismic cube attribute"),
time_or_interval_str: str = Query(description="Timestamp or timestep"),
observed: bool = Query(description="Observed or simulated"),
inline_no: int = Query(description="Inline number"),
inline_number: int = Query(description="Inline number"),
) -> schemas.SeismicSliceData:
"""Get a seismic inline from a seismic cube."""
seismic_access = SeismicAccess.from_ensemble_name(
Expand All @@ -64,7 +64,7 @@ async def get_inline_slice(

vds_access = VdsAccess(sas_token=vds_handle.sas_token, vds_url=vds_handle.vds_url)

flattened_slice_traces_array, metadata = await vds_access.get_inline_slice_async(line_no=inline_no)
flattened_slice_traces_array, metadata = await vds_access.get_inline_slice_async(line_no=inline_number)

return converters.to_api_vds_slice_data(
flattened_slice_traces_array=flattened_slice_traces_array, metadata=metadata
Expand All @@ -80,7 +80,7 @@ async def get_crossline_slice(
seismic_attribute: str = Query(description="Seismic cube attribute"),
time_or_interval_str: str = Query(description="Timestamp or timestep"),
observed: bool = Query(description="Observed or simulated"),
crossline_no: int = Query(description="Crossline number"),
crossline_num: int = Query(description="Crossline number"),
) -> schemas.SeismicSliceData:
"""Get a seismic crossline from a seismic cube."""
seismic_access = SeismicAccess.from_ensemble_name(
Expand All @@ -103,7 +103,7 @@ async def get_crossline_slice(

vds_access = VdsAccess(sas_token=vds_handle.sas_token, vds_url=vds_handle.vds_url)

flattened_slice_traces_array, metadata = await vds_access.get_crossline_slice_async(line_no=crossline_no)
flattened_slice_traces_array, metadata = await vds_access.get_crossline_slice_async(line_no=crossline_num)

return converters.to_api_vds_slice_data(
flattened_slice_traces_array=flattened_slice_traces_array, metadata=metadata
Expand All @@ -119,7 +119,7 @@ async def get_depth_slice(
seismic_attribute: str = Query(description="Seismic cube attribute"),
time_or_interval_str: str = Query(description="Timestamp or timestep"),
observed: bool = Query(description="Observed or simulated"),
depth_slice_no: int = Query(description="Depth slice no"),
depth_slice_num: int = Query(description="Depth slice number"),
) -> schemas.SeismicSliceData:
"""Get a seismic depth slice from a seismic cube."""
seismic_access = SeismicAccess.from_ensemble_name(
Expand All @@ -142,13 +142,61 @@ async def get_depth_slice(

vds_access = VdsAccess(sas_token=vds_handle.sas_token, vds_url=vds_handle.vds_url)

flattened_slice_traces_array, metadata = await vds_access.get_depth_slice_async(depth_slice_no=depth_slice_no)
flattened_slice_traces_array, metadata = await vds_access.get_depth_slice_async(depth_slice_no=depth_slice_num)

return converters.to_api_vds_slice_data(
flattened_slice_traces_array=flattened_slice_traces_array, metadata=metadata
)


@router.get("/get_seismic_slices/")
# pylint: disable=too-many-arguments
async def get_seismic_slices(
authenticated_user: AuthenticatedUser = Depends(AuthHelper.get_authenticated_user),
case_uuid: str = Query(description="Sumo case uuid"),
ensemble_name: str = Query(description="Ensemble name"),
realization_num: int = Query(description="Realization number"),
seismic_attribute: str = Query(description="Seismic cube attribute"),
time_or_interval_str: str = Query(description="Timestamp or timestep"),
observed: bool = Query(description="Observed or simulated"),
inline_number: int = Query(description="Inline number"),
crossline_number: int = Query(description="Crossline number"),
depth_slice_number: int = Query(description="Depth slice number"),
) -> Tuple[schemas.SeismicSliceData, schemas.SeismicSliceData, schemas.SeismicSliceData]:
"""Get a seismic depth slice from a seismic cube."""
seismic_access = SeismicAccess.from_ensemble_name(
authenticated_user.get_sumo_access_token(), case_uuid, ensemble_name
)

vds_handle: Optional[VdsHandle] = None
try:
vds_handle = await seismic_access.get_vds_handle_async(
realization=realization_num,
seismic_attribute=seismic_attribute,
time_or_interval_str=time_or_interval_str,
observed=observed,
)
except ValueError as err:
raise HTTPException(status_code=404, detail=str(err)) from err

if vds_handle is None:
raise HTTPException(status_code=404, detail="Vds handle not found")

vds_access = VdsAccess(sas_token=vds_handle.sas_token, vds_url=vds_handle.vds_url)

inline_tuple = await vds_access.get_inline_slice_async(line_no=inline_number)
crossline_tuple = await vds_access.get_crossline_slice_async(line_no=crossline_number)
depth_slice_tuple = await vds_access.get_depth_slice_async(depth_slice_no=depth_slice_number)

return (
converters.to_api_vds_slice_data(flattened_slice_traces_array=inline_tuple[0], metadata=inline_tuple[1]),
converters.to_api_vds_slice_data(flattened_slice_traces_array=crossline_tuple[0], metadata=crossline_tuple[1]),
converters.to_api_vds_slice_data(
flattened_slice_traces_array=depth_slice_tuple[0], metadata=depth_slice_tuple[1]
),
)


@router.post("/get_seismic_fence/")
async def post_get_seismic_fence(
authenticated_user: AuthenticatedUser = Depends(AuthHelper.get_authenticated_user),
Expand Down
33 changes: 22 additions & 11 deletions backend_py/primary/primary/services/vds_access/vds_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

from primary import config
from primary.services.utils.httpx_async_client_wrapper import HTTPX_ASYNC_CLIENT_WRAPPER
from primary.services.service_exceptions import ServiceRequestError

from .response_types import VdsArray, VdsAxis, VdsMetadata, VdsFenceMetadata, VdsSliceMetadata
from .request_types import (
Expand Down Expand Up @@ -60,16 +61,21 @@ def __init__(
@staticmethod
async def _query_async(endpoint: str, request: VdsRequestedResource) -> httpx.Response:
"""Query the service"""
try:
response = await HTTPX_ASYNC_CLIENT_WRAPPER.client.post(
f"{config.VDS_HOST_ADDRESS}/{endpoint}",
headers={"Content-Type": "application/json"},
content=json.dumps(request.request_parameters()),
timeout=60,
)

response = await HTTPX_ASYNC_CLIENT_WRAPPER.client.post(
f"{config.VDS_HOST_ADDRESS}/{endpoint}",
headers={"Content-Type": "application/json"},
content=json.dumps(request.request_parameters()),
timeout=60,
)
if response.is_error:
raise ServiceRequestError(
f"({str(response.status_code)})-{response.reason_phrase}-{response.text}", service=Service.VDS
)

if response.is_error:
raise RuntimeError(f"({str(response.status_code)})-{response.reason_phrase}-{response.text}")
except httpx.RequestError as error:
raise ServiceRequestError(f"{error}", service=Service.VDS) from error

return response

Expand All @@ -94,8 +100,14 @@ async def get_inline_slice_async(self, line_no: int) -> Tuple[NDArray[np.float32
response = await self._query_async(endpoint, slice_request)

parts = self._extract_and_validate_body_parts_from_response(response)

metadata = VdsSliceMetadata(**json.loads(parts[0].content))
response_metadata = json.loads(parts[0].content)
metadata = VdsSliceMetadata(
format=response_metadata["format"],
shape=response_metadata["shape"],
x_axis=VdsAxis(**response_metadata["x"]),
y_axis=VdsAxis(**response_metadata["y"]),
geospatial=response_metadata["geospatial"],
)
self._assert_valid_metadata_format_and_shape(metadata)

byte_array = parts[1].content
Expand Down Expand Up @@ -254,7 +266,6 @@ async def get_flattened_fence_traces_array_and_metadata_async(

# Convert every value of `hard_coded_fill_value` to np.nan
flattened_fence_traces_float32_array[flattened_fence_traces_float32_array == hard_coded_fill_value] = np.nan

return (flattened_fence_traces_float32_array, num_traces, num_samples_per_trace)

def _extract_and_validate_body_parts_from_response(self, response: httpx.Response) -> Tuple[BodyPart, BodyPart]:
Expand Down
15 changes: 15 additions & 0 deletions frontend/.dependency-cruiser.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,21 @@ module.exports = {
path: "^src/(?!$1/).*(/_[^/]+/)",
},
},
{
name: "no-cross-module-imports",
severity: "error",
from: {
path: "^src/modules/([^/]+)/",
},
to: {
path: "^src/modules/([^/]+)/",
pathNot: [
"^src/modules/_shared/",
// This should allow same-module imports
"($1)",
],
},
},
],
options: {
/* conditions specifying which files not to follow further when encountered:
Expand Down
Loading
Loading