AK Coral FRR Fspec Reflect 1c


calculate fluorescence spectrum, reflectance spectrum and FRR for use with protocol: "AK Coral FRR Fspec Reflect 1" .
/**
 * Macro for data evaluation on PhotosynQ.org
 * by: David M. Kramer
 * created: December 12, 2018 4:48 PM
 */     
      
 // Define the output object here 

// var backup_refs ={};
// backup_refs["blank"] = [1244, 1278, 1270, 1254, 1256, 1252, 1261, 1264, 1251, 1265, 1260, 1245, 1240, 1270, 1225, 1270, 1266, 1250, 1271, 1273, 1251, 1252, 1262, 1258, 1241, 1266, 1268, 1259, 1276, 1260, 1290, 1272, 1283, 1254, 1268, 1269, 1291, 1315, 1356, 1394, 1434, 1493, 1540, 1516, 1536, 1510, 1507, 1499, 1501, 1483, 1515, 1535, 1549, 1565, 1642, 1670, 1738, 1790, 1849, 1909, 1967, 2070, 2124, 2198, 2264, 2350, 2420, 2503, 2556, 2683, 2816, 2985, 3157, 3420, 3707, 4087, 4487, 4951, 5471, 6010, 6543, 7097, 7616, 8155, 8639, 9082, 9539, 9929, 10311, 10681, 10996, 11298, 11625, 11923, 12168, 12411, 12554, 12573, 12524, 12306, 12013, 11669, 11322, 10956, 10585, 10245, 9872, 9499, 9127, 8732, 8326, 7957, 7565, 7248, 6944, 6707, 6421, 6173, 5971, 5790, 5602, 5413, 5247, 5099, 4972, 4849, 4732, 4629, 4612, 4533, 4521, 4486, 4448, 4424, 4425, 4330, 4316, 4291, 4268, 4291, 4325, 4376, 4484, 4618, 4798, 4947, 5143, 5386, 5583, 5834, 6081, 6370, 6645, 6909, 7192, 7497, 7843, 8169, 8552, 8868, 9132, 9370, 9559, 9722, 9832, 9963, 10106, 10213, 10346, 10504, 10663, 10781, 10929, 11016, 11042, 11067, 11080, 11023, 11004, 10998, 10936, 10914, 10832, 10673, 10460, 10174, 9889, 9522, 9148, 8723, 8344, 7967, 7543, 7065, 6588, 6047, 5539, 5024, 4532, 4106, 3688, 3343, 3117, 2884, 2727, 2572, 2513, 2432, 2416, 2385, 2408, 2421, 2472, 2524, 2568, 2621, 2678, 2759, 2830, 2885, 2983, 3046, 3115, 3165, 3222, 3290, 3346, 3421, 3497, 3594, 3660, 3798, 3867, 4040, 4253, 4493, 4738, 5065, 5418, 5692, 5963, 6153, 6271, 6325, 6192, 5986, 5764, 5466, 5175, 4929, 4772, 4631, 4494, 4377, 4268, 4125];

//   //[1270, 1232, 1233, 1257, 1252, 1249, 1245, 1224, 1230, 1246, 1239, 1224, 1227, 1234, 1236, 1240, 1225, 1230, 1236, 1225, 1249, 1253, 1252, 1241, 1242, 1205, 1215, 1233, 1217, 1239, 1227, 1216, 1222, 1242, 1260, 1268, 1303, 1296, 1348, 1380, 1415, 1482, 1491, 1517, 1516, 1523, 1508, 1513, 1482, 1469, 1509, 1532, 1561, 1562, 1612, 1649, 1717, 1797, 1881, 1958, 2019, 2096, 2172, 2237, 2278, 2366, 2444, 2511, 2613, 2731, 2885, 3045, 3240, 3497, 3790, 4196, 4632, 5142, 5633, 6184, 6761, 7303, 7844, 8336, 8829, 9328, 9760, 10159, 10573, 10950, 11300, 11643, 11950, 12253, 12559, 12743, 12877, 12893, 12797, 12594, 12269, 11951, 11584, 11209, 10859, 10476, 10066, 9682, 9323, 8930, 8526, 8138, 7743, 7368, 7075, 6773, 6543, 6281, 6072, 5895, 5677, 5513, 5349, 5166, 5021, 4880, 4765, 4705, 4655, 4598, 4568, 4521, 4544, 4493, 4457, 4414, 4373, 4348, 4334, 4330, 4385, 4431, 4521, 4622, 4782, 4991, 5180, 5407, 5654, 5881, 6141, 6373, 6642, 6931, 7207, 7507, 7819, 8144, 8475, 8791, 9103, 9331, 9520, 9693, 9790, 9930, 10073, 10206, 10342, 10499, 10647, 10784, 10897, 10973, 11024, 11064, 11078, 11064, 11026, 11021, 10998, 10973, 10869, 10722, 10489, 10225, 9870, 9535, 9177, 8786, 8404, 8005, 7587, 7110, 6607, 6124, 5602, 5052, 4561, 4116, 3721, 3387, 3119, 2912, 2731, 2608, 2500, 2470, 2417, 2399, 2419, 2437, 2444, 2487, 2551, 2621, 2708, 2784, 2821, 2907, 2993, 3046, 3105, 3159, 3242, 3308, 3352, 3444, 3523, 3587, 3665, 3775, 3890, 4054, 4232, 4484, 4727, 5089, 5381, 5695, 5984, 6192, 6316, 6333, 6226, 6031, 5816, 5509, 5249, 4986, 4784, 4628, 4523, 4397, 4296, 4146];
// backup_refs["black"] = [1210, 1200, 1224, 1202, 1219, 1234, 1213, 1221, 1219, 1202, 1222, 1210, 1201, 1193, 1237, 1203, 1193, 1204, 1223, 1212, 1211, 1200, 1191, 1187, 1224, 1221, 1196, 1202, 1198, 1202, 1211, 1209, 1195, 1195, 1205, 1192, 1219, 1215, 1249, 1215, 1247, 1218, 1223, 1227, 1253, 1241, 1230, 1228, 1217, 1242, 1229, 1222, 1237, 1241, 1229, 1238, 1238, 1212, 1237, 1261, 1249, 1279, 1267, 1243, 1262, 1255, 1267, 1296, 1287, 1285, 1303, 1290, 1308, 1333, 1331, 1355, 1392, 1393, 1403, 1420, 1445, 1473, 1502, 1531, 1542, 1532, 1570, 1595, 1597, 1625, 1638, 1631, 1662, 1648, 1661, 1662, 1632, 1663, 1663, 1655, 1631, 1627, 1609, 1583, 1571, 1558, 1524, 1508, 1502, 1489, 1467, 1427, 1462, 1429, 1417, 1394, 1352, 1401, 1374, 1380, 1354, 1369, 1348, 1363, 1348, 1343, 1318, 1344, 1321, 1319, 1302, 1326, 1313, 1299, 1305, 1306, 1299, 1300, 1293, 1319, 1308, 1302, 1352, 1321, 1316, 1327, 1341, 1338, 1387, 1361, 1371, 1378, 1384, 1400, 1402, 1418, 1414, 1432, 1458, 1448, 1489, 1503, 1483, 1508, 1513, 1523, 1554, 1536, 1536, 1515, 1533, 1533, 1536, 1548, 1555, 1543, 1563, 1550, 1586, 1542, 1552, 1564, 1538, 1554, 1551, 1536, 1516, 1509, 1496, 1476, 1471, 1453, 1429, 1393, 1410, 1386, 1357, 1360, 1330, 1316, 1316, 1270, 1299, 1265, 1243, 1252, 1272, 1277, 1259, 1251, 1265, 1272, 1292, 1249, 1267, 1250, 1245, 1236, 1260, 1268, 1265, 1279, 1281, 1289, 1289, 1270, 1311, 1310, 1275, 1286, 1297, 1295, 1314, 1334, 1330, 1342, 1336, 1361, 1383, 1372, 1375, 1396, 1388, 1391, 1400, 1349, 1391, 1367, 1343, 1342, 1326, 1344, 1345, 1341, 1312, 1321];
  
//   //[1190, 1195, 1189, 1183, 1176, 1176, 1196, 1193, 1208, 1197, 1207, 1210, 1197, 1227, 1180, 1191, 1178, 1198, 1198, 1216, 1206, 1206, 1209, 1219, 1189, 1206, 1197, 1196, 1199, 1211, 1208, 1191, 1192, 1223, 1193, 1208, 1212, 1188, 1195, 1219, 1262, 1233, 1217, 1206, 1258, 1231, 1218, 1228, 1196, 1214, 1198, 1199, 1208, 1194, 1205, 1209, 1201, 1227, 1241, 1235, 1246, 1219, 1230, 1280, 1234, 1250, 1245, 1264, 1254, 1270, 1285, 1284, 1297, 1288, 1312, 1355, 1362, 1380, 1376, 1417, 1463, 1461, 1481, 1499, 1529, 1550, 1552, 1576, 1558, 1596, 1645, 1617, 1640, 1656, 1683, 1679, 1676, 1686, 1660, 1643, 1635, 1627, 1612, 1576, 1584, 1553, 1540, 1527, 1524, 1494, 1478, 1449, 1482, 1465, 1410, 1411, 1396, 1390, 1385, 1362, 1367, 1349, 1358, 1331, 1338, 1308, 1315, 1318, 1319, 1316, 1334, 1302, 1307, 1333, 1315, 1321, 1318, 1313, 1305, 1300, 1321, 1335, 1319, 1318, 1330, 1332, 1323, 1340, 1373, 1350, 1372, 1392, 1395, 1398, 1401, 1433, 1427, 1431, 1486, 1454, 1469, 1480, 1494, 1517, 1515, 1520, 1519, 1523, 1536, 1523, 1531, 1520, 1559, 1567, 1551, 1571, 1560, 1558, 1564, 1547, 1590, 1551, 1542, 1520, 1555, 1500, 1513, 1490, 1471, 1476, 1450, 1435, 1431, 1421, 1392, 1395, 1352, 1339, 1313, 1303, 1307, 1307, 1274, 1247, 1247, 1272, 1267, 1230, 1255, 1254, 1240, 1247, 1269, 1243, 1236, 1251, 1234, 1261, 1259, 1276, 1248, 1256, 1275, 1274, 1256, 1277, 1263, 1282, 1290, 1265, 1287, 1303, 1294, 1316, 1315, 1334, 1335, 1337, 1370, 1369, 1379, 1364, 1389, 1369, 1376, 1367, 1402, 1345, 1367, 1350, 1339, 1341, 1323, 1323, 1330, 1326]
// backup_refs["FRR"] = [0,0,113,172,174,181,177,179,179,180,175,179,175,179,177,180,175,181,176,178,178,141,365,545,659,713,740,757,765,772,774,780,778,780,780,781,778,777,776,777,772,774,772,772,773,774,769,768,767,767,763,766,764,763,762,762,759,758,758,757,755,758,756,754,754,750,750,747,749,747,750,748,747,742,745,743,743,743,742,740,740,737,740,736,740,734,738,736,738,731,734,732,733,731,733,731,731,726,730,726,338,337,341,349,348,350,357,361,354,363,359,361,365];

var wl=[];
for (var pixel =0; pixel<256; pixel++) {
    A0=323.7487111;
    B1=2.377124912;
    B2=-0.00089977;
    B3=-4.34719E-06;
    B4=-2.74095E-09;
    B5=2.16278E-11;
    nm = A0 + B1 * pixel + B2 * pixel^2 + B3 * pixel^3 + B4 * pixel^4 + B5 * pixel^5;
    wl.push(nm); //use this array to find the wavelength values

}
 
var output = {};

output.wl=wl;
var tb = 50; // beginning of subtrace for total fluorescence
var te=255;  // end of subtrace for total fluorescence 

var tchlfb = 142; // beginning of chlorophyll fluorescence
var tchlfe = 255;
var chlorophyll_norm_point = 33; 

// Check if the key time exists in json
if (json.time !== undefined){
    // Add key time and value to output
    output.time = json.time;
}  

var frr=GetProtocolByLabel( "frr", json, true );
var num_decay_pts = 13;

var frrv=frr[0].FRRvals;
output.frr_raw=frr[0].FRRvals;

frrv=TransformTrace("subtract", frrv, frrv[19]);
frrv=TransformTrace("divide", frrv, frrv[22]);
output.frrNorm=frrv;

 
var frr_ref = frr[0].recall.frr_ref;  
// json.set[0].recall
if ((frr_ref.length < 2) || (MathSUM(frr_ref) <1)) {
     danger("FRR background signal calibration needed!", output); 
}


var ll =frr_ref.length;
  
frr_ref=TransformTrace("subtract", frr_ref, frr_ref[19]);
frr_ref=TransformTrace("divide", frr_ref, frr_ref[22]); 
//output.frr_ref=frr_ref;

var frrNorm2 = TransformTrace("divide", frrv.slice(22,ll-num_decay_pts), frr_ref.slice(22,ll-num_decay_pts)); 
output.FRR_rise=frrNorm2;
var frr_rise_normed = TransformTrace("subtract", frrNorm2, 1);

var ll =frr_rise_normed.length; //slice(0,frr_rise_normed.length);



frr_rise_normed = TransformTrace("divide", frr_rise_normed, MathMEAN(frr_rise_normed.slice(frr_rise_normed.length-5,frr_rise_normed.length)));
output.frr_rise_normed=frr_rise_normed;


var frrNorm3 = TransformTrace("divide", frrv.slice(frrv.length-num_decay_pts,frrv.length), frr_ref.slice(frr_ref.length-num_decay_pts,frrv.length)); 
output.FRR_decay=frrNorm3;


var frr_decay_normed = TransformTrace("divide", frrNorm3, frrNorm3[0]);
output.frr_decay_normed=frr_decay_normed; 

var fluorescence=GetProtocolByLabel( "fluorescence", json, true );
//output.t=fluorescence.length;

var fluorescence_low=GetProtocolByLabel( "fluorescence_low", json, true );
//output.t=fluorescence.length;
output.fluorescence_low=fluorescence_low[0].spec.slice(tb,te);

// set up array that contains only the wavelength values used in the 
// fluorescence traces
output.fluorescence_wl=wl.slice(tb,te);  

var fpf=fluorescence_low[0].spec.slice(tb,te);
     var b=MathMIN(fpf)-2;
	 fpf=TransformTrace( "subtract", fpf, b);
	output.fpf=fpf;

	 var red_b = 55;    
	 var red_e = 100;    
	 var green_b = 20;  
	 var green_e = 55;   
	 var blue_b = 0; 
	 var blue_e = 20; 
	 var fpf_max=MathMAX(fpf); //.slice(blue_b,red_e));

output.fpf_max=fpf_max; 
//return output; 
     var fpfr = MathMEAN(fpf.slice(red_b,red_e))/fpf_max;
     var fpfg = MathMEAN(fpf.slice(green_b,green_e))/fpf_max;
     var fpfb =MathMEAN(fpf.slice(blue_b,blue_e))/fpf_max;
 
      //var gamma=3.9;   
       var rgamma=4.5;     
      var ggamma=3.5;   
      var bgamma=3.5;   
     
      
      fpfr=Math.pow(fpfr,1/rgamma) || 0; 
      fpfg=Math.pow(fpfg,1/ggamma) || 0;
      fpfb=Math.pow(fpfb,1/bgamma) || 0; 
  
      fpfr=parseInt(fpfr*255);
      fpfg=parseInt(fpfg*255);
      fpfb=parseInt(fpfb*255); 
//      var g=parseInt(MathROUND(3*255*,2));
//      var b=parseInt(MathROUND(3*255*,2));
  
     output.fpfr=fpfr; 
     output.fpfg=fpfg;
     output.fpfb=fpfb;
  
     output.fpf_RGB = "rgb(" + fpfr + "," + fpfg + "," + fpfb + ")";

 



var background=GetProtocolByLabel( "background", json, true );

var av_background=background[0].spec;
//output["background"+0]=background[0].spec;
for (var i=1; i<background.length; i++){ 
  //output["background"+i]=background[i].spec;
  av_background = TransformTrace( "add", av_background, background[i].spec);
}
av_background = TransformTrace( "divide", av_background, background.length);
//output.av_background=av_background;


for (var i=0; i < fluorescence.length; i++){
	var fluorspec=fluorescence[i].spec;
	output["fluorescence#" + i] = fluorspec.slice(tb,te);
  	var f_m_b=TransformTrace( "subtract",fluorspec,av_background);
	//output["fluorescence_m_back#" + i]=f_m_b.slice(tb,te); 
    
    var chlf = f_m_b.slice(tchlfb,tchlfe);
    var norm_ampl = chlf[chlorophyll_norm_point];
    //output.norm_ampl=norm_ampl;
    var chlf = TransformTrace( "divide", chlf, norm_ampl);
    output["chlorophyl_fluorescence#" + i]=chlf;
  
  //chlorophyll_norm_point
  
// return output;
//   output["spec#" + i]=samples[i].spec;
// output.blank=json.set[0].ref_specs[0];
// output.black=json.set[0].ref_specs[1];
}
  
var reflectance=GetProtocolByLabel( "reflectance", json, true );
 
var reflectance_raw=reflectance[0].spec;
//output.reflectance_raw=reflectance_raw;

var reflectance_ref=reflectance[0].recall.spec_ref;
reflectance_ref = TransformTrace( "subtract", reflectance_ref, reflectance_ref[1]);
//output.reflectance_ref=reflectance_ref;
 
var reflectance_background =GetProtocolByLabel( "r_background", json, true );

var r_back=reflectance_background[0].spec; 

//output.reflectance_background=reflectance_background[0].spec;
                                    
var reflect_m_back = TransformTrace( "subtract", reflectance_raw, r_back);
//output.reflect_m_back=reflect_m_back;
reflect_m_back =  TransformTrace("subtract", reflect_m_back, reflect_m_back[1]);
// var reflectance_norm=TransformTrace( "divide",reflect_m_back,MathMEAN(reflect_m_back.slice(200,220)));
// output.reflectance_norm=reflectance_norm;

var fract_reflect = TransformTrace( "divide", reflect_m_back, reflectance_ref);

fract_reflect = TransformTrace( "divide", fract_reflect, MathMAX(fract_reflect.slice(200,240)));

output.fract_reflect=fract_reflect.slice(40,255);
// output.reflect_m_back=reflect_m_back;
var reflectance_trace=fract_reflect;
// return output;  

for (var i=0; i < reflectance.length; i++){
	var specx=reflectance[i].spec;
	//output["spec#" + i] = specx;
  	var black=av_background; //reflectance[i].ref_specs[1];
   if (MathSUM(black)<1){
      danger("reflectance dark calibration needed!", output); 
    }
   //output.black=black; //backup_refs["blank"]; //blank;
 
   
	//output["spec#" + i] = specx;
 	var sample_m_black=TransformTrace( "subtract", specx, black);
	//output["spec-black#" + i] = sample_m_black;
    var blank=reflect_m_back; //eflectance[i].ref_specs[0];
   if (MathSUM(blank)<1){
      danger("reflectance blank calibration needed!", output); 
    } 
  //output.blank=blank; //backup_refs["blank"]; //blank;

//return output; 
  
 	var blank_m_black=TransformTrace( "subtract", blank, black);
	//output["blank-black#" + i] = blank_m_black; 
//   	var reflectance_trace=[]; 
// 	for (var ii =0; ii< blank_m_black.length; ii++) {
//       if (blank_m_black[ii]>0) {
//         reflectance_trace.push(sample_m_black[ii]/blank_m_black[ii]);
//       } else {
//          reflectance_trace.push(-0.001);
//       }  
//     }    
//       var reflectance_max = reflectance_trace[254];
//       //output.reflectance_max=reflectance_max;
//       reflectance_trace=TransformTrace("divide", reflectance_trace, reflectance_max);
     reflectance_trace=reflectance_trace.slice(40,255);
     output["reflectance#" + i] = reflectance_trace;
  	output.reflectance_wl=wl.slice(40,255);
	 var red_b = 115; 
	 var red_e = 150;    
	 var green_b = 55;  
	 var green_e = 81;   
	 var blue_b = 15; 
	 var blue_e = 55; 
     var r = MathMEAN(reflectance_trace.slice(red_b,red_e));
     var g = MathMEAN(reflectance_trace.slice(green_b,green_e));
     var b =MathMEAN(reflectance_trace.slice(blue_b,blue_e));
  
      var rgamma=3.5;    
      var ggamma=3.5;   
      var bgamma=3.5;   
   
      r=Math.pow(r,1/rgamma) || 0; 
      g=Math.pow(g,1/ggamma) || 0;
      b=Math.pow(b,1/bgamma) || 0; 
  
      r=parseInt(r*255);
      g=parseInt(g*255);
      b=parseInt(b*255); 
//      var g=parseInt(MathROUND(3*255*,2));
//      var b=parseInt(MathROUND(3*255*,2));
  
     output.r=r; 
     output.g=g;
     output.b=b;
  
     output.RGB_test = "rgb(" + r + "," + g + "," + b + ")";

//       output.RGB_test2 = "rgb(200,150,50)";
output["order"]=["RBG_test"];
}
// Return data
return output;
{
  "time": 1545458168235,
  "device_name": "CoralspeQ",
  "device_version": "2",
  "device_id": "00:00:00:00",
  "device_battery": 58,
  "device_firmware": 0.055,
  "sample": [
    [
      {
        "time": 1545458168235,
        "protocol_id": 1,
        "set": [
          {
            "time": 1545458168254,
            "label": "frr",
            "FRRvals": [
              0,
              0,
              99,
              165,
              166,
              165,
              159,
              161,
              165,
              167,
              156,
              160,
              174,
              160,
              161,
              181,
              164,
              161,
              164,
              163,
              159,
              128,
              367,
              574,
              720,
              803,
              855,
              894,
              922,
              957,
              968,
              1014,
              1047,
              1076,
              1101,
              1129,
              1146,
              1166,
              1187,
              1214,
              1225,
              1240,
              1255,
              1259,
              1273,
              1294,
              1293,
              1319,
              1311,
              1325,
              1323,
              1328,
              1337,
              1366,
              1357,
              1367,
              1373,
              1369,
              1383,
              1386,
              1383,
              1395,
              1377,
              1401,
              1406,
              1403,
              1409,
              1409,
              1415,
              1414,
              1409,
              1419,
              1427,
              1426,
              1422,
              1426,
              1423,
              1419,
              1422,
              1429,
              1419,
              1423,
              1427,
              1425,
              1430,
              1437,
              1433,
              1443,
              1434,
              1432,
              1445,
              1432,
              1421,
              1417,
              1413,
              1432,
              1429,
              1423,
              1423,
              1431,
              599,
              587,
              545,
              503,
              459,
              430,
              415,
              409,
              388,
              386,
              370,
              339,
              356
            ],
            "recall": {
              "time": 1545458169343,
              "frr_ref": [
                0,
                0,
                110,
                166,
                165,
                169,
                171,
                170,
                171,
                170,
                167,
                169,
                170,
                168,
                171,
                171,
                167,
                168,
                167,
                170,
                170,
                130,
                666,
                1172,
                1451,
                1590,
                1686,
                1731,
                1754,
                1772,
                1781,
                1787,
                1791,
                1798,
                1800,
                1803,
                1810,
                1809,
                1809,
                1810,
                1806,
                1806,
                1806,
                1804,
                1802,
                1799,
                1800,
                1799,
                1800,
                1796,
                1797,
                1797,
                1792,
                1793,
                1791,
                1789,
                1789,
                1789,
                1787,
                1787,
                1786,
                1783,
                1783,
                1783,
                1782,
                1781,
                1778,
                1777,
                1776,
                1776,
                1774,
                1774,
                1773,
                1772,
                1769,
                1770,
                1772,
                1769,
                1769,
                1767,
                761,
                760,
                758,
                758,
                756,
                761,
                762,
                760,
                761,
                757,
                757,
                757,
                757
              ]
            },
            "data_raw": [

            ]
          },
          {
            "time": 1545458169343,
            "label": "background",
            "spec": [
              1228,
              1198,
              1155,
              1174,
              1190,
              1191,
              1148,
              1147,
              1172,
              1176,
              1168,
              1184,
              1165,
              1170,
              1164,
              1165,
              1169,
              1167,
              1170,
              1168,
              1160,
              1158,
              1178,
              1191,
              1180,
              1158,
              1191,
              1188,
              1189,
              1185,
              1184,
              1162,
              1200,
              1168,
              1171,
              1188,
              1187,
              1211,
              1190,
              1196,
              1183,
              1190,
              1171,
              1178,
              1168,
              1193,
              1192,
              1182,
              1193,
              1150,
              1185,
              1194,
              1221,
              1201,
              1217,
              1211,
              1219,
              1202,
              1228,
              1209,
              1249,
              1231,
              1229,
              1225,
              1237,
              1247,
              1222,
              1232,
              1199,
              1201,
              1210,
              1223,
              1232,
              1213,
              1216,
              1204,
              1204,
              1205,
              1198,
              1188,
              1188,
              1187,
              1187,
              1158,
              1176,
              1184,
              1197,
              1184,
              1193,
              1214,
              1217,
              1180,
              1199,
              1185,
              1173,
              1194,
              1176,
              1201,
              1178,
              1193,
              1200,
              1228,
              1243,
              1218,
              1231,
              1232,
              1227,
              1159,
              1198,
              1238,
              1216,
              1226,
              1209,
              1227,
              1211,
              1204,
              1217,
              1217,
              1227,
              1228,
              1264,
              1240,
              1253,
              1234,
              1243,
              1243,
              1211,
              1203,
              1213,
              1231,
              1186,
              1199,
              1206,
              1219,
              1262,
              1260,
              1262,
              1279,
              1268,
              1259,
              1245,
              1229,
              1228,
              1223,
              1217,
              1210,
              1222,
              1213,
              1182,
              1206,
              1190,
              1195,
              1183,
              1188,
              1215,
              1197,
              1191,
              1165,
              1209,
              1181,
              1198,
              1188,
              1180,
              1187,
              1177,
              1185,
              1175,
              1185,
              1194,
              1186,
              1185,
              1164,
              1171,
              1185,
              1183,
              1187,
              1182,
              1163,
              1184,
              1189,
              1168,
              1200,
              1199,
              1180,
              1188,
              1160,
              1187,
              1185,
              1200,
              1203,
              1220,
              1212,
              1199,
              1206,
              1192,
              1203,
              1170,
              1197,
              1197,
              1168,
              1202,
              1200,
              1201,
              1207,
              1178,
              1184,
              1200,
              1162,
              1196,
              1187,
              1181,
              1211,
              1188,
              1193,
              1215,
              1202,
              1205,
              1172,
              1188,
              1193,
              1227,
              1211,
              1221,
              1233,
              1204,
              1178,
              1183,
              1211,
              1192,
              1215,
              1210,
              1190,
              1214,
              1261,
              1209,
              1187,
              1190,
              1194,
              1191,
              1201,
              1212,
              1208,
              1206,
              1214,
              1199,
              1196,
              1215,
              1189,
              1192,
              1196,
              1203,
              1231,
              1194,
              1196,
              1207,
              1260
            ],
            "data_raw": [

            ]
          },
          {
            "time": 1545458169343,
            "label": "fluorescence",
            "spec": [
              2093,
              2103,
              2104,
              2109,
              2091,
              2103,
              2094,
              2122,
              2110,
              2104,
              2112,
              2093,
              2107,
              2137,
              2145,
              2150,
              2127,
              2166,
              2166,
              2184,
              2196,
              2235,
              2283,
              2305,
              2392,
              2500,
              2624,
              2738,
              2931,
              3161,
              3641,
              4561,
              6521,
              13781,
              59209,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              65535,
              20462,
              7585,
              4916,
              3836,
              3268,
              3011,
              2860,
              2793,
              2784,
              2787,
              2795,
              2822,
              2865,
              2924,
              3031,
              3145,
              3289,
              3440,
              3560,
              3653,
              3708,
              3711,
              3726,
              3720,
              3726,
              3677,
              3678,
              3641,
              3646,
              3700,
              3715,
              3788,
              3842,
              3861,
              3901,
              3941,
              4052,
              4124,
              4257,
              4395,
              4521,
              4619,
              4679,
              4674,
              4629,
              4572,
              4545,
              4587,
              4707,
              4953,
              5248,
              5722,
              6285,
              6984,
              7800,
              8753,
              9822,
              10910,
              12018,
              13048,
              13932,
              14639,
              15146,
              15439,
              15539,
              15507,
              15378,
              15160,
              14941,
              14578,
              14233,
              13838,
              13377,
              12892,
              12388,
              11877,
              11384,
              10964,
              10577,
              10215,
              9900,
              9626,
              9367,
              9163,
              8914,
              8619,
              8331,
              8007,
              7727,
              7357,
              7008,
              6677,
              6350,
              6020,
              5752,
              5531,
              5305,
              5128,
              4954,
              4809,
              4616,
              4524,
              4403,
              4311,
              4216,
              4201,
              4144,
              4186,
              4174,
              4248,
              4325,
              4464,
              4665,
              4872,
              5213,
              5614,
              6165,
              6869,
              7760,
              8859,
              10208,
              11745,
              13510,
              15465,
              17463,
              19364,
              21150,
              22603,
              23754,
              24542,
              24991,
              25216,
              25182,
              24986,
              24654,
              24157,
              23559,
              22818,
              21980,
              21004,
              20065,
              19052,
              18073,
              17205,
              16370,
              15626,
              14924,
              14267,
              13590,
              12919,
              12290,
              11656,
              11020,
              10477,
              10021,
              9647,
              9342,
              9143,
              9006,
              8980,
              8975,
              9036,
              9120,
              9208,
              9318,
              9367,
              9436,
              9457,
              9450,
              9411,
              9390,
              9314,
              9229,
              9101,
              8914,
              8700,
              8458,
              8151,
              7827,
              7442,
              7072,
              6640,
              6248,
              5866,
              5517,
              5181,
              4860,
              4589,
              4331,
              4137,
              3945,
              3758,
              3604,
              3479,
              3365,
              3226,
              3105,
              3005,
              2893,
              2835,
              2785,
              2697,
              2605,
              2586,
              2526,
              2528,
              2486,
              2456,
              2458,
              2437
            ],
            "data_raw": [

            ]
          },
          {
            "time": 1545458169343,
            "label": "fluorescence_low",
            "spec": [
              1387,
              1371,
              1362,
              1371,
              1376,
              1356,
              1369,
              1353,
              1376,
              1368,
              1342,
              1346,
              1340,
              1389,
              1373,
              1363,
              1378,
              1379,
              1373,
              1390,
              1406,
              1411,
              1414,
              1416,
              1421,
              1474,
              1503,
              1501,
              1553,
              1571,
              1643,
              1811,
              2054,
              2490,
              3361,
              5744,
              58103,
              65535,
              65535,
              65535,
              65535,
              65535,
              61147,
              17640,
              5113,
              3010,
              2277,
              1969,
              1778,
              1697,
              1618,
              1618,
              1596,
              1595,
              1587,
              1597,
              1599,
              1619,
              1633,
              1652,
              1684,
              1700,
              1722,
              1753,
              1788,
              1781,
              1795,
              1803,
              1809,
              1811,
              1812,
              1792,
              1772,
              1766,
              1759,
              1775,
              1791,
              1769,
              1773,
              1781,
              1822,
              1815,
              1818,
              1830,
              1867,
              1905,
              1932,
              1949,
              1963,
              1935,
              1925,
              1916,
              1935,
              1969,
              1961,
              2009,
              2078,
              2178,
              2322,
              2444,
              2648,
              2845,
              3046,
              3286,
              3491,
              3693,
              3874,
              4003,
              4088,
              4165,
              4181,
              4158,
              4146,
              4099,
              4010,
              3975,
              3897,
              3799,
              3730,
              3637,
              3534,
              3456,
              3347,
              3253,
              3176,
              3106,
              3027,
              2998,
              2932,
              2894,
              2823,
              2764,
              2715,
              2660,
              2591,
              2531,
              2492,
              2405,
              2353,
              2257,
              2198,
              2150,
              2091,
              2040,
              2021,
              1965,
              1931,
              1892,
              1868,
              1862,
              1844,
              1820,
              1820,
              1811,
              1820,
              1825,
              1833,
              1864,
              1898,
              1938,
              2000,
              2069,
              2176,
              2336,
              2476,
              2711,
              2956,
              3285,
              3618,
              3964,
              4352,
              4721,
              5057,
              5322,
              5554,
              5718,
              5824,
              5818,
              5856,
              5785,
              5721,
              5625,
              5531,
              5374,
              5207,
              5012,
              4858,
              4659,
              4495,
              4321,
              4156,
              4021,
              3865,
              3741,
              3626,
              3503,
              3389,
              3252,
              3140,
              3020,
              2962,
              2867,
              2801,
              2785,
              2748,
              2726,
              2733,
              2750,
              2769,
              2779,
              2797,
              2798,
              2843,
              2813,
              2816,
              2840,
              2821,
              2820,
              2778,
              2755,
              2713,
              2667,
              2644,
              2578,
              2521,
              2434,
              2369,
              2299,
              2218,
              2129,
              2052,
              1978,
              1918,
              1898,
              1851,
              1780,
              1767,
              1719,
              1684,
              1636,
              1614,
              1604,
              1569,
              1551,
              1551,
              1535,
              1520,
              1491,
              1471,
              1437,
              1458,
              1459,
              1450,
              1451,
              1452,
              1442
            ],
            "data_raw": [

            ]
          },
          {
            "time": 1545458169740,
            "label": "background",
            "spec": [
              1200,
              1166,
              1189,
              1170,
              1171,
              1168,
              1177,
              1195,
              1199,
              1188,
              1188,
              1181,
              1189,
              1197,
              1189,
              1203,
              1187,
              1176,
              1193,
              1206,
              1164,
              1198,
              1187,
              1176,
              1172,
              1165,
              1180,
              1172,
              1183,
              1180,
              1197,
              1182,
              1186,
              1168,
              1176,
              1194,
              1157,
              1182,
              1177,
              1206,
              1204,
              1208,
              1189,
              1187,
              1184,
              1199,
              1226,
              1210,
              1200,
              1180,
              1187,
              1207,
              1214,
              1199,
              1209,
              1208,
              1218,
              1240,
              1215,
              1220,
              1222,
              1240,
              1211,
              1188,
              1220,
              1240,
              1236,
              1247,
              1249,
              1235,
              1258,
              1240,
              1239,
              1223,
              1201,
              1210,
              1210,
              1194,
              1213,
              1225,
              1204,
              1219,
              1194,
              1194,
              1178,
              1189,
              1175,
              1215,
              1171,
              1176,
              1205,
              1184,
              1207,
              1224,
              1208,
              1191,
              1200,
              1234,
              1214,
              1240,
              1254,
              1248,
              1227,
              1262,
              1265,
              1254,
              1238,
              1243,
              1232,
              1245,
              1233,
              1236,
              1234,
              1215,
              1224,
              1215,
              1214,
              1224,
              1241,
              1235,
              1252,
              1254,
              1235,
              1262,
              1242,
              1243,
              1247,
              1219,
              1257,
              1249,
              1255,
              1220,
              1263,
              1253,
              1290,
              1276,
              1299,
              1300,
              1287,
              1287,
              1291,
              1264,
              1248,
              1233,
              1261,
              1242,
              1222,
              1222,
              1213,
              1220,
              1221,
              1225,
              1216,
              1223,
              1234,
              1216,
              1206,
              1199,
              1196,
              1239,
              1245,
              1207,
              1229,
              1217,
              1217,
              1226,
              1223,
              1208,
              1205,
              1228,
              1221,
              1209,
              1214,
              1205,
              1207,
              1229,
              1194,
              1208,
              1204,
              1225,
              1231,
              1212,
              1220,
              1222,
              1232,
              1229,
              1216,
              1239,
              1211,
              1195,
              1250,
              1251,
              1232,
              1223,
              1222,
              1226,
              1229,
              1208,
              1209,
              1218,
              1222,
              1248,
              1234,
              1237,
              1231,
              1226,
              1193,
              1230,
              1220,
              1227,
              1226,
              1230,
              1234,
              1228,
              1243,
              1226,
              1247,
              1218,
              1238,
              1226,
              1226,
              1229,
              1224,
              1225,
              1197,
              1215,
              1246,
              1221,
              1219,
              1209,
              1211,
              1214,
              1241,
              1262,
              1241,
              1222,
              1241,
              1207,
              1211,
              1230,
              1241,
              1228,
              1235,
              1218,
              1218,
              1241,
              1212,
              1227,
              1219,
              1219,
              1217,
              1233,
              1241,
              1226,
              1231,
              1214
            ],
            "data_raw": [

            ]
          },
          {
            "time": 1545458169740,
            "label": "reflectance",
            "spec": [
              1289,
              1319,
              1312,
              1313,
              1318,
              1303,
              1318,
              1316,
              1337,
              1282,
              1290,
              1290,
              1311,
              1299,
              1320,
              1316,
              1314,
              1309,
              1322,
              1310,
              1319,
              1304,
              1309,
              1306,
              1297,
              1286,
              1324,
              1310,
              1314,
              1316,
              1275,
              1297,
              1273,
              1288,
              1296,
              1305,
              1325,
              1327,
              1330,
              1317,
              1335,
              1318,
              1363,
              1361,
              1368,
              1350,
              1283,
              1320,
              1336,
              1314,
              1313,
              1354,
              1356,
              1370,
              1376,
              1382,
              1340,
              1369,
              1384,
              1388,
              1402,
              1421,
              1440,
              1423,
              1393,
              1393,
              1431,
              1427,
              1423,
              1447,
              1447,
              1462,
              1463,
              1459,
              1489,
              1511,
              1522,
              1557,
              1553,
              1580,
              1570,
              1612,
              1632,
              1608,
              1654,
              1715,
              1775,
              1862,
              1935,
              2004,
              2071,
              2104,
              2189,
              2258,
              2304,
              2376,
              2437,
              2501,
              2548,
              2602,
              2713,
              2820,
              2920,
              3036,
              3148,
              3256,
              3353,
              3422,
              3501,
              3538,
              3594,
              3592,
              3594,
              3565,
              3540,
              3531,
              3494,
              3447,
              3382,
              3312,
              3245,
              3158,
              3086,
              3022,
              2952,
              2900,
              2853,
              2773,
              2797,
              2768,
              2751,
              2741,
              2728,
              2699,
              2645,
              2624,
              2602,
              2521,
              2480,
              2445,
              2409,
              2370,
              2371,
              2371,
              2379,
              2419,
              2387,
              2407,
              2430,
              2443,
              2447,
              2469,
              2523,
              2541,
              2573,
              2623,
              2656,
              2680,
              2691,
              2677,
              2655,
              2631,
              2590,
              2530,
              2485,
              2422,
              2398,
              2359,
              2320,
              2336,
              2341,
              2368,
              2412,
              2460,
              2498,
              2599,
              2687,
              2850,
              3073,
              3316,
              3561,
              3959,
              4356,
              4708,
              5045,
              5348,
              5564,
              5754,
              5896,
              5954,
              5945,
              5851,
              5719,
              5491,
              5229,
              4927,
              4575,
              4223,
              3867,
              3559,
              3295,
              3074,
              2881,
              2689,
              2566,
              2493,
              2442,
              2400,
              2368,
              2371,
              2389,
              2418,
              2482,
              2504,
              2540,
              2638,
              2684,
              2747,
              2833,
              2897,
              2965,
              3031,
              3072,
              3131,
              3188,
              3229,
              3283,
              3338,
              3434,
              3508,
              3606,
              3646,
              3813,
              3956,
              4170,
              4422,
              4670,
              4973,
              5295,
              5601,
              5887,
              6100,
              6196,
              6211,
              6125,
              5946,
              5704,
              5455,
              5156,
              4926,
              4748,
              4617,
              4510,
              4408,
              4309,
              4146
            ],
            "recall": {
              "time": 1545458169740,
              "spec_ref": [
                397,
                354,
                383,
                423,
                381,
                354,
                366,
                334,
                295,
                314,
                330,
                374,
                315,
                271,
                281,
                313,
                355,
                392,
                321,
                365,
                331,
                382,
                409,
                428,
                336,
                340,
                324,
                350,
                346,
                349,
                360,
                273,
                369,
                366,
                337,
                384,
                428,
                427,
                566,
                654,
                793,
                885,
                1001,
                1127,
                1098,
                1054,
                1038,
                1076,
                1037,
                1028,
                1109,
                1157,
                1213,
                1263,
                1371,
                1533,
                1673,
                1837,
                1987,
                2204,
                2386,
                2670,
                2789,
                3007,
                3170,
                3333,
                3449,
                3630,
                3866,
                4108,
                4386,
                4822,
                5332,
                6012,
                6748,
                7685,
                8812,
                9945,
                11266,
                12551,
                13827,
                15085,
                16239,
                17394,
                18337,
                19396,
                20285,
                21139,
                21941,
                22816,
                23666,
                24412,
                25118,
                25851,
                26445,
                26876,
                27154,
                27169,
                26847,
                26228,
                25477,
                24695,
                23804,
                23021,
                22108,
                21190,
                20256,
                19342,
                18359,
                17364,
                16433,
                15547,
                14609,
                13799,
                13055,
                12337,
                11653,
                11121,
                10527,
                10066,
                9607,
                9190,
                8728,
                8381,
                8071,
                7755,
                7530,
                7385,
                7141,
                7087,
                6858,
                6892,
                6792,
                6709,
                6699,
                6522,
                6437,
                6449,
                6424,
                6391,
                6444,
                6645,
                6724,
                6956,
                7245,
                7622,
                8018,
                8482,
                8878,
                9336,
                9858,
                10420,
                10995,
                11600,
                12165,
                12798,
                13389,
                14067,
                14672,
                15299,
                15892,
                16317,
                16694,
                16994,
                17229,
                17595,
                17958,
                18233,
                18495,
                18758,
                19023,
                19228,
                19411,
                19553,
                19598,
                19607,
                19559,
                19642,
                19584,
                19525,
                19424,
                19233,
                19000,
                18672,
                18136,
                17581,
                16882,
                16134,
                15479,
                14671,
                13863,
                13090,
                12295,
                11383,
                10435,
                9355,
                8329,
                7374,
                6419,
                5527,
                4846,
                4244,
                3751,
                3253,
                3016,
                2712,
                2536,
                2388,
                2325,
                2362,
                2368,
                2352,
                2423,
                2509,
                2583,
                2699,
                2813,
                2973,
                3067,
                3212,
                3286,
                3421,
                3554,
                3620,
                3713,
                3863,
                3957,
                4053,
                4253,
                4391,
                4553,
                4692,
                4929,
                5198,
                5540,
                5953,
                6471,
                7115,
                7751,
                8323,
                8854,
                9255,
                9485,
                9549,
                9329,
                8953,
                8542,
                8099,
                7527,
                7115,
                6778,
                6491,
                6227,
                6107,
                5845,
                5602
              ]
            },
            "data_raw": [

            ]
          },
          {
            "time": 1545458169877,
            "label": "r_background",
            "spec": [
              1094,
              1069,
              1084,
              1074,
              1069,
              1088,
              1086,
              1073,
              1081,
              1091,
              1090,
              1076,
              1076,
              1084,
              1086,
              1061,
              1074,
              1086,
              1084,
              1077,
              1093,
              1089,
              1078,
              1045,
              1073,
              1100,
              1073,
              1085,
              1084,
              1085,
              1074,
              1093,
              1080,
              1105,
              1081,
              1088,
              1111,
              1114,
              1094,
              1102,
              1077,
              1065,
              1070,
              1074,
              1093,
              1079,
              1079,
              1087,
              1077,
              1084,
              1099,
              1086,
              1091,
              1086,
              1084,
              1090,
              1090,
              1087,
              1139,
              1097,
              1106,
              1126,
              1101,
              1086,
              1103,
              1098,
              1112,
              1124,
              1118,
              1118,
              1116,
              1121,
              1112,
              1086,
              1124,
              1092,
              1086,
              1088,
              1107,
              1092,
              1085,
              1084,
              1083,
              1087,
              1112,
              1114,
              1107,
              1075,
              1104,
              1109,
              1099,
              1092,
              1101,
              1087,
              1105,
              1115,
              1108,
              1108,
              1114,
              1098,
              1109,
              1112,
              1101,
              1126,
              1131,
              1108,
              1103,
              1111,
              1102,
              1116,
              1135,
              1122,
              1122,
              1109,
              1092,
              1094,
              1099,
              1138,
              1120,
              1126,
              1130,
              1133,
              1132,
              1123,
              1120,
              1126,
              1144,
              1110,
              1133,
              1128,
              1121,
              1117,
              1118,
              1115,
              1114,
              1131,
              1139,
              1137,
              1130,
              1127,
              1126,
              1128,
              1123,
              1117,
              1105,
              1123,
              1131,
              1103,
              1097,
              1116,
              1122,
              1121,
              1123,
              1136,
              1116,
              1115,
              1110,
              1114,
              1124,
              1113,
              1112,
              1118,
              1133,
              1121,
              1108,
              1107,
              1112,
              1088,
              1102,
              1102,
              1144,
              1119,
              1108,
              1103,
              1127,
              1121,
              1106,
              1105,
              1112,
              1134,
              1113,
              1132,
              1110,
              1111,
              1143,
              1126,
              1124,
              1138,
              1135,
              1112,
              1120,
              1124,
              1139,
              1137,
              1129,
              1131,
              1128,
              1119,
              1124,
              1133,
              1128,
              1133,
              1118,
              1115,
              1128,
              1136,
              1142,
              1111,
              1122,
              1129,
              1098,
              1117,
              1104,
              1116,
              1126,
              1098,
              1119,
              1100,
              1114,
              1126,
              1130,
              1124,
              1121,
              1101,
              1110,
              1118,
              1137,
              1117,
              1120,
              1123,
              1127,
              1136,
              1116,
              1119,
              1112,
              1118,
              1089,
              1133,
              1137,
              1099,
              1122,
              1127,
              1137,
              1123,
              1113,
              1105,
              1131,
              1131,
              1122,
              1136,
              1129,
              1120,
              1120,
              1125,
              1147,
              1138
            ],
            "data_raw": [

            ]
          }
        ],
        "data_raw": [

        ]
      }
    ]
  ],
  "app_os": "Windows 10.0.17134",
  "app_name": "PhotosynQ",
  "app_version": "1.0.2",
  "app_device": "x86",
  "location": false,
  "time_offset": "Australia/Sydney",
  "note": "Orange\nUnhealthy (bleached)\nSub-massive\nPolyp\n16:56"
}
Dave in cap img 4615
Created by

David M. Kramer


Protocol connections:
0
Latest Update:
Dec 2018