Commit 387db6ca authored by LUSTIG Peter's avatar LUSTIG Peter

added plotfunction for percentiles

parent 2be1717e
......@@ -495,6 +495,22 @@ class PCAreaEvaluation:
return np.nanpercentile(flux[~totmask], percentiles)
def PlotPercentiles(self, percentiles=None, influx=None):
if percentiles is None:
percentiles = self.fluxpercentiles
if influx is None:
influx = self.flux
percentiles = np.copy(percentiles).T
medidx = int(percentiles.shape[0] / 2)
plt.plot(influx, percentiles[medidx]/influx)
colorarr = ['red', 'yellow']
for iperc in range(1, medidx+1):
alpha=.5, facecolor=colorarr[iperc-1])
def GetNormedDetections(self, absolute_detections=None, norm=None):
if absolute_detections is None:
absolute_detections = self.absolute_detections
......@@ -555,7 +571,8 @@ class PCAreaEvaluation:
ax.set_yscale("log", nonposy='clip')
def FitFluxResolution(self, flux, bins=25, clipmin=20, clipmax=80, **kwargs):
def FitFluxResolution(self, flux, bins=25, clipmin=0, clipmax=100,
realfluxidx = find_nearest(self.flux.to_value(u.mJy),
realflux = self.flux[realfluxidx]
......@@ -726,7 +743,7 @@ if __name__ == '__main__':
rsfname = ('/home/peter/Dokumente/Uni/Paris/Stage/FirstSteps/Completness/'
addmaskname = ('/home/peter/Dokumente/Uni/Paris/Stage/FirstSteps/'
hdul =
sources =['DETECTED_SOURCES'])
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