shine.galaxy_utils¶
Galaxy morphology modeling utilities.
Factory functions for creating GalSim and JAX-GalSim galaxy objects from configuration, supporting Sersic and Exponential profiles with ellipticity.
galaxy_utils
¶
Galaxy morphology modeling utilities.
get_galaxy(gal_config, flux, half_light_radius, e1=0.0, e2=0.0)
¶
Create a GalSim galaxy object from configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gal_config
|
GalaxyConfig
|
Galaxy configuration specifying profile type and parameters. |
required |
flux
|
float
|
Galaxy flux. |
required |
half_light_radius
|
float
|
Half-light radius in arcseconds. |
required |
e1
|
float
|
First component of intrinsic ellipticity. |
0.0
|
e2
|
float
|
Second component of intrinsic ellipticity. |
0.0
|
Returns:
| Type | Description |
|---|---|
GSObject
|
GalSim galaxy object with ellipticity applied. |
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
If the galaxy type is not supported. |
Source code in shine/galaxy_utils.py
get_jax_galaxy(gal_config, flux, half_light_radius, e1=0.0, e2=0.0, gsparams=None)
¶
Create a JAX-GalSim galaxy object from configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gal_config
|
GalaxyConfig
|
Galaxy configuration specifying profile type and parameters. |
required |
flux
|
float
|
Galaxy flux. |
required |
half_light_radius
|
float
|
Half-light radius in arcseconds. |
required |
e1
|
float
|
First component of intrinsic ellipticity. |
0.0
|
e2
|
float
|
Second component of intrinsic ellipticity. |
0.0
|
gsparams
|
Optional[Any]
|
Optional GSParams for controlling rendering. |
None
|
Returns:
| Type | Description |
|---|---|
GSObject
|
JAX-GalSim galaxy object with ellipticity applied. |
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
If the galaxy type is not supported. |