From 500867cf706b1866b2003ecf1e3e79960119aeca Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Mon, 27 Nov 2023 13:02:54 -0500 Subject: [PATCH] expose adopt_period_at_max_power through ephem API (#64) --- lcviz/plugins/ephemeris/ephemeris.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lcviz/plugins/ephemeris/ephemeris.py b/lcviz/plugins/ephemeris/ephemeris.py index b4064f18..a96259ab 100644 --- a/lcviz/plugins/ephemeris/ephemeris.py +++ b/lcviz/plugins/ephemeris/ephemeris.py @@ -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): @@ -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