libcrystfel 0.11.1
Loading...
Searching...
No Matches
Data Structures | Enumerations | Functions
geometry.h File Reference

Data Structures

struct  polarisation
 

Enumerations

enum  PartialityModel {
  PMODEL_UNITY ,
  PMODEL_XSPHERE ,
  PMODEL_OFFSET ,
  PMODEL_RANDOM ,
  PMODEL_GGPM
}
 

Functions

RefListpredict_to_res (Crystal *cryst, struct image *image, double max_res)
 
void calculate_partialities (RefList *list, Crystal *cryst, struct image *image, PartialityModel pmodel)
 
void update_predictions (RefList *list, Crystal *cryst, struct image *image)
 
struct polarisation parse_polarisation (const char *text)
 
void polarisation_correction (RefList *list, UnitCell *cell, struct polarisation p)
 
double sphere_fraction (double rlow, double rhigh, double pr)
 
double gaussian_fraction (double rlow, double rhigh, double pr)
 

Detailed Description

Geometry of diffraction

This contains the prediction and partiality calculation functions.

Enumeration Type Documentation

◆ PartialityModel

A PartialityModel describes a geometrical model which can be used to calculate spot partialities and Lorentz correction factors.

Enumerator
PMODEL_UNITY 

Set all partialities and Lorentz factors to 1.

PMODEL_XSPHERE 

Flat sphere model with super-Gaussian spectrum

PMODEL_OFFSET 

Ewald offset model for monochromatic beam

PMODEL_RANDOM 

Randomly assigned partialities

PMODEL_GGPM 

Generalised gaussian prediction model

Function Documentation

◆ calculate_partialities()

void calculate_partialities ( RefList * list,
Crystal * cryst,
struct image * image,
PartialityModel pmodel )
extern
Parameters
listA RefList
crystA Crystal
imageAn image structure
pmodelA PartialityModel

Calculates the partialities for the reflections in list, given the current state of cryst and image.

If pmodel is PMODEL_RANDOM or PMODEL_UNITY, then cryst can be NULL. If pmodel is PMODEL_UNITY, then image can also be NULL.

You must not have changed the crystal or image parameters since you last called predict_to_res or update_predictions, because this function relies on the limiting wavelength values calculated by those functions.

◆ predict_to_res()

RefList * predict_to_res ( Crystal * cryst,
struct image * image,
double max_res )
extern
Parameters
crystA Crystal
imageAn image structure
max_resMaximum resolution to predict to (m^-1)

Calculates reflection positions for crys, as seen in image, up to maximum 1/d value max_res

Returns
A list of predicted reflections

◆ update_predictions()

void update_predictions ( RefList * list,
Crystal * cryst,
struct image * image )
extern
Parameters
listA RefList
crystA Crystal
imageAn image structure

Updates the predicted reflections (positions and excitation errors, but not the actual partialities) in list, to match the current statea of crys as seen in image.

If you need to update the partialities as well, call calculate_partialities afterwards.