Skip to content

Commit 001612e

Browse files
authored
make baseline and density settable for DPpropagator (#155)
* make baseline and density settable for DPpropagator * also add python bindings
1 parent ce442b6 commit 001612e

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

nuTens/propagator/DP-propagator.hpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,18 @@ class DPpropagator : public Propagator
2424

2525
/// @{Setters
2626

27+
inline void setBaseline(float newBaseline) override
28+
{
29+
NT_PROFILE();
30+
31+
_baseline = newBaseline;
32+
}
33+
inline void setDensity(float newDensity)
34+
{
35+
NT_PROFILE();
36+
37+
_density = newDensity;
38+
}
2739
inline void setTheta12(Tensor &newTheta12)
2840
{
2941
NT_PROFILE();

python/binding.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,14 @@ void initPropagator(py::module &m)
311311
"set the parameters for the oscillation calculations",
312312
py::arg("new_theta12"), py::arg("new_theta23"), py::arg("new_theta13"), py::arg("new_deltaCP"), py::arg("new_deltamsq21"), py::arg("new_deltamsq31")
313313
)
314+
.def("set_baseline", &DPpropagator::setBaseline,
315+
"set the baseline",
316+
py::arg("new_baseline")
317+
)
318+
.def("set_density", &DPpropagator::setDensity,
319+
"set the density",
320+
py::arg("new_density")
321+
)
314322
.def("set_energies", &DPpropagator::setEnergies,
315323
"set the neutrino energies",
316324
py::arg("new_energies")

0 commit comments

Comments
 (0)