profitRemakeModellist | R Documentation |
This is a convenience function that allows users to easily substitute into a legal image model results from an optimisation run. This can be parsed directly into profitMakeModel
. It uses the same conversion functions in the same manner as profitLikeModel
so you can create an image model that is fully consistent. These consistent model lists can be used for other analysis, e.g. profitEllipsePlot
.
profitRemakeModellist(parm, modellist, tofit, tolog = NULL, intervals = NULL,
constraints = NULL, offset = NULL, parmuse = NULL, Data)
parm |
Vector; required, of parameters that will be inserted into the modellist provided. |
modellist |
List; required, the basic model list that describes the structure of the object (see |
tofit |
List; required, of elements that are being fitted, flagging which elements of modellist will be replaced with parm (see |
tolog |
List; optional, of elements that are being fitted in log space, flagging which elements of modellist will be replaced with unlogged elements of parm (see |
intervals |
List; optional, interval limits for each parameter, using a similar list structure to modellist (see |
constraints |
Function; optional, takes the modellist and returns a list with exactly the same structure (see |
offset |
Numeric vector; optional. Additive offset to be applied to all xcen and ycen positions in the model list. This is useful if you are fitting one object on multiple images with different WCS- you should then specify the input modellist in a common manner for all Data objects (say using the coordinate system of the first image in the list), but supply different offset for each image, where [X,Y] (image N) = [X,Y] (image 1) + [X,Y] (offset N). If the offset vector is length 3, the third element is treated as the position angle, and this can also be given a rotational offset in degrees additively with respect to the first image in the list. |
parmuse |
Integer vector; optional. Species which element of the inpout parm will be propogated to the remade model list. This is only really intended for multi-frame fitting, where you might only want to use certain parameters in each image (e.g. you want to fit the mag freely, but force a common position angle to be fit to all images). Because of the deliberate flexibility, this takes some careful planning to use correctly, so user beware! |
Data |
Data of class profit.data; optional. This must be generated by the |
A list with two elements: modellist; a list with the same structure as modellist; and parm, a vector with the same structure as parm.
Aaron Robotham
profitMakeModel
, profitSetupData
, profitLikeModel
, profitEllipsePlot
modellist = list(
sersic = list(
xcen = c(50, 50),
ycen = c(50, 50),
mag = c(15, 13),
re = c(14, 5),
nser = c(3, 10),
ang = c(46, 80),
axrat = c(0.4, 0.6),
box = c(0,-0.5)
)
)
magimage(profitMakeModel(modellist))
tofit = list(
sersic = list(
xcen = c(TRUE, NA),
ycen = c(TRUE, NA),
mag = c(TRUE, FALSE),
re = c(TRUE, FALSE),
nser = c(TRUE, TRUE),
ang = c(FALSE, FALSE),
axrat = c(TRUE, FALSE),
box = c(FALSE, FALSE)
)
)
parm=c(55,55,12,20,1,4,0.8)
magimage(profitMakeModel(profitRemakeModellist(parm, modellist, tofit)$modellist))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.