Image Cleaning

hostphot.image_cleaning.remove_nan(hdu)

Remove columns and/or rows which have all NaN values. The WCS is updated accordingly.

Parameters:

image (Header Data Unit) – Fits image with header and data.

Returns:

trimmed_hdu – Trimmed image.

Return type:

Header Data Unit

hostphot.image_cleaning.trim_images(fits_files, pos, size)

Trims the size of the given fits images.

Parameters:
  • fits_files (list) – List of fits images.

  • pos (~astropy.coordinates.SkyCoord) – The position of the cutout array’s center.

  • size (int) – Image size in pixels.

Returns:

trimmed_fits_files – List of the trimmed fits images.

Return type:

list