Commit 4297dc26 authored by LUSTIG Peter's avatar LUSTIG Peter
Browse files

added maskplot forall subclasses

parent 04feb4f8
......@@ -105,47 +105,20 @@ class BasicEvaluation:
self.shape = shape
self.wcs = wcs
def PlotMask(self, sourcecat=None,
realsources=False, realsourcecat=None,
fluxdev=False, sources=False, **kwargs):
def PlotMask(self, sourcecat=None, fluxdeviation=None, **kwargs):
mask = self.mask
if sourcecat is not None:
if type(sourcecat) is int:
idx = sourcecat
sourcecat = self.sources[idx]
if 'find_peak' in sourcecat.keys():
fpmask = sourcecat['find_peak'].mask
# print(type(fpmask))
smask = np.array(fpmask | self.sourcelocmask[idx],
smask = self.sourcelocmask[idx]
sourcecat = sourcecat[~smask]
if realsources and realsourcecat is None:
realsourcecat = self.RealSources
wcs = self.wcs
ax, img = Plot2D(np.array(mask, dtype=int), wcs=wcs, xlabel='Ra',
ylabel='Dec', **kwargs)
if sourcecat is not None:
if not fluxdev:
if fluxdeviation is None:
plt.scatter(sourcecat['xmean'], sourcecat['ymean'], marker='.',
dev = (u.Quantity(sourcecat['flux_psf'] -
.to_value(u.mJy)) # ** 2
plt.scatter(sourcecat['xmean'], sourcecat['ymean'], marker='.',
c=dev, label='Sources')
if realsourcecat is not None:
plt.scatter(realsourcecat['xmean'], realsourcecat['ymean'],
marker='.', color='r', label='Real Sources')
c=fluxdeviation, label='Sources')
return ax, img
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment