DSP

Get processed sample (slice)

Get slice of sample data, and run it through the DSP block. This only the axes selected by the DSP block. E.g. if you have selected only accX and accY as inputs for the DSP block, but the raw sample also contains accZ, accZ is filtered out.

post/api/{projectId}/dsp/{dspId}/raw-data/{sampleId}/slice/run

Request

Path parameters

projectIdinteger required

Project ID

dspIdinteger required

DSP Block ID, use the impulse functions to retrieve the ID

sampleIdinteger required

Sample ID

Query parameters

sliceStartinteger required

Begin index of the slice

sliceEndinteger

End index of the slice. If not given, the sample will be sliced to the same length as the impulse input block window length.

Request body

paramsobject required

DSP parameters with values

storeboolean required

Whether to store the DSP parameters as the new default parameters.

Example request

{
  "params": {
    "scale-axes": "10"
  }
}

Response

OK

successboolean required

Whether the operation succeeded

errorstring

Optional error description (set if 'success' was false)

featuresnumber[] required

Array of processed features. Laid out according to the names in 'labels'

labelsstring[]

Labels of the feature axes

state_stringstring

String representation of the DSP state returned

labelAtEndOfWindowstring

DEPRECATED. Label at the end of the window (only present for time-series data)

labelForWindowstring

Label for the window. How the label is chosen is dependent on the value of "labelingMethodMultiLabel" in the input block.

canProfilePerformanceboolean required

Example response

{
  "graphs": [
    {
      "name": "Frequency domain",
      "X": {
        "accX": [
          3,
          5,
          7
        ],
        "accY": [
          2,
          1,
          5
        ]
      },
      "y": [
        0,
        0.5,
        1
      ]
    }
  ],
  "sample": {
    "sample": {
      "id": 2,
      "filename": "idle01.d8Ae",
      "signatureValidate": true,
      "signatureMethod": "HS256",
      "label": "healthy-machine",
      "intervalMs": 16,
      "frequency": 62.5,
      "originalIntervalMs": 16,
      "originalFrequency": 62.5,
      "sensors": [
        {
          "name": "accX"
        }
      ],
      "datastreams": [
        {
          "sensors": [
            {
              "name": "accX"
            }
          ]
        }
      ]
    },
    "payload": {
      "device_name": "ac:87:a3:0a:2d:1b",
      "device_type": "DISCO-L475VG-IOT01A",
      "sensors": [
        {
          "name": "accX"
        }
      ],
      "cropEnd": 128,
      "intervalMs": 16,
      "frequencyHz": 62.5
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.