Commit 17079947154348c7de70cc34323e5b567db4b372
1 parent
af7cc2ab
Correct copy base class in copy constructors (#3402)
A major bug was lurking in the GModelSpatialDiffuse, GModelSpatialElliptical and GModelSpatialRadial classes where the GModelSpatial base class members were not copied in the copy constructors. This prevented in particular the model fitting of diffuse maps in the stacked analysis.
Showing
4 changed files
with
8 additions
and
4 deletions
NEWS
| ... | ... | @@ -63,7 +63,11 @@ None |
| 63 | 63 | |
| 64 | 64 | 8. Model module |
| 65 | 65 | --------------- |
| 66 | -The copy constructors of the classes ... | |
| 66 | +The copy constructors of the GModelSpatialDiffuse, GModelSpatialElliptical | |
| 67 | +and GModelSpatialRadial classes did not properly copy the base class members | |
| 68 | +in their copy constructors. This prevented specifically the fitting of | |
| 69 | +diffuse maps in the stacked analysis. The code was modified to fix the | |
| 70 | +issue. | |
| 67 | 71 | |
| 68 | 72 | |
| 69 | 73 | 9. Numerics module | ... | ... |
src/model/GModelSpatialDiffuse.cpp
| ... | ... | @@ -65,7 +65,7 @@ GModelSpatialDiffuse::GModelSpatialDiffuse(void) : GModelSpatial() |
| 65 | 65 | * @param[in] model Diffuse spatial model. |
| 66 | 66 | ***************************************************************************/ |
| 67 | 67 | GModelSpatialDiffuse::GModelSpatialDiffuse(const GModelSpatialDiffuse& model) : |
| 68 | - GModelSpatial() | |
| 68 | + GModelSpatial(model) | |
| 69 | 69 | { |
| 70 | 70 | // Initialise members |
| 71 | 71 | init_members(); | ... | ... |
src/model/GModelSpatialElliptical.cpp
| ... | ... | @@ -89,7 +89,7 @@ GModelSpatialElliptical::GModelSpatialElliptical(const GXmlElement& xml) : |
| 89 | 89 | * @param[in] model Elliptical spatial model. |
| 90 | 90 | ***************************************************************************/ |
| 91 | 91 | GModelSpatialElliptical::GModelSpatialElliptical(const GModelSpatialElliptical& model) : |
| 92 | - GModelSpatial() | |
| 92 | + GModelSpatial(model) | |
| 93 | 93 | { |
| 94 | 94 | // Initialise members |
| 95 | 95 | init_members(); | ... | ... |
src/model/GModelSpatialRadial.cpp
| ... | ... | @@ -90,7 +90,7 @@ GModelSpatialRadial::GModelSpatialRadial(const GXmlElement& xml) : |
| 90 | 90 | * @param[in] model Radial spatial model. |
| 91 | 91 | ***************************************************************************/ |
| 92 | 92 | GModelSpatialRadial::GModelSpatialRadial(const GModelSpatialRadial& model) : |
| 93 | - GModelSpatial() | |
| 93 | + GModelSpatial(model) | |
| 94 | 94 | { |
| 95 | 95 | // Initialise members |
| 96 | 96 | init_members(); | ... | ... |