Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
skamann
pampelmuse
Commits
adb37760
Commit
adb37760
authored
Aug 07, 2016
by
skamann
Browse files
Added comments.
parent
2245e7c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
pampelmuse/core/fit_layer.py
View file @
adb37760
...
...
@@ -18,12 +18,46 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with PampelMuse. If not, see <http://www.gnu.org/licenses/>.
+++
This module implements the optimization for a single layer of IFS data.
The optimization consists of three steps that are performed iteratively:
(1) An optimization for the fluxes based on the current estimate of the PSF
parameters and the source coordinates. This is a linear optimization,
carried out via direct inversion of a sparse matrix that contains the PSF
profiles of all fitted components
(2) An optimization for the positions of the individual sources that is
performed using a Levenberg-Marquard algorithm. Note that there are two
different ways of how the to fit the fluxes.
(a) via a coordinate transformation that translates the positions from a
reference frame into the image that is being analysed. In that case,
the parameters of the transformation are optimized, not individual
source positions.
(b) via direct coordinate fits without a transformation. This approach is
currently only recommended for sparsely populated fields.
(3) An optimization for the parameters of the PSF profile that is also
performed using a Levenberg-Marquard algorithm.
Note that steps (2a) and (3) can be performed in two different ways, either by
simultaneously fitting all sources or by selecting individual isolated sources
and only fitting this subset. The former approach is recommended for small
images while the latter approach works better on large images. Step (2b) only
works with the latter approach.
Finally, a not about the fitting weights of the individual pixels in the
analysis. By default, inverse-variance weighting is used. If the variances are
not provided, the code tries to estimate them from the current residuals as a
function of the fitted pixel intensities.
In addition, the code uses an additional weighting scheme to reduce the
weights of deviant pixels. As this method requires a reasonably good model to
stars with, it is currently only used if the source positions and PSF
parameters are not fitted.
Latest SVN revision
-------------------
3
49
, 2016/08/0
5
3
51
, 2016/08/0
7
"""
import
contextlib
import
logging
...
...
@@ -36,7 +70,7 @@ from ..core.coordinates import Transformation
__author__
=
"Sebastian Kamann (skamann@astro.physik.uni-goettingen.de)"
__revision__
=
3
49
__revision__
=
3
51
logger
=
logging
.
getLogger
(
__name__
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment