Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/profitMakeGaussianPSF.R

Creates an analytic 2D Gaussian PSF with a given full-width at half-maximum.

1 |

`fwhm` |
Numeric scalar; the full width half max (FWHM) of the desired PSF. This is internally converted to a Gaussian standard deviation (sigma) using sigma=FWHM/(2*sqrt(2*log(2)))~FWHM/2.355. |

`dim` |
Integer vector; the dimensions of the image to be generated. Typically this should be c(Nx,Ny). If length 1 then the value will be replicated for both dimensions. |

`trim` |
Numeric scalar; fraction of pixels to keep. This is done by using quantile to find the pixel value and setting pixels below this to zero. This is done to obtain a more circular kernel (often handy), where the defaults will approximately fill a square image with a circle of diameter dim. |

`plot` |
Logical; should a |

`...` |
Further arguments to be passed to |

This is a simple function to create a Gaussian PSF for prototyping image convolution/fits in cases where PSF has not been estimated. In general this should *not* be used for final fitting, since it is rare to have an exact, circular Gaussian profile PSFs in real astronomical images. Better options would be a double winged Gaussian, a Moffat (which is similar to a 2D Student-T distribution with no correlation), or an empirical PSF.

Numeric matrix; the 2D image of the specified PSF with dimensions c(npix,npix).

Aaron Robotham & Dan Taranu

`profitMakePointSource`

, `profitConvolvePSF`

1 2 3 4 5 | ```
#Various FWHM:
magimage(profitMakeGaussianPSF(fwhm=1), stretch='lin')
magimage(profitMakeGaussianPSF(fwhm=3), stretch='lin')
magimage(profitMakeGaussianPSF(fwhm=5), stretch='lin')
``` |

```
Loading required package: FITSio
Loading required package: LaplacesDemon
Loading required package: magicaxis
Loading required package: MASS
Loading required package: plotrix
Loading required package: sm
Package 'sm', version 2.2-5.4: type help(sm) for summary information
Attaching package: 'sm'
The following object is masked from 'package:MASS':
muscle
Loading required package: mapproj
Loading required package: maps
Loading required package: celestial
Loading required package: RANN
Loading required package: NISTunits
Loading required package: pracma
Attaching package: 'pracma'
The following object is masked from 'package:sm':
nile
The following objects are masked from 'package:LaplacesDemon':
Mode, logit, loglog
Loading required package: R2Cuba
Loading required package: RColorBrewer
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.