Simple Profiles
We have a few profiles that are just simple shapes.
Gaussian Profile
- class galsim.Gaussian(half_light_radius=None, sigma=None, fwhm=None, flux=1.0, gsparams=None)[source]
Bases:
GSObject
A class describing a 2D Gaussian surface brightness profile.
The Gaussian surface brightness profile is characterized by two properties, its
flux
and the characteristic sizesigma
where the radial profile of the circular Gaussian drops off as\[I(r) \sim e^{-\frac{r^2}{2 \sigma^2}}\]A Gaussian can be initialized using one (and only one) of three possible size parameters:
sigma
,fwhm
, orhalf_light_radius
. Exactly one of these three is required.- Parameters:
sigma – The value of sigma of the profile. Typically given in arcsec. [One of
sigma
,fwhm
, orhalf_light_radius
is required.]fwhm – The full-width-half-max of the profile. Typically given in arcsec. [One of
sigma
,fwhm
, orhalf_light_radius
is required.]half_light_radius – The half-light radius of the profile. Typically given in arcsec. [One of
sigma
,fwhm
, orhalf_light_radius
is required.]flux – The flux (in photons/cm^2/s) of the profile. [default: 1]
gsparams – An optional
GSParams
argument. [default: None]
- property fwhm
The FWHM of this Gaussian profile
- property half_light_radius
The half-light radius of this Gaussian profile
- property sigma
The sigma of this Gaussian profile
- withFlux(flux)[source]
Create a version of the current object with a different flux.
This function is equivalent to
obj.withScaledFlux(flux / obj.flux)
.It creates a new object that has the same profile as the original, but with the surface brightness at every location rescaled such that the total flux will be the given value. Note that if
flux
is anSED
, the return value will be aChromaticObject
with specifiedSED
.- Parameters:
flux – The new flux for the object.
- Returns:
the object with the new flux
Pixel Profile
- class galsim.Pixel(scale, flux=1.0, gsparams=None)[source]
Bases:
Box
A class describing a pixel profile. This is just a 2D square top-hat function.
This class is typically used to represent a pixel response function. It is used internally by the
GSObject.drawImage
function, but there may be cases where the user would want to use this profile directly.- Parameters:
scale – The linear scale size of the pixel. Typically given in arcsec.
flux – The flux (in photons/cm^2/s) of the profile. This should almost certainly be left at the default value of 1. [default: 1]
gsparams – An optional
GSParams
argument. [default: None]
- withFlux(flux)[source]
Create a version of the current object with a different flux.
This function is equivalent to
obj.withScaledFlux(flux / obj.flux)
.It creates a new object that has the same profile as the original, but with the surface brightness at every location rescaled such that the total flux will be the given value. Note that if
flux
is anSED
, the return value will be aChromaticObject
with specifiedSED
.- Parameters:
flux – The new flux for the object.
- Returns:
the object with the new flux
Box Profile
- class galsim.Box(width, height, flux=1.0, gsparams=None)[source]
Bases:
GSObject
A class describing a box profile. This is just a 2D top-hat function, where the width and height are allowed to be different.
- Parameters:
width – The width of the Box.
height – The height of the Box.
flux – The flux (in photons/cm^2/s) of the profile. [default: 1]
gsparams – An optional
GSParams
argument. [default: None]
- withFlux(flux)[source]
Create a version of the current object with a different flux.
This function is equivalent to
obj.withScaledFlux(flux / obj.flux)
.It creates a new object that has the same profile as the original, but with the surface brightness at every location rescaled such that the total flux will be the given value. Note that if
flux
is anSED
, the return value will be aChromaticObject
with specifiedSED
.- Parameters:
flux – The new flux for the object.
- Returns:
the object with the new flux
TopHat Profile
- class galsim.TopHat(radius, flux=1.0, gsparams=None)[source]
Bases:
GSObject
A class describing a radial tophat profile. This profile is a constant value within some radius, and zero outside this radius.
- Parameters:
radius – The radius of the TopHat, where the surface brightness drops to 0.
flux – The flux (in photons/cm^2/s) of the profile. [default: 1]
gsparams – An optional
GSParams
argument. [default: None]
- withFlux(flux)[source]
Create a version of the current object with a different flux.
This function is equivalent to
obj.withScaledFlux(flux / obj.flux)
.It creates a new object that has the same profile as the original, but with the surface brightness at every location rescaled such that the total flux will be the given value. Note that if
flux
is anSED
, the return value will be aChromaticObject
with specifiedSED
.- Parameters:
flux – The new flux for the object.
- Returns:
the object with the new flux
Delta Function
- class galsim.DeltaFunction(flux=1.0, gsparams=None)[source]
Bases:
GSObject
A class describing a DeltaFunction surface brightness profile.
The DeltaFunction surface brightness profile is characterized by a single property, its
flux
.A DeltaFunction can be initialized with a specified flux.
- Parameters:
flux – The flux (in photons/cm^2/s) of the profile. [default: 1]
gsparams – An optional
GSParams
argument. [default: None]
- withFlux(flux)[source]
Create a version of the current object with a different flux.
This function is equivalent to
obj.withScaledFlux(flux / obj.flux)
.It creates a new object that has the same profile as the original, but with the surface brightness at every location rescaled such that the total flux will be the given value. Note that if
flux
is anSED
, the return value will be aChromaticObject
with specifiedSED
.- Parameters:
flux – The new flux for the object.
- Returns:
the object with the new flux