#include #include "Map2D.h" #include #include #include Map2D *overlay(Map2D *prox, Map2D *proy) { Map2D *m=new Map2D(*prox); for (int ix=1; ix <=m->GetXaxis()->GetNbins(); ++ix) { for (int iy=1; iy <=m->GetYaxis()->GetNbins(); ++iy) { if (m->GetBinContent(ix,iy)==0) { //m->SetBinContent(ix,iy,1); } } } m->Add(proy,0.1); m->SetMinimum(0); m->Draw("colz"); return m; } double curl(Map2D *gx, Map2D *gy) { Map2D *u = new Map2D(*gx); return u->TotalCurl(gx,gy); } double recurl(Map2D *gx, Map2D *gy) { Map2D *u = new Map2D(*gx); Map2D *s = new Map2D(*u); std::cout << u->TotalCurl(gx,gy,&s) << std::endl; gx->Add(s,1e-20); gy->Add(s,1e-20); gx->Mask(u,-1); gy->Mask(u,-1); gx->Despeckle(1000); gy->Despeckle(1000); return u->TotalCurl(gx,gy,&s); }