\(\renewcommand\AA{\unicode{x212B}}\)

SaveLauenorm v1

Summary

Save a PeaksWorkspace to a ASCII file for each detector.

Properties

Name

Direction

Type

Default

Description

InputWorkspace

Input

PeaksWorkspace

Mandatory

An input PeaksWorkspace.

Filename

Input

string

Mandatory

Select the directory and base name for the output files.

ScalePeaks

Input

number

1

Multiply FSQ and sig(FSQ) by scaleFactor

MinDSpacing

Input

number

0

Minimum d-spacing (Angstroms)

MinWavelength

Input

number

0

Minimum wavelength (Angstroms)

MaxWavelength

Input

number

Optional

Maximum wavelength (Angstroms)

SortFilesBy

Input

string

Bank

Sort into files by bank(default), run number or both. Allowed values: [‘Bank’, ‘RunNumber’, ‘Both Bank and RunNumber’]

MinIsigI

Input

number

Optional

The minimum I/sig(I) ratio

WidthBorder

Input

number

Optional

Width of border of detectors

MinIntensity

Input

number

Optional

The minimum Intensity

UseDetScale

Input

boolean

False

Scale intensity and sigI by scale factor of detector if set in SetDetScale. If false, no change (default).

EliminateBankNumbers

Input

str list

Comma deliminated string of bank numbers to exclude for example 1,2,5

LaueScaleFormat

Input

boolean

False

New format for Lauescale

CrystalSystem

Input

string

TRICLINIC

The conventional cell type to use. Allowed values: [‘TRICLINIC’, ‘MONOCLINIC’, ‘ORTHORHOMBIC’, ‘TETRAGONAL’, ‘HEXAGONAL’, ‘RHOMBOHEDRAL’, ‘CUBIC’]

Centering

Input

string

P

The centering for the conventional cell. Allowed values: [‘P’, ‘A’, ‘B’, ‘C’, ‘I’, ‘F’, ‘R’]

Description

Provide input files for the program LAUENORM which is used to perform a wavelength normalisation for Laue data using symmetry equivalent reflections measured at different wavelengths.

Input_Files

Unit 21 LAUE001 Input Laue data file. This is normally a card image file with one record per reflection (unmerged, unsorted data) containing the items: h k l lambda theta intensity and sig(intensity) in format (3I5,2F10.5,2I10).

Unit 22 LAUE002

Unit 23 LAUE003

Continuing

From: http://www.ccp4.ac.uk/newsletters/newsletter36/10_laue.html

Usage

Example - a simple example of running SaveLauenorm.

import os

prefix = os.path.expanduser("~/MyPeaks")
#load a peaks workspace from file
peaks = LoadIsawPeaks(Filename=r'Peaks5637.integrate')
SaveLauenorm(InputWorkspace=peaks, Filename=prefix)

firstfile = prefix + "001"
print("File was saved: {}".format(os.path.isfile(firstfile)))

Output:

File was saved: True

Example - an example of running SaveLauenorm with sorting and filtering options.

import os

#load a peaks workspace from file
peaks = LoadIsawPeaks(Filename=r'Peaks5637.integrate')
print("Number of peaks in table {}".format(peaks.rowCount()))

prefix = os.path.expanduser("~/MyPeaks")
SaveLauenorm(InputWorkspace=peaks, Filename=prefix, MinWavelength=0.5, MaxWavelength=2,MinDSpacing=0.2, SortFilesBy='Bank')

finalfile = prefix + "009"
ifile = open(finalfile, 'r')
lines = ifile.readlines()
ifile.close()
print("Number of peaks in table {}".format(len(lines)))

Output:

Number of peaks in table 434
Number of peaks in table 23

Categories: AlgorithmIndex | Crystal\DataHandling | DataHandling\Text

Source

C++ header: SaveLauenorm.h

C++ source: SaveLauenorm.cpp