image_manipulation¶
-
image_manipulation.subtract_gauss(ind, x, y, major, minor, pa, flux, ax1, ax2, ax3, fig, fits_data, convolve=True)[source]¶ Takes a 2D CLEAN restored image array (data) and subtracts a Gaussian using the specified parameters. The subtracted Gaussian is convolved with the restoring beam kernel to ensure the correct Gaussian properties. Plots the subtracted gaussians with postage stamps before and after subtraction
Parameters: - ind (int) – index of the Gaussian being fit, used to correctly title the outputs when plotting
- x (int) – The central x coord of the Gaussian to subtract
- y (int) – The central y coord of the Gaussian to subtract
- major (float) – The major axis of the Gaussian to subtract (arcmin)
- minor (float) – The minor axis of the Gaussian to subtract (arcmin)
- pa (float) – The pa of the Gaussian to subtract (deg)
- flux (float) – The integrated flux density of the Gaussian to subract (Jy)
- ax1 (matplotlib.pyplot.figure.add_subplot instance) – The axis to plot the data before subtraction on
- ax2 (matplotlib.pyplot.figure.add_subplot instance) – The axis to plot the Gaussian to be subtracted on
- ax3 (matplotlib.pyplot.figure.add_subplot instance) – The axis to plot the data after subtraction on
- fig (matplotlib.pyplot.figure) – The figure to plot on
- fits_data (shamfi.read_FITS_image.FITSInformation instance) – A
FITSInformationclass containing the image data - convolve (boolean) – By default, gaussians to subtract are convolved by the restoring beam to account correctly for resolution effects. Set this to False if you know you gaussian parameters work with the current image. Default convolve=True.
Returns: - data (2D numpy array) – 2D numpy image array with the Gaussian subtracted
- ra (float) – The RA of the the subtracted Gaussian (deg)
- dec (float) – The Dec of the the subtracted Gaussian (deg)