Skip to content

Commit

Permalink
expose adopt_period_at_max_power through ephem API (spacetelescope#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry authored Nov 27, 2023
1 parent 989e282 commit e3e666b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lcviz/plugins/ephemeris/ephemeris.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def user_api(self):
'update_ephemeris', 'create_phase_viewer',
'add_component', 'remove_component', 'rename_component',
'times_to_phases', 'phases_to_times', 'get_data',
'dataset', 'method']
'dataset', 'method', 'period_at_max_power', 'adopt_period_at_max_power']
return PluginUserApi(self, expose=expose)

def _phase_comp_lbl(self, component):
Expand Down Expand Up @@ -503,9 +503,12 @@ def _update_periodogram(self, *args):
self.period_at_max_power = per.period_at_max_power.value
self.method_spinner = False

def vue_adopt_period_at_max_power(self, *args):
def adopt_period_at_max_power(self):
self.period = self.period_at_max_power

def vue_adopt_period_at_max_power(self, *args):
self.adopt_period_at_max_power()

def get_data(self, dataset, ephem_component=None):
# TODO: support subset_to_apply and then include a wrapper at the helper-level?
# (would need to catch when cls does not result in a lightkurve object or write
Expand Down

0 comments on commit e3e666b

Please sign in to comment.