24 #define WAVECLUSTER_CC 123 size_t nj = w.
size()/ni;
126 size_t nl = size_t(2.*low*ni/w.wavearray<double>::rate());
127 size_t nh = size_t(2.*high*ni/w.wavearray<double>::rate());
129 if(nh>=ni) nh = ni-1;
132 int* TF =
new int[ni*nj];
144 cout<<
"wavecluster::constructor() size error: "<<nj<<endl;
147 if(a.
data[j]==0. || i<nl || i>nh) p[
j]=0;
151 if(!k) {
delete [] TF;
return 0; }
162 pix.
rate = float(w.wavearray<double>::rate()/
L);
165 size_t &
t = pix.
time;
176 if(p[j] != -1)
continue;
180 pList.push_back(pix);
192 for(f = i>0 ? i-1 : i; f<=
F; f++) {
194 for(t = j>0 ? j-1 : j; t<=
T; t++) {
195 if(!q[t]) {pList.push_back(pix); q[
t] = ++
L;}
203 std::vector<int>* pN;
204 size_t nL = pList.size();
209 i = pList[
k].frequency;
211 if(
int(i)>w.
maxLayer()) cout<<
"wavecluster::constructor() maxLayer error: "<<i<<endl;
220 pN = &(pList[
k].neighbors);
225 for(f = i>0 ? i-1 : i; f<=
F; f++) {
227 for(t = j>0 ? j-1 : j; t<=
T; t++) {
228 L = (f==i && t==
j) ? 0 : q[t];
229 if(L) pN->push_back(L-1);
248 size_t n = pList.size();
250 if(!pList.size())
return 0;
257 if(pList[i].clusterID)
continue;
258 pList[
i].clusterID = ++nCluster;
261 cRate.push_back(refMask);
262 refMask.resize(volume);
263 cList.push_back(refMask);
264 sCuts.push_back(
false);
267 list<vector_int>::iterator it;
269 if(!cList.size())
return 0;
271 for(it=cList.begin(); it != cList.end(); it++) {
276 if(pList[i].clusterID == nCluster) (*it)[m++] =
i;
279 if(it->size() !=
m) {
280 cout<<
"cluster::cluster() size mismatch error: ";
281 cout<<m<<
" size="<<it->size()<<
" "<<nCluster<<endl;
283 if(m==1 && !pList[(*it)[0]].
core) {
284 cout<<
"cluster::cluster() : empty cluster. \n";
285 cout<<pList[(*it)[0]].time<<
" "<<pList[(*it)[0]].frequency<<endl;
313 if(!pList.size() || !cList.size())
return 0;
320 list<vector_int>::iterator it;
329 for(it=x.
cList.begin(); it != x.
cList.end(); it++) {
331 pix = &(x.
pList[((*it)[0])]);
336 for(i=0; i<it->size(); i++) {
337 pix = &(x.
pList[((*it)[
i])]);
342 pList.push_back(*pix);
347 if(!i) cout<<
"wavecluster::cleanhalo() error: empty cluster.";
351 sCuts.push_back(
false);
357 pList[
id[i-1]].neighbors.push_back(
id[i]);
358 pList[
id[
i]].neighbors.push_back(
id[i-1]);
373 size_t N = w.
size()-1;
374 size_t M = pList.size();
383 offset =
fabs(offset);
385 printf(
"wavecluster::apush: start time mismatch: dT=%16.13f",
start-w.
start());
400 rate = w.wavearray<double>::rate()/
m;
401 ofFSet = size_t(offset*w.wavearray<double>::rate()+0.5);
403 if(
int(p->
rate+0.1) !=
int(rate+0.1)) {
408 if((ofFSet/m)*m != ofFSet)
409 cout<<
"wavecluster::apush(): illegal offset "<<ofFSet<<
" m="<<m<<
"\n";
412 a = j>N ? 0. : w.
data[
j];
416 return pList[0].amplitude.size();
426 size_t on = pList.size();
427 size_t im = w.
cList.size();
428 size_t om = cList.size();
430 if(!in) {
return on; }
431 if(!on) { *
this =
w;
return in; }
437 printf(
"\n wavecluster::append(): cluster type mismatch");
445 for(i=0; i<
in; i++) w.
pList[i].clusterID=0;
448 sCuts.clear(); cList.clear(); om=0;
449 for(i=0; i<on; i++) pList[i].clusterID=0;
457 for(k=0; k<
n; k++) (*v)[
k] += on;
462 if(!im)
return pList.size();
464 list<vector_int>::iterator it;
467 for(it=w.
cList.begin(); it != w.
cList.end(); it++) {
469 for(i=0; i<it->size(); i++) {
473 cList.push_back(*it);
474 sCuts.push_back(w.
sCuts[n++]);
486 size_t n = pList.size();
505 for(i=0; i<
n; i++) { pp[
i] = &(pList[
i]); pp[
i]->
index =
i; }
513 if(!p->
core)
continue;
517 for(j=i+1; j<
n; j++){
523 if(qtime<ptime) cout<<
"wavecluster::merge() error"<<endl;
525 if(qtime-ptime > 1.)
break;
526 if(qtime-ptime > eps)
continue;
532 if(
fabs(pfreq-qfreq) > eps)
continue;
541 if((*v)[k] == l) {insert=
false;
break;}
543 if(insert) v->push_back(l);
552 if((*v)[k] == l) {insert=
false;
break;}
554 if(insert) v->push_back(l);
564 std::list<vector_int>::iterator it;
566 std::vector<int>
rate;
567 std::vector<int> temp;
568 std::vector<int> sIZe;
569 std::vector<bool> cuts;
570 std::vector<double> ampl;
571 std::vector<double> amax;
572 std::vector<double> sigf;
573 std::vector<double>* pa;
581 for(it=cList.begin(); it != cList.end(); it++) {
583 if(!k) cout<<
"wavecluster::merge() error: empty cluster.\n";
596 ID = pList[((*it)[0])].clusterID;
599 pix = &(pList[((*it)[
i])]);
600 if(!pix->
core)
continue;
602 a = pa->size()>1 ? pow((*pa)[1],2) : (*pa)[0];
605 for(j=0; j<rate.size(); j++) {
606 if(rate[j] ==
int(pix->
rate+0.1)) {
611 if(a>amax[j]) amax[
j] =
a;
616 rate.push_back(
int(pix->
rate+0.1));
620 cuts.push_back(
true);
621 sigf.push_back((*pa)[0]);
627 cout<<
"wavecluster::merge() error: cluster ID mismatch.\n";
632 if(!rate.size()) { cout<<
"k="<<k<<
" id="<<ID<<endl;
continue; }
633 if(rate.size()<2 || m<=2){ sCuts[ID-1] =
true;
continue; }
635 sCuts[ID-1] = (
gammaCL(E,m) >
S) ?
false :
true;
639 for(i=0; i<rate.size(); i++) {
640 for(j=0; j<rate.size(); j++) {
641 if(rate[i]/2==rate[j] || rate[j]/2==rate[i]) {
642 cuts[
i] = cuts[
j] = cut =
false;
646 if(cut || sCuts[ID-1]) { sCuts[ID-1] =
true;
continue; }
651 for(j=0; j<rate.size(); j++) {
652 if(ampl[j]-sIZe[j]>a && !cuts[j]) {max=
j; a=ampl[
j]-sIZe[
j];}
656 for(j=0; j<rate.size(); j++) {
658 if(ampl[j]-sIZe[j]>a && !cuts[j]) {min=
j; a=ampl[
j]-sIZe[
j];}
661 temp.push_back(rate[max]);
662 temp.push_back(rate[min]);
678 size_t ik = w.
asize();
681 if(!ik || !ok)
return 0;
693 size_t on = tou.
size();
702 window = 0.5/rou[
i]+0.5/rin[
j];
703 if(window<T) window =
T;
704 if(
fabs(tou.
data[i]-tin.
data[j])<window) { cut=
false;
break; }
706 if(cut) sCuts[
int(cid[i]-0.5)] =
true;
720 size_t M = pList.size();
725 int wsize = w.
size()/max_layer;
726 double wstart = w.
start();
727 double wrate = w.wavearray<double>::rate();
728 double deltaF = w.
gethigh()/max_layer;
735 if(!M || !w.
size())
return;
743 C = f<fl ? true :
false;
745 n = size_t(f/deltaF);
747 m =
size_t(f/deltaF);
749 k =
int((t-wstart)*wrate);
751 if(k>=wsize) k -= k ? 1 : 0;
752 if(k<0 || n>=m || k>=wsize) {
753 cout<<
"wavecluster::setrms() - invalid input\n";
764 r /= double(m)-double(n);
777 size_t M = pList.size();
781 int wsize = w.
size();
782 double wstart = w.
start();
785 if(!M || !w.
size())
return;
793 if(f>=fh && f+p->
rate/2. >fh)
continue;
794 if(f <fl && f+p->
rate/2.<=fl)
continue;
799 if(k>=wsize) k -= k ? 1 : 0;
800 if(k<0 || k>=wsize) {
801 cout<<
"wavecluster::setvar() - invalid input\n";
813 if(!nRMS.size())
return 1.;
816 size_t M = nRMS.maxLayer()+1;
817 size_t n = size_t(fl/(nRMS.gethigh()/
M));
818 size_t m = size_t(fh/(nRMS.gethigh()/
M));
824 int inRMS =
int((t-nRMS.start())*nRMS.rate());
825 int inVAR = nVAR.size() ?
int((t-nVAR.start())*nVAR.rate()) : 0;
827 if(inRMS>=
int(nRMS.size()/
M)) inRMS -= inRMS ? 1 : 0;
828 if(inVAR>=
int(nVAR.size())) inVAR -= inVAR ? 1 : 0;
830 if(inRMS<0 || inVAR<0 || n>=m ||
831 inRMS >=
int(nRMS.size()/
M) ||
832 inVAR >=
int(nVAR.size()))
834 cout<<
"wavecluster::getNoiseRMS() - invalid pixel time\n";
839 S = nRMS.getSlice(i);
843 rms /= double(m)-double(n);
846 if(!nVAR.size() || fh<low || fl>high)
return rms;
848 return rms*double(nVAR.data[inVAR]);
857 if(!cList.size())
return out;
871 list<vector_int>::iterator it;
873 size_t M = pList.size();
874 size_t m = abs(index);
884 if(strstr(name,
"ID")) c =
'i';
885 if(strstr(name,
"size")) c =
'k';
886 if(strstr(name,
"volume")) c =
'v';
887 if(strstr(name,
"start")) c =
's';
888 if(strstr(name,
"stop")) c =
'd';
889 if(strstr(name,
"low")) c =
'l';
890 if(strstr(name,
"high")) c =
'h';
891 if(strstr(name,
"time")) c =
't';
892 if(strstr(name,
"TIME")) c =
'T';
893 if(strstr(name,
"freq")) c =
'f';
894 if(strstr(name,
"FREQ")) c =
'F';
895 if(strstr(name,
"energy")) c =
'e';
896 if(strstr(name,
"like")) c =
'Y';
897 if(strstr(name,
"sign")) c =
'z';
898 if(strstr(name,
"corr")) c =
'x';
899 if(strstr(name,
"asym")) c =
'a';
900 if(strstr(name,
"grand")) c =
'g';
901 if(strstr(name,
"rate")) c =
'r';
902 if(strstr(name,
"SNR")) c =
'S';
903 if(strstr(name,
"hrss")) c =
'H';
904 if(strstr(name,
"noise")) c =
'n';
906 if(c==
'0')
return out;
910 for(it=cList.begin(); it!=cList.end(); it++){
912 ID = pList[((*it)[0])].clusterID;
913 if(sCuts[ID-1])
continue;
915 it_size = it->size();
920 rate = type && type<=pv->size()? (*pv)[type-1] : 0;
924 for(k=0; k<it_size; k++) {
927 if(!pList[M].
core)
continue;
928 if(rate &&
int(pList[M].rate+0.1)!=rate)
continue;
933 if(!it_core)
continue;
939 out.
data[out_size++] = pList[
M].clusterID;
943 out.
data[out_size++] = float(it_core);
947 for(k=0; k<it_size; k++){
949 if(!skip.
data[k])
break;
951 out.
data[out_size++] = pList[
M].rate;
957 for(k=0; k<it_size; k++){
960 if(skip.
data[k])
continue;
963 x = pList[
M].amplitude[m-1];
967 if(c ==
'a') out.
data[out_size++] = (float(mp)-float(mm))/(mp+mm);
976 for(k=0; k<it_size; k++){
979 if(skip.
data[k])
continue;
982 x = pList[
M].amplitude[m-1];
984 if(c==
'Y' || c==
'z') y += pow(
fabs(x)+1.11/2,2)/2./1.07 +
log(
bpp);
985 else if(c==
'S') y += x*x-1.;
986 else if(c==
'e') y += x*
x;
989 if(c==
'Y' || c==
'z') y +=
fabs(x);
990 else if(c==
'S') y += pow(sqrt(2*1.07*(
fabs(x)-
log(
bpp)))-1.11/2.,2)-1.;
991 else if(c==
'e') y += pow(sqrt(2*1.07*(
fabs(x)-
log(
bpp)))-1.11/2.,2);
999 for(k=0; k<it_size; k++){
1002 if(skip.
data[k])
continue;
1008 out.
data[out_size++] =
y;
1015 for(k=0; k<it_size; k++){
1017 if(skip.
data[k])
continue;
1018 y = 1./pList[
M].
rate;
1019 x = y * pList[
M].time;
1023 out.
data[out_size++] = (c==
's') ? a : b;
1030 for(k=0; k<it_size; k++){
1032 if(skip.
data[k])
continue;
1033 y = pList[
M].rate/2.;
1034 x = y * pList[
M].frequency;
1038 out.
data[out_size++] = (c==
'l') ? a : b;
1047 for(k=0; k<it_size; k++) {
1050 if(skip.
data[k])
continue;
1053 r = pList[
M].variability;
1054 if(c ==
'T' || c ==
'F') {
1058 r *= pList[
M].noiserms;
1061 x = pList[
M].amplitude[m-1];
1062 t = 1./pList[
M].rate;
1067 x = pow(sqrt(2*1.07*(
fabs(x)-
log(
bpp)))-1.11/2.,2)-1.;
1071 if(c ==
't' || c ==
'T'){
1073 a += (pList[
M].time+0.5)*
x;
1074 b += x*pList[
M].rate;
1078 a += (pList[
M].frequency+0.5)*
x;
1079 b += x*2./pList[
M].rate;
1083 out.
data[out_size++] = b>0. ? a/b : -1.;
1091 out.
data[out_size] = 0.;
1094 for(k=0; k<it_size; k++) {
1097 if(skip.
data[k])
continue;
1106 r = pList[
M].variability*pList[
M].noiserms;
1111 sum += a<0. ? 0. : a*r*
r;
1119 if(c ==
'n') { sum = double(mp)/sum; }
1120 out.
data[out_size++] = float(
log(sum)/2./
log(10.));
1125 out.
data[out_size++] = it_size;
1137 #if !defined (__SUNPRO_CC) 1141 register int* q = NULL;
1142 register int* p = NULL;
1155 int nj = w.
size()/ni;
1163 for(i=0; i<ni; i++){
1169 for(j=0; j<nj; j++){
1170 p[
j] = (a.
data[
j]!=0) ? 1 : 0;
1180 if(!nc || ni<3 || nPixel<2)
return double(nPixel)/double(
size());
1185 if(FT[0][0]) XY[0][0] = FT[0][1] + FT[1][0] + FT[1][1];
1186 if(FT[0][m]) XY[0][
m] = FT[1][
m] + FT[1][m-1] + FT[0][m-1];
1187 if(FT[n][0]) XY[
n][0] = FT[n-1][0] + FT[n-1][1] + FT[
n][1];
1188 if(FT[n][m]) XY[
n][
m] = FT[
n][m-1] + FT[n-1][
m] + FT[n-1][m-1];
1197 XY[0][
j] = p[j-1]+p[j+1] + pp[j-1]+pp[
j]+pp[j+1];
1201 XY[
n][
j] = q[j-1]+q[j+1] + pm[j-1]+pm[
j]+pm[j+1];
1206 pm = FT[i-1]; p = FT[
i]; pp = FT[i+1]; q = XY[
i];
1209 q[0] = p[1] + pm[0]+pm[1] + pp[0]+pp[1];
1212 q[
m] = p[m-1] + pm[
m]+pm[m-1] + pp[
m]+pp[m-1];
1216 q[
j] = pm[j-1]+pm[
j]+pm[j+1] + pp[j-1]+pp[
j]+pp[j+1] + p[j-1]+p[j+1];
1228 x = XY[0][1] + XY[1][0] + XY[1][1];
1229 if(x==1 || x==4) XY[0][0]=XY[0][1]=XY[1][0]=XY[1][1]=0;
1232 x = XY[1][
m] + XY[1][m-1] + XY[0][m-1];
1233 if(x==1 || x==4) XY[0][
m]=XY[1][
m]=XY[1][m-1]=XY[0][m-1]=0;
1236 x = XY[n-1][0] + XY[n-1][1] + XY[
n][1];
1237 if(x==1 || x==4) XY[
n][0]=XY[n-1][0]=XY[n-1][1]=XY[
n][1]=0;
1240 x = XY[n-1][
m] + XY[
n][m-1] + XY[n-1][m-1];
1241 if(x==1 || x==4) XY[
n][
m]=XY[n-1][
m]=XY[
n][m-1]=XY[n-1][m-1]=0;
1249 if(p[j]==1 || p[j]==2){
1250 if(p[j-1]+p[j+1] < 4){
1252 L = p[j-1]+p[j+1] + pp[
j];
1253 x = pp[j-1] + pp[j+1] +
L;
1255 if(x==1 || (p[j]==2 && nc>2 && (x==2 || (x==4 && L==4))))
1256 p[
j]=p[j-1]=p[j+1]=pp[j-1]=pp[
j]=pp[j+1]=0;
1260 if(q[j]==1 || q[j]==2){
1261 if(q[j-1]+q[j+1] < 4){
1263 L = q[j-1]+q[j+1] + pm[
j];
1264 x = pm[j-1] + pm[j+1] +
L;
1266 if(x==1 || (q[j]==2 && nc>2 && (x==2 || (x==4 && L==4))))
1267 q[
j]=q[j-1]=q[j+1]=pm[j-1]=pm[
j]=pm[j+1]=0;
1279 if(p[0]==1 || p[0]==2){
1280 if(pm[0]+pp[0] < 4){
1281 L = p[1] + pm[0] + pp[0];
1282 x = pm[1] + pp[1] +
L;
1284 if(x==1 || (p[0]==2 && nc>2 && (x==2 || (x==4 && L==4))))
1285 p[0]=pm[0]=pp[0]=pm[1]=pp[1]=p[1]=0;;
1289 if(p[m]==1 || p[m]==2){
1290 if(pm[m]+pp[m] < 4){
1291 L = p[m-1] + pm[
m] + pp[
m];
1292 x = pm[m-1] + pp[m-1] +
L;
1294 if(x==1 || (p[m]==2 && nc>2 && (x==2 || (x==4 && L==4))))
1295 p[
m]=pm[
m]=pp[
m]=pm[m-1]=pp[m-1]=p[m-1]=0;
1301 if(y == 1 || y == 2){
1302 if(pm[j]+pp[j] >3)
continue;
1303 if(p[j-1]+p[j+1] >3)
continue;
1305 L = pm[
j]+pp[
j] + p[j-1]+p[j+1];
1306 x = pm[j-1]+pm[j+1] + pp[j-1]+pp[j+1] +
L;
1308 if(x==1 || (y==2 && nc>2 && (x==2 || (x==4 && L==4))))
1309 p[
j]=p[j-1]=p[j+1]=pm[j-1]=pm[
j]=pm[j+1]=pp[j-1]=pp[
j]=pp[j+1]=0;
1323 pix.
rate = float(w.wavearray<double>::rate()/
L);
1326 size_t &
t = pix.
time;
1330 for(i=0; i<ni; i++){
1331 p = FT[
i]; q = XY[
i];
1336 for(i=0; i<ni; i++){
1339 for(j=0; j<nj; j++){
1343 pList.push_back(pix);
1350 t=j-1; f=i-1;
if(!FT[f][t]) {pList.push_back(pix); FT[
f][
t] = ++
L;}
1353 t=
j; f=i-1;
if(!FT[f][t]) {pList.push_back(pix); FT[
f][
t] = ++
L;}
1356 t=j+1; f=i-1;
if(!FT[f][t]) {pList.push_back(pix); FT[
f][
t] = ++
L;}
1359 t=j-1; f=
i;
if(!FT[f][t]) {pList.push_back(pix); FT[
f][
t] = ++
L;}
1362 t=j+1; f=
i;
if(!FT[f][t]) {pList.push_back(pix); FT[
f][
t] = ++
L;}
1365 t=j-1; f=i+1;
if(!FT[f][t]) {pList.push_back(pix); FT[
f][
t] = ++
L;}
1368 t=
j; f=i+1;
if(!FT[f][t]) {pList.push_back(pix); FT[
f][
t] = ++
L;}
1371 t=j+1; f=i+1;
if(!FT[f][t]) {pList.push_back(pix); FT[
f][
t] = ++
L;}
1379 register std::vector<int>* pN;
1380 int nM = pList.size();
1383 for(k=0; k<nM; k++){
1386 i = pList[
k].frequency;
1388 if(
int(i)>w.
maxLayer()) cout<<
"cluster::setMask() maxLayer error: "<<i<<endl;
1390 pList[
k].amplitude.clear();
1394 pN = &(pList[
k].neighbors);
1398 if(i==0){ p = FT[0]; q = FT[1];}
1399 if(i==n){ p = FT[
n]; q = FT[n-1];}
1402 if(p[1]) pN->push_back(p[1]-1);
1403 if(q[1]) pN->push_back(q[1]-1);
1404 if(q[0]) pN->push_back(q[0]-1);
1407 if(p[m-1]) pN->push_back(p[m-1]-1);
1408 if(q[m-1]) pN->push_back(q[m-1]-1);
1409 if(q[m]<0) pN->push_back(q[m]-1);
1412 if(p[j-1]) pN->push_back(p[j-1]-1);
1413 if(p[j+1]) pN->push_back(p[j+1]-1);
1414 if(q[j-1]) pN->push_back(q[j-1]-1);
1415 if(q[j]) pN->push_back(q[j]-1);
1416 if(q[j+1]) pN->push_back(q[j+1]-1);
1426 if(pm[0]) pN->push_back(pm[0]-1);
1427 if(pp[0]) pN->push_back(pp[0]-1);
1428 if( p[1]) pN->push_back(p[1]-1);
1429 if(pm[1]) pN->push_back(pm[1]-1);
1430 if(pp[1]) pN->push_back(pp[1]-1);
1433 if(pm[m]) pN->push_back(pm[m]-1);
1434 if(pp[m]) pN->push_back(pp[m]-1);
1435 if( p[m-1]) pN->push_back(p[m-1]-1);
1436 if(pm[m-1]) pN->push_back(pm[m-1]-1);
1437 if(pp[m-1]) pN->push_back(pp[m-1]-1);
1440 if(pm[j-1]) pN->push_back(pm[j-1]-1);
1441 if(pm[j]) pN->push_back(pm[j]-1);
1442 if(pm[j+1]) pN->push_back(pm[j+1]-1);
1443 if( p[j-1]) pN->push_back(p[j-1]-1);
1444 if( p[j+1]) pN->push_back(p[j+1]-1);
1445 if(pp[j-1]) pN->push_back(pp[j-1]-1);
1446 if(pp[j]) pN->push_back(pp[j]-1);
1447 if(pp[j+1]) pN->push_back(pp[j+1]-1);
1451 L = pList[
k].neighbors.size();
1452 x = pList[
k].core ? XY[
i][
j] :
L;
1453 if((x != L && !halo) || L>8){
1454 cout<<
"cluster::getMask() vector size error: "<<L<<
" reserved: "<<x<<endl;
1455 cout<<
"k="<<k<<
" i="<<i<<
" j="<<j<<endl;
1459 return double(pList.size())/
double(
size());
wavearray< double > t(hp.size())
std::vector< vector_int > cRate
std::vector< int > vector_int
virtual size_t append(wavecluster &)
param: input cluster list return size of appended list
double gammaCL(double x, double n)
virtual size_t cluster()
return number of clusters
double min(double x, double y)
virtual void rate(double r)
std::vector< pixel > cluster
wavearray< double > a(hp.size())
wavearray< float > get(char *, int=0, size_t=0)
param: string with parameter name param: amplitude field index param: rate index, if 0 ignore rate fo...
std::vector< wavepixel > pList
wavecluster & operator=(const wavecluster &)
cout<< endl;cout<< "ts size = "<< ts.size()<< " ts rate = "<< ts.rate()<< endl;tf.Forward(ts, wdm);int levels=tf.getLevel();cout<< "tf size = "<< tf.size()<< endl;double dF=tf.resolution();double dT=1./(2 *dF);cout<< "rate(hz) : "<< RATE<< "\ layers : "<< nLAYERS<< "\ dF(hz) : "<< dF<< "\ dT(ms) : "<< dT *1000.<< endl;int itime=TIME_PIXEL_INDEX;int ifreq=FREQ_PIXEL_INDEX;int index=(levels+1) *itime+ifreq;double time=itime *dT;double freq=(ifreq >0) ? ifreq *dF :dF/4;cout<< endl;cout<< "PIXEL TIME = "<< time<< " sec "<< endl;cout<< "PIXEL FREQ = "<< freq<< " Hz "<< endl;cout<< endl;wavearray< double > x
virtual double setMask(WSeries< double > &, int=1, bool=false)
param: max number of pixels in clusters to be cleaned (<4); param: false - core only, true - core + halo return pixel occupancy
std::slice getSlice(double n)
virtual size_t init(WSeries< double > &, bool=false)
param: false - core only, true - core + halo return cluster list size
virtual void start(double s)
cout<< "SNR "<< xsnr<< endl;wavearray< double > f
virtual size_t size() const
double signPDF(const size_t m, const size_t k)
virtual size_t coincidence(wavecluster &, double=1.)
param: input cluster list return size of the coincidence list
void setvar(wavearray< float > &, double=-1., double=-1.)
int compare_pix(const void *x, const void *y)
int getLayer(wavearray< DataType_t > &w, double n)
param: n - layer number
printf("total live time: non-zero lags = %10.1f \, liveTot)
virtual size_t merge(double=0.)
param: non return size of merged list
void setrms(WSeries< double > &, double=-1., double=-1.)
virtual size_t apush(WSeries< double > &a, double=0.)
param: this and WSeries objects should have the same tree type and the approximation level size param...
virtual size_t cleanhalo(bool=false)
param: if true - de-cluster pixels return size of the list
double fabs(const Complex &x)
Meyer< double > S(1024, 2)
WaveDWT< DataType_t > * pWavelet
std::vector< double > amplitude
double getNoiseRMS(double, double, double)
param: pixel time, sec param: pixel low frequency param: pixel high frequency
virtual void resize(unsigned int)
std::vector< int > neighbors
std::list< vector_int > cList
std::vector< bool > sCuts