generate_plots: make some plots nicer
This commit is contained in:
@@ -51,7 +51,7 @@ if(useTESS):
|
||||
current = datetime.now()
|
||||
date = f"{current.year}-{current.month}-{current.day}"
|
||||
time = f"{current.hour}-{current.minute}-{current.second}"
|
||||
folderPath = f"../{date}/{time}/"
|
||||
folderPath = f"../{date}/"
|
||||
#folderPath = f"G:/Meine Ablage/Masterthesis/{date}/"
|
||||
mkdir_p(folderPath)
|
||||
|
||||
@@ -198,11 +198,11 @@ for comboLength in range(1, len(spType) + 1):
|
||||
axFlarepeakHist.set_ylabel("Flare peak")
|
||||
axFlarepeakHist.set_xlabel("Phase")
|
||||
axFlarepeakHist.set_title(f"Flare peak per phase histogram of {', '.join(combo)} type stars with {bins} bins ({numStars} stars)")
|
||||
H, xedges, yedges = np.histogram2d(xData, yData, bins=bins, range=[[0, 2], [0.95, maxY]])
|
||||
H, xedges, yedges = np.histogram2d(xData, yData, bins=bins, range=[[0, 2], [0.99, maxY]])
|
||||
cmax = 11
|
||||
H_clipped = np.clip(H, None, cmax)
|
||||
im = axFlarepeakHist.imshow(H_clipped.T, origin='lower', interpolation='nearest',
|
||||
extent=[xedges[0], xedges[-1], yedges[0], yedges[-1]],
|
||||
im = axFlarepeakHist.imshow(H_clipped.T, origin='lower', interpolation='nearest',
|
||||
extent=[xedges[0], xedges[-1], yedges[0], yedges[-1]],
|
||||
aspect='auto', cmap='viridis')
|
||||
figFlarepeakHist.colorbar(im, label='Counts', ax=axFlarepeakHist)
|
||||
axFlarepeakHist.xaxis.set_major_formatter(tck.FormatStrFormatter('%g $\pi$'))
|
||||
@@ -230,7 +230,7 @@ for comboLength in range(1, len(spType) + 1):
|
||||
pdcsapbinningData[Ffilter]["Peak"],
|
||||
label="F Stars", color="greenyellow")
|
||||
axFlarePeaks.set_xlim(0, 2)
|
||||
axFlarePeaks.set_ylim(0.95, maxY)
|
||||
axFlarePeaks.set_ylim(0.99, maxY)
|
||||
axFlarePeaks.set_ylabel("Flare peak")
|
||||
axFlarePeaks.set_xlabel("Phase")
|
||||
axFlarePeaks.xaxis.set_major_formatter(tck.FormatStrFormatter('%g $\pi$'))
|
||||
@@ -361,7 +361,7 @@ for sT, color in zip(["M", "K", "G", "F"], ["red", "orange", "yellow", "greenyel
|
||||
pdcsapbinningData[SpTypefilter]["Peak"],
|
||||
label=f"{spTyp} Stars", color=color)
|
||||
axFlarePeaks.set_xlim(0, 2)
|
||||
axFlarePeaks.set_ylim(0.95, maxY)
|
||||
axFlarePeaks.set_ylim(0.99, maxY)
|
||||
axFlarePeaks.set_ylabel("Flare peak")
|
||||
axFlarePeaks.set_xlabel("Phase")
|
||||
axFlarePeaks.set_title(f"Flare peaks per phase of {spTyp} type stars ({numStars} stars)")
|
||||
@@ -371,4 +371,3 @@ for sT, color in zip(["M", "K", "G", "F"], ["red", "orange", "yellow", "greenyel
|
||||
|
||||
plt.savefig(f"{locFolder}/{''.join(spTyp)}-Flarepeaks_maxY-{maxY}.png")
|
||||
plt.close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user