Bsoft 2.1.4
Bernard's software package
mg_xtal.h File Reference

Header file for functions to process crystallographic data. More...

#include "mg_processing.h"
#include "rwimg.h"

Functions

int mg_unitcell_vectors (Bmicrograph *mg)
 Calculates the unit cell vectors for a 2D crystal. More...
 
long mg_generate_reflections (Bmicrograph *mg, Vector3< double > real_size, double resolution)
 Generates reflections given the unit cell vectors. More...
 
int img_mask_reflections (Bimage *p, Bstrucfac *sflist, double radius)
 Masks the image using the list of reflections. More...
 

Detailed Description

Header file for functions to process crystallographic data.

Author
Bernard Heymann and Samuel Payne
Date
Created: 20061110
Modified: 20180410

Function Documentation

◆ img_mask_reflections()

int img_mask_reflections ( Bimage p,
Bstrucfac sflist,
double  radius 
)

Masks the image using the list of reflections.

Parameters
*pcomplex image.
*sflistreflection list.
radiusradius around reflection to mask.
Returns
int error code.

◆ mg_generate_reflections()

long mg_generate_reflections ( Bmicrograph mg,
Vector3< double >  real_size,
double  resolution 
)

Generates reflections given the unit cell vectors.

Parameters
*mgmicrograph.
real_sizephysical image size.
resolutionresolution limit.
Returns
long number of reflections generated, <0 on error.
The structure factor location is given by:
    x = uh + vk
where u and v are the unit cell vectors,
and h and k are the associated Miller indices.

◆ mg_unitcell_vectors()

int mg_unitcell_vectors ( Bmicrograph mg)

Calculates the unit cell vectors for a 2D crystal.

Parameters
*mgmicrograph.
Returns
int 0, <0 on error.
Finds the unit cell vectors u and v by solving the equation:
    x = uh + vk
where x is the location of the reflection or structure factor,
and h and k are the associated Miller indices.