| Bsoft 2.0.5 Bernard's software package

Functions
mg_xtal.h File Reference

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

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

Go to the source code of this file.

## 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

Definition in file mg_xtal.h.

## Function Documentation

## ◆ img_mask_reflections()

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

Masks the image using the list of reflections.

Parameters

  *p | complex image.
  *sflist | reflection list.
  radius | radius around reflection to mask.

Returns
  int error code.

Definition at line 152 of file mg_xtal.cpp.

## ◆ mg_generate_reflections()

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

Generates reflections given the unit cell vectors.

Parameters

  *mg | micrograph.
  real_size | physical image size.
  resolution | resolution 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.

Definition at line 80 of file mg_xtal.cpp.

## ◆ mg_unitcell_vectors()

int mg_unitcell_vectors | ( | Bmicrograph * | mg | ) |

Calculates the unit cell vectors for a 2D crystal.

Parameters

  *mg | micrograph.

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.

Definition at line 32 of file mg_xtal.cpp.