fixed threshold at 1e-13
This commit is contained in:
parent
a986a6b9cd
commit
bfb23ad698
@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -75,6 +75,8 @@ class Periodic: public Siggen {
|
||||
|
||||
virtual vd genSignalUnscaled(const us nframes) override final;
|
||||
|
||||
vd getA() const { return A_; }
|
||||
|
||||
~Periodic() = default;
|
||||
|
||||
};
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user