Table of Contents

Class: ScanParams goniometer/scan.py

Keep the parameters of a scan that are not relevant to simulation.

Methods   
__init__
__repr__
curscan
filename
newdarkname
newscan
prefix
resetscan
  __init__ 
__init__ (
        self,
        frametime=None,
        degreetime=None,
        frameangle=1.0 * projtls.degrees,
        fnpattern='s' + config.hashfilepattern,
        numimg=2,
        scanlimit=99,
        imagelimit=999,
        firstscan=1,
        avoidclash=0,
        )

Constructor:

optional parameters:

frametime

Collect data at give number of seconds per frame.

degreetime

Collect at given number of seconds per degree. If this is given, no frametime should be specified. If none of the two is specified, the default of 10 seconds per frame is used.

frameangle

Collect frames at given intervals.

fnpattern

The file name pattern to be used.

numimg

number of times each image has to be measured. Normally 2 for dezingering.

scanlimit

Maximum number of scans that the scan pattern must accommodate.

imagelimit

The ## in the filename are checked to see if there is space for this many images per scan

firstscan

number of the first scan to be collected

avoidclash

if 1, repeatedly increment firstscan until file does not exist

Exceptions   
error( "Illegal filenamepattern in ScanParams" )
error( "frametime and degreetime both given" )
  __repr__ 
__repr__ ( self )

A one-line summary string of the scan parameters.

  curscan 
curscan ( self )

Return the current scan number.

  filename 
filename (
        self,
        scannr=None,
        sector=None,
        extension='kcd',
        )

Calculate a file name.

optional parameters:

scannr

Number of the scan for which the prefix should be created. If not given, the currently active scan will be used.

sector

The image number withing the scan. If not given, the hash pattern for the scan is returned.

extension

The file name extension.

Return value: the file name.

Exceptions   
error( "Illegal imagenumber for scanparameters" )
  newdarkname 
newdarkname ( self )

Return a new proposed name for a dark current image.

The returned name will be dark##.kcd with the exposure time on the ## marks for the first dark image; for subsequent dark images it will be dark##-#.kcd with the last # representing a sequence number.

  newscan 
newscan ( self )

Progress to the next scan.

This should be called once before each scan is started. Those calls are normally handled by the scanset.Perform() method

Exceptions   
error( "Illegal scannumber for scanparameters" )
  prefix 
prefix ( self,  scannr=None )

Calculate the file name prefix.

optional parameters:

scannr

Number of the scan for which the prefix should be created. If not given, the currently active scan will be used.

Return value: the prefix string.

Exceptions   
error( "Illegal scannumber for scanparameters" )
  resetscan 
resetscan ( self )

Reset the current scan number.

This should be called once before each scan set. That call is normally handled by the scanset.Perform() method


Table of Contents

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