Break ties
When your dataset has multiple points with the exact same value, it can cause problems with data transformation. Breaking ties, sometimes called despiking, is a way to avoid that. When you break ties, you add tiny random numbers to all the data values. This task adds a random number between 10^-7 and 10^-6 to each data value. The random number is different for each one.
Parameters
composites
(geoscience object reference)- A geoscience object reference that points to a one-dimensional continuous attribute inside a pointset or downhole-intervals object.
target
(geoscience object reference)- A geoscience object reference that tells the task where to save the result. It must point to an attribute inside a pointset or downhole-intervals object.
random_seed
(integer, optional)- Seeds random number generation in the task. Defaults to
123456789
.
- Seeds random number generation in the task. Defaults to
Example
Request
requests.post(
"https://{hub}.api.seequent.com/compute/orgs/{org_id}/geostat/break-ties",
headers={"Authorization": "Bearer {token}"},
json={
"parameters": {
"composites": {
"type": "geoscience-object-reference",
"object_reference": "https://{hub}.api.seequent.com/geoscience-object/orgs/{org_id}/workspaces/{workspace_id}/objects/path/my-pointset.json",
"object_element": [
{
"type": "element",
"path": "/locations/attributes/@name=my-data",
},
],
},
"target": {
"type": "geoscience-object-reference",
"object_reference": "https://{hub}.api.seequent.com/geoscience-object/orgs/{org_id}/workspaces/{workspace_id}/objects/path/my-pointset.json",
"object_element": [
{
"type": "element",
"path": "/locations/attributes/@name=my-data-without-ties",
},
],
},
"random_seed": 9,
},
},
)
Result
{
"message": "Breaking ties completed.",
"object_modified": {
"type": "geoscience-object-reference",
"object_reference": "https://{hub}.api.seequent.com/geoscience-object/orgs/{org_id}/workspaces/{workspace_id}/objects/path/my-pointset.json",
"object_element": [
{
"type": "element",
"path": "/locations/attributes/@name=my-data-without-ties",
},
],
},
}
Tips
- The composites and target can use the same object, but they don't have to.