mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 15:21:11 +00:00
many bug fixes from the previous update; new changes appear to work now
This commit is contained in:
parent
90964d2be3
commit
0b54a31d0c
7 changed files with 72 additions and 21 deletions
|
@ -54,3 +54,33 @@ void computeContourPixels(Healpix_Map<float>& m, vector<int>& contour)
|
|||
write_Healpix_map_to_fits(h, contour_map, planckType<int>());
|
||||
}
|
||||
}
|
||||
|
||||
void computeMaskPixels(Healpix_Map<float>& m, vector<int>& contour)
|
||||
{
|
||||
for (int p = 0; p < m.Npix(); p++)
|
||||
{
|
||||
|
||||
if (m[p]>0)
|
||||
{
|
||||
contour.push_back(p);
|
||||
// This is boundary go to next pixel
|
||||
}
|
||||
}
|
||||
|
||||
if (DEBUG)
|
||||
{
|
||||
Healpix_Map<int> contour_map;
|
||||
|
||||
contour_map.SetNside(m.Nside(), RING);
|
||||
contour_map.fill(0);
|
||||
for (int p = 0; p < contour.size(); p++)
|
||||
{
|
||||
contour_map[contour[p]]=1;
|
||||
}
|
||||
|
||||
fitshandle h;
|
||||
h.create("!mask_map.fits");
|
||||
write_Healpix_map_to_fits(h, contour_map, planckType<int>());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,5 +7,6 @@
|
|||
|
||||
void computeContourPixels(Healpix_Map<float>& map, std::vector<int>& contour);
|
||||
void computeFilledPixels(Healpix_Map<float>& map, std::vector<int>& contour);
|
||||
void computeMaskPixels(Healpix_Map<float>& map, std::vector<int>& contour);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue