Skip to content

Commit

Permalink
remove old_div() from ipmag.unsquish() and ipmag.fisher_angular_devia…
Browse files Browse the repository at this point in the history
…tion(), #600
  • Loading branch information
Swanson-Hysell committed Feb 28, 2021
1 parent 06c24c4 commit 46fe979
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pmagpy/ipmag.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,11 @@ def fisher_angular_deviation(dec=None, inc=None, di_block=None, confidence=95):
else:
mean = pmag.fisher_mean(di_block)
if confidence == 50:
theta = old_div(67.5, np.sqrt(mean['k']))
theta = 67.5/np.sqrt(mean['k'])
if confidence == 63:
theta = old_div(81, np.sqrt(mean['k']))
theta = 81.0/np.sqrt(mean['k'])
if confidence == 95:
theta = old_div(140, np.sqrt(mean['k']))
theta = 140.0/np.sqrt(mean['k'])
return theta


Expand Down Expand Up @@ -529,14 +529,14 @@ def unsquish(incs, f):
incs_unsquished = []
for n in range(0, length):
inc_rad = np.deg2rad(incs[n]) # convert to radians
inc_new_rad = (old_div(1., f)) * np.tan(inc_rad)
inc_new_rad = (1.0/f) * np.tan(inc_rad)
# convert back to degrees
inc_new = np.rad2deg(np.arctan(inc_new_rad))
incs_unsquished.append(inc_new)
return incs_unsquished
except:
inc_rad = np.deg2rad(incs) # convert to radians
inc_new_rad = (old_div(1., f)) * np.tan(inc_rad)
inc_new_rad = (1.0/f) * np.tan(inc_rad)
inc_new = np.rad2deg(np.arctan(inc_new_rad)) # convert back to degrees
return inc_new

Expand Down

0 comments on commit 46fe979

Please sign in to comment.