diff --git a/LATTE/LATTE_DV.py b/LATTE/LATTE_DV.py index 78e4262..8e92787 100644 --- a/LATTE/LATTE_DV.py +++ b/LATTE/LATTE_DV.py @@ -873,22 +873,23 @@ def addPageNumber(canvas, doc): # -------------------------------------------- # eep # -------------------------------------------- - Story.append(Spacer(1, 20)) + if os.path.exists(eep_name): + Story.append(Spacer(1, 20)) - imp = Image(eep_name) + imp = Image(eep_name) - imp._restrictSize(width*0.55, width*0.55) + imp._restrictSize(width*0.55, width*0.55) - Story.append(imp) + Story.append(imp) - fig_count += 1 - Story.append(Spacer(1, 10)) - periodogram_text = "Fig {}. The equivalent evolutionary phase (eep) tracks for main sequence evolution (solid lines) and post \ - main-sequence evolution (dashed lines) for masses ranging from 0.3 to 1.6 solar masses (from right to left). \ - The 1 Solar Mass track is shown in maroon. The blue points show the TOIs and the magenta point TIC {}.".format(fig_count, tic) + fig_count += 1 + Story.append(Spacer(1, 10)) + periodogram_text = "Fig {}. The equivalent evolutionary phase (eep) tracks for main sequence evolution (solid lines) and post \ + main-sequence evolution (dashed lines) for masses ranging from 0.3 to 1.6 solar masses (from right to left). \ + The 1 Solar Mass track is shown in maroon. The blue points show the TOIs and the magenta point TIC {}.".format(fig_count, tic) - ptext = '%s' % periodogram_text - Story.append(Paragraph(ptext, styles["Normal"])) + ptext = '%s' % periodogram_text + Story.append(Paragraph(ptext, styles["Normal"])) if model == True: diff --git a/LATTE/LATTEutils.py b/LATTE/LATTEutils.py index 7da4d07..b0a5991 100644 --- a/LATTE/LATTEutils.py +++ b/LATTE/LATTEutils.py @@ -7005,6 +7005,10 @@ def plot_echelle(tic, indir, seis, args, smooth_filter_width=.3, cmap='Greys', q # plot the equivilaten evolutionary phase tracks def eep_target(tic, indir, syspath, temp, rad, args, ql = False): + if temp is None or rad is None: + print(f"eep_target(): missing stellar temperature and/or radius ({temp} / {rad}). Skip it.") + return + # the eep tracks are downloaded when you install the code. These files are not large ~70 KB each phase0 = pd.read_csv('{}/LATTE_eep_data/eep_phase0.csv'.format(syspath)) # these are the main-sequence tracks phase2 = pd.read_csv('{}/LATTE_eep_data/eep_phase2.csv'.format(syspath)) # these are the post main-sequence tracks