From bb54965b54d8bffcd284d59de99904f627b56d79 Mon Sep 17 00:00:00 2001 From: SGCMarkus Date: Tue, 11 Mar 2025 12:08:18 +0100 Subject: [PATCH] generate_plots: fix generation of more detailed spectral types plots --- generate_plots.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/generate_plots.py b/generate_plots.py index 4666c1d..41b8ea8 100644 --- a/generate_plots.py +++ b/generate_plots.py @@ -480,8 +480,9 @@ for comboLength in range(1, len(spType) + 1): plotdata, filters, PDCSAPlabelList, PDCSAPcolorList, f"Flare peaks per phase of {', '.join(combo)} type stars ({numStars} stars)", f"{locFolder}/{''.join(combo)}-Flarepeaks_maxY-@maxY.png") if(comboLength == 1): - spTypes = [f"{combo}0", f"{combo}1", f"{combo}2", f"{combo}3", f"{combo}4", f"{combo}5", f"{combo}6", f"{combo}7", f"{combo}8", f"{combo}9"] - match combo: + mainSpType = combo[0] + spTypes = [f"{mainSpType}0", f"{mainSpType}1", f"{mainSpType}2", f"{mainSpType}3", f"{mainSpType}4", f"{mainSpType}5", f"{mainSpType}6", f"{mainSpType}7", f"{mainSpType}8" f"{mainSpType}9"] + match mainSpType: case "M": color = "red" case "K": @@ -543,7 +544,7 @@ for comboLength in range(1, len(spType) + 1): filters = SpTypefilter generatePlots(PDCSAPdataList, PDCSAPlabelList, PDCSAPcolorList, f"Flare count in phase of {spTyp} type stars with @bins bins ({numStars} stars)", f"{locFolder}/{''.join(spTyp)}-Flarecount-@bins_Bins.png", xData, yData, f"Flare peak per phase histogram of {spTyp} type stars with @bins bins ({numStars} stars)", f"{locFolder}/{''.join(spTyp)}-Flarepeaks-@bins_Bins_maxY-@maxY.png", - plotdata, filters, PDCSAPlabelList, PDCSAPcolorList, f"Flare peaks per phase of {spTyp} type stars ({numStars} stars)", f"{locFolder}/{''.join(spTyp)}-Flarepeaks_maxY-@maxY.png") + plotdata, filters, PDCSAPlabelList[0], PDCSAPcolorList[0], f"Flare peaks per phase of {spTyp} type stars ({numStars} stars)", f"{locFolder}/{''.join(spTyp)}-Flarepeaks_maxY-@maxY.png") # per Period for periodCut in periodsCutList: