diff --git a/pyext/GModelSpatialRadialDisk.i b/pyext/GModelSpatialRadialDisk.i index dc6e5e8..97896c3 100644 --- a/pyext/GModelSpatialRadialDisk.i +++ b/pyext/GModelSpatialRadialDisk.i @@ -66,9 +66,21 @@ public: /***********************************************************************//** * @brief GModelSpatialRadialDisk class extension + * + * The eval(GSkyDir&) and eval_gradients(GSkyDir&) need to be defined in the + * extension to force swig to build also the interface for these methods that + * are implemented in the base class only. It's not clear to me why these + * methods are not inherited automatically. Maybe this could also be handled + * by a %typemap(typecheck) construct. ***************************************************************************/ %extend GModelSpatialRadialDisk { GModelSpatialRadialDisk copy() { return (*self); } + double eval(const GSkyDir& srcDir) const { + return self->GModelSpatialRadial::eval(srcDir); + } + double eval_gradients(const GSkyDir& srcDir) const { + return self->GModelSpatialRadial::eval_gradients(srcDir); + } }; diff --git a/pyext/GModelSpatialRadialGauss.i b/pyext/GModelSpatialRadialGauss.i index 414108c..b2ebd9d 100644 --- a/pyext/GModelSpatialRadialGauss.i +++ b/pyext/GModelSpatialRadialGauss.i @@ -63,9 +63,21 @@ public: /***********************************************************************//** * @brief GModelSpatialRadialGauss class extension + * + * The eval(GSkyDir&) and eval_gradients(GSkyDir&) need to be defined in the + * extension to force swig to build also the interface for these methods that + * are implemented in the base class only. It's not clear to me why these + * methods are not inherited automatically. Maybe this could also be handled + * by a %typemap(typecheck) construct. ***************************************************************************/ %extend GModelSpatialRadialGauss { GModelSpatialRadialGauss copy() { return (*self); } + double eval(const GSkyDir& srcDir) const { + return self->GModelSpatialRadial::eval(srcDir); + } + double eval_gradients(const GSkyDir& srcDir) const { + return self->GModelSpatialRadial::eval_gradients(srcDir); + } }; diff --git a/pyext/GModelSpatialRadialShell.i b/pyext/GModelSpatialRadialShell.i index c9858d6..7bea8bf 100644 --- a/pyext/GModelSpatialRadialShell.i +++ b/pyext/GModelSpatialRadialShell.i @@ -68,9 +68,21 @@ public: /***********************************************************************//** * @brief GModelSpatialRadialShell class extension + * + * The eval(GSkyDir&) and eval_gradients(GSkyDir&) need to be defined in the + * extension to force swig to build also the interface for these methods that + * are implemented in the base class only. It's not clear to me why these + * methods are not inherited automatically. Maybe this could also be handled + * by a %typemap(typecheck) construct. ***************************************************************************/ %extend GModelSpatialRadialShell { GModelSpatialRadialShell copy() { return (*self); } + double eval(const GSkyDir& srcDir) const { + return self->GModelSpatialRadial::eval(srcDir); + } + double eval_gradients(const GSkyDir& srcDir) const { + return self->GModelSpatialRadial::eval_gradients(srcDir); + } };