# NOT RUN {
model = list(
sersic = list(
xcen = 10,
ycen = 10,
mag = 15,
re = 2,
nser = 4,
ang = 30,
axrat = 0.5,
box = 0
)
)
dim=c(20,20)
tempExact=profitCubaSersic(xcen=model$sersic$xcen, ycen=model$sersic$ycen,
mag=model$sersic$mag, re=model$sersic$re, nser=model$sersic$nser, ang=model$sersic$ang,
axrat=model$sersic$axrat, box=model$sersic$box, dim=dim)
tempProFit=profitMakeModel(model, dim=dim)$z
#The relative differences between the exact and approximate ProFit model image.
#This is scaled to show 1% differences as extremes:
magimage((tempExact-tempProFit)/tempExact, magmap=FALSE, zlim=c(-0.01,0.01))
#They differ by no more the 1% in flux for any pixel, and in general much less than that:
hist((tempExact-tempProFit)/tempExact)
# }
Run the code above in your browser using DataLab