View source: R/profoundHotFuzz.R
profoundHotFuzz | R Documentation |
Functions to fit the tenuous outer fuzz of extended sources.
profoundHotFuzz(profound = NULL, loc = NULL, box = c(200, 200), region = NULL, size = 21,
shape = "disc", select = NULL, rough = TRUE, nser = 1, dofit = TRUE, Niters = c(200, 0),
fitRe = TRUE, axrat = 'profound', ...)
profoundPSFFuzz(profound = NULL, loc = NULL, box = c(200,200), size = 21, shape = "disc",
select = NULL, rough = TRUE, nser = 2, dofit = TRUE, Niters = c(200, 0), ...)
profound |
List, required; output from |
loc |
Numeric vector; two element [x,y] position for cutout region. |
box |
Numeric vector; two element dimensions of the box to cut out from image centred on loc (in pixels). |
region |
Boolean matrix; region to use for determining extended fuzzy profiles. If not defined then the dilated outskirts of objects will be defined internally. |
size |
Integer scalar; the size (e.g. width/diameter) of the dilation kernel in pixels. Should be an odd number else will be rounded up to the nearest odd number. |
shape |
Character scalar; the shape of the dilation kernel. Options are 'box', 'disc', 'diamond', 'Gaussian', 'line'. |
select |
Vector; either logical vector of segstat rows to keep (same length as segstats), or integer vector of row numbers. |
rough |
Logical; should the profile be approximated roughly. Usually setting this to true is fine for the out parts of light profiles. |
nser |
Numeric scalar; the Sersic index of the profile to use when fitting. When fitting "Hot-Fuzz" the Magnitude, Re and Index become quite degenerate, so this can usually be left at the default of 1 (meaning an exponential/power-law outer profile). |
dofit |
Logical; should fitting be done (TRUE) or just produce the outputs that can be later fitted (FALSE)? |
Niters |
Integer vector; if dofit = TRUE, the number of CMA and MCMC steps to make with |
fitRe |
Logical; if dofit = TRUE, should Re also be fitted? |
axrat |
Character or numeric; either set to 'profound' (so axrat in inherited from ProFound), or set to the desired value. |
... |
Other arguments to pass to |
These codes are probably not general user at the moment (although feel free to use them). They were produced with a mind to my (Aaron Robotham's) ARC Future Fellowship project.
In brief they construct a ProFit
region map that is defined by the segmentation map from ProFound and a dilation of this (using the provided kernel arguments). This region map becomes the target for a large ProFit
model that is in effect only attempting to fit the outer "Hot Fuzz" that is not inside the standard ProFound
segmentation map. Because of how far out this fuzz usually easier, a computationally cheaper 'rough' model can usually be used.
profoundHotFuzz
fits the outer profile of target galaxies. This is used to model the "Hot Fuzz" in the outer parts of galaxy profiles. It inherits the ellipticity and orientation of the profoundProFound
output, allowing variable magnitude and Re by default per source.
profoundPSFFuzz
fits the outer profile of target stars. This is used to model the "Hot Fuzz" in the outer parts of star profiles. It assumes the stars are circular, allowing variable Re and Index shared for all sources (so a common PSF profile), and variable magnitude per source (different flux stars).
The either function the output is:
If dofit = TRUE the first list elements are all the usual outputs from Highlander.
Modellist |
The best fit modellist (if dofit = TRUE). |
image_model |
The best fit model image (if dofit = TRUE). |
Data |
The fitting data for Highlander. |
image |
The sky subtracted fitting image. |
segim |
The fitting segmentation map. |
segim_redo |
The dilated fitting segmentation map. |
sigma |
The fitting segstats map. |
segstats |
The fitting segstats. |
Aaron Robotham
profoundProFound
, ~~~
## Not run:
image = Rfits_read_image(system.file("extdata", 'VIKING/mystery_VIKING_Z.fits',
package="ProFound"))
profound = profoundProFound(image, magzero=30)
#This takes a few minutes to run
fuzz_fit = profoundHotFuzz(profound)
magimage(fuzz_fit$image, qdiff=TRUE)
no_fuzz = fuzz_fit$image
sel = profound$segim_orig == 0
no_fuzz[sel] = no_fuzz[sel] - fuzz_fit$image_model[sel]
magimage(no_fuzz, qdiff=TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.