flaredetector: support plotting peaks onto given non-normalized fluxes
This commit is contained in:
@@ -32,15 +32,21 @@ def calculateFlareFitsForLightcurve(lightcurve, num=100, distance=1, height=0.05
|
||||
for index in maxIndices:
|
||||
Peak, flareFitDataPoints, fit = calculateFitForFlare(lightcurve, index)
|
||||
peaks.append({"FlarePeak": Peak,
|
||||
"FlarePeakTime": lightcurve.time[index]})
|
||||
"FlarePeakTime": lightcurve.time[index],
|
||||
"StandardIndex": index})
|
||||
fits.append({"FlareFit": fit,
|
||||
"FlareFitTime": lightcurve.time[flareFitDataPoints]})
|
||||
"FlareFitTime": lightcurve.time[flareFitDataPoints],
|
||||
"StandardIndex": flareFitDataPoints})
|
||||
|
||||
return peaks, fits
|
||||
|
||||
def plotFlarePeaks(ax, peaks):
|
||||
for peak in peaks:
|
||||
ax.plot(peak["FlarePeakTime"], peak["FlarePeak"], "x", color="red")
|
||||
def plotFlarePeaks(ax, peaks, flux = None):
|
||||
if(flux is None):
|
||||
for peak in peaks:
|
||||
ax.plot(peak["FlarePeakTime"], peak["FlarePeak"], "x", color="red")
|
||||
else:
|
||||
for peak in peaks:
|
||||
ax.plot(peak["FlarePeakTime"], flux[peak["StandardIndex"]], "x", color="red")
|
||||
|
||||
def plotFlareFits(ax, fits):
|
||||
for fit in fits:
|
||||
|
||||
Reference in New Issue
Block a user