Skip to content

Commit f3b8067

Browse files
committed
verbosity edit
1 parent 9608a00 commit f3b8067

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

RHT_tools.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
import numpy as np
44
import math
55

6-
def get_thets(wlen, save = True):
6+
def get_thets(wlen, save = True, returnbins = False, verbose = False):
77
"""
88
Determine the values of theta for RHT output. These are determined by the window length (wlen)
99
by Equation 2 in Clark+ 2014.
1010
"""
1111

1212
ntheta = math.ceil((np.pi*np.sqrt(2)*((wlen-1)/2.0)))
13-
print('ntheta is {}'.format(ntheta))
13+
if verbose:
14+
print('ntheta is {}'.format(ntheta))
1415
dtheta = np.pi/ntheta
1516

1617
#Thetas for binning
@@ -23,7 +24,10 @@ def get_thets(wlen, save = True):
2324
if save == True:
2425
np.save('thets_w'+str(wlen)+'.npy', thets)
2526

26-
return thets
27+
if returnbins:
28+
return thets, thetbins
29+
else:
30+
return thets
2731

2832
def get_RHT_data(xyt_filename = "filename.fits"):
2933
"""

0 commit comments

Comments
 (0)