Skip to content

Commit

Permalink
Merge branch 'master' into weight_pol_type
Browse files Browse the repository at this point in the history
  • Loading branch information
arahlin committed Jan 23, 2024
2 parents 52d287b + 7052169 commit 884ae48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion maps/python/map_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def FlattenPol(frame, invert=False):
return

ValidateMaps(frame)
qmap, umap = frame.pop("Q"), frame.pop("U")
tmap, qmap, umap = frame.pop("T"), frame.pop("Q"), frame.pop("U")

if "Wpol" in frame:
wmap = frame.pop("Wpol")
Expand All @@ -134,6 +134,9 @@ def FlattenPol(frame, invert=False):
else:
maps.flatten_pol(qmap, umap, invert=invert)

tmap.flat_pol = not invert

frame["T"] = tmap
frame["Q"] = qmap
frame["U"] = umap

Expand Down
2 changes: 2 additions & 0 deletions maps/src/maputils.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ void FlattenPol(FlatSkyMapPtr Q, FlatSkyMapPtr U, G3SkyMapWeightsPtr W, double h
U->SetFlatPol(!invert);

if (!!W) {
flatptr = boost::dynamic_pointer_cast<FlatSkyMap>(W->TT);
flatptr->SetFlatPol(!invert);
flatptr = boost::dynamic_pointer_cast<FlatSkyMap>(W->TQ);
flatptr->SetFlatPol(!invert);
flatptr = boost::dynamic_pointer_cast<FlatSkyMap>(W->TU);
Expand Down

0 comments on commit 884ae48

Please sign in to comment.