code: function convertToObject(spectra) {
      var result={};
      for (var i=0; i<spectra.length; i++) {
          var spectrum=spectra[i];
          result[spectrum.type]=spectrum;
      }
      return result;
  }
docs: /*
  types are normally: R G B W
  Z (background), E (experimental)
  A: absorbance
  T: transmittance