Large diffs are not rendered by default.

@@ -0,0 +1,303 @@
#ifndef IITP_CONSTS_H
#define IITP_CONSTS_H
#include <myLib/signalProcessing.h>
#include <myLib/valar.h>

namespace iitp
{
/// const consts
const std::vector<QString> trialTypesNames
{
"rest",
"real",
"imag",
"passive",
"stat"
};

/// class because of simple names
enum trialType {rest = 0,
real = 1,
imag = 2,
passive = 3,
stat = 4};


const std::valarray<int> trialTypes{
// 0 eyes closed
trialType::rest,
// 1 eyes open
trialType::rest,
// 2 legs
trialType::real,
// 3 legs imaginary
trialType::imag,
// 4 feet
trialType::real,
// 5 feet imaginary
trialType::imag,
// 6 wrists
trialType::real,
// 7 wrists imaginary
trialType::imag,
// 8 feet + wrists
trialType::real,
// 9 feet + wrists imaginary
trialType::imag,
// 10 legs + wrists
trialType::real,
// 11 legs + wrists imaginary
trialType::imag,
// 12 static stress
trialType::stat,
// 13 middle eyes closed
trialType::rest,
// 14 middle eyes open
trialType::rest,
// 15 arms
trialType::real,
// 16 arms imaginary
trialType::imag,
// 17 arms + legs
trialType::real,
// 18 arms + legs imaginagy
trialType::imag,
// 19 legs passive
trialType::passive,
// 20 arms passive
trialType::passive,
// 21 arms+legs passive
trialType::passive,
// 22 final eyes closed
trialType::rest,
// 23 final eyes open
trialType::rest,
// 24 weak Ta_l
trialType::stat,
// 25 weak Ta_r
trialType::stat,
// 26 weak Fcr_l
trialType::stat,
// 27 weak Fcr_r
trialType::stat,
// 28 weak Ecr_l
trialType::stat,
// 29 weak Ecr_r
trialType::stat,

/// VR
// 30 VR + legs slow
trialType::real,
// 31 VR + legs fast
trialType::real,
// 32 VR + arms slow
trialType::real,
// 33 VR + arms fast
trialType::real,
// 34 VR + arms, legs slow
trialType::real,
// 34 VR + arms, legs fast
trialType::real
};

enum gonioChans {Ankle_l = 0,
Ankle_r = 1,
Knee_l = 2,
Knee_r = 3,
Elbow_l = 4,
Elbow_r = 5,
Wrist_l = 6,
Wrist_r = 7};

const std::vector<QString> gonioNames {
"Ankle_l",
"Ankle_r",
"Knee_l",
"Knee_r",
"Elbow_l",
"Elbow_r",
"Wrist_l",
"Wrist_r"};




enum emgChans {Ta_l = 0,
Ta_r = 1,
Bf_l = 2,
Bf_r = 3,
Fcr_l = 4,
Fcr_r = 5,
Ecr_l = 6,
Ecr_r = 7,
Da_l = 8,
Da_r = 9,
Dp_l = 10,
Dp_r = 11
};

const std::vector<QString> emgNamesPrefixes {
"Ta",
"Bf",
"Fcr",
"Ecr",
"Da",
"Dp"
};


const std::vector<QString> emgNames {
"Ta_l",
"Ta_r",
"Bf_l",
"Bf_r",
"Fcr_l",
"Fcr_r",
"Ecr_l",
"Ecr_r",
"Da_l",
"Da_r",
"Dp_l",
"Dp_r"};


/// [numFile] - interestingChannels
/// maybe all EMGs for rest and/or stat
/// 1 May 17 - added Ta_l, Ta_r everywhere for maps drawing

const std::vector<std::valarray<int>> interestEmg{
// 0 eyes closed
{Ta_l, Ta_r, Bf_l, Bf_r, Fcr_l, Fcr_r, Ecr_l, Ecr_r},
// 1 eyes open
{Ta_l, Ta_r, Bf_l, Bf_r, Fcr_l, Fcr_r, Ecr_l, Ecr_r},
// 2 legs
{Ta_l, Ta_r, Bf_l, Bf_r},
// 3 legs imaginary
{Ta_l, Ta_r, Bf_l, Bf_r},
// 4 feet
{Ta_l, Ta_r},
// 5 feet imaginary
{Ta_l, Ta_r},
// 6 wrists
{Fcr_l, Fcr_r, Ecr_l, Ecr_r, Ta_l, Ta_r},
// 7 wrists imaginary
{Fcr_l, Fcr_r, Ecr_l, Ecr_r, Ta_l, Ta_r},
// 8 feet + wrists
{Ta_l, Ta_r, Fcr_l, Fcr_r, Ecr_l, Ecr_r},
// 9 feet + wrists imaginary
{Ta_l, Ta_r, Fcr_l, Fcr_r, Ecr_l, Ecr_r},
// 10 legs + wrists
{Ta_l, Ta_r, Bf_l, Bf_r, Fcr_l, Fcr_r, Ecr_l, Ecr_r},
// 11 legs + wrists imaginary
{Ta_l, Ta_r, Bf_l, Bf_r, Fcr_l, Fcr_r, Ecr_l, Ecr_r},
// 12 static stress
{},
// 13 middle eyes closed
{Ta_l, Ta_r, Bf_l, Bf_r, Fcr_l, Fcr_r, Ecr_l, Ecr_r},
// 14 middle eyes open
{Ta_l, Ta_r, Bf_l, Bf_r, Fcr_l, Fcr_r, Ecr_l, Ecr_r},
// 15 arms
{Da_l, Da_r, Dp_l, Dp_r, Ta_l, Ta_r},
// 16 arms imaginary
{Da_l, Da_r, Dp_l, Dp_r, Ta_l, Ta_r},
// 17 arms + legs
{Da_l, Da_r, Dp_l, Dp_r, Ta_l, Ta_r, Bf_l, Bf_r},
// 18 arms + legs imaginagy
{Da_l, Da_r, Dp_l, Dp_r, Ta_l, Ta_r, Bf_l, Bf_r},
// 19 legs passive
{Ta_l, Ta_r, Bf_l, Bf_r},
// 20 arms passive
{Da_l, Da_r, Dp_l, Dp_r, Ta_l, Ta_r},
// 21 arms + legs passive
{Da_l, Da_r, Dp_l, Dp_r, Ta_l, Ta_r, Bf_l, Bf_r},
// 22 final eyes closed
{Da_l, Da_r, Dp_l, Dp_r, Ta_l, Ta_r, Bf_l, Bf_r},
// 23 final eyes open
{Da_l, Da_r, Dp_l, Dp_r, Ta_l, Ta_r, Bf_l, Bf_r},
// 24 weak Ta_l
{Ta_l, Ta_r},
// 25 weak Ta_r
{Ta_r, Ta_l},
// 26 weak Fcr_l
{Fcr_l, Ta_l, Ta_r},
// 27 weak Fcr_r
{Fcr_r, Ta_l, Ta_r},
// 28 weak Ecr_l
{Ecr_l, Ta_l, Ta_r},
// 29 weak Ecr_r
{Ecr_r, Ta_l, Ta_r},

/// VR
// 30 VR + legs slow
{Ta_l, Ta_r, Bf_l, Bf_r},
// 31 VR + legs fast
{Ta_l, Ta_r, Bf_l, Bf_r},
// 32 VR + arms slow
{Da_l, Da_r, Dp_l, Dp_r},
// 33 VR + arms fast
{Da_l, Da_r, Dp_l, Dp_r},
// 34 VR + arms, legs slow
{Da_l, Da_r, Dp_l, Dp_r, Ta_l, Ta_r, Bf_l, Bf_r},
// 35 VR + arms, legs fast
{Da_l, Da_r, Dp_l, Dp_r, Ta_l, Ta_r, Bf_l, Bf_r}
};



const std::vector<QString> eegNames{
"Fp1",
"Fp2",
"F7",
"F3",
"Fz",
"F4",
"F8",
"T3",
"C3",
"Cz",
"C4",
"T4",
"T5",
"P3",
"Pz",
"P4",
"T6",
"O1",
"O2"};



/// for spectra inspection
const double leftFr = 4.;
const double rightFr = 40.;
const myLib::windowName iitpWindow = myLib::windowName::Hamming;
const std::vector<double> interestFrequencies = smLib::range<std::vector<double>>(8, 45 + 1);



/// EXPERIMENTAL forMaps
const std::vector<QString> forMapEmgNames {
"Ta_l",
"Ta_r",
"Fcr_l",
"Fcr_r",
"Ecr_l",
"Ecr_r",

/// VR
"Bf_l",
"Bf_r",
"Da_l",
"Da_r",
"Dp_l",
"Dp_r"
};

const std::vector<QString> forMapRangeNames {
"alpha",
"beta",
"gamma"
};

} // end namespace iitp
#endif // IITP_CONSTS_H
@@ -0,0 +1,137 @@
#ifndef IITP_VARIABLES_H
#define IITP_VARIABLES_H
#include <myLib/iitp_consts.h>

namespace iitp
{


/// [numFile] - interestingChannels
/// commented wrists and ankles - letter 7-Nov-17
const std::vector<std::valarray<int>> interestGonios{
// 0 eyes closed
{},
// 1 eyes open
{},
// 2 legs
{/*Ankle_l, Ankle_r,*/ Knee_l, Knee_r}, /// commented Ankles 17.02.18 (Alex2)
// 3 legs imaginary
{},
// 4 feet
{Ankle_l, Ankle_r},
// 5 feet imaginary
{},
// 6 wrists
{Wrist_l, Wrist_r},
// 7 wrists imaginary
{},
// 8 feet + wrists
{Ankle_l, Ankle_r, Wrist_l, Wrist_r},
// 9 feet + wrists imaginary
{},
// 10 legs + wrists
{ /*Ankle_l, Ankle_r, */ Knee_l, Knee_r, Wrist_l, Wrist_r},
// 11 legs + wrists imaginary
{},
// 12 static stress
{},
// 13 middle eyes closed
{},
// 14 middle eyes open
{},
// 15 arms
{Elbow_l, Elbow_r /*, Wrist_l, Wrist_r*/ },
// 16 arms imaginary
{},
// 17 arms + legs
{Elbow_l, Elbow_r, Knee_l, Knee_r /*, Ankle_l, Ankle_r, Wrist_l, Wrist_r*/ },
// 18 arms + legs imaginagy
{},
// 19 legs passive
{Knee_l, Knee_r /*,Ankle_l, Ankle_r*/ },
// 20 arms passive
{Elbow_l, Elbow_r /*, Wrist_l, Wrist_r*/ },
// 21 arms+legs passive
{Elbow_l, Elbow_r, Knee_l, Knee_r /*, Wrist_l, Wrist_r, Ankle_l, Ankle_r*/ },
// 22 final eyes closed
{},
// 23 final eyes open
{},
// 24 weak Ta_l
{},
// 25 weak Ta_r
{},
// 26 weak Fcr_l
{},
// 27 weak Fcr_r
{},
// 28 weak Ecr_l
{},
// 29 weak Ecr_r
{},

/// VR
// 30 VR + legs slow
{Knee_l, Knee_r},
// 31 VR + legs fast
{Knee_l, Knee_r},
// 32 VR + arms slow
{Elbow_l, Elbow_r},
// 33 VR + arms fast
{Elbow_l, Elbow_r},
// 34 VR + arms, legs slow
{Knee_l, Knee_r, Elbow_l, Elbow_r},
// 35 VR + arms, legs fast
{Knee_l, Knee_r, Elbow_l, Elbow_r}
};


const std::vector<int> interestEeg{
// 0, // Fp1
// 1, // Fp2,
2, // F7
3, // F3
4, // Fz
5, // F4 - usually bad
6, // F8
7, // T3
8, // C3
9, // Cz
10, // C4
11, // T4
12, // T5
13, // P3
14, // Pz
15, // P4 - usually bad
16, // T5
17, // O1
18 // O2
};

/// all with 12th
const std::valarray<double> fileNums = smLib::range(0, 35 + 1);
//const std::valarray<double> fileNums{1};


/// added 2, 6, 10 due to letter 03.11.17
const QVector<int> interestingForLegs{0, 1, 2, 4, 6, 8, 10, 13, 14, 22, 23, 24, 25, 30, 31, 34, 35}; /// for maps drawing

/// added due to talk 28.11.17
const QVector<int> interestingForWrists{0, 1, 6, 8, 10, 13, 14, 26, 27, 28, 29}; /// for maps drawing

/// don't apply any processing for these files
const std::map<QString, std::vector<int>> badFiles{
{"Alex", {0, 1, 2, 3, 4, 5}},
{"Boris", {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}},
{"Dima", {2}},
{"Egor", {5}},
{"Ira", {11, 13}},
{"Isakov", {9}},
{"Victor", {9}},
{"Aliev2", {16, 31}}
};


} // end of namespace iitp

#endif // IITP_VARIABLES_H
@@ -1,4 +1,6 @@
#include <myLib/iitp.h>
#include <myLib/iitp_consts.h>
#include <myLib/iitp_variables.h>
#include <typeinfo>

#include <myLib/signalProcessing.h>
@@ -866,4 +868,119 @@ void iitpData::setFftLen(int in)
}




/// forMap
///
forMap::forMap(const iitp::iitpData::mscohsType & in,
const iitp::iitpData & inFile,
int filNum,
QString typ,
QString gon)
{
fileNum = filNum;
fileType = typ;
gonio = gon;



fmChans.clear();
for(QString emgNam : iitp::forMapEmgNames)
{
// int a = inFile.findChannel(emgNam);
// if(a != -1)
// {
// fmChans.push_back(a);
// }
fmChans.push_back(inFile.findChannel(emgNam));
}

/// new 28.11.17 - EXPERIMENTAL
// std::cout << fmChans << std::endl;
forMapRanges.resize(iitp::forMapEmgNames.size());
for(int i = 0; i < forMapRanges.size(); ++i) /// i ~ EMG channel
{
if(isBad(i)) { continue; }

for(int j = 0; j < forMapRanges[i].size(); ++j) /// j ~ alpha/beta/gamma
{

fmRange & pewpew = forMapRanges[i][j];

pewpew.maxValZero();
pewpew.meanValZero();

for(int eegNum : iitp::interestEeg)
{
for(int FR = pewpew.lef(); FR < pewpew.rig(); ++FR)
{
const auto & val = in[eegNum][fmChans[i]][FR / inFile.getSpStepW()];
if(std::abs(val) >= 1.0)
{
std::cout << "abs(coh) > 1"
<< " fileNum " << fileNum
<< " type " << typ
<< " eeg " << inFile.getLabels(eegNum)
<< " EMG " << iitp::forMapEmgNames[i]
<< " freq " << FR
<< " rhythm " << iitp::forMapRangeNames[j]
<< std::endl;
}
// pewpew.meanVal[eegNum] += val;
// pewpew.maxVal[eegNum] = std::max(pewpew.maxVal[eegNum], val);

pewpew.setMeanVal(eegNum, val);
pewpew.setMaxVal(eegNum,
std::max(pewpew.getMaxVal(eegNum), val));
}
}
// pewpew.meanVal /= pewpew.rightLim - pewpew.leftLim;
pewpew.meanValDivide(pewpew.rig() - pewpew.lef());
}
}

if(0)
{
std::cout << fileType << std::endl;
std::cout << std::fixed;
std::cout.precision(3);
for(int i = 0; i < forMapRanges.size(); ++i) /// i ~ EMG channel
{
for(int j = 0; j < forMapRanges[i].size(); ++j) /// j ~ alpha/beta/gamma
{
const fmRange & pewpew = forMapRanges[i][j];

std::cout << fileNum << " " << i << " " << j << " : " << std::endl;
// std::cout << pewpew.meanVal << std::endl;
// std::cout << pewpew.maxVal << std::endl;

std::cout << pewpew.getMeanVal() << std::endl;
std::cout << pewpew.getMaxVal() << std::endl;
}
std::cout << std::endl;
}
std::cout << std::defaultfloat;
}

}


bool forMap::isBad(int numEmg) const
{
/// may not have such Emg channel
/// OR it is not interesting EMG,
/// i.e. the signal may be bad and coherencies weren't calced
///
// std::cout << "isGood(" << numEmg << "):" << std::endl;
// std::cout << "num of chan (should != -1) " << fmChans[numEmg] << std::endl;
// std::cout << "is emg in interest chans? " << myLib::contains(iitp::interestEmg[fileNum],
// myLib::indexOfVal(iitp::emgNames,
// iitp::forMapEmgNames[numEmg])) << std::endl;
return (fmChans[numEmg] == -1) ||
(!myLib::contains(iitp::interestEmg[fileNum],
myLib::indexOfVal(iitp::emgNames,
iitp::forMapEmgNames[numEmg])));
}


} // namespace iitp
@@ -143,11 +143,8 @@ std::valarray<double> softmax(const std::valarray<double> & in)
template <typename Container>
Container contReverse(const Container & in)
{
Container res(in.size());
for(int i = 0; i < in.size(); ++i)
{
res[i] = in[in.size() - 1 - i];
}
Container res{in.size()};
std::reverse_copy(std::begin(in), std::end(in), std::begin(res));
return res;
}
template std::valarray<double> contReverse(const std::valarray<double> & in);
@@ -130,6 +130,13 @@ void IITPconcat(const QString & guyName,
const QString & emgPostfix);
void IITPdatToEdf(const QString & guyName);

bool IITPtestInitialFiles(const QString & guyName);
std::vector<std::pair<QString, std::vector<QString>>> IITPtestEegChannels(const QString & guyDir,
const QString & postfix);

void IITPinsertChannels(const QString & guyDir,
const std::vector<std::pair<QString, std::vector<QString>>> & forInsert);


void IITPcopyChannel(const QString & guy,
const QString & whatChan,
@@ -5,10 +5,94 @@
#include <myLib/signalProcessing.h>
#include <myLib/dataHandlers.h>

#include <myLib/iitp_consts.h>
#include <myLib/iitp_variables.h>

using namespace myOut;

namespace autos
{

bool IITPtestInitialFiles(const QString & guyName)
{
/// all eeg channels presence
/// Fpz, Oz absence
/// emg file channels - interest emg
/// emg file channels - interest gonios
return true;
}


std::vector<std::pair<QString, std::vector<QString>>> IITPtestEegChannels(const QString & guyDir,
const QString & postfix)
{
/// check all EEG channels presence
std::vector<std::pair<QString, std::vector<QString>>> res;
const auto filesList = QDir(guyDir).entryList({"*" + postfix + ".edf"});
for(auto edf : filesList)
{
edfFile fil;
fil.readEdfFile(guyDir + "/" + edf);

std::vector<QString> absChans{};
for(auto chan : iitp::eegNames) /// good order
{
bool absent = true;
for(auto inChan : fil.getLabels())
{
if(inChan.contains(chan)) { absent = false; break; }
}
if(absent)
{
absChans.push_back(chan);
}
}
if(!absChans.empty())
{
res.push_back({edf, absChans});

/// cout
if(0)
{
std::cout << edf << ": ";
for(auto ch : absChans)
{
std::cout << ch << " ";
}
std::cout << std::endl;
}
}
}
return res;
}

void IITPinsertChannels(const QString & guyDir,
const std::vector<std::pair<QString, std::vector<QString>>> & forInsert)
{
/// - make std::vector<...> of parameters, what to insert
/// in simpliest case - weighted sum of neighbours or just contralateral channel
/// USED ALGORITHM - insert previous channel by number
for(const auto & in : forInsert)
{
edfFile fil;
fil.readEdfFile(guyDir + "/" + in.first);
for(auto chan : in.second)
{
int num = myLib::indexOfVal(iitp::eegNames, chan);

/// should be special function, these could be also absent
int substit = (num == 0) ? (num + 1) : (num - 1);

edfChannel newChan = fil.getChannels(substit);
newChan.label.replace(iitp::eegNames[substit], iitp::eegNames[num]);

fil.insertChannel(num, fil.getData(substit), newChan);
}
fil.rewriteEdfFile();
}
}


QPixmap IITPdrawCoh(const std::valarray<std::complex<double>> & inData,
double minFreq,
double maxFreq,
@@ -936,20 +1020,27 @@ void IITPrerefCAR(const QString & guyName,
{
if(!addFilter.isEmpty() && !fileName.contains(addFilter)) { continue; }

// std::cout << fileName << std::endl;

edfFile fil;
fil.readEdfFile(workPath + "/" + fileName);


/// refArr = (Fp1 + Fp2 + ... + O1 + O2)/19 - Ref
std::valarray<double> refArr(fil.getDataLen());
for(QString chanName : usedLabels)
{
// std::cout << chanName << " st" << std::endl;
int ref = fil.findChannel(chanName);
refArr += fil.getData(ref);
// std::cout << chanName << " en" << std::endl;
}
refArr /= usedLabels.size();


for(int i = 0; i < fil.getNs(); ++i)
{
// std::cout << i << " "; std::cout.flush();
auto it = std::find_if(std::begin(rerefLabels),
std::end(rerefLabels),
[fil, i](const QString & in)
@@ -966,6 +1057,7 @@ void IITPrerefCAR(const QString & guyName,
fil.setLabel(i, newLabel);
}
}
// std::cout << std::endl;
fil.writeEdfFile(workPath + "/" + fileName
// .replace(".edf", "_car.edf") /// add name or not
);
@@ -1058,9 +1150,9 @@ void IITPstaging(const QString & guyName,
{
for(int ch : iitp::interestGonios[fileNum])
{
std::cout << guyName << " " << iitp::gonioNames[ch] << " beg" << std::endl;
// std::cout << guyName << " " << iitp::gonioNames[ch] << " beg" << std::endl;
fil.staging(ch);
std::cout << guyName << " " << iitp::gonioNames[ch] << " end" << std::endl;
// std::cout << guyName << " " << iitp::gonioNames[ch] << " end" << std::endl;
}
}
filePath = ExpNamePre + postfix + "_stag" + ".edf";
@@ -1242,8 +1334,9 @@ void IITPprocessStaged(const QString & guyName,
/// check existence
if(!QFile::exists(filePath(fileNum)))
{
const auto a = filePath(fileNum);
std::cout << "IITPprocessStaged: file doesn't exist = "
<< filePath(fileNum) << std::endl;
<< a.mid(a.lastIndexOf("/")) << std::endl;
continue;
}

@@ -347,6 +347,7 @@ class edfFile
const QString & getHeaderRest() const { return headerRest; }

const std::vector<edfChannel> & getChannels() const { return channels; }
const edfChannel & getChannels(int i) const { return channels[i]; }

const QString & getFilePath() const { return filePath; }
const QString & getDirPath() const { return dirPath; }
@@ -197,6 +197,18 @@ void MainWindow::customFunc()
exit(0);
#endif

#if 0
{
const QString guy = "Alex2";
const QString guyPath = def::iitpSyncFolder + "/" + guy;
const QString postfix = "_sum_new";
auto badFiles = autos::IITPtestEegChannels(guyPath, postfix);
autos::IITPinsertChannels(guyPath, badFiles);
exit(0);
}
#endif

// return;

#if 01
/// IITP
@@ -222,20 +234,7 @@ void MainWindow::customFunc()
};


// edfFile f;
// f.readEdfFile("/media/Files/Data/iitp/Alex/Alex_05_sum_new.edf");
// auto z = f.getData(0); z = 0;
// for(uint emg : f.findChannels("EMG"))
// {
// f.setData(emg, z);
// }
// f.writeEdfFile("/media/Files/Data/iitp/Alex/Alex_05_sum_new.edf");
// exit(0);

// autos::IITPfilter("Levik", "_sum_new", false, false, true); /// rewrites _sum_new.edf
// exit(0);

return;
// return;

QString guy = "Alex2";
// for(QString guy : guyList)
@@ -261,6 +260,10 @@ void MainWindow::customFunc()
}
if(0)
{
if(!autos::IITPtestInitialFiles(guy))
{
exit(0);
}
autos::IITPremoveZchans(guy, def::iitpFolder); /// rewrites _eeg.edf
autos::IITPdatToEdf(guy);
autos::IITPfilter(guy, "_emg", true, true, false); /// rewrites _emg.edf
@@ -271,7 +274,7 @@ void MainWindow::customFunc()
if(01)
{
/// filter eeg 0.5-70, notch 45-55
autos::IITPfilter(guy, "_eeg_new", false, false, true); /// rewrites _eeg_new.edf
// autos::IITPfilter(guy, "_eeg_new", false, false, true); /// rewrites _eeg_new.edf
autos::IITPconcat(guy, "_eeg_new", "_emg"); /// if cleaned init eeg
}
else
@@ -284,18 +287,25 @@ void MainWindow::customFunc()
// return;
if(01)
{
std::cout << "staging start" << std::endl;
autos::IITPstaging(guy); /// flex/extend markers
std::cout << "staging end, copy start" << std::endl;
autos::IITPcopyToCar(guy); /// copy ALL *_stag.edf to guy_car
std::cout << "copy end, reref start" << std::endl;
autos::IITPrerefCAR(guy); /// rewrite ALL edfs in SYNCED/guy_car
std::cout << "copy end, process start" << std::endl;
autos::IITPprocessStaged(guy); /// both -Ref and -car
std::cout << "process end, draw start" << std::endl;
autos::IITPdrawSpectralMaps(guy); /// both -Ref and -car
std::cout << "all end" << std::endl;
// continue;
// exit(0);
}

exit(0);
// continue;

#if 0
/// deleted lists 14.10.2017
myLib::drw::trueChans = iitp::interestEeg;

@@ -305,6 +315,7 @@ void MainWindow::customFunc()
// nums.erase(std::find(std::begin(nums), std::end(nums), 8));
autos::IITPdrawSameScale(guy, smLib::range<Typ>(0, 11 + 1));
exit(0);
#endif
}
exit(0);
#endif