scopesim.optics.image_plane_utils.add_table_to_imagehdu

scopesim.optics.image_plane_utils.add_table_to_imagehdu#

scopesim.optics.image_plane_utils.add_table_to_imagehdu(table: Table, canvas_hdu: ImageHDU, sub_pixel: bool = True, wcs_suffix: str = '') ImageHDU#

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

Parameters:
  • table (astropy.Table) – Must contain the columns “x_mm”, “y_mm”, “flux” with the units in the column attribute .unit, or in the table.meta dictionary as “<colname>_unit”. Default units are mm and ph / s / pix

  • canvas_hdu (fits.ImageHDU) – The ImageHDU onto which the table files should be projected. This must include a valid WCS

  • sub_pixel (bool, optional) – Default is True. If True, sub-pixel shifts of files will be taken into account when projecting onto the canvas pixel grid. This takes about 5x longer than ignoring the sub-pixel shifts

  • wcs_suffix (str, optional)

Returns:

canvas_hdu

Return type:

fits.ImageHDU