scopesim.optics.image_plane_utils

scopesim.optics.image_plane_utils#

Functions

add_imagehdu_to_imagehdu(image_hdu, canvas_hdu)

Re-project one fits.ImageHDU onto another fits.ImageHDU.

add_table_to_imagehdu(table, canvas_hdu[, ...])

Add files from an astropy.Table to the image of an fits.ImageHDU.

affine_map(input[, matrix, rotation_angle, ...])

Apply an affine transformation matrix to an image around its centre.

calc_footprint(header[, wcs_suffix, new_unit])

Return the sky/detector positions [deg/mm] of the corners of a header WCS.

calc_table_footprint(table, x_name, y_name, ...)

Equivalent to calc_footprint(), but for tables instead of images.

create_wcs_from_points(points, pixel_scale)

Create astropy.wcs.WCS instance that fits all points inside.

det_wcs_from_sky_wcs(sky_wcs, pixel_scale, ...)

Create detector WCS from celestial WCS using pixel and plate scales.

get_canvas_header(hdu_or_table_list[, ...])

Generate a fits.Header with a WCS that covers everything in the FOV.

header_from_list_of_xy(x, y, pixel_scale[, ...])

Make a header large enough to contain all x,y on-sky coordinates.

overlay_image(small_im, big_im, coords[, ...])

Overlay small_im on top of big_im at the position specified by coords.

pix2val(header, x, y[, wcs_suffix])

Return the real coordinates [deg, mm] for coordinates from a Header WCS.

reorient_imagehdu(imagehdu[, wcs_suffix, ...])

Apply an affine transformation to the image, as given in its header.

rescale_imagehdu(imagehdu, pixel_scale[, ...])

Scale the .data array by the ratio of pixel_scale [deg] and CDELTn.

sky_wcs_from_det_wcs(det_wcs, pixel_scale, ...)

Create celestial WCS from detector WCS using pixel and plate scales.

split_header(hdr, chunk_size[, wcs_suffix])

Split a header into many smaller parts of the chunk_size.

sub_pixel_fractions(x, y)

Make a list of pixel coordinates and weights to reflect sub-pixel shifts.

val2pix(header, a, b[, wcs_suffix])

Return the pixel coordinates for real coordinates [deg, mm] from a WCS.