Skip to content

Commit

Permalink
Remove unnecessary maps header
Browse files Browse the repository at this point in the history
  • Loading branch information
arahlin committed Oct 25, 2023
1 parent fffbd29 commit 0a56335
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 72 deletions.
60 changes: 0 additions & 60 deletions maps/include/maps/maputils.h

This file was deleted.

22 changes: 12 additions & 10 deletions maps/src/maputils.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
#include <G3Logging.h>
#include <G3Units.h>

#include <maps/maputils.h>
#include <maps/G3SkyMap.h>
#include <maps/FlatSkyMap.h>
#include <maps/pointing.h>

#include <iostream>
Expand All @@ -19,11 +20,6 @@

using namespace G3Units;

void RemoveWeightsT(G3SkyMapPtr T, G3SkyMapWeightsConstPtr W, bool zero_nans)
{
RemoveWeights(T, NULL, NULL, W, zero_nans);
}

void RemoveWeights(G3SkyMapPtr T, G3SkyMapPtr Q, G3SkyMapPtr U, G3SkyMapWeightsConstPtr W,
bool zero_nans)
{
Expand Down Expand Up @@ -100,9 +96,9 @@ void RemoveWeights(G3SkyMapPtr T, G3SkyMapPtr Q, G3SkyMapPtr U, G3SkyMapWeightsC
}
}

void ApplyWeightsT(G3SkyMapPtr T, G3SkyMapWeightsConstPtr W)
void RemoveWeightsT(G3SkyMapPtr T, G3SkyMapWeightsConstPtr W, bool zero_nans)
{
ApplyWeights(T, NULL, NULL, W);
RemoveWeights(T, NULL, NULL, W, zero_nans);
}

void ApplyWeights(G3SkyMapPtr T, G3SkyMapPtr Q, G3SkyMapPtr U, G3SkyMapWeightsConstPtr W)
Expand Down Expand Up @@ -139,6 +135,11 @@ void ApplyWeights(G3SkyMapPtr T, G3SkyMapPtr Q, G3SkyMapPtr U, G3SkyMapWeightsCo
}
}

void ApplyWeightsT(G3SkyMapPtr T, G3SkyMapWeightsConstPtr W)
{
ApplyWeights(T, NULL, NULL, W);
}

boost::python::tuple GetRaDecMap(G3SkyMapConstPtr m)
{

Expand Down Expand Up @@ -526,8 +527,9 @@ MakePointSourceMask(G3SkyMapConstPtr map, const std::vector<double> & ra,
}


namespace bp = boost::python;
void maputils_pybindings(void){
PYBINDINGS("maps")
{
namespace bp = boost::python;
bp::def("remove_weights_t", RemoveWeightsT,
(bp::arg("T"), bp::arg("W"), bp::arg("zero_nans")=false),
"Remove weights from unpolarized maps. If zero_nans is true, empty pixels "
Expand Down
2 changes: 0 additions & 2 deletions maps/src/python.cxx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
#include <pybindings.h>
#include <maps/maputils.h>

namespace bp = boost::python;

BOOST_PYTHON_MODULE(maps)
{
bp::import("spt3g.core");
bp::docstring_options docopts(true, true, false);
maputils_pybindings();
G3ModuleRegistrator::CallRegistrarsFor("maps");
}

0 comments on commit 0a56335

Please sign in to comment.