Skip to main content
PATCH
/
oes
/
{data_id}
/
peaks
import requests

response = requests.patch(
    "https://api.atomscale.ai/oes/d290f1ee-6c54-4b01-90e6-d701748f0851/peaks",
    headers={
        "X-API-KEY": "YOUR_API_KEY",
        "Content-Type": "application/json"
    },
    json={
        "peak_id": "p1",
        "candidate_key": "Ga_417.2"
    }
)
oes_data = response.json()
{
  "data_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "id": "oes_001",
  "wavelengths": [400.0, 400.5, 401.0, 401.5],
  "wavelength_unit": "nm",
  "sample": [1200, 1350, 4100, 1280],
  "scope_corrected": [1150, 1298, 4049, 1231],
  "spectrum_type": "sample",
  "detected_peaks": [
    {"peak_id": "p1", "wavelength_nm": 401.0, "element": "Ga", "manual": true}
  ],
  "constraint_mode": "auto",
  "constrained_elements": null,
  "last_updated": "2024-01-15T10:40:00Z"
}
Applies a manual peak assignment override to the latest OES result. Each detected peak carries a set of candidate element assignments; this endpoint selects one of those candidates for a given peak and persists the override so it survives reprocessing.
data_id
string
required
The data entry UUID for the OES measurement
peak_id
string
required
The peak_id of the detected peak to reassign
candidate_key
string
required
The candidate assignment to apply to the peak. Must be one of the candidate keys available on that peak.

Response

Returns the updated OES result with the new assignment applied. The response has the same shape as the Get OES Data response.
import requests

response = requests.patch(
    "https://api.atomscale.ai/oes/d290f1ee-6c54-4b01-90e6-d701748f0851/peaks",
    headers={
        "X-API-KEY": "YOUR_API_KEY",
        "Content-Type": "application/json"
    },
    json={
        "peak_id": "p1",
        "candidate_key": "Ga_417.2"
    }
)
oes_data = response.json()
{
  "data_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "id": "oes_001",
  "wavelengths": [400.0, 400.5, 401.0, 401.5],
  "wavelength_unit": "nm",
  "sample": [1200, 1350, 4100, 1280],
  "scope_corrected": [1150, 1298, 4049, 1231],
  "spectrum_type": "sample",
  "detected_peaks": [
    {"peak_id": "p1", "wavelength_nm": 401.0, "element": "Ga", "manual": true}
  ],
  "constraint_mode": "auto",
  "constrained_elements": null,
  "last_updated": "2024-01-15T10:40:00Z"
}