ROISkyScene API Documentation

Bases: pandoraaperture.scene.SkyScene
Special version of a SkyScene that works with a ROI sparse matrix
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
prf
|
PRF
|
pandoraaperture PRF class. |
required |
wcs
|
WCS
|
astropy World Coordinate System |
required |
time
|
Time
|
astropy Time |
<Time object: scale='utc' format='datetime' value=2026-01-07 20:53:23.118502>
|
user_cat
|
DataFrame
|
Optional catalog from the user. Use this to pass a catalog of objects expected in this data that are not part of the Gaia catalog. You must include all the columns specified in your config file under |
None
|
nROIs
|
int
|
The number of regions of interest in the larger image |
1
|
ROI_size
|
Tuple
|
The size the regions of interest in (row, column) pixels. All ROIs must be the same size. |
(50, 50)
|
ROI_corners
|
List[Tuple[int, int]]
|
The origin (lower left) corner positon for each of the ROIs. Must have length nROIs. List of tuples. |
(999, 999)
|
NIRDAflux
property
Gives the flux on the NIRDA. This can be updated with a reference product in the future...!
ROI_corners = (999, 999)
class
Built-in immutable sequence.
If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable's items.
If the argument is a tuple, the return value is the same object.
ROI_size = (50, 50)
class
Built-in immutable sequence.
If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable's items.
If the argument is a tuple, the return value is the same object.
VDAflux
property
Gives the flux on the VDA. This can be updated with a reference product in the future...!
flux
property
Here we set the flux that is assumed to be the default for this object. For regular sky scenes it's VDA.
header_cards
property
Header cards that are necessary to show state of package.
nROIs = 1
class
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
wcs_cards
property
Returns the WCS header as cards.
A(delta_pos=None)
Returns the design matrix of the SkyScene.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
A
|
Matrix containing the PRFs of all targets in the scene. |
required | |
delta_pos
|
Change in position in pixels. Use format (row, column). |
None
|
evaluate(delta_pos=None)
Returns a dense image of the SkyScene
Returns
Returns
r: npt.NDArray
Array of row positions of the image
c: npt.NDArray
Array of column positions of the image
im: npt.NDArray
Image of the scene
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
delta_pos
|
Change in position in pixels. Use format (row, column). |
None
|
from_pointing(ra, dec, theta, nROIs, ROI_corners, ROI_size, time=<Time object: scale='utc' format='datetime' value=2026-01-07 20:53:23.119926>)
classmethod
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ra
|
Right Ascention |
required | |
dec
|
Declination |
required | |
theta
|
Roll angle in degrees |
required | |
time
|
astropy Time |
<Time object: scale='utc' format='datetime' value=2026-01-07 20:53:23.119926>
|
|
nROIs
|
The number of regions of interest in the larger image |
required | |
ROI_corners
|
The origin (lower left) corner positon for each of the ROIs. Must have length nROIs. List of tuples. |
required | |
ROI_size
|
The size the regions of interest in (row, column) pixels. All ROIs must be the same size. |
required |
get_all_apertures(delta_pos=None, relative_threshold=0.005, absolute_threshold=50)
Obtain the aperture and aperture statistics for all targets.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
delta_pos
|
Change in position in pixels. Use format (row, column). |
None
|
|
relative_threshold
|
Threshold to cut aperture off at in units of total source flux. |
0.005
|
|
absolute_threshold
|
Threshold to cut aperture off at, in units of electrons/s. |
50
|
Returns:
| Name | Type | Description |
|---|---|---|
aperture |
ndarray
|
Array of bools that shows which pixels are considered to be part of the target. |
contamination |
float
|
Value showing how much of the flux in the aperture is due to other sources/the amount of flux inside the aperture. |
completeness |
float
|
Value showing how much of the target flux is inside the aperture/total expected flux. |
total_in_aperture |
float
|
Value showing how much flux is inside the aperture. |
get_aperture(target, delta_pos=None, relative_threshold=0.005, absolute_threshold=50)
Obtain the aperture and aperture statistics for a particular target.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target
|
Indicates a target in the catalog. Use either in integer to express an index in the catalog, or a SkyCoord to find the closest target |
required | |
delta_pos
|
Change in position in pixels. Use format (row, column). |
None
|
|
relative_threshold
|
Threshold to cut aperture off at in units of total source flux. |
0.005
|
|
absolute_threshold
|
Threshold to cut aperture off at, in units of electrons/s. |
50
|
Returns:
| Name | Type | Description |
|---|---|---|
aperture |
ndarray
|
Array of bools that shows which pixels are considered to be part of the target. |
contamination |
float
|
Value showing how much of the flux in the aperture is due to other sources/the amount of flux inside the aperture. |
completeness |
float
|
Value showing how much of the target flux is inside the aperture/total expected flux. |
total_in_aperture |
float
|
Value showing how much flux is inside the aperture. |
get_aperture_hdu(target, delta_pos=None, relative_threshold=0.005, absolute_threshold=50)
Obtain the aperture HDU.
Returns:
| Name | Type | Description |
|---|---|---|
hdu |
hdu
|
FITS HDU containing the aperture, with aperture metrics in header. |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target
|
Indicates a target in the catalog. Use either in integer to express an index in the catalog, or a SkyCoord to find the closest target |
required | |
delta_pos
|
Change in position in pixels. Use format (row, column). |
None
|
|
relative_threshold
|
Threshold to cut aperture off at in units of total source flux. |
0.005
|
|
absolute_threshold
|
Threshold to cut aperture off at, in units of electrons/s. |
50
|
get_catalog_hdu(delta_pos=None)
Obtain the catalog HDU.
Returns:
| Name | Type | Description |
|---|---|---|
hdu |
hdu
|
FITS HDU containing the catalog of all sources that will land on pixels. |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
delta_pos
|
Change in position in pixels. Use format (row, column). |
None
|
get_model_hdu(delta_pos=None)
Obtain the model HDU.
Returns:
| Name | Type | Description |
|---|---|---|
hdu |
hdu
|
FITS HDU containing the model of all sources, including their brightness. |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
delta_pos
|
Change in position in pixels. Use format (row, column). |
None
|
get_prf_hdu(delta_pos=None)
Obtain the PRF HDU.
Returns:
| Name | Type | Description |
|---|---|---|
hdu |
hdu
|
FITS HDU containing the of all sources that will land on pixels. |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
delta_pos
|
Change in position in pixels. Use format (row, column). |
None
|
plot(**kwargs)
Plots the SkyScene. Use this functon to visually inspect the SkyScene.