Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove O D from compute nested fits. #108

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lppls/lppls.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ def fit(self, max_searches, minimizer="Nelder-Mead", obs=None):
# Increment search count on SVD convergence error, but raise all other exceptions.
try:
tc, m, w, a, b, c, c1, c2 = self.estimate_params(obs, seed, minimizer)
O = self.get_oscillations(w, tc, t1, t2)
D = self.get_damping(m, w, b, c)
return tc, m, w, a, b, c, c1, c2, O, D
# O = self.get_oscillations(w, tc, t1, t2)
# D = self.get_damping(m, w, b, c)
return tc, m, w, a, b, c, c1, c2, #O, D
except Exception as e:
# print(e)
search_count += 1
Expand Down Expand Up @@ -270,8 +270,8 @@ def compute_indicators(self, res, filter_conditions_config=None):
w = fits["w"]
b = fits["b"]
c = fits["c"]
O = fits["O"]
D = fits["D"]
# O = fits["O"]
# D = fits["D"]

# t_delta = t2 - t1
# pct_delta_min = t_delta * 0.5
Expand Down Expand Up @@ -485,7 +485,7 @@ def compute_nested_fits(
i_idx += 1
for j in range(0, window_delta, inner_increment):
obs_shrinking_slice = obs[:, j:window_size]
tc, m, w, a, b, c, c1, c2, O, D = self.fit(
tc, m, w, a, b, c, c1, c2 = self.fit(
max_searches, obs=obs_shrinking_slice
)
res[i_idx - 1].append([])
Expand Down
2 changes: 1 addition & 1 deletion lppls/tests/test_lppls.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def test_mp_compute_nested_fits(observations, lppls_model):
assert res[0]['t1'] == 0.0
assert res[0]['t2'] == 79.0
assert res[4]['t1'] == 20.0
expected_keys = {'tc_d', 'tc', 'm', 'w', 'a', 'b', 'c', 'c1', 'c2', 't1_d', 't2_d', 't1', 't2', 'O', 'D'}
expected_keys = {'tc', 'm', 'w', 'a', 'b', 'c', 'c1', 'c2', 't1', 't2'}
assert len(res[0]['res']) == 30
assert set(res[0]['res'][0]).issubset(expected_keys)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
long_description = fh.read()

setuptools.setup(name='lppls',
version='0.6.16',
version='0.6.17',
description='A Python module for fitting the LPPLS model to data.',
packages=['lppls'],
author='Josh Nielsen',
Expand Down
Loading