Skip to content

Instantly share code, notes, and snippets.

@artlbv
Created February 13, 2015 15:48
Show Gist options
  • Save artlbv/15d3c236e930b0b9e4aa to your computer and use it in GitHub Desktop.
Save artlbv/15d3c236e930b0b9e4aa to your computer and use it in GitHub Desktop.
ZS simpleAna
std::string zshist = "HO_ZS";
zshist += std::to_string(ZSthr);
float TSsum = 0;
// search within first 3 2TS pairs
for (int sample=0; sample < it->size()-1; ++sample) {
// for (int sample=0; sample < 6; ++sample) {
TSsum = it->sample(sample).nominal_fC();
TSsum += it->sample(sample+1).nominal_fC();
if ( TSsum >= ZSthr ){
// if TS sum over ZS threshold label channel as not ZS
setData(generateName(zshist,hoId),0);
NchNZS[ZSthr - minZSthr]++;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment