const GCMS = require('chromatography');
let gcms = GCMS.fromJcamp(jcampReferenceMixture);
let kovatsConvertionTable = GCMS.getKovatsTable(gcms); // [{time, value}, ]
let convertionFunction = GCMS.kovatsConvertionFunction(kovatsConvertionTable, {});
let diesel = GCMS.fromJcamp(jcampOfDiesel);
let times = GCMS.rescaleTime(diesel.getTimes(), convertionFunction);
diesel.setTimes(times);
// diesel.rescaleTime(convertionFunction);
let peaks = GCMS.getPeaks(diesel, options);
let dieselJSON = diesel.toJSON(options); // [ time:12, height:12, width: 3, mass: [{mass, intensity}] ]
let gcms2 = GCMS.fromJSON(anotherDieselJSON);
let similarity = GCMS.similarity(gcms, gcms2, options)
// get a spectrum in another reference model
let revertConvertionFunction = GCMS.kovatsConvertionFunction(kovatsConvertionTable, {revert: true});
cc @lpatiny @targos any modification to this proposal before I continue on it?
Coverage decreased (-0.3%) to 99.688% when pulling 8848b4c8dd0c6a771e41691cc8764545221bd74a on development into 79efc71644065e047d91c0b17effbe1590717f27 on master.
Unfinished work
The main goal is to have an API like the example:
cc @lpatiny @targos any modification to this proposal before I continue on it?