You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			16 lines
		
	
	
		
			719 B
		
	
	
	
		
			Plaintext
		
	
			
		
		
	
	
			16 lines
		
	
	
		
			719 B
		
	
	
	
		
			Plaintext
		
	
##################################################
 | 
						|
################ pearson.beta ####################
 | 
						|
##################################################
 | 
						|
pearson.beta <- function(m, w) {
 | 
						|
   # Function for calculating integral breadth, \beta, of
 | 
						|
   # an X-ray reflection using the half-width of FWHM (w)
 | 
						|
   # and m parameter from a Pearson fit.
 | 
						|
   ## Args: m - shape parameter from Pearson fit (numeric)
 | 
						|
   ##       w - half the FWHM for the reflection (numeric)
 | 
						|
   ## **** NOTE: gamma(x) out of range for x > 171
 | 
						|
   ## Values: The integral breadth of the reflection (numeric)
 | 
						|
   # Ref: Birkholz2006, page 96 (Eq. 3.5)
 | 
						|
   beta <- ((pi * 2^(2 * (1 - m)) * gamma(2 * m - 1)) /
 | 
						|
      ((2^(1 / m) - 1) * (gamma(m))^2)) * w
 | 
						|
}
 |