diff --git a/exotic/exotic.py b/exotic/exotic.py index e3fb9685..d01a4479 100644 --- a/exotic/exotic.py +++ b/exotic/exotic.py @@ -154,7 +154,7 @@ def log_info(string, warn=False, error=False): if error: print(f"\033[91m {string}\033[00m") elif warn: - print(f"\033[93m {string}\033[00m") + print(f"\033[33m {string}\033[00m") else: print(string) log.debug(string) @@ -1424,21 +1424,21 @@ def main(): if exotic_infoDict['darks']: darksImgList = [] for darkFile in exotic_infoDict['darks']: - darkData = fits.getdata(darkFile, ext=0) + darkData = fits.getdata(darkFile) darksImgList.append(darkData) generalDark = np.median(darksImgList, axis=0) if exotic_infoDict['biases']: biasesImgList = [] for biasFile in exotic_infoDict['biases']: - biasData = fits.getdata(biasFile, ext=0) + biasData = fits.getdata(biasFile) biasesImgList.append(biasData) generalBias = np.median(biasesImgList, axis=0) if exotic_infoDict['flats']: flatsImgList = [] for flatFile in exotic_infoDict['flats']: - flatData = fits.getdata(flatFile, ext=0) + flatData = fits.getdata(flatFile) flatsImgList.append(flatData) notNormFlat = np.median(flatsImgList, axis=0) @@ -1523,7 +1523,7 @@ def main(): # checks for MOBS data mobs_header = fits.getheader(filename=inputfiles[0], ext=0) if 'CREATOR' in mobs_header: - if "MicroObservatory" in mobs_header['CREATOR']: + if 'MicroObservatory' in mobs_header['CREATOR'] and 'MOBS' not in exotic_infoDict['second_obs'].upper(): if exotic_infoDict['second_obs'].upper() != "N/A": exotic_infoDict['second_obs'] += ",MOBS" else: @@ -1537,7 +1537,7 @@ def main(): # fit target in the first image and use it to determine aperture and annulus range inc = 0 for ifile in inputfiles: - first_image = fits.getdata(ifile, ext=0) + first_image = fits.getdata(ifile) try: get_first = fit_centroid(first_image, [exotic_UIprevTPX, exotic_UIprevTPY]) break @@ -1594,7 +1594,7 @@ def main(): psf_data[ckey] = np.zeros((len(inputfiles), 7)) aper_data[ckey] = np.zeros((len(inputfiles), len(apers), len(annuli))) aper_data[f"{ckey}_bg"] = np.zeros((len(inputfiles), len(apers), len(annuli))) - tar_comp_dist[ckey] = np.zeros(2, dtype=int) + tar_comp_dist[ckey] = np.zeros(2) # open files, calibrate, align, photometry for i, fileName in enumerate(inputfiles): @@ -1665,8 +1665,8 @@ def main(): psf_data[ckey][i] = fit_centroid(imageData, [cx, cy]) if i != 0: - if not (tar_comp_dist[ckey][0] - 1 <= abs(int(psf_data[ckey][j][0]) - int(psf_data['target'][i][0])) <= tar_comp_dist[ckey][0] + 1 and - tar_comp_dist[ckey][1] - 1 <= abs(int(psf_data[ckey][j][1]) - int(psf_data['target'][i][1])) <= tar_comp_dist[ckey][1] + 1) or \ + if not (tar_comp_dist[ckey][0] - 1 <= abs(int(psf_data[ckey][i][0]) - int(psf_data['target'][i][0])) <= tar_comp_dist[ckey][0] + 1 and + tar_comp_dist[ckey][1] - 1 <= abs(int(psf_data[ckey][i][1]) - int(psf_data['target'][i][1])) <= tar_comp_dist[ckey][1] + 1) or \ np.abs((psf_data[ckey][i][2] - psf_data[ckey][i - 1][2]) / psf_data[ckey][i - 1][2]) > 0.5: raise Exception else: @@ -2074,7 +2074,7 @@ def main(): else: log_info(f" Optimal Aperture: {abs(np.round(minAperture, 2))}") log_info(f" Optimal Annulus: {np.round(minAnnulus, 2)}") - log_info(f" Transit Duration [day]: {round_to_2(np.mean(durs))} +/- {round_to_2(np.std(durs))}") + log_info(f" Transit Duration [day]: {round_to_2(np.mean(durs), np.std(durs))} +/- {round_to_2(np.std(durs))}") log_info("*********************************************************") ########## diff --git a/exotic/plots.py b/exotic/plots.py index e147e177..d5358802 100644 --- a/exotic/plots.py +++ b/exotic/plots.py @@ -180,6 +180,7 @@ def plot_obs_stats(fit, comp_stars, psf, si, gi, target_name, save, date): def plot_final_lightcurve(fit, high_res, targ_name, save, date): f, (ax_lc, ax_res) = fit.plot_bestfit() + ax_lc.set_title(targ_name) ax_lc.plot(np.linspace(np.nanmin(fit.phase), np.nanmax(fit.phase), 1000), high_res, 'r', zorder=1000, lw=2) Path(save).mkdir(parents=True, exist_ok=True) diff --git a/exotic/version.py b/exotic/version.py index e4adfb83..f49459c7 100644 --- a/exotic/version.py +++ b/exotic/version.py @@ -1 +1 @@ -__version__ = "1.6.0" +__version__ = "1.6.1" diff --git a/requirements.txt b/requirements.txt index 87304915..5ba87285 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ astropy>=4.3 astroquery~=0.4 barycorrpy~=0.4 cython~=0.29.24 ; platform_system != "Windows" -dynesty~=1.0 ; platform_system == "Windows" +dynesty~=1.1 ; platform_system == "Windows" holoviews~=1.14 LDTk~=1.7 lmfit~=1.0 diff --git a/run_exotic_linux.sh b/run_exotic_linux.sh index 5b09a279..368c9ba0 100755 --- a/run_exotic_linux.sh +++ b/run_exotic_linux.sh @@ -125,4 +125,4 @@ ${pip_runner} install setuptools echo "INFO: Installing EXOTIC core. ..." ${pip_runner} install --upgrade exotic echo "INFO: Launching EXOTIC user interface. ..." -bash -l -c "exotic-gui" +bash -c "exotic-gui" diff --git a/run_exotic_mac.command b/run_exotic_mac.command index 3e82f7b2..4649cdb8 100755 --- a/run_exotic_mac.command +++ b/run_exotic_mac.command @@ -125,4 +125,4 @@ ${pip_runner} install setuptools echo "INFO: Installing EXOTIC core. ..." ${pip_runner} install --upgrade exotic echo "INFO: Launching EXOTIC user interface. ..." -bash -l -c "exotic-gui" +zsh -c "exotic-gui"