| Bsoft 1.9 Bernard's software package

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Functions
img_diffraction.h File Reference

Library functions for analyzing diffraction patterns. More...

`#include "rwimg.h"`

Go to the source code of this file.

## Functions
int | img_diffraction_origin (Bimage *p, Bimage *pmask)
| Finds the origin of a powder diffraction pattern by cross-correlation. More...

## Detailed Description

Library functions for analyzing diffraction patterns.

Author
  Bernard Heymann

Date
  Created: 20050216
  Modified: 20110325

Definition in file img_diffraction.h.

## Function Documentation

int img_diffraction_origin | ( | Bimage * | p,
|  | Bimage * | pmask
| ) |  |

Finds the origin of a powder diffraction pattern by cross-correlation.

Parameters

  *p | image.
  *pmask | mask to exclude a region such as a beam stop.

Returns
  int 0.

      The diffraction pattern is copied, masked around the set origin to
      remove background distractions, and cross-correlated with a copy of
      itself rotated 180 degrees. To overcome the masking bias, the
      masking and cross-correlation are repeated until the result stabilizes.
      The origins within the sub-image structures are used for masking.
      The new origins are written back into the sub-image structures.

Definition at line 30 of file img_diffraction.cpp.