Skip to content

Commit

Permalink
fixed min specific alpha ejection functions
Browse files Browse the repository at this point in the history
  • Loading branch information
wrguenthner committed Apr 19, 2024
1 parent e32ebcb commit 513da54
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/pythermo/crystal.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ def get_rho_r_array(self):
return self.__rho_r_array

def zircon_alpha_ejection(self):
self.alpha_ejection(self.__radius,self.__nodes,self.__r_step,self.__U_ppm,self.__Th_ppm,self.__Sm_ppm,'zircon')
return self.alpha_ejection(self.__radius,self.__nodes,self.__r_step,self.__U_ppm,self.__Th_ppm,self.__Sm_ppm,'zircon')

def guenthner_damage(self):
"""
Expand Down Expand Up @@ -763,7 +763,7 @@ def get_rho_r_array(self):
return self.__rho_r_array

def apatite_alpha_ejection(self):
self.alpha_ejection(self.__radius,self.__nodes,self.__r_step,self.__U_ppm,self.__Th_ppm,self.__Sm_ppm,'apatite')
return self.alpha_ejection(self.__radius,self.__nodes,self.__r_step,self.__U_ppm,self.__Th_ppm,self.__Sm_ppm,'apatite')

def flowers_damage(self):
"""
Expand Down
8 changes: 4 additions & 4 deletions tests/test_crystal.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def test_ap_He_date(ap):
lambda_147_yr = 6.54*10**-12

total_He = ft_U238*(np.exp(lambda_238_yr*date_guess)-1)+ft_U235*(np.exp(lambda_235_yr*date_guess)-1)+ft_Th*(np.exp(lambda_232_yr*date_guess)-1)+ft_Sm*(np.exp(lambda_147_yr*date_guess)-1)
date = zirc.He_date(total_He)
date = zirc.He_date(total_He, corr_factors)

assert math.isclose(date,date_guess,rel_tol=.001)

Expand All @@ -151,14 +151,14 @@ def test_zirc_He_date(zirc):
lambda_147_yr = 6.54*10**-12

total_He = ft_U238*(np.exp(lambda_238_yr*date_guess)-1)+ft_U235*(np.exp(lambda_235_yr*date_guess)-1)+ft_Th*(np.exp(lambda_232_yr*date_guess)-1)+ft_Sm*(np.exp(lambda_147_yr*date_guess)-1)
date = zirc.He_date(total_He)
date = zirc.He_date(total_He, corr_factors)

assert math.isclose(date,date_guess,rel_tol=.001)

def test_guenthner_damage(zirc):
damage = zirc.guenthner_damage()
relevant_tT = zirc.get_relevant_tT()
assert np.size(damage) == np.size(relevant_tT,0)
assert np.size(damage)+1 == np.size(relevant_tT,0)
assert np.isnan(damage).any() == False
assert np.any(damage < 0) == False

Expand All @@ -170,7 +170,7 @@ def test_guenthner_date(zirc):
def test_flowers_damage(ap):
damage = ap.flowers_damage()
relevant_tT = ap.get_relevant_tT()
assert np.size(damage) == np.size(relevant_tT,0)
assert np.size(damage)+1 == np.size(relevant_tT,0)
assert np.isnan(damage).any() == False
assert np.any(damage < 0) == False

Expand Down

0 comments on commit 513da54

Please sign in to comment.