Definition in file yanera_reflectivity.h.
Go to the source code of this file.
Functions | |
void | yanera_write_reflectivity (yanera_container *yanera) |
General function call to write refelctivity curves to file. | |
double | calcReflectivity (double q, yanera_resolution *resolution, yanera_model *model, yanera_container *yanera) |
Wrapper for calculating the reflectivity with background and instrumental resolution. | |
double | calcParrattFromSlabs (double q, yanera_model *model, yanera_container *yanera) |
Calculates reflectivity at from the slabs given in yanera_model . | |
double | calcParrattFromModel (double q, yanera_model *model, yanera_container *yanera) |
Calculates reflectivity at for given yanera_model . | |
double | lookupResolution (double q, yanera_resolution *resolution) |
Retruns the resolution spread at a point . |
void yanera_write_reflectivity | ( | yanera_container * | yanera | ) |
yanera | The yanera_container . |
q_min
to q_max
in q_num
number of steps.Filenames are based on the datafile names, with *.ref appended, or in the event of no datafiles, the default filename is "results_xx.ref" where xx is a sequential number from 1, based on how many models there are.
Definition at line 24 of file yanera_reflectivity.c.
double calcReflectivity | ( | double | q, | |
yanera_resolution * | resolution, | |||
yanera_model * | model, | |||
yanera_container * | yanera | |||
) |
q | The value to evaluate . | |
resolution | A pointer to the yanera_resolution data for the datafile and the model. | |
model | The yanera_model for which the refelctiity curve is calculated. | |
yanera | The yanera_container . |
calcParratt()
.The instrumental resolution is determined by calculating the reflectivity averaged over several points with Gaussian weights. It's a method that was borrowed and made more general from Parratt32. It works by the following, assuming a point average,
In the first equation, we can specify the instrumental resolution present in the data as in the same manner as it is typically recorded a Chalk River, . Otherwise, the resolution can be specified as . The Gaussian averaging of points has been pre-calculated for 9 point average. If no resolution smearing is required, the calculation is skipped for speed.
Finally, the background is added.
Definition at line 96 of file yanera_reflectivity.c.
double calcParrattFromSlabs | ( | double | q, | |
yanera_model * | model, | |||
yanera_container * | yanera | |||
) |
q | The value to evaluate . | |
model | The yanera_model for which the refelctiity curve is calculated. | |
yanera | The yanera_container . |
yanera_model
. Formulas are located on page <<Calculating the reflectivity>>. This function uses the tiny slabs calculated by adaptive quadrature.NOTE: This function sets the imaginary SLD to zero.
At this point the imaginary part of the SLD is not being used. It is read in the XML but not calculated as part of the quadrature into little slabs, so is not accessible for use here.
Definition at line 155 of file yanera_reflectivity.c.
double calcParrattFromModel | ( | double | q, | |
yanera_model * | model, | |||
yanera_container * | yanera | |||
) |
q | The value to evaluate . | |
model | The yanera_model for which the refelctiity curve is calculated. | |
yanera | The yanera_container . |
yanera_model
. Formulas are located on page <<Calculating the reflectivity>>. This functions calculates directly from teh model, and not from the quadarture slabs.NOTE: This function sets the imaginary SLD to zero.
At this point the imaginary part of the SLD is not being used. It is read in the XML but not calculated as part of the quadrature into little slabs, so is not accessible for use here.
Definition at line 263 of file yanera_reflectivity.c.
double lookupResolution | ( | double | q, | |
yanera_resolution * | resolution | |||
) |
q | The value of that we want the resolution | |
resolution | A pointer to a yanera_rsolution structure with the resolution information. |
Definition at line 428 of file yanera_reflectivity.c.