curl --request POST \
--url https://api.eddy.engineer/v1/earthing.soil.fit \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"async": true,
"settings": {},
"survey": {},
"survey_key": "<string>",
"traverses": [
"<string>"
]
}
'import requests
url = "https://api.eddy.engineer/v1/earthing.soil.fit"
payload = {
"async": True,
"settings": {},
"survey": {},
"survey_key": "<string>",
"traverses": ["<string>"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
async: true,
settings: {},
survey: {},
survey_key: '<string>',
traverses: ['<string>']
})
};
fetch('https://api.eddy.engineer/v1/earthing.soil.fit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eddy.engineer/v1/earthing.soil.fit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'async' => true,
'settings' => [
],
'survey' => [
],
'survey_key' => '<string>',
'traverses' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eddy.engineer/v1/earthing.soil.fit"
payload := strings.NewReader("{\n \"async\": true,\n \"settings\": {},\n \"survey\": {},\n \"survey_key\": \"<string>\",\n \"traverses\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eddy.engineer/v1/earthing.soil.fit")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"async\": true,\n \"settings\": {},\n \"survey\": {},\n \"survey_key\": \"<string>\",\n \"traverses\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/earthing.soil.fit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"async\": true,\n \"settings\": {},\n \"survey\": {},\n \"survey_key\": \"<string>\",\n \"traverses\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{}{
"events": "/v1/jobs/job-000001-…/events",
"job_id": "<string>",
"phase": "queued",
"poll": "/v1/jobs/job-000001-…"
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Fit a layered soil model to resistivity soundings (EG3)
Levenberg-Marquardt on the logarithms of the layers’ resistivities and thicknesses, from a fixed lattice of starts (no randomness), on the survey’s Wenner, Schlumberger and dipole-dipole readings: the forward model is the image series for two layers and our own Hankel transform with libdlf’s filter for more. The layer count is the fewest the readings ask for (corrected Akaike) up to max_layers, or exactly layers; the fit’s RMS misfit, 95 % ranges of each parameter, the layers the readings cannot separate (equivalence) and readings far from the curve (outliers, left out and named by default) are on the record. mode: joint (default) fits the traverses named together and answers the soil document itself (ss.earthing.soil/1, its fit record in source and extensions); apart fits each on its own and answers ss.earthing.soil.fits/1, each fitted soil also stored as a document. fit_findings lists what a person should look at (poor fit, equivalence, outliers). Refused by name: EARTHING_REQUEST (400: the body, a member the calculation does not take, a document missing or given twice, a key that is not b3: and 64 hex digits), EARTHING_SETTINGS (400: a setting that does not read, by name), EARTHING_DOCUMENT_INVALID (400: a document that does not read), EARTHING_DOCUMENT_NOT_FOUND (404: a key that names no stored document of the kind, or a soil model the system names that is not stored), SOIL_REFERENCE_DANGLING (422: a traverse the survey does not hold), SOIL_FIT_NO_DATA, SOIL_FIT_TOO_FEW_READINGS, SOIL_FIT_UNSUPPORTED, SOIL_FIT_NOT_CONVERGED, SOIL_ARRAY_INVALID (422). What cannot be worked out inside the calculation (a missing value table entry, a split that cannot be worked, a ladder that does not settle) is on the result as the crate states it, typed and named (status: unevaluable, unevaluable, findings), with status 200. The result is a design aid: a person reviews it before it is relied on.
curl --request POST \
--url https://api.eddy.engineer/v1/earthing.soil.fit \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"async": true,
"settings": {},
"survey": {},
"survey_key": "<string>",
"traverses": [
"<string>"
]
}
'import requests
url = "https://api.eddy.engineer/v1/earthing.soil.fit"
payload = {
"async": True,
"settings": {},
"survey": {},
"survey_key": "<string>",
"traverses": ["<string>"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
async: true,
settings: {},
survey: {},
survey_key: '<string>',
traverses: ['<string>']
})
};
fetch('https://api.eddy.engineer/v1/earthing.soil.fit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eddy.engineer/v1/earthing.soil.fit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'async' => true,
'settings' => [
],
'survey' => [
],
'survey_key' => '<string>',
'traverses' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eddy.engineer/v1/earthing.soil.fit"
payload := strings.NewReader("{\n \"async\": true,\n \"settings\": {},\n \"survey\": {},\n \"survey_key\": \"<string>\",\n \"traverses\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eddy.engineer/v1/earthing.soil.fit")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"async\": true,\n \"settings\": {},\n \"survey\": {},\n \"survey_key\": \"<string>\",\n \"traverses\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/earthing.soil.fit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"async\": true,\n \"settings\": {},\n \"survey\": {},\n \"survey_key\": \"<string>\",\n \"traverses\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{}{
"events": "/v1/jobs/job-000001-…/events",
"job_id": "<string>",
"phase": "queued",
"poll": "/v1/jobs/job-000001-…"
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Body
Response
calc, schema, result_key (BLAKE3 of the result's canonical bytes: the crate's own; blob_uri reads it, report_uri is its certificate, which verify_result runs again), request_key, inputs (every document by key), fault_case, tables (each table read, by id, item, revision and content key: its citation; never its entries), tables_on, upstream, documents (earthing documents made with the result, by key), layers (rasters and vectors the result names, stored in the spatial engine: /v1/spatial.raster/{key}, /v1/spatial.vector/{key}), summary, lane (light | heavy | job), result_inline and result: the soil model, or the fits apart; and fit_findings
The response is of type object.