Table of Contents

Module: proposer strategy/proposer.py

Scan proposers for strategy generation.

Introduction to the strategy modules

There are three functions of a data collection strategy that can be clearly separated.

  • The "target": What do we want to measure? Are we satisfied with the current scans, or do we need more?

  • The "limitations". Where does the hardware allow us to measure? Can we avoid a long unit cell axis? Can we avoid less favorable positions for the cryostat?

  • The "propositions". Think of some scans that we could do to measure more data.

For all three a class-hierarchy is present in the library. To make a complete data collection strategy, one target object, one limit object and one proposition object must be combined.

For non-data collection strategies currently a different concept is being used, consisting of only one class hierarchy of "strategies". This might change any moment. However, these classes are not so important for further development, because they are only present for GUI use and normal scripting applications will do fine without them.

Usage Example

This is a piece of code from the strategy code in the "Collect" GUI:

# Build limiter
from strategy import limit
lim=limit.CompositeLimit()
lim.Add(limit.HardwareLimit(self.experiment.hardware))
if self.experiment.efficlimit:
lim.Add(limit.EfficiencyLimit(thetamax=self.experiment.dataset.ThetaMax()))
if self.experiment.lowtemplimit:
lim.Add(limit.CoolerLimit())
if self.experiment.longaxislimit:
vec=self.experiment.cell.ShortestReciprocalLatticeVector()
lim.Add(limit.VectorAvoid(vec))
# Build target function
from strategy import target
if self.experiment.redundancy<1.0:
tar=target.RedundantTarget(dataset=self.experiment.dataset,
completeness=self.experiment.completeness,
limiter=lim,redundancy=self.experiment.redundancy)
else:
tar=target.OnceTarget(dataset=self.experiment.dataset,
completeness=self.experiment.completeness,
limiter=lim)
#
pro=self.experiment.strategytype(
target=tar,
hardware=self.experiment.hardware,
cell=self.experiment.cell,
dx=self.experiment.dx)
pro.Calculate()
return pro.ScanSet()

Variables defined by the proposer module.

a single variable proposerlist is defined by this module. It refers to a list of all the proposer classes defined. This can be used in a GUI to make user selection of the data collection strategy possible,

For this purpose, each proposer class has a 1-line doc-string that uniquely describes its functionality.

Functions   
normang
  normang 
normang ( p )

Bring the angle p within -pi and +pi value bounds.

Classes   
FriedelMixin

Mixin class that can be used to calculate scans with Friedel pairs.

FriedelProposer

Omega scans with even order axes vertical + other omega scans

OmegaMixin

Mixin class used to help finding useful omega scans to perform.

OmegaProposer

Omega scans to fill asymmetric unit

Phi180Proposer

180 degree phi scans at kappa=0

Phi360Proposer

360 degree phi scans at fixed kappa (normally 0)

PhiMixin

Mixin class to help with the design of Phi-scans in the strategy.

PhiOmegaProposer

Phi scans + omega scans to fill asymmetric unit

PhiProposer

Optimized phi scans at fixed kappa (normally 0)

PlatformMixin

Mixin class to calculate scans compatible with the Platform goniostat.

PlatformProposer

Omega scans at chi=55 degrees

Proposer

Top class for all scan proposers.

ReverseBeamProposer

Two 360 degree phi scans in reverse beam geometry

UtrechtProposer

A phi scan + 2 standard omega scans


Table of Contents

This document was automatically generated on Fri Jul 3 09:28:36 2009 by HappyDoc version WORKING