Skip to content
Snippets Groups Projects
Commit e632e6f7 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

repair 1

parent b3392a02
No related branches found
No related tags found
1 merge request!1312rm IRangedDistribution with children, and ScanResolution
...@@ -61,10 +61,7 @@ def run_simulation(*, ...@@ -61,10 +61,7 @@ def run_simulation(*,
sample = get_sample() sample = get_sample()
qzs = numpy.linspace(0.1, 1.5, 1500) qzs = numpy.linspace(0.1, 1.5, 1500)
distr = ba.DistributionGaussian(0., 1., 25, 4.)
n_sig = 4.0
n_samples = 25
distr = ba.RangedDistributionGaussian(n_samples, n_sig)
scan = ba.QzScan(qzs) scan = ba.QzScan(qzs)
scan.setAbsoluteQResolution(distr, 0.008) scan.setAbsoluteQResolution(distr, 0.008)
......
...@@ -110,13 +110,13 @@ std::string defineQzScan(const QzScan& scan) ...@@ -110,13 +110,13 @@ std::string defineQzScan(const QzScan& scan)
result << axis_def << Py::Fmt2::printAxis(scan.coordinateAxis(), "") << "\n"; result << axis_def << Py::Fmt2::printAxis(scan.coordinateAxis(), "") << "\n";
// TODO correct unit would be 1/nm // TODO correct unit would be 1/nm
result << indent() << "scan = ba.QzScan(axis)"; result << indent() << "scan = ba.QzScan(axis)\n";
if (const IDistribution1D* d = scan.qzDistribution()) { if (const IDistribution1D* d = scan.qzDistribution()) {
result << Py::Fmt2::printDistribution(*d); result << Py::Fmt2::printDistribution(*d);
if (scan.resolution_is_relative()) if (scan.resolution_is_relative())
result << indent() << "scan.setRelativeQResolution(distribution)\n"; result << indent() << "scan.setRelativeQResolution(distribution, 1.)\n";
else if (scan.resolution_widths().size() == 1) else if (scan.resolution_widths().size() == 1)
result << indent() << "scan.setAbsoluteQResolution(distribution)\n"; result << indent() << "scan.setAbsoluteQResolution(distribution, 1.)\n";
else else
ASSERT(0); // vector resolution export not yet implemented ASSERT(0); // vector resolution export not yet implemented
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment