libcrystfel 0.11.0
Loading...
Searching...
No Matches
Data Structures | Enumerations | Functions
fom.h File Reference

Data Structures

struct  fom_rejections
 
struct  fom_shells
 

Enumerations

enum  fom_type {
  FOM_R1I ,
  FOM_R1F ,
  FOM_R2 ,
  FOM_RSPLIT ,
  FOM_CC ,
  FOM_CCSTAR ,
  FOM_CCANO ,
  FOM_CRDANO ,
  FOM_RANO ,
  FOM_RANORSPLIT ,
  FOM_D1SIG ,
  FOM_D2SIG ,
  FOM_NUM_MEASUREMENTS ,
  FOM_REDUNDANCY ,
  FOM_SNR ,
  FOM_MEAN_INTENSITY ,
  FOM_COMPLETENESS
}
 

Functions

struct fom_rejections fom_select_reflection_pairs (RefList *list1, RefList *list2, RefList **plist1_acc, RefList **plist2_acc, UnitCell *cell, SymOpList *sym, int anom, double rmin_fix, double rmax_fix, double sigma_cutoff, int ignore_negs, int zero_negs, int mul_cutoff)
 
struct fom_rejections fom_select_reflections (RefList *list, RefList **plist_acc, UnitCell *cell, SymOpList *sym, double rmin_fix, double rmax_fix, double sigma_cutoff, int ignore_negs, int zero_negs, int mul_cutoff)
 
struct fom_context * fom_calculate (RefList *list1, RefList *list2, UnitCell *cell, struct fom_shells *shells, enum fom_type fom, int noscale, const SymOpList *sym)
 
struct fom_shellsfom_make_resolution_shells (double rmin, double rmax, int nshells)
 
double fom_shell_centre (struct fom_shells *s, int i)
 
double fom_overall_value (struct fom_context *fctx)
 
double fom_shell_value (struct fom_context *fctx, int i)
 
int fom_overall_num_reflections (struct fom_context *fctx)
 
int fom_shell_num_reflections (struct fom_context *fctx, int i)
 
int fom_overall_num_possible (struct fom_context *fctx)
 
int fom_shell_num_possible (struct fom_context *fctx, int i)
 
int fom_is_anomalous (enum fom_type f)
 
int fom_is_comparison (enum fom_type f)
 
const char * fom_name (enum fom_type f)
 

Detailed Description

Figure of merit calculation

Enumeration Type Documentation

◆ fom_type

enum fom_type

An enumeration of possible figures of merit to calculate

Function Documentation

◆ fom_calculate()

struct fom_context * fom_calculate ( RefList list1,
RefList list2,
UnitCell cell,
struct fom_shells shells,
enum fom_type  fom,
int  noscale,
const SymOpList sym 
)
Parameters
list1A RefList
list2A RefList
cellA UnitCell
shellsA fom_shells structure
fomThe figure of merit to calculate
noscaleNon-zero to disable scaline of reflection lists
symThe symmetry of list1 and list2.

Calculates the specified figure of merit, comparing the two reflection lists.

The cell and sym must match both reflection lists. You should also have called fom_select_reflection_pairs() to pre-process the lists.

If the figure of merit does not involve comparison (e.g. FOM_SNR), then list1 will be used. In this case, list2 and noscale will be ignored. Use fom_select_reflections() instead of fom_select_reflection_pairs() in this case.

Returns
a fom_context structure. Use fom_shell_value() et al., to extract the actual figure of merit values.

◆ fom_make_resolution_shells()

struct fom_shells * fom_make_resolution_shells ( double  rmin,
double  rmax,
int  nshells 
)
Parameters
rminThe minimum value of 1/d, in m^-1
rmaxThe maximum value of 1/d, in m^-1
nshellsThe number of shells to use

Create a fom_shells structure for the specified minimum and maximum resolution limits

Returns the fom_shells structure, or NULL on error.

◆ fom_overall_num_possible()

int fom_overall_num_possible ( struct fom_context *  fctx)
Parameters
fctxA fom_context structure

This must only be called on a fom_context for FOM_COMPLETENESS.

Returns
the total number of reflections possible in all shells, taking into account symmetry and lattice absences, but not screw axis/glide place absences.

◆ fom_overall_num_reflections()

int fom_overall_num_reflections ( struct fom_context *  fctx)
Parameters
fctxA fom_context structure
Returns
the total number of unique reflections

◆ fom_overall_value()

double fom_overall_value ( struct fom_context *  fctx)

Calculates the overall value for the fom_context

You must have previously called fom_calculate()

◆ fom_select_reflection_pairs()

struct fom_rejections fom_select_reflection_pairs ( RefList list1,
RefList list2,
RefList **  plist1_acc,
RefList **  plist2_acc,
UnitCell cell,
SymOpList sym,
int  anom,
double  rmin_fix,
double  rmax_fix,
double  sigma_cutoff,
int  ignore_negs,
int  zero_negs,
int  mul_cutoff 
)
Parameters
list1The first input RefList
list2The second input RefList
plist1_accPointer to location for accepted list
plist2_accPointer to location for accepted list
cellA UnitCell
symThe symmetry of raw_list
anomNon-zero if you will calculate a FoM for anomalous signal
rmin_fixIf positive, minimum resolution to use
rmax_fixIf positive, maximum resolution to use
sigma_cutoffMinimum I/sigI value
ignore_negsNon-zero to filter out negative intensities
zero_negsNon-zero to set negative intensities to zero
mul_cutoffMinimum number of measurements per reflection

Selects reflections suitable for use with fom_calculate().

Use -INFINITY for sigma_cutoff to disable the check. Set mul_cutoff to zero to disable the check.

Returns
a fom_rejections structure with the counts of reflections.

◆ fom_select_reflections()

struct fom_rejections fom_select_reflections ( RefList raw_list,
RefList **  plist_acc,
UnitCell cell,
SymOpList sym,
double  rmin_fix,
double  rmax_fix,
double  sigma_cutoff,
int  ignore_negs,
int  zero_negs,
int  mul_cutoff 
)
Parameters
raw_listThe input RefList
plist_accPointer to location for accepted list
cellA UnitCell
symThe symmetry of raw_list
rmin_fixIf positive, minimum resolution to use
rmax_fixIf positive, maximum resolution to use
sigma_cutoffMinimum I/sigI value
ignore_negsNon-zero to filter out negative intensities
zero_negsNon-zero to set negative intensities to zero
mul_cutoffMinimum number of measurements per reflection

Use -INFINITY for sigma_cutoff to disable the check. Set mul_cutoff to zero to disable the check.

Returns
a fom_rejections structure with the counts of reflections.

◆ fom_shell_centre()

double fom_shell_centre ( struct fom_shells s,
int  i 
)
Parameters
sA fom_shells structure
iThe shell number

Returns the value of 1/d at the middle of the shell, i.e. the mean of the minimum and maximum 1/d values for the shell

◆ fom_shell_num_possible()

int fom_shell_num_possible ( struct fom_context *  fctx,
int  i 
)
Parameters
fctxA fom_context structure
iShell number

This must only be called on a fom_context for FOM_COMPLETENESS.

Returns
the number of reflections possible in the shell, taking into account symmetry and lattice absences, but not screw axis/glide place absences.

◆ fom_shell_num_reflections()

int fom_shell_num_reflections ( struct fom_context *  fctx,
int  i 
)
Parameters
fctxA fom_context structure
iShell number
Returns
the number of unique reflections in the shell

◆ fom_shell_value()

double fom_shell_value ( struct fom_context *  fctx,
int  i 
)

Calculates the figure of merit for the specified shell number. You must have previously called fom_calculate()