exovetter 0.0.6__py3-none-any.whl → 0.0.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
exovetter/utils.py CHANGED
@@ -2,12 +2,19 @@
2
2
 
3
3
  import sys
4
4
  import warnings
5
-
5
+ from exovetter import lightkurve_utils
6
+ from exovetter import utils
7
+ from exovetter import const as exo_const
8
+ import astropy.units as u
9
+ from exovetter import vetters as vet
10
+ from matplotlib.backends.backend_pdf import PdfPages
11
+ import matplotlib.pyplot as plt
6
12
  import numpy as np
13
+ import os
7
14
 
8
15
  __all__ = ['sine', 'estimate_scatter', 'mark_transit_cadences', 'median_detrend',
9
16
  'plateau', 'set_median_flux_to_zero', 'set_median_flux_to_one', 'sigmaClip',
10
- 'get_mast_tce', 'WqedLSF', 'compute_phases', 'first_epoch']
17
+ 'get_mast_tce', 'WqedLSF', 'compute_phases', 'first_epoch', 'run_all']
11
18
 
12
19
  def sine(x, order, period=1):
13
20
  """Sine function for SWEET vetter."""
@@ -653,3 +660,164 @@ def first_epoch(epoch, period, lc):
653
660
  first_epoch = epoch + N*period
654
661
 
655
662
  return first_epoch
663
+
664
+ def run_all(tce, lc, tpf=None, vetters=None, remove_metrics=None, plot=False, plot_dir=None):
665
+ """Run a set of vetters on a tce and lc, returning a dictionary of all metrics collected
666
+
667
+ Parameters
668
+ ----------
669
+ tce : tce object
670
+ tce object is a dictionary that contains information about the tce
671
+ to vet, like period, epoch, duration, depth
672
+
673
+ lc : lightkurve object
674
+ lightkurve object with the time and flux to use for vetting.
675
+
676
+ tpf : obj
677
+ ``lightkurve`` target pixel file object with pixels in column lc_name
678
+
679
+ vetters : list
680
+ list of vetter objects to run on, ie [vet.ModShift(), vet.OddEven(dur_frac=0.75)]
681
+ Defaults to all vetters
682
+
683
+ remove_metrics : list
684
+ metrics to not store, defaults to removing plotting values
685
+
686
+ plot : bool
687
+ Option to return a pdf of the vetting diagnostic plots, defaults to False
688
+
689
+ plot_dir : str
690
+ Path to store diagnostic pdfs in, defaults to current working directory
691
+
692
+ Returns
693
+ -------
694
+ results_dict : dictionary
695
+ Dictionary of the kept vetting metrics
696
+ """
697
+
698
+ # Set initial parameters
699
+ if not vetters:
700
+ vetters = [vet.VizTransits(), vet.ModShift(), vet.Lpp(), vet.OddEven(), vet.TransitPhaseCoverage(), vet.Sweet(), vet.LeoTransitEvents(), vet.Centroid()]
701
+
702
+ if not remove_metrics:
703
+ remove_metrics = ['plot_data']
704
+
705
+ if not plot_dir:
706
+ plot_dir = os.getcwd()+'/'
707
+
708
+ if not tpf:
709
+ if any(vetter.__class__.__name__ == 'Centroid' for vetter in vetters):
710
+ raise Exception("TPF file required while running centroid")
711
+
712
+ # Run all listed vetters
713
+ results_list = []
714
+
715
+ if not plot:
716
+ for vetter in vetters:
717
+ if vetter.__class__.__name__ != 'Centroid':
718
+ vetter_results = vetter.run(tce, lc, plot=False) # dictionary returned from each vetter
719
+ results_list.append(vetter_results)
720
+ else:
721
+ vetter_results = vetter.run(tce, tpf, plot=False) # centroid uses tpf rather than lc
722
+ results_list.append(vetter_results)
723
+
724
+ else:
725
+ plot_name = lc.LABEL
726
+
727
+ diagnostic_plot = PdfPages(plot_dir+plot_name+'.pdf') # initialize a pdf to save each figure into
728
+ plot_figures = []
729
+
730
+ # Manually run viz transits with an extra mark cadences plot
731
+ cadences_plot = mark_cadences_plot(lc, tce)
732
+ diagnostic_plot.savefig(cadences_plot)
733
+
734
+ for vetter in vetters:
735
+ if vetter.__class__.__name__ not in ['VizTransits', 'Centroid', 'LeoTransitEvents']: # viz_transits and Centroid generate more than one figures so handle later
736
+ vetter_results = vetter.run(tce, lc, plot=True) # dictionary returned from each vetter
737
+ plot_figures.append(plt.gcf())
738
+ plt.close() # Make them not show up if running in a notebook
739
+ results_list.append(vetter_results)
740
+
741
+ if vetter.__class__.__name__ == 'Centroid': # centroid produces 2 plots, the second of which is the most useful so just collect that one
742
+ vetter_results = vet.Centroid(lc_name=vetter.lc_name, diff_plots=False, centroid_plots=True).run(tce, tpf)
743
+ plot_figures.append(plt.gcf())
744
+ plt.close()
745
+ results_list.append(vetter_results)
746
+
747
+ # run viz_transits plots
748
+ transit = vet.VizTransits(transit_plot=True, folded_plot=False).run(tce, lc)
749
+ transit_plot = plt.gcf()
750
+ transit_plot.suptitle(plot_name+' Transits')
751
+ transit_plot.tight_layout()
752
+ plt.close()
753
+ diagnostic_plot.savefig(transit_plot)
754
+
755
+ folded = vet.VizTransits(transit_plot=False, folded_plot=True).run(tce, lc)
756
+ folded_plot = plt.gcf()
757
+ folded_plot.suptitle(plot_name+' Folded Transits')
758
+ folded_plot.tight_layout()
759
+ plt.close()
760
+ diagnostic_plot.savefig(folded_plot)
761
+
762
+ # Save each diagnostic plot stored in plot_figures to diagnostic_plot pdf file
763
+ for plot in plot_figures:
764
+ diagnostic_plot.savefig(plot)
765
+
766
+ diagnostic_plot.close()
767
+
768
+ # Convert to a single dictionary output
769
+ results_dict = {k: v for d in results_list for k, v in d.items()} # Combine all dictionaries returned from vetters
770
+
771
+ # delete specified metrics
772
+ for key in remove_metrics:
773
+ if results_dict.get(key):
774
+ del results_dict[key]
775
+
776
+ return results_dict
777
+
778
+
779
+ def mark_cadences_plot(lc, tce):
780
+ """return figure object of the lightcurve with epochs oeverplotted"""
781
+
782
+ fig, ax1 = plt.subplots(nrows=1, ncols=1, figsize=(9,5))
783
+
784
+ # Get lightcurve data
785
+ time, flux, time_offset_str = lightkurve_utils.unpack_lk_version(lc, "flux") # noqa: E50
786
+ time_offset_q = getattr(exo_const, time_offset_str)
787
+ epoch = tce.get_epoch(time_offset_q).to_value(u.day)
788
+
789
+ # Get points of lightcurve found to be in transit
790
+ period = tce["period"].to_value(u.day)
791
+ dur = tce["duration"].to_value(u.day)
792
+ intransit = mark_transit_cadences(time, period, epoch, dur)
793
+
794
+ # Plot epoch
795
+ ax1.axvline(x=epoch, lw='0.6', color='r', label='epoch', alpha=0.5)
796
+
797
+ # Plot transit train
798
+ ax1.plot(time, flux, lw=0.72, alpha=0.9)
799
+ ax1.scatter(time, flux, color='k', s=3, label='cadences', alpha=0.5)
800
+
801
+ # TODO This only plots forward in time from the epoch, works fine assuming tce epoch is first in light curve but not robust
802
+ transit_epochs = epoch-dur/2
803
+ while transit_epochs <= time[-1]:
804
+ ax1.axvline(x=transit_epochs, lw='0.6', color='r', alpha=0.3, ls='--')
805
+ transit_epochs = transit_epochs+dur
806
+ ax1.axvline(x=transit_epochs, lw='0.6', color='r', alpha=0.3, ls='--')
807
+ transit_epochs = transit_epochs-dur + period
808
+
809
+ # Plot cadences in transit
810
+ ax1.scatter(time[intransit], flux[intransit], color='r', s=4, label='cadences in transit');
811
+
812
+ # Plotting params
813
+ ax1.set_ylabel('Flux')
814
+ ax1.set_xlabel('Time '+time_offset_str)
815
+ ax1.set_title(lc.label+' period='+'{0:.2f}'.format(period)+'d, dur='+'{0:.2f}'.format(dur)+'d')
816
+ ax1.legend();
817
+
818
+ cadences_plot = plt.gcf()
819
+ plt.close()
820
+
821
+ return cadences_plot
822
+
823
+
exovetter/version.py CHANGED
@@ -5,4 +5,4 @@ try:
5
5
  from setuptools_scm import get_version
6
6
  version = get_version(root='..', relative_to=__file__)
7
7
  except Exception:
8
- version = '0.0.6'
8
+ version = '0.0.7'
exovetter/vetters.py CHANGED
@@ -6,10 +6,10 @@ from abc import ABC, abstractmethod
6
6
  import astropy.units as u
7
7
  import numpy as np
8
8
  import pandas as pd
9
- import time as py_time
9
+ # import time as py_time
10
10
  import os
11
- import matplotlib.pyplot as plt
12
- from matplotlib.backends.backend_pdf import PdfPages
11
+ # import matplotlib.pyplot as plt
12
+ # from matplotlib.backends.backend_pdf import PdfPages
13
13
 
14
14
  from exovetter.centroid import centroid as cent
15
15
  from exovetter import transit_coverage
@@ -26,7 +26,7 @@ from exovetter import leo
26
26
 
27
27
  __all__ = ['BaseVetter', 'ModShift', 'Lpp', 'OddEven',
28
28
  'TransitPhaseCoverage', 'Sweet', 'Centroid',
29
- 'VizTransits', 'LeoTransitEvents', 'run_all']
29
+ 'VizTransits', 'LeoTransitEvents']
30
30
 
31
31
  class BaseVetter(ABC):
32
32
  """Base class for vetters.
@@ -585,13 +585,19 @@ class Sweet(BaseVetter):
585
585
  class Centroid(BaseVetter):
586
586
  """Class to handle centroid vetting"""
587
587
 
588
- def __init__(self, lc_name="flux"):
588
+ def __init__(self, lc_name="flux", diff_plots=False, centroid_plots=False):
589
589
  """
590
590
  Parameters
591
591
  ----------
592
592
  lc_name : str
593
593
  Name of the flux array in the ``lightkurve`` object.
594
594
 
595
+ diff_plots : bool
596
+ Show centroid difference plots
597
+
598
+ centroid_plots : bool
599
+ Show centroid summary plot
600
+
595
601
  Attributes
596
602
  ----------
597
603
  tce : tce object
@@ -608,6 +614,8 @@ class Centroid(BaseVetter):
608
614
  self.tce = None
609
615
  self.tpf = None
610
616
  self.metrics = None
617
+ self.diff_plots = diff_plots
618
+ self.centroid_plots = centroid_plots
611
619
 
612
620
  def run(self, tce, lk_tpf, plot=False, remove_transits=None):
613
621
  """Runs cent.compute_diff_image_centroids and cent.measure_centroid_shift
@@ -642,6 +650,10 @@ class Centroid(BaseVetter):
642
650
  self.tce = tce
643
651
  self.tpf = lk_tpf
644
652
 
653
+ if plot:
654
+ self.diff_plots = True
655
+ self.centroid_plots = True
656
+
645
657
  time, cube, time_offset_str = lightkurve_utils.unpack_tpf(
646
658
  self.tpf, self.lc_name
647
659
  ) # noqa: E50
@@ -656,9 +668,9 @@ class Centroid(BaseVetter):
656
668
 
657
669
  centroids, figs, kept_transits = cent.compute_diff_image_centroids(
658
670
  time, cube, period_days, epoch, duration_days,
659
- remove_transits, plot=plot)
671
+ remove_transits, plot=self.diff_plots)
660
672
 
661
- offset, signif, fig = cent.measure_centroid_shift(centroids, kept_transits, plot)
673
+ offset, signif, fig = cent.measure_centroid_shift(centroids, kept_transits, self.centroid_plots)
662
674
  figs.append(fig)
663
675
 
664
676
  # TODO: If plot=True, figs is a list of figure handles.
@@ -901,16 +913,14 @@ class LeoTransitEvents(BaseVetter):
901
913
  def plot(self):
902
914
  pass
903
915
 
904
- def run_all(tces, lcs, vetters=[VizTransits(), ModShift(), Lpp(), OddEven(), TransitPhaseCoverage(), Sweet(), LeoTransitEvents()], plot=False, verbose=False, plot_dir=None):
905
- # TODO Add centroid, maybe rething plotting in general since plotting uses vetter.plot which essentially doubles runtime,
906
- # probably should run initially with vet.run(plot=True) and not store them unless run_all plot=True
907
- """Runs vetters and packs results into a dataframe.
916
+ def run_all(tce, lc, vetters=[VizTransits(), ModShift(), Lpp(), OddEven(), TransitPhaseCoverage(), Sweet(), LeoTransitEvents()], remove_metrics = ['plot_data'], plot=False, plot_dir='', plot_name=None ,verbose=False):
917
+ """Runs vetters on a tce and lc and packs results into a dictionary.
908
918
 
909
919
  Parameters
910
920
  ----------
911
- tces: list of tce objects to vet on
921
+ tces: tce object to vet on
912
922
 
913
- lc: list of lightkurve objects to vet on
923
+ lc: lightkurve object to vet on
914
924
 
915
925
  vetters : list
916
926
  List of vetter classes to run
@@ -918,126 +928,180 @@ def run_all(tces, lcs, vetters=[VizTransits(), ModShift(), Lpp(), OddEven(), Tra
918
928
  plot : bool
919
929
  Toggle diagnostic plots
920
930
 
921
- plot_dir : str
922
- path to store plots in, defaults to current working directory
923
-
924
931
  verbose : bool
925
932
  Toggle timing info and other print statements
926
933
 
927
934
  Returns
928
935
  ------------
929
- results : dataframe
930
- Pandas dataframe of all the numerical results from the vetters
936
+ results : dictionary
937
+ Dictionary of all the numerical results from the vetters
931
938
 
932
939
  """
933
940
 
934
- results_dicts = [] # initialize a list to pack results from each tce into
935
- tce_names = []
936
- run_start = py_time.time()
941
+ results = run_vetters.run_all(tce, lc, vetters, remove_metrics, plot, plot_dir, plot_name, verbose)
942
+
943
+ return results
944
+
945
+ # results_list = []
946
+
947
+ # if plot == False:
948
+ # for vetter in vetters:
949
+ # vetter_results = vetter.run(tce, lc, plot=False) # dictionary returned from each vetter
950
+ # results_list.append(vetter_results)
951
+
952
+ # else:
953
+ #
954
+ # if plot_name is None:
955
+ # plot_name = tce['target']
956
+ # diagnostic_plot = PdfPages(plot_dir+plot_name+'.pdf') # initialize a pdf to save each figure into
957
+ # plot_figures = []
958
+
959
+ # for vetter in vetters:
960
+ # vetter_results = vetter.run(tce, lc, plot=True)
961
+ # plot_figures.append(plt.gcf())
962
+ # plt.close()
963
+ # results_list.append(vetter_results)
964
+
965
+ # # Save each diagnostic plot ran on that tce/lc
966
+ # for plot in plot_figures:
967
+ # diagnostic_plot.savefig(plot)
968
+
969
+ # diagnostic_plot.close()
970
+
971
+ # results_dict = {k: v for d in results_list for k, v in d.items()}
972
+
973
+ # # delete dictionary entries that are huge arrays to save space
974
+ # for key in remove_metrics:
975
+ # if results_dict.get(key):
976
+ # del results_dict[key]
977
+
978
+ # return results_dict
979
+
980
+ # OLDER CODE
981
+ # if plot:
982
+ # if vetter.__class__.__name__ != 'VizTransits' and vetter.__class__.__name__ != 'LeoTransitEvents':
983
+ # # viz_transits generates 2 figures so it's handled later, LeoTransitEvents just doesn't have a plot
984
+ # vetter.plot()
985
+ # vetter_plot = plt.gcf()
986
+ # vetter_plot.suptitle(tce['target']+' '+vetter.__class__.__name__)
987
+ # vetter_plot.tight_layout()
988
+ # plt.close()
989
+ # plot_figures.append(vetter_plot)
990
+
991
+ # if verbose:
992
+ # time_end = py_time.time()
993
+ # print(vetter.__class__.__name__, 'finished in', time_end - time_start, 's.')
994
+
995
+ # results_list.append(vetter_results)
996
+
997
+
998
+ # results_dicts = [] # initialize a list to pack results from each tce into
999
+ # tce_names = []
1000
+ # run_start = py_time.time()
937
1001
 
938
- if plot_dir is None:
939
- plot_dir = os.getcwd()
1002
+ # if plot_dir is None:
1003
+ # plot_dir = os.getcwd()
940
1004
 
941
- if plot or verbose:
942
- for tce in tces:
943
- if 'target' not in tce.keys():
944
- print("ERROR: Please supply a 'target' key to all input tces to use the plot or verbose parameters")
945
- return
946
-
947
- for tce, lc in zip(tces, lcs):
948
- if verbose:
949
- print('Vetting', tce['target'], ':')
950
-
951
- tce_names.append(tce['target'])
952
- results_list = [] # initialize a list to pack result dictionaries into
1005
+ # if plot or verbose:
1006
+ # for tce in tces:
1007
+ # if 'target' not in tce.keys():
1008
+ # print("ERROR: Please supply a 'target' key to all input tces to use the plot or verbose parameters")
1009
+ # return
1010
+
1011
+ # for tce, lc in zip(tces, lcs):
1012
+ # if verbose:
1013
+ # print('Vetting', tce['target'], ':')
1014
+
1015
+ # tce_names.append(tce['target'])
1016
+ # results_list = [] # initialize a list to pack result dictionaries into
953
1017
 
954
- # run each vetter, if plotting is true fill the figures into a list to save later
955
- plot_figures = []
956
- for vetter in vetters:
957
- time_start = py_time.time()
958
- vetter_results = vetter.run(tce, lc)
1018
+ # # run each vetter, if plotting is true fill the figures into a list to save later
1019
+ # plot_figures = []
1020
+ # for vetter in vetters:
1021
+ # time_start = py_time.time()
1022
+ # vetter_results = vetter.run(tce, lc)
959
1023
 
960
- if plot:
961
- if vetter.__class__.__name__ != 'VizTransits' and vetter.__class__.__name__ != 'LeoTransitEvents':
962
- # viz_transits generates 2 figures so it's handled later, LeoTransitEvents just doesn't have a plot
963
- vetter.plot()
964
- vetter_plot = plt.gcf()
965
- vetter_plot.suptitle(tce['target']+' '+vetter.__class__.__name__)
966
- vetter_plot.tight_layout()
967
- plt.close()
968
- plot_figures.append(vetter_plot)
969
-
970
- if verbose:
971
- time_end = py_time.time()
972
- print(vetter.__class__.__name__, 'finished in', time_end - time_start, 's.')
1024
+ # if plot:
1025
+ # if vetter.__class__.__name__ != 'VizTransits' and vetter.__class__.__name__ != 'LeoTransitEvents':
1026
+ # # viz_transits generates 2 figures so it's handled later, LeoTransitEvents just doesn't have a plot
1027
+ # vetter.plot()
1028
+ # vetter_plot = plt.gcf()
1029
+ # vetter_plot.suptitle(tce['target']+' '+vetter.__class__.__name__)
1030
+ # vetter_plot.tight_layout()
1031
+ # plt.close()
1032
+ # plot_figures.append(vetter_plot)
1033
+
1034
+ # if verbose:
1035
+ # time_end = py_time.time()
1036
+ # print(vetter.__class__.__name__, 'finished in', time_end - time_start, 's.')
973
1037
 
974
- results_list.append(vetter_results)
1038
+ # results_list.append(vetter_results)
975
1039
 
976
- if verbose: # add some whitespace for readability
977
- print()
978
-
979
- if plot: # save a pdf of each figure made for that vetter
980
- diagnostic_plot = PdfPages(plot_dir+tce['target']+'.pdf') # initialize a pdf to save each figure into
981
-
982
- # plot the lightcurve with epochs oeverplotted
983
- time, flux, time_offset_str = lightkurve_utils.unpack_lk_version(lc, "flux") # noqa: E50
984
- period = tce["period"].to_value(u.day)
985
- dur = tce["duration"].to_value(u.day)
986
-
987
- time_offset_q = getattr(exo_const, time_offset_str)
988
- epoch = tce.get_epoch(time_offset_q).to_value(u.day)
989
- intransit = utils.mark_transit_cadences(time, period, epoch, dur, num_durations=3, flags=None)
990
-
991
- fig, ax1 = plt.subplots(nrows=1, ncols=1, figsize=(9,5))
992
- ax1.plot(time, flux, lw=0.4);
993
- ax1.axvline(x=epoch, lw='0.6', color='r', label='epoch');
994
- ax1.fill_between(time, 0,1, where=intransit, transform=ax1.get_xaxis_transform(), color='r', alpha=0.15, label='in transit')
995
-
996
- ax1.set_ylabel('Flux')
997
- ax1.set_xlabel('Time '+time_offset_str)
998
- if 'target' in tce:
999
- ax1.set_title(tce['target']);
1000
-
1001
- ax1.legend();
1002
- lightcurve_plot = plt.gcf()
1003
- plt.close()
1004
- diagnostic_plot.savefig(lightcurve_plot)
1005
-
1006
- # run viz_transits plots
1007
- transit = VizTransits(transit_plot=True, folded_plot=False).run(tce, lc)
1008
- transit_plot = plt.gcf()
1009
- transit_plot.suptitle(tce['target']+' Transits')
1010
- transit_plot.tight_layout()
1011
- plt.close()
1012
- diagnostic_plot.savefig(transit_plot)
1013
-
1014
- folded = VizTransits(transit_plot=False, folded_plot=True).run(tce, lc)
1015
- folded_plot = plt.gcf()
1016
- folded_plot.suptitle(tce['target']+' Folded Transits')
1017
- folded_plot.tight_layout()
1018
- plt.close()
1019
- diagnostic_plot.savefig(folded_plot)
1020
-
1021
- # Save each diagnostic plot ran on that tce/lc
1022
- for plot in plot_figures:
1023
- diagnostic_plot.savefig(plot)
1024
-
1025
- diagnostic_plot.close()
1040
+ # if verbose: # add some whitespace for readability
1041
+ # print()
1042
+
1043
+ # if plot: # save a pdf of each figure made for that vetter
1044
+ # diagnostic_plot = PdfPages(plot_dir+tce['target']+'.pdf') # initialize a pdf to save each figure into
1045
+
1046
+ # # plot the lightcurve with epochs oeverplotted
1047
+ # time, flux, time_offset_str = lightkurve_utils.unpack_lk_version(lc, "flux") # noqa: E50
1048
+ # period = tce["period"].to_value(u.day)
1049
+ # dur = tce["duration"].to_value(u.day)
1050
+
1051
+ # time_offset_q = getattr(exo_const, time_offset_str)
1052
+ # epoch = tce.get_epoch(time_offset_q).to_value(u.day)
1053
+ # intransit = utils.mark_transit_cadences(time, period, epoch, dur, num_durations=3, flags=None)
1054
+
1055
+ # fig, ax1 = plt.subplots(nrows=1, ncols=1, figsize=(9,5))
1056
+ # ax1.plot(time, flux, lw=0.4);
1057
+ # ax1.axvline(x=epoch, lw='0.6', color='r', label='epoch');
1058
+ # ax1.fill_between(time, 0,1, where=intransit, transform=ax1.get_xaxis_transform(), color='r', alpha=0.15, label='in transit')
1059
+
1060
+ # ax1.set_ylabel('Flux')
1061
+ # ax1.set_xlabel('Time '+time_offset_str)
1062
+ # if 'target' in tce:
1063
+ # ax1.set_title(tce['target']);
1064
+
1065
+ # ax1.legend();
1066
+ # lightcurve_plot = plt.gcf()
1067
+ # plt.close()
1068
+ # diagnostic_plot.savefig(lightcurve_plot)
1069
+
1070
+ # # run viz_transits plots
1071
+ # transit = VizTransits(transit_plot=True, folded_plot=False).run(tce, lc)
1072
+ # transit_plot = plt.gcf()
1073
+ # transit_plot.suptitle(tce['target']+' Transits')
1074
+ # transit_plot.tight_layout()
1075
+ # plt.close()
1076
+ # diagnostic_plot.savefig(transit_plot)
1077
+
1078
+ # folded = VizTransits(transit_plot=False, folded_plot=True).run(tce, lc)
1079
+ # folded_plot = plt.gcf()
1080
+ # folded_plot.suptitle(tce['target']+' Folded Transits')
1081
+ # folded_plot.tight_layout()
1082
+ # plt.close()
1083
+ # diagnostic_plot.savefig(folded_plot)
1084
+
1085
+ # # Save each diagnostic plot ran on that tce/lc
1086
+ # for plot in plot_figures:
1087
+ # diagnostic_plot.savefig(plot)
1088
+
1089
+ # diagnostic_plot.close()
1026
1090
 
1027
- # put all values from each results dictionary into a single dictionary
1028
- results_dict = {k: v for d in results_list for k, v in d.items()}
1091
+ # # put all values from each results dictionary into a single dictionary
1092
+ # results_dict = {k: v for d in results_list for k, v in d.items()}
1029
1093
 
1030
- # delete dictionary entries that are huge arrays to save space
1031
- if results_dict.get('plot_data'):
1032
- del results_dict['plot_data']
1094
+ # # delete dictionary entries that are huge arrays to save space
1095
+ # if results_dict.get('plot_data'):
1096
+ # del results_dict['plot_data']
1033
1097
 
1034
- # add the dictionary to the final list
1035
- results_dicts.append(results_dict)
1098
+ # # add the dictionary to the final list
1099
+ # results_dicts.append(results_dict)
1036
1100
 
1037
- results_df = pd.DataFrame(results_dicts) # Put the values from each result dictionary into a dataframe
1101
+ # results_df = pd.DataFrame(results_dicts) # Put the values from each result dictionary into a dataframe
1038
1102
 
1039
- results_df.insert(loc=0, column='tce', value=tce_names)
1040
- if verbose:
1041
- print('Execution time:', (py_time.time() - run_start), 's')
1103
+ # results_df.insert(loc=0, column='tce', value=tce_names)
1104
+ # if verbose:
1105
+ # print('Execution time:', (py_time.time() - run_start), 's')
1042
1106
 
1043
- return results_df
1107
+ # return results_df
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: exovetter
3
- Version: 0.0.6
3
+ Version: 0.0.7
4
4
  Summary: Exoplanet vetting package
5
5
  Home-page: https://github.com/spacetelescope/exovetter
6
6
  Author: Susan Mullally et al.
@@ -9,9 +9,9 @@ exovetter/sweet.py,sha256=prbuteEaahFWhAoCtQCVP47SbA6h4pYJn1Wn9JkEalc,3066
9
9
  exovetter/tce.py,sha256=5JFKkbKoKCtdhm5EuW6FMAvp0LiaHLuqpFUbY0joyLI,7302
10
10
  exovetter/transit_coverage.py,sha256=Wix6TaQmEgRxlEZKB6WF3OFQVXqtJN1tBkltFaMDrHM,2194
11
11
  exovetter/trapezoid_fit.py,sha256=Dok-H0zRsfigh4zfVO4R6Wi2TgK6hQXh4EIIYGouxiQ,31097
12
- exovetter/utils.py,sha256=4HNRJkzgHI9XlRYvPSLZqJIQMG8ihX0UujSSTpiRTvU,18430
13
- exovetter/version.py,sha256=EnOl1cJ7hjy3aYox8oAzHbnkOWXlNbTHGaVr_NVNfR0,337
14
- exovetter/vetters.py,sha256=MRQjRR-PDXuPfGk5Z0DuW4muOpTsp6ygp47lGpnChZ8,35132
12
+ exovetter/utils.py,sha256=1K34N6sQ7iomf4oFHyqGubcDhNwTa2lF_uKEOGJGrCk,24909
13
+ exovetter/version.py,sha256=Es0ObF1J9qSSraJcBVdj4CHe2laI8JXK6MYDVl2LypM,337
14
+ exovetter/vetters.py,sha256=ONNZM3qhVRd_s6By-wR7VBuas8tyo_TwtrpiS2x4_XE,37423
15
15
  exovetter/viz_transits.py,sha256=FUc8DEedaQQ8YDoeVvR1QyGPmh2oPGmVg27W3WrVguQ,5648
16
16
  exovetter/centroid/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
17
17
  exovetter/centroid/centroid.py,sha256=LWqjn-Oerdw5j2wDCFYqB6omE4K9gckIwAA0-WZvgkY,8655
@@ -21,8 +21,8 @@ exovetter/centroid/fastpsffit.py,sha256=eRMxYUJ_4hsCxso4u1d1zQvFSJQlJ_gRzhNa2PXk
21
21
  exovetter/modshift/__init__.py,sha256=j5665q0RHVzbzdPBXv_jUozGB4sex8ANXtzB41EYzRQ,68
22
22
  exovetter/modshift/modshift.py,sha256=VEnj7ITvYRfqICyRiNeCZ9tqQ4d4fPOw8avB6TTbhIU,14773
23
23
  exovetter/modshift/plotmodshift.py,sha256=MMLkvxkOqBGIYGPN97_WtrHgTZsDzY_XRRNswhz5YQI,2452
24
- exovetter-0.0.6.dist-info/LICENSE.rst,sha256=uhiFz7eEG8WszLtRtYIT89FNMI3ijy1aACnvl5BOz2Y,1492
25
- exovetter-0.0.6.dist-info/METADATA,sha256=ionvGOGowwq37EvLogal4vsPZ46y5oKK4SxQOEvgTW0,3706
26
- exovetter-0.0.6.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
27
- exovetter-0.0.6.dist-info/top_level.txt,sha256=wh0_U5IPEspONX8zhGRaFUqfuovCGkgYjAmWuQe0w6Q,10
28
- exovetter-0.0.6.dist-info/RECORD,,
24
+ exovetter-0.0.7.dist-info/LICENSE.rst,sha256=uhiFz7eEG8WszLtRtYIT89FNMI3ijy1aACnvl5BOz2Y,1492
25
+ exovetter-0.0.7.dist-info/METADATA,sha256=nXJOHqH5ayjdJ7idVePETqwxsiD8RKpI0JQBUoZ0Epc,3706
26
+ exovetter-0.0.7.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
27
+ exovetter-0.0.7.dist-info/top_level.txt,sha256=wh0_U5IPEspONX8zhGRaFUqfuovCGkgYjAmWuQe0w6Q,10
28
+ exovetter-0.0.7.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: bdist_wheel (0.43.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5