fixed threshold at 1e-13
All checks were successful
Building, testing and releasing LASP if it has a tag / Build-Test-Ubuntu (push) Successful in -4m59s
Building, testing and releasing LASP if it has a tag / Release-Ubuntu (push) Has been skipped

This commit is contained in:
Thijs Hekman 2024-11-06 17:08:51 +01:00
parent a986a6b9cd
commit bfb23ad698
3 changed files with 9 additions and 2 deletions

View File

@ -235,7 +235,8 @@ ccube AvSweepPowerSpectra::compute(const dmat &timedata)
_n_averages = vd(nfreq, arma::fill::zeros);
}
d threshold = arma::mean(arma::real(temp.slice(0).col(0)));
// d threshold = arma::mean(arma::real(temp.slice(0).col(0)));
d threshold = 1e-13;
for (us f=0; f < nfreq; f++)
{
@ -252,7 +253,7 @@ ccube AvSweepPowerSpectra::compute(const dmat &timedata)
_est.row(f) = (static_cast<d>(_n_averages[f] - 1) / _n_averages[f]) * _est.row(f) +
temp.row(f) / _n_averages[f];
// _est.subcube(f, 0, 0, f, ncols - 1, ncols - 1) = (static_cast<d>(_n_averages[f] - 1) / _n_averages[f]) * _est.subcube(f, 0, 0, f, ncols - 1, ncols - 1) +
// temp.subcube(f, 0, 0, f, ncols - 1, ncols - 1) / _n_averages[f];
// temp.subcube(f, 0, 0, f, ncols - 1, ncols - 1) / _n_averages[f];
}
}
}

View File

@ -75,6 +75,8 @@ class Periodic: public Siggen {
virtual vd genSignalUnscaled(const us nframes) override final;
vd getA() const { return A_; }
~Periodic() = default;
};

View File

@ -51,6 +51,10 @@ void init_siggen(py::module &m) {
periodic.def("getSequence",
[](const Sweep &s) { return ColToNpy<d>(s.getSequence()); });
periodic.def("getA",
[](const Sweep &s) { return ColToNpy<d>(s.getA()); });
py::class_<Sweep, std::shared_ptr<Sweep>> sweep(m, "Sweep", periodic);
sweep.def(py::init<const d, const d, const d, const d, const us>());
sweep.def("getfn",