Commit 061d2da4 authored by Maude Le Jeune's avatar Maude Le Jeune
Browse files

new condition fit ok

parent 05de536f
...@@ -73,7 +73,7 @@ void gaussfit (Healpix_Map<double> &hmap, Healpix_Map<double> &smap, double* tab ...@@ -73,7 +73,7 @@ void gaussfit (Healpix_Map<double> &hmap, Healpix_Map<double> &smap, double* tab
healpixGaussianFit(hmap, fwhm, guess, err, &chisqrdof,smap,radius); healpixGaussianFit(hmap, fwhm, guess, err, &chisqrdof,smap,radius);
} }
// fit is ok, set to new value // fit is ok, set to new value
if (chisqrdof < maxxi2 && guess[0]>0 && err[0]!=INFINITY){ if (chisqrdof < maxxi2 && guess[0]>0 && err[0]!=INFINITY && err[1]<guess[1]){
addGaussianPatternOnSky(hmap, pointing(guess[1],guess[2]), fwhm, guess[0], err[0]/10, true); addGaussianPatternOnSky(hmap, pointing(guess[1],guess[2]), fwhm, guess[0], err[0]/10, true);
tabcat[icol+0] = guess[1]; tabcat[icol+0] = guess[1];
tabcat[icol+1] = guess[2]; tabcat[icol+1] = guess[2];
...@@ -83,6 +83,7 @@ void gaussfit (Healpix_Map<double> &hmap, Healpix_Map<double> &smap, double* tab ...@@ -83,6 +83,7 @@ void gaussfit (Healpix_Map<double> &hmap, Healpix_Map<double> &smap, double* tab
tabcat[icol+5] = err[0]; tabcat[icol+5] = err[0];
tabcat[icol+6] = chisqrdof; tabcat[icol+6] = chisqrdof;
} }
// fit is bad, keep old values // fit is bad, keep old values
else { else {
tabcat[icol+0] = p.theta; tabcat[icol+0] = p.theta;
......
This diff is collapsed.
...@@ -83,7 +83,7 @@ void _cat2mask(double *tabmask, int npix, double* theta, int ncat, double* phi, ...@@ -83,7 +83,7 @@ void _cat2mask(double *tabmask, int npix, double* theta, int ncat, double* phi,
if (cst==1) if (cst==1)
radius = fwhm; radius = fwhm;
else else
radius = fwhm/2.0*sqrt(log(snr[i])/log(2)); radius = fwhm/2.0*sqrt(log(snr[i])/M_LN2);
mask.query_disc(p, radius, listpix); mask.query_disc(p, radius, listpix);
for(it = listpix.begin();it!=listpix.end();it++){ for(it = listpix.begin();it!=listpix.end();it++){
mask[*it]=0; mask[*it]=0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment