-
-
Notifications
You must be signed in to change notification settings - Fork 146
Open
Description
photutils/photutils/isophote/sample.py
Lines 98 to 103 in 31801ba
| if geometry: | |
| # when the geometry is inherited from somewhere else, | |
| # its sma attribute must be replaced by the value | |
| # explicitly passed to the constructor. | |
| self.geometry = copy.deepcopy(geometry) | |
| self.geometry.sma = sma |
photutils/photutils/isophote/geometry.py
Lines 150 to 154 in 31801ba
| if self.sma > 0.0: | |
| self.sector_angular_width = max(min((inner_sma / self.sma), | |
| self._phi_max), self._phi_min) | |
| self.initial_polar_angle = self.sector_angular_width / 2.0 | |
| self.initial_polar_radius = self.radius(self.initial_polar_angle) |
When the
EllipseSample constructor is provided with both an EllipseGeometry object and an sma, it overwrites the sma attribute of the EllipseGeometry object as expected. However, that is not enough because the EllipseGeometry object has already initialized an initial_polar_radius attribute using the old sma, which will not get updated. Therefore, the first sampled point may have a different radius from the rest. This is not vital when fitting the isophotes, because the samples will be recreated in the iterations; it only causes a noticeable effect in the noniterative mode that simply samples the image without fitting geometric parameters. But, fixing it should help the iterative fitting converge faster.Metadata
Metadata
Assignees
Labels
No labels