PSI_test12


test
//============================================
// Macro for data evaluation on PhotosynQ.org
// created: 2017/8/17
//============================================

//Define the output object here
var output = {};

output["850nm"] = [];
output['880nm'] = [];
output['850nm-880nm'] = [];
output["abs850nm"] = [];
output["abs880nm"] = [];

//Check if the key time exists in json

for(i=0,len=json.data_raw.length;i<len;i++){
	
   if(i % 2){
      output['880nm'].push(json.data_raw[i]);
   }
   else{
      output['850nm'].push(json.data_raw[i]);
   }
    
}
for(i in output['850nm']){
   output['abs850nm'].push(MathLOG(output['850nm'][i]/output['850nm'][0])*-1);
}

for(i in output['880nm']){
  
  
   output['abs880nm'].push(MathLOG(output['880nm'][i]/output['880nm'][0])*-1);
} 
for(i in output['abs850nm']){
	
  if(output['abs850nm'][i] !== undefined && output['abs880nm'][i] !== undefined ){
		output['850nm-880nm'].push(output['abs850nm'][i] - output['abs880nm'][i]);
  }
}
delete output["850nm"]; 
delete output["880nm"];

//Return data
return output;
{
  "time_offset": -540,
  "time": 1503014129721,
  "device_name": "MultispeQ",
  "device_version": "1",
  "device_id": "01:12:52:12",
  "device_battery": 95,
  "device_firmware": 1.17,
  "sample": [
    {
      "time": 1503014129732,
      "protocol_id": 1,
      "data_raw": [
        2248,
        248,
        328,
        176,
        280,
        136,
        226,
        149,
        200,
        116,
        178,
        120,
        157,
        104,
        136,
        84,
        126,
        74,
        125,
        66,
        113,
        78,
        106,
        68,
        100,
        67,
        93,
        64,
        84,
        58,
        81,
        53,
        77,
        47,
        74,
        55,
        72,
        50,
        68,
        45,
        68,
        51,
        67,
        48,
        65,
        43,
        65,
        41,
        67,
        38,
        67,
        50,
        67,
        48,
        67,
        47,
        68,
        47,
        67,
        45,
        67,
        37,
        65,
        45,
        69,
        35,
        67,
        50,
        67,
        49,
        67,
        47,
        67,
        47,
        65,
        45,
        65,
        42,
        65,
        41,
        67,
        49,
        69,
        49,
        68,
        45,
        66,
        50,
        67,
        49,
        64,
        44,
        64,
        42,
        68,
        41,
        67,
        50,
        67,
        49,
        68,
        434,
        91,
        121,
        91,
        133,
        87,
        115,
        87,
        98,
        88,
        104,
        85,
        84,
        84,
        82,
        83,
        77,
        82,
        71,
        80,
        38,
        66,
        41,
        67,
        52,
        68,
        49,
        66,
        47,
        67,
        50,
        67,
        48,
        65,
        42,
        65,
        42,
        69,
        39,
        67,
        47,
        67,
        47,
        67,
        47,
        67,
        47,
        64,
        42,
        65,
        42,
        68,
        38,
        67,
        47,
        67,
        46,
        3,
        67,
        40,
        68,
        52,
        67,
        44,
        67,
        47,
        68,
        47,
        68,
        41,
        66,
        43,
        65,
        40,
        67,
        52,
        67,
        47,
        67,
        46,
        67,
        51,
        67,
        47,
        64,
        49,
        66,
        59,
        67,
        53,
        71,
        53,
        67,
        47,
        67,
        59,
        71,
        41
      ]
    }
  ],
  "app_os": "mac",
  "app_name": "PhotosynQ",
  "app_version": "0.3.8",
  "app_device": "x86-64",
  "location": [
    "43.0792340",
    "141.3379131"
  ],
  "ConsoleMacro": "400"
}
Default avatar
Created by

Makio Yokono


Protocol connections:
2
Latest Update:
Aug 2017