Skip to content

Commit 9b5728d

Browse files
committed
debug verbose: simple test runs working
1 parent 117c956 commit 9b5728d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

transitleastsquares/main.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,12 @@ class transitleastsquares(object):
4646

4747
def __init__(self, t, y, dy=None, verbose=True):
4848
self.t, self.y, self.dy = validate_inputs(t, y, dy)
49+
self.verbose = verbose
4950

5051
def power(self, **kwargs):
5152
"""Compute the periodogram for a set of user-defined parameters"""
5253

53-
if verbose:
54+
if self.verbose:
5455
print(tls_constants.TLS_VERSION)
5556
self, kwargs = validate_args(self, kwargs)
5657

@@ -82,10 +83,10 @@ def power(self, **kwargs):
8283
w=self.w,
8384
u=self.u,
8485
limb_dark=self.limb_dark,
85-
verbose=verbose
86+
verbose=self.verbose
8687
)
8788

88-
if verbose:
89+
if self.verbose:
8990
print(
9091
"Searching "
9192
+ str(len(self.y))
@@ -104,7 +105,7 @@ def power(self, **kwargs):
104105
self.use_threads = 1
105106
warnings.warn("This TLS version supports no multithreading on Python 2")
106107

107-
if verbose:
108+
if self.verbose:
108109
if self.use_threads == multiprocessing.cpu_count():
109110
print("Using all " + str(self.use_threads) + " CPU threads")
110111
else:

transitleastsquares/transit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def fractional_transit(
9696

9797

9898
def get_cache(durations, maxwidth_in_samples, per, rp, a, inc, ecc, w, u,
99-
limb_dark, verobse=True):
99+
limb_dark, verbose=True):
100100
"""Fetches (size(durations)*size(depths)) light curves of length
101101
maxwidth_in_samples and returns these LCs in a 2D array, together with
102102
their metadata in a separate array."""

0 commit comments

Comments
 (0)