@webviz/well-log-viewer 0.0.1-alpha.1 → 0.0.1-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/SyncLogViewer.js +3 -4
- package/dist/SyncLogViewer.js.map +1 -1
- package/dist/components/WellLogView.js +5 -5
- package/dist/components/WellLogView.js.map +1 -1
- package/dist/demo/example-data/welllog_template_2.json +167 -167
- package/dist/demo/example-data/wellpick_colors.json +1 -1
- package/dist/demo/example-data/wellpicks.json +179 -179
- package/package.json +32 -5
- package/dist/Intro.stories.mdx +0 -59
- package/dist/package.json +0 -21
- package/src/Intro.stories.mdx +0 -59
- package/src/MapAndWellLogViewer.stories.jsx +0 -147
- package/src/MapAndWellLogViewer.test.tsx +0 -26
- package/src/MapAndWellLogViewer.tsx +0 -473
- package/src/SyncLogViewer.stories.jsx +0 -361
- package/src/SyncLogViewer.test.tsx +0 -41
- package/src/SyncLogViewer.tsx +0 -1188
- package/src/WellLogViewer.png +0 -0
- package/src/WellLogViewer.stories.jsx +0 -169
- package/src/WellLogViewer.test.tsx +0 -53
- package/src/WellLogViewer.tsx +0 -439
- package/src/WellLogViewer_performance.test.tsx +0 -78
- package/src/__snapshots__/MapAndWellLogViewer.test.tsx.snap +0 -365
- package/src/__snapshots__/SyncLogViewer.test.tsx.snap +0 -510
- package/src/__snapshots__/WellLogViewer.test.tsx.snap +0 -552
- package/src/components/AxisSelector.test.tsx +0 -50
- package/src/components/AxisSelector.tsx +0 -49
- package/src/components/ColorTableTypes.ts +0 -9
- package/src/components/InfoPanel.test.tsx +0 -58
- package/src/components/InfoPanel.tsx +0 -144
- package/src/components/InfoTypes.ts +0 -17
- package/src/components/LocalMenus.tsx +0 -336
- package/src/components/PlotDialog.tsx +0 -419
- package/src/components/Scroller.stories.jsx +0 -80
- package/src/components/Scroller.test.tsx +0 -22
- package/src/components/Scroller.tsx +0 -173
- package/src/components/TrackDialog.tsx +0 -217
- package/src/components/WellLogSpacer.tsx +0 -483
- package/src/components/WellLogTemplateTypes.ts +0 -65
- package/src/components/WellLogTypes.ts +0 -53
- package/src/components/WellLogView.stories.jsx +0 -84
- package/src/components/WellLogView.test.tsx +0 -52
- package/src/components/WellLogView.tsx +0 -2063
- package/src/components/WellLogViewWithScroller.stories.jsx +0 -69
- package/src/components/WellLogViewWithScroller.test.tsx +0 -47
- package/src/components/WellLogViewWithScroller.tsx +0 -179
- package/src/components/ZoomSlider.stories.jsx +0 -52
- package/src/components/ZoomSlider.test.tsx +0 -28
- package/src/components/ZoomSlider.tsx +0 -86
- package/src/components/__snapshots__/AxisSelector.test.tsx.snap +0 -28
- package/src/components/__snapshots__/InfoPanel.test.tsx.snap +0 -103
- package/src/components/__snapshots__/Scroller.test.tsx.snap +0 -13
- package/src/components/__snapshots__/WellLogView.test.tsx.snap +0 -54
- package/src/components/__snapshots__/WellLogViewWithScroller.test.tsx.snap +0 -270
- package/src/components/__snapshots__/ZoomSlider.test.tsx.snap +0 -50
- package/src/components/styles.scss +0 -106
- package/src/custom.d.ts +0 -13
- package/src/demo/example-data/volve_logs.json +0 -689617
- package/src/demo/example-data/welllog_template_2.json +0 -196
- package/src/demo/example-data/wellpick_colors.json +0 -156
- package/src/demo/example-data/wellpicks.json +0 -186
- package/src/index.ts +0 -8
- package/src/utils/axes.ts +0 -26
- package/src/utils/color-table.ts +0 -153
- package/src/utils/deepcopy.ts +0 -3
- package/src/utils/edit-track.tsx +0 -40
- package/src/utils/fill-info.ts +0 -224
- package/src/utils/gradientfill-plot-legend.ts +0 -177
- package/src/utils/gradientfill-plot.ts +0 -203
- package/src/utils/graph/factory.ts +0 -15
- package/src/utils/legend/common.ts +0 -153
- package/src/utils/log-viewer.ts +0 -209
- package/src/utils/minmax.ts +0 -126
- package/src/utils/pattern.tsx +0 -50
- package/src/utils/stack/stack-legend.ts +0 -100
- package/src/utils/tracks.ts +0 -1559
- package/tsconfig.json +0 -8
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
export type TemplatePlotScaleTypes = "linear" | "log";
|
|
2
|
-
|
|
3
|
-
export type TemplatePlotTypes =
|
|
4
|
-
| ""
|
|
5
|
-
| "line"
|
|
6
|
-
| "linestep"
|
|
7
|
-
| "dot"
|
|
8
|
-
| "area"
|
|
9
|
-
| "differential"
|
|
10
|
-
| "gradientfill"
|
|
11
|
-
| "stacked";
|
|
12
|
-
|
|
13
|
-
export type CSSColor = string;
|
|
14
|
-
// rgbhexcolor pattern: "^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$"
|
|
15
|
-
// rgbcolor pattern: "^rgb\\((25[0-5]|2[0-4][0-9]|1[0-9]?[0-9]?|[1-9][0-9]?|[0-9]), ?(25[0-5]|2[0-4][0-9]|1[0-9]?[0-9]?|[1-9][0-9]?|[0-9]), ?(25[0-5]|2[0-4][0-9]|1[0-9]?[0-9]?|[1-9][0-9]?|[0-9])\\)$"
|
|
16
|
-
|
|
17
|
-
export type TemplatePlotProps = {
|
|
18
|
-
type: TemplatePlotTypes;
|
|
19
|
-
scale?: TemplatePlotScaleTypes; // 'linear' or 'log', default 'linear'
|
|
20
|
-
domain?: [number, number]; // min, max values
|
|
21
|
-
|
|
22
|
-
color: CSSColor;
|
|
23
|
-
inverseColor?: CSSColor;
|
|
24
|
-
|
|
25
|
-
fill?: CSSColor; // for 'area' plot
|
|
26
|
-
fillOpacity?: number; // for 'area' and 'gradientfill' plots! default 0.25
|
|
27
|
-
colorTable?: string; // table id (name) for 'gradientfill' plot
|
|
28
|
-
inverseColorTable?: string; // table id (name) for 'gradientfill' plot
|
|
29
|
-
colorScale?: TemplatePlotScaleTypes; // for 'linear' plot scale. default equal to plot scale
|
|
30
|
-
inverseColorScale?: TemplatePlotScaleTypes; // for 'linear' plot scale. default equal to plot scale
|
|
31
|
-
|
|
32
|
-
color2?: CSSColor; // for 'differetial' plot
|
|
33
|
-
fill2?: CSSColor; // for 'differetial' plot
|
|
34
|
-
//...
|
|
35
|
-
}; // Part of JSON
|
|
36
|
-
|
|
37
|
-
export interface TemplatePlot extends TemplatePlotProps {
|
|
38
|
-
name: string;
|
|
39
|
-
style?: string;
|
|
40
|
-
scale?: TemplatePlotScaleTypes | undefined;
|
|
41
|
-
name2?: string; // for differential plot
|
|
42
|
-
} // Part of JSON
|
|
43
|
-
|
|
44
|
-
export type TemplateTrack = {
|
|
45
|
-
title: string;
|
|
46
|
-
required?: boolean;
|
|
47
|
-
plots: TemplatePlot[];
|
|
48
|
-
scale?: TemplatePlotScaleTypes; // 'linear' or 'log', default first plot scale
|
|
49
|
-
domain?: [number, number]; // min, max values, default all plots domain
|
|
50
|
-
}; // Part of JSON
|
|
51
|
-
|
|
52
|
-
export interface TemplateStyle extends TemplatePlotProps {
|
|
53
|
-
name: string;
|
|
54
|
-
} // Part of JSON
|
|
55
|
-
|
|
56
|
-
export interface Template {
|
|
57
|
-
name: string;
|
|
58
|
-
scale: {
|
|
59
|
-
primary: string;
|
|
60
|
-
allowSecondary?: boolean;
|
|
61
|
-
};
|
|
62
|
-
tracks: TemplateTrack[];
|
|
63
|
-
styles?: TemplateStyle[];
|
|
64
|
-
//...
|
|
65
|
-
} // JSON
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
// See https://github.com/JSONWellLogFormat/JSONWellLogFormat
|
|
2
|
-
export type integer = number;
|
|
3
|
-
export type float = number;
|
|
4
|
-
export type datetime = string;
|
|
5
|
-
|
|
6
|
-
export type WellLogHeader = {
|
|
7
|
-
name?: string; // Log name
|
|
8
|
-
description?: string; // Log description
|
|
9
|
-
externalIds?: Record<string, string>; // IDs within external storage, key being the storage name, and value being the ID.
|
|
10
|
-
well?: string; // Well name
|
|
11
|
-
wellbore?: string; // Wellbore name
|
|
12
|
-
filed?: string; // Field name
|
|
13
|
-
country?: string; // Country of operation
|
|
14
|
-
date?: datetime; // Logging date
|
|
15
|
-
operator?: string; // Operator company name
|
|
16
|
-
serviceCompany?: string; // Service company name
|
|
17
|
-
runNumber?: string; // Run number
|
|
18
|
-
elevation?: float; // Vertical distance between measured depth 0.0 and mean sea level in SI unit (meters)
|
|
19
|
-
source?: string; // Source system or process of this log
|
|
20
|
-
startIndex?: number /*According to index value type*/; // Value of the first index. Unit according to index curve.
|
|
21
|
-
endIndex?: number /*According to index value type*/; // Value of the last index. Unit according to index curve.
|
|
22
|
-
step?: number /*According to index value type*/; // Distance between indices if regularly sampled. Unit according to index curve. If log is time based, milliseconds assumed.
|
|
23
|
-
dataUri?: string; // Point to data source in case this is kept separate. Can be absolute or relative according to the URI specification.
|
|
24
|
-
//...
|
|
25
|
-
}; // a part of JSON
|
|
26
|
-
export type WellLogCurve = {
|
|
27
|
-
name: string; // Curve name or mnemonic. Mandatory. Non-null.
|
|
28
|
-
description?: string | null; // Curve description. Optional.
|
|
29
|
-
quantity?: string | null; // Curve quantity such as length, pressure, force etc. Optional.
|
|
30
|
-
unit?: string | null; // Unit of measurement such as m, ft, bar, etc. Optional.
|
|
31
|
-
valueType?: string | null; // Curve value type: float, integer, string, datetime or boolean. Non-null. Optional. float assumed if not present.
|
|
32
|
-
dimensions?: integer; // Number of dimensions. [1,>. Non-null. Optional. 1 assumed if not present.
|
|
33
|
-
// Not supported yet:
|
|
34
|
-
//axis?: array of curve definition; // A detailed description of the multi-dimensional structure of the curve in case this spans multiple axes. One element per axis. The combined product of the axis diemsnsions elements must equal the dimensions of the curve. Optional.
|
|
35
|
-
//maxSize?: integer; // Maximum storage size (number of bytes) for UTF-8 string data. Used with binary storage in order to align the curve data. [0,>. Optional. 20 assumed if not present. Ignored for curves where valueType is other than string.
|
|
36
|
-
}; // a part of JSON
|
|
37
|
-
export type WellLogDataRow = (number | string | null)[];
|
|
38
|
-
|
|
39
|
-
export type WellLogMetadataDiscreteObjects = Record<string, []>;
|
|
40
|
-
// data example: { "Above_BCU": [ [255,13,186,255], 0 ], "ABOVE": ... }
|
|
41
|
-
|
|
42
|
-
export type WellLogMetadataDiscrete = {
|
|
43
|
-
attributes: string[] /* ["color", "code" ] */;
|
|
44
|
-
objects: WellLogMetadataDiscreteObjects;
|
|
45
|
-
}; // a part of JSON
|
|
46
|
-
|
|
47
|
-
export type WellLog = {
|
|
48
|
-
header: WellLogHeader;
|
|
49
|
-
curves: WellLogCurve[];
|
|
50
|
-
data: WellLogDataRow[];
|
|
51
|
-
|
|
52
|
-
metadata_discrete?: Record<string, WellLogMetadataDiscrete>;
|
|
53
|
-
}; // JSON object from a file
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import WellLogView from "./WellLogView";
|
|
3
|
-
import { argTypesWellLogViewProp } from "./WellLogView";
|
|
4
|
-
import { colorTables } from "@emerson-eps/color-tables";
|
|
5
|
-
|
|
6
|
-
const ComponentCode =
|
|
7
|
-
'<WellLogView id="WellLogView" \r\n' +
|
|
8
|
-
" horizontal=false \r\n" +
|
|
9
|
-
' welllog={require("../../../../../example-data/L898MUD.json")[0]} \r\n' +
|
|
10
|
-
' template={require("../../../../../example-data/welllog_template_1.json")} \r\n' +
|
|
11
|
-
" colorTables={colorTables} \r\n" +
|
|
12
|
-
"/>";
|
|
13
|
-
|
|
14
|
-
import { axisTitles, axisMnemos } from "../utils/axes";
|
|
15
|
-
|
|
16
|
-
export default {
|
|
17
|
-
component: WellLogView,
|
|
18
|
-
title: "WellLogViewer/Components/WellLogView",
|
|
19
|
-
parameters: {
|
|
20
|
-
docs: {
|
|
21
|
-
description: {
|
|
22
|
-
component:
|
|
23
|
-
"WellLogView is a basic react component to wrap [videx-wellog](https://github.com/equinor/videx-wellog) library for drawing well log data",
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
componentSource: {
|
|
27
|
-
code: ComponentCode,
|
|
28
|
-
language: "javascript",
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
argTypes: {
|
|
32
|
-
...argTypesWellLogViewProp,
|
|
33
|
-
id: {
|
|
34
|
-
description:
|
|
35
|
-
"The ID of this component, used to identify dash components in callbacks. The ID needs to be unique across all of the components in an app.",
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const Template = (args) => {
|
|
41
|
-
return (
|
|
42
|
-
<div style={{ height: "92vh" }}>
|
|
43
|
-
<div style={{ width: "100%", height: "100%" }}>
|
|
44
|
-
<WellLogView id="WellLogView" {...args} />
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
const welllogDefault = require("../../../../../example-data/L898MUD.json")[0];
|
|
51
|
-
|
|
52
|
-
export const Default = Template.bind({});
|
|
53
|
-
Default.args = {
|
|
54
|
-
id: "Well-Log-View",
|
|
55
|
-
horizontal: false,
|
|
56
|
-
welllog: welllogDefault,
|
|
57
|
-
template: require("../../../../../example-data/welllog_template_1.json"),
|
|
58
|
-
viewTitle: (
|
|
59
|
-
<div>
|
|
60
|
-
<i>Well</i> <b>{welllogDefault.header.well}</b>
|
|
61
|
-
</div>
|
|
62
|
-
),
|
|
63
|
-
colorTables: colorTables,
|
|
64
|
-
axisTitles: axisTitles,
|
|
65
|
-
axisMnemos: axisMnemos,
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
const welllogDiscrete =
|
|
69
|
-
require("../../../../../example-data/volve_logs.json")[0];
|
|
70
|
-
|
|
71
|
-
export const Discrete = Template.bind({});
|
|
72
|
-
Discrete.args = {
|
|
73
|
-
id: "Well-Log-View-Discrete",
|
|
74
|
-
horizontal: false,
|
|
75
|
-
welllog: welllogDiscrete,
|
|
76
|
-
template: require("../../../../../example-data/welllog_template_2.json"),
|
|
77
|
-
viewTitle: "Well '" + welllogDiscrete.header.well + "'",
|
|
78
|
-
colorTables: colorTables,
|
|
79
|
-
axisTitles: axisTitles,
|
|
80
|
-
axisMnemos: axisMnemos,
|
|
81
|
-
options: {
|
|
82
|
-
checkDatafileSchema: true,
|
|
83
|
-
},
|
|
84
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
|
-
import "@testing-library/jest-dom/extend-expect";
|
|
3
|
-
import { render } from "@testing-library/react";
|
|
4
|
-
import "jest-styled-components";
|
|
5
|
-
import React from "react";
|
|
6
|
-
import WellLogView from "./WellLogView";
|
|
7
|
-
import { colorTables } from "@emerson-eps/color-tables";
|
|
8
|
-
|
|
9
|
-
const exampleTemplate = require("../../../../../example-data/welllog_template_1.json");
|
|
10
|
-
const exampleWellLog = {
|
|
11
|
-
header: {},
|
|
12
|
-
curves: [],
|
|
13
|
-
data: [],
|
|
14
|
-
};
|
|
15
|
-
const exampleColorTable = colorTables;
|
|
16
|
-
|
|
17
|
-
window.ResizeObserver =
|
|
18
|
-
window.ResizeObserver ||
|
|
19
|
-
jest.fn().mockImplementation(() => ({
|
|
20
|
-
disconnect: jest.fn(),
|
|
21
|
-
observe: jest.fn(),
|
|
22
|
-
unobserve: jest.fn(),
|
|
23
|
-
}));
|
|
24
|
-
|
|
25
|
-
describe("Test Well Log View Component", () => {
|
|
26
|
-
it("snapshot test", () => {
|
|
27
|
-
const { container } = render(
|
|
28
|
-
<WellLogView
|
|
29
|
-
welllog={exampleWellLog}
|
|
30
|
-
options={{
|
|
31
|
-
checkDatafileSchema: true,
|
|
32
|
-
hideTrackLegend: true,
|
|
33
|
-
hideTrackTitle: true,
|
|
34
|
-
}}
|
|
35
|
-
template={exampleTemplate}
|
|
36
|
-
colorTables={exampleColorTable}
|
|
37
|
-
primaryAxis={"md"}
|
|
38
|
-
axisTitles={{
|
|
39
|
-
md: "MD",
|
|
40
|
-
tvd: "TVD",
|
|
41
|
-
time: "TIME",
|
|
42
|
-
}}
|
|
43
|
-
axisMnemos={{
|
|
44
|
-
md: ["DEPTH", "DEPT", "MD", "TDEP", "MD_RKB"],
|
|
45
|
-
tvd: ["TVD", "TVDSS", "DVER", "TVD_MSL"],
|
|
46
|
-
time: ["TIME"],
|
|
47
|
-
}}
|
|
48
|
-
/>
|
|
49
|
-
);
|
|
50
|
-
expect(container.firstChild).toMatchSnapshot();
|
|
51
|
-
});
|
|
52
|
-
});
|