import numpy as np from astropy.io import fits import cv2 import matplotlib.pyplot as plt from photutils.segmentation import detect_threshold from astropy.convolution import Gaussian2DKernel from astropy.stats import gaussian_fwhm_to_sigma from photutils.segmentation import detect_sources, deblend_sources, SourceCatalog,source_properties import warnings from astropy.visualization import simple_norm warnings.filterwarnings("ignore")