@@ -1196,6 +1196,12 @@ def stellar_variability(ref_flux, lmfit, times, comp_stars, id, vsp_comp_stars,
1196
1196
comp_mask = [True if i in intx_times else False for i in comp_flux ['myfit' ].time ]
1197
1197
OOT = (np .array (comp_flux ['myfit' ].transit )[comp_mask ] == 1 )
1198
1198
1199
+ if not OOT .any ():
1200
+ log_info ("Data does not contain any Out-Of-Transit portions.\n "
1201
+ "Magnitude of star will not be calculated.\n "
1202
+ "EXOTIC will continue to produce a lightcurve.\n " , warn = True )
1203
+ return None
1204
+
1199
1205
vsp_label = [key for key , value in vsp_comp_stars .items () if value ['xy' ] == comp_xy ][0 ]
1200
1206
curr = OOT [0 ]
1201
1207
idxs = []
@@ -1846,7 +1852,7 @@ def main():
1846
1852
log_info (f"\n Checking for variability in Comparison Star #{ compn + 1 } :"
1847
1853
f"\n \t Pixel X: { comp [0 ]} Pixel Y: { comp [1 ]} " )
1848
1854
if variableStarCheck (ra_file [int (comp [1 ])][int (comp [0 ])], dec_file [int (comp [1 ])][int (comp [0 ])]):
1849
- log_info ("\n Current comparison star is variable, proceeding to next star." )
1855
+ log_info ("\n Current comparison star is variable, proceeding to next star." , warn = True )
1850
1856
exotic_infoDict ['comp_stars' ].remove (comp )
1851
1857
1852
1858
if exotic_infoDict ['aavso_comp' ] == 'y' :
@@ -2203,10 +2209,10 @@ def main():
2203
2209
if "BJD_TDB" in image_header or "BJD" in image_header or "BJD_TBD" in image_header :
2204
2210
goodTimes = nonBJDTimes
2205
2211
2206
- index_list = np . intersect1d (times , nonBJDTimes )
2212
+ index_list = [ i for i , time_ in enumerate (times ) if time_ in nonBJDTimes ]
2207
2213
good_jd_times = [jd_times [i ] for i in index_list ]
2208
2214
for key , val in ref_flux_dict .items ():
2209
- index_list = np . intersect1d (times , ref_flux_dict [key ]['myfit' ].time )
2215
+ index_list = [ i for i , time_ in enumerate (times ) if time_ in ref_flux_dict [key ]['myfit' ].time ]
2210
2216
ref_flux_dict [key ]['time' ] = [jd_times [i ] for i in index_list ]
2211
2217
2212
2218
# If not in there, then convert all the final times into BJD - using astropy alone
0 commit comments