Skip to content

Commit

Permalink
Add 'calculation' as field for content 'seismic'
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrivenaes committed Jan 6, 2023
1 parent 90db726 commit 8dbe875
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ data: # The data block describes the actual data (e.g. surface). Only present in

seismic:
attribute: amplitude_timeshifted
calculation: mean
zrange: 12.0
filter_size: 1.0
scaling_factor: 1.0
Expand Down Expand Up @@ -189,4 +190,3 @@ masterdata:
stratigraphic_column:
identifier: DROGON_2020
uuid: 00000000-0000-0000-0000-000000000000 # mock uuid for Drogon

8 changes: 7 additions & 1 deletion schema/definitions/0.8.0/schema/fmu_results.json
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,12 @@
"amplitude_timeshifted"
]
},
"calculation": {
"type": "string",
"examples": [
"mean"
]
},
"zrange": {
"type": "number",
"examples": [
Expand Down Expand Up @@ -1281,4 +1287,4 @@
}
}
]
}
}
3 changes: 2 additions & 1 deletion src/fmu/dataio/_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ def __post_init__(self):
"thickness": None,
"property": {"attribute": str, "is_discrete": bool},
"seismic": {
"attribute": str,
"attribute": str, # e.g. amplitude
"calculation": str, # e.g. mean
"zrange": float,
"filter_size": float,
"scaling_factor": float,
Expand Down
6 changes: 4 additions & 2 deletions tests/test_units/test_dataio.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ def test_content_valid_dict(regsurf, globalconfig2):
name="TopVolantis",
content={
"seismic": {
"attribute": "myattribute",
"attribute": "amplitude",
"calculation": "mean",
"zrange": 12.0,
"stacking_offset": "0-15",
}
Expand All @@ -138,7 +139,8 @@ def test_content_valid_dict(regsurf, globalconfig2):
mymeta = eobj.generate_metadata(regsurf)
assert mymeta["data"]["content"] == "seismic"
assert mymeta["data"]["seismic"] == {
"attribute": "myattribute",
"attribute": "amplitude",
"calculation": "mean",
"zrange": 12.0,
"stacking_offset": "0-15",
}
Expand Down

0 comments on commit 8dbe875

Please sign in to comment.