diff --git a/auto/Wrap/libBornAgainBase.py b/auto/Wrap/libBornAgainBase.py index 64444e59c8883bd5a9bacd2f765bf7b618cc4485..96d77020e52ce554145d1cca4c9b699695cf1f3f 100644 --- a/auto/Wrap/libBornAgainBase.py +++ b/auto/Wrap/libBornAgainBase.py @@ -1864,6 +1864,10 @@ class Scale(object): r"""__eq__(Scale self, Scale other) -> bool""" return _libBornAgainBase.Scale___eq__(self, other) + def coordName(self): + r"""coordName(Scale self) -> std::string""" + return _libBornAgainBase.Scale_coordName(self) + def unit(self): r"""unit(Scale self) -> std::string""" return _libBornAgainBase.Scale_unit(self) diff --git a/auto/Wrap/libBornAgainBase_wrap.cpp b/auto/Wrap/libBornAgainBase_wrap.cpp index ffe418ebc301de54546628dbe954ee2c64378128..2a0e2ca66d14c058f512d69c31cb4d56115bffcd 100644 --- a/auto/Wrap/libBornAgainBase_wrap.cpp +++ b/auto/Wrap/libBornAgainBase_wrap.cpp @@ -26007,6 +26007,39 @@ fail: } +SWIGINTERN PyObject *_wrap_Scale_coordName(PyObject *self, PyObject *args) { + PyObject *resultobj = 0; + Scale *arg1 = (Scale *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + + if (!args) SWIG_fail; + swig_obj[0] = args; + res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Scale, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Scale_coordName" "', argument " "1"" of type '" "Scale const *""'"); + } + arg1 = reinterpret_cast< Scale * >(argp1); + { + try { + result = ((Scale const *)arg1)->coordName(); + } catch (const std::exception& ex) { + // message shown in the Python interpreter + const std::string msg { + "BornAgain C++ Exception: " + std::string(ex.what()) + }; + SWIG_exception(SWIG_RuntimeError, msg.c_str()); + } + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return NULL; +} + + SWIGINTERN PyObject *_wrap_Scale_unit(PyObject *self, PyObject *args) { PyObject *resultobj = 0; Scale *arg1 = (Scale *) 0 ; @@ -29686,6 +29719,7 @@ static PyMethodDef SwigMethods[] = { "Scale_clipped(Scale self, pvacuum_double_t bounds) -> Scale\n" ""}, { "Scale___eq__", _wrap_Scale___eq__, METH_VARARGS, "Scale___eq__(Scale self, Scale other) -> bool"}, + { "Scale_coordName", _wrap_Scale_coordName, METH_O, "Scale_coordName(Scale self) -> std::string"}, { "Scale_unit", _wrap_Scale_unit, METH_O, "Scale_unit(Scale self) -> std::string"}, { "Scale_plottableScale", _wrap_Scale_plottableScale, METH_O, "Scale_plottableScale(Scale self) -> Scale"}, { "Scale_transformedScale", _wrap_Scale_transformedScale, METH_VARARGS, "Scale_transformedScale(Scale self, Coordinate const & coord, trafo_t const & axTrafo) -> Scale"}, diff --git a/hugo/content/ref/instr/det/2d.md b/hugo/content/ref/instr/det/2d.md index 71c2974da648da635b37287448d299f6ae076bc6..b7ed8c4d6a632954976508ffd903bb0c26a14970 100644 --- a/hugo/content/ref/instr/det/2d.md +++ b/hugo/content/ref/instr/det/2d.md @@ -40,15 +40,17 @@ when requested by users. The constructor has the signature ``` -detector = ba.Detector2D(nphi, phimin, phimax, nalpha, alphamin, alphamax) +detector = ba.Detector2D(phi_span, alpha_span, n_phi, n_alpha, phi_center, alpha_center) ``` -where `nphi` and `nalpha` are numbers of bins; + +The arguments `phi_span, alpha_span` are the full width of the detector in +directions $\varphi_\text{f},\alpha_\text{f}$. + +The arguments `n_phi, n_alpha` are the number of bins per direction; their product is the number of pixels of the detector. -The arguments `phimin`, `phimax` designate the lowest and highest signed deflection $\varphi$ -at $\alpha=0$. -The arguments `alphamin`, `alphamax` designate the lowest and highest signed grazing angle $\alpha$ -at $\varphi=0$. +The arguments `phi_center, alpha_center` are the scattering angles +$\varphi_\text{f},\alpha_\text{f}$ at the center of the detector. ### Masks @@ -65,4 +67,4 @@ For modeling the detector resolution, see [Detector resolution](/ref/instr/det/r ### History Until BornAgain 21, we had a `RectangularDetector` and a `SphericalDetector`. -In BornAgain 22, they were merged into a new `Detector2D` class. \ No newline at end of file +In BornAgain 22, they were merged into a new `Detector2D` class.