image
Source Extent Function image
function is a simplified SAOTrace
source extent interface function which simulates a source using an image. The flux distribution follows the intensity of the pixels in the image.
image()
takes a single argument, a table, with the following recognized named entries:
name | type | description | default |
---|---|---|---|
position |
position specification | source position | on optical axis |
spectrum |
spectrum specification | source spectrum | |
file |
string | filename of image | |
rotate |
angle (default unit degrees) | rotation of the image about its fiducial point | 0 |
clip |
non-negative number | Pixel values below this are ignored | 0 |
flip |
string; one of x, y, xy, or none | which if any axes should be flipped | none |
format |
string; one of ascii, double, fits, float, pbm, pgm. | format of the image. See Image Extent Function#Image Formats. | guessed at |
pixsz |
angular size (default unit arcseconds) pixsz = 0.2If the pixel is not square, specify a table: pixsz = { x = 0.1, y = 0.2 } |
angular size of a pixel | Determined from the image data if possible, else it defaults to 0.5" |
size |
a table with elements x and y size = { x = 1024, y = 1024 } |
The pixel extent of the image | Only required if the image data do not include the image size. |
point_idx |
a table with elements x and y point_idx = { x = 4096, y = 4096 } |
The location of the image fiducial point in pixels. Excludes point_wcs , ref_wcs , ref_idx |
Defaults to the center of the image |
point_wcs | a table with elements x and y point_wcs = { x = 16536, y = 16536 } |
The location of the image fiducial point in world coordinates. Excludes |
|
ref_wcs | a table with elements x and y ref_wcs = { x = 4096, y = 4096 } |
The location of the image fiducial point reference point in world coordinates. Used with point_wcs . |
|
ref_idx | a table with elements x and y ref_idx = { x = 4096, y = 4096 } |
The location of the image fiducial point reference point in pixel indices. Used with point_wcs . |
position
parameter. By default it is the center of the image. To specify an alternate point you may specify either the exact pixel indices or a position in world coordinates.
To specify pixel indices, use the point_idx
parameter, which takes a table of pixel indices:
point_idx = { x = 33, y = 22.2}To specify the fiducial point in world coordinates, three pieces of information are required:
point_wcs
parameter point_wcs = { x = 4096, y = 4096 }
ref_wcs
parameter; ref_wcs = { x = 4096, y = 4096 }
ref_idx
ref_idx = { x = 1, y = 1 }
CUNIT1, CUNIT2
, CDELT1, CDELT2
CDELTn
keywords are not present, the pixel size is set to 0.5 arcseconds. Otherwise, if the CUNITn
keywords are not present, the units for CDELTn
are assumed to be degrees.
CRPIX1
, CRPIX2
, CRVAL1
, CRVAL2
CRPIXn
indicates the pixel indices for a reference pixel and CRVALn
indicates the world coordinate system values at those indices.
CTYPE1
, CTYPE2
flip
parameter).
pixsz
parameter may be used to override the pixel size.
PBM
and PGM
data formats include image size metadata, but do not include pixel size metadata. Those must be provided with the pixsz
parameter.
size
and pixsz
parameters. The data should be stored so that the X values vary most quickly.
size
and pixsz
parameters. The data should be stored so that the X values vary most quickly.
image{ file = 'ell.fits', rotate = 65, point_idx={ x = 0, y = 0 }, spectrum = 1.49, }