Skip to content

Instantly share code, notes, and snippets.

@mikekunze
Created September 12, 2011 21:51
Show Gist options
  • Save mikekunze/1212574 to your computer and use it in GitHub Desktop.
Save mikekunze/1212574 to your computer and use it in GitHub Desktop.
beadChips async forEach (section) build function
sectionObject = {
date: sectionArray[0],
beadChip: sectionArray[1],
section: sectionArray[2],
focusGrn: Number(sectionArray[3]),
regGrn: Number(sectionArray[4]),
p05Grn: Number(sectionArray[5]),
p95Grn: Number(sectionArray[6]),
focusRed: Number(sectionArray[7]),
regRed: Number(sectionArray[8]),
p05Red: Number(sectionArray[9]),
p95Red: Number(sectionArray[10])
};
// Conditions for bad section
if(sectionObject.focusGrn < 0.5 || sectionObject.focusRed < 0.5 ||
sectionObject.p95Red < 10000 || sectionObject.p95Grn < 10000) {
fail.push(sectionObject);
} else {
pass.push(sectionObject);
}
sections.push(sectionObject);
callback();
}
callback();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment