Extended Source¶
Bases: Source
__init__ ¶
__init__(
optBand: str,
coordinates: list = [0, 0],
fov=10,
altitude: float = np.inf,
img_path="",
img_PS=None,
nSubDirs=1,
maxnSubDirs=7,
patch_padding=5,
subDir_margin=1.0,
logger=None,
)
Initialize an extended source (e.g., the Sun) for use in AO simulations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
optBand
|
str
|
Optical band identifier. |
required |
coordinates
|
list
|
Sky position [zenith, azimuth] in [arcsec, degrees], by default [0, 0]. |
[0, 0]
|
fov
|
float
|
Field of view in arcseconds, by default 10. |
10
|
altitude
|
float
|
Altitude of the source in meters. Default is infinity. |
inf
|
img_path
|
str
|
Path to the H5 image of the source (e.g., solar image). |
''
|
img_PS
|
float
|
Plate scale in arcsec/pixel, by default None to use the metadata of the image. |
None
|
nSubDirs
|
int
|
Number of sub-directions across the extended source. |
1
|
maxnSubDirs
|
int
|
Maximum number of sub-directions allowed for processing limits. |
7
|
patch_padding
|
float
|
Padding beyond FOV for sub-region extraction. |
5
|
subDir_margin
|
float
|
Margin added to avoid boundary effects. |
1.0
|
logger
|
Logger
|
Optional logger instance. |
None
|
photometry ¶
Return photometric properties specific to solar sources.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
arg
|
str
|
Photometric band identifier. |
required |
Returns:
| Type | Description |
|---|---|
list
|
[wavelength, bandwidth, zero point flux] or -1 if not found. |
print_properties ¶
Print key attributes of the extended source.
Returns:
| Type | Description |
|---|---|
None
|
|
load_sun_img ¶
Load the solar image patch and extract both padded and unpadded versions.
Returns:
| Type | Description |
|---|---|
tuple of np.ndarray
|
(unpadded image patch, padded image patch) |
get_subDirs ¶
Compute the sub-direction coordinates and extract subregions from the image.
Returns:
| Type | Description |
|---|---|
tuple of (np.ndarray, np.ndarray)
|
Coordinates [r, theta] and subregion image cubes. |