sigma_1


This macro analyzes data from the sigma protocol set.

// Define the output object here
var output = {}; //dictionary to hold results

var baseline=json.set[0].data_raw;
output.baseline=baseline;
var sample=json.set[1].data_raw;
output.sample=sample;
var ratio_trace=[];

for (var i=0; i< baseline.length; i++){
	ratio_trace.push(sample[i]/baseline[i]);
}
output.ratio_trace=ratio_trace;
return output;
{
  "time": 1514416863414,
  "device_name": "MultispeQ",
  "device_version": "1",
  "device_id": "01:12:37:34",
  "device_battery": 98,
  "device_firmware": 1.253,
  "sample": [
    [
      {
        "time": 1514416863416,
        "protocol_id": 1,
        "set": [
          {
            "time": 1514416863424,
            "label": "",
            "data_raw": [
              422,
              1583,
              659,
              461,
              424,
              412,
              419,
              409,
              412,
              419,
              405,
              409,
              400,
              407,
              408,
              403,
              409,
              409,
              408,
              410,
              415,
              419,
              420,
              420,
              421,
              418,
              420,
              422,
              421,
              421,
              420,
              422,
              421,
              419,
              420,
              425,
              423,
              421,
              424,
              421
            ]
          },
          {
            "time": 1514416864411,
            "label": "",
            "data_raw": [
              5541,
              33813,
              14861,
              11265,
              10527,
              10367,
              10631,
              10651,
              11028,
              11301,
              11559,
              11816,
              11827,
              12213,
              12236,
              12622,
              12885,
              13092,
              13315,
              13507,
              13083,
              11467,
              10817,
              10707,
              10444,
              10263,
              10331,
              10479,
              10570,
              10540,
              10194,
              10055,
              9985,
              9945,
              9923,
              9751,
              9706,
              9688,
              9683,
              9686
            ]
          }
        ],
        "data_raw": [

        ]
      }
    ]
  ],
  "app_os": "darwin-16.7.0",
  "app_name": "PhotosynQ",
  "app_version": "0.0.31",
  "app_device": "x64",
  "location": [
    "42.7224033",
    "-84.4746487"
  ],
  "time_offset": "America/Detroit"
}
Dave in cap img 4615
Created by

David M. Kramer


Protocol connections:
1
Latest Update:
Dec 2017