def setUp(self): uncorr_map = accessors.open(uncorr_path) corr_map = accessors.open(corr_path) map_with_sources = accessors.open(deconv_path) self.uncorr_image = image.ImageData(uncorr_map.data, uncorr_map.beam, uncorr_map.wcs) self.corr_image = image.ImageData(corr_map.data, uncorr_map.beam, uncorr_map.wcs) self.image_with_sources = image.ImageData(map_with_sources.data, map_with_sources.beam, map_with_sources.wcs)
def setUp(self): # Beam here is a random beam, in this case the WENSS beam # without the declination dependence. fitsfile = tkp.accessors.fitsimage.FitsImage(corrected_fits, beam=(54. / 3600, 54. / 3600, 0.)) self.my_im = image.ImageData(fitsfile.data, fitsfile.beam, fitsfile.wcs)
def setUp(self): # Beam here is a random beam, in this case the WENSS beam # without the declination dependence. fitsfile = tkp.accessors.fitsimage.FitsImage(corrected_fits, beam=(54. / 3600, 54. / 3600, 0.)) self.image = image.ImageData(fitsfile.data, fitsfile.beam, fitsfile.wcs) self.results = self.image.extract(det=10.0, anl=3.0)
def setUp(self): # This image is of the whole sequence, so obviously we won't see the # transient varying. In fact, due to a glitch in the simulation # process, it will appear smeared out & shouldn't be identified at # all. # Beam here is a random beam, in this case the WENSS beam # without the declination dependence. fitsfile = tkp.accessors.fitsimage.FitsImage(all_fits, beam=(54. / 3600, 54. / 3600, 0.)) self.image = image.ImageData(fitsfile.data, fitsfile.beam, fitsfile.wcs, radius=100) self.results = self.image.extract(det=5, anl=3.0)
def setUp(self): fitsfile = tkp.accessors.open( os.path.join(DATAPATH, 'sourcefinder/simulations/deconvolved.fits')) img = image.ImageData(fitsfile.data, fitsfile.beam, fitsfile.wcs) # This is quite subtle. We bypass any possible flaws in the # kappa, sigma clipping algorithm by supplying a background # level and noise map. In this way we make sure that any # possible biases in the measured source parameters cannot # come from biases in the background level. The peak fluxes, # in particular, can be biased low if the background levels # are biased high. The background and noise levels supplied # here are the true values. extraction_results = img.extract(det=10.0, anl=6.0, noisemap=np.ma.array(BG_STD * np.ones( (2048, 2048))), bgmap=np.ma.array(BG_MEAN * np.ones( (2048, 2048)))) self.number_sources = len(extraction_results) peak_fluxes = [] deconv_smajaxes = [] deconv_sminaxes = [] deconv_bpas = [] for sources in extraction_results: peak_fluxes.append([sources.peak.value, sources.peak.error]) deconv_smajaxes.append( [sources.smaj_dc.value, sources.smaj_dc.error]) deconv_sminaxes.append( [sources.smin_dc.value, sources.smin_dc.error]) deconv_bpas.append( [sources.theta_dc.value, sources.theta_dc.error]) self.peak_fluxes = np.array(peak_fluxes) self.deconv_smajaxes = np.array(deconv_smajaxes) self.deconv_sminaxes = np.array(deconv_sminaxes) self.deconv_bpas = np.array(deconv_bpas)