Table of Contents

Class: Header filetype/imageheader.py

Parent class for all image headers

Subclasses should define:

Scan

__repr__

only required for writing the format

__len__

Methods   
AddComment
AddCorrection
RemoveCorrection
SetAdc0
SetBinned
SetDatatype
SetDetid
SetEndPos
SetExposureTime
SetIntegrationTime
SetOverflowLevel
SetPixSize
SetPrecession
SetReadouts
SetRepeats
SetScale
SetShutter
SetSize
SetWavelength
WasCorrectedFor
__getattr__
__getstate__
__init__
__setstate__
copy
  AddComment 
AddComment ( self,  s )

Add a comment string to the header.

  AddCorrection 
AddCorrection ( self,  s )

Keep track of a correction type.

Recognized correction types are: adc0,'localdark','shortdark','dark','sensitivity', area,'incidence','airabsorption', fries

This can be used to make sure corrections are not applied twice.

  RemoveCorrection 
RemoveCorrection ( self,  s )

Keep track of a correction type.

Recognized correction types are: adc0,'localdark','shortdark','dark','sensitivity', area,'incidence','airabsorption', fries

This can be used to note to the system that a certain correction was un-applied.

  SetAdc0 
SetAdc0 ( self,  adc0 )

  SetBinned 
SetBinned (
        self,
        binned=1,
        factor=2,
        )

Change the image to binned

Used by the BinningSink

  SetDatatype 
SetDatatype ( self,  datatype )

Change the data type

KappaCCD images can be stored either as ccp4w or u16 data types. This routine is used whenever a conversion takes place

  SetDetid 
SetDetid ( self,  detid )

  SetEndPos 
SetEndPos ( self,  p )

Change the ending position in the header

Exceptions   
TypeError( 'Position of wrong type' )
  SetExposureTime 
SetExposureTime ( self,  exposuretime )

Change the header exposure time.

Used by programs that generate new images

  SetIntegrationTime 
SetIntegrationTime ( self,  integrationtime )

Change the header integration time.

Used by programs that generate new images

  SetOverflowLevel 
SetOverflowLevel ( self,  overflowlevel )

  SetPixSize 
SetPixSize (
        self,
        pixsizex,
        pixsizey,
        )

Change the pixel size.

Used by programs that generate new images

  SetPrecession 
SetPrecession (
        self,
        matrix,
        range,
        )

Add precession information to the header

arguments:

matrix

the matrix that transforms c-vectors into pixel coordinates

range

the z-coordinate range that was used for the image generation

  SetReadouts 
SetReadouts ( self,  readouts )

Remember the number of readouts that were used to create this image.

  SetRepeats 
SetRepeats ( self,  repeats )

Change the number of repeats in the image.

This is used by the "dezinger" ImageSink

  SetScale 
SetScale (
        self,
        add=None,
        scale=None,
        )

Add information about scale and shift to the header.

KappaCCD images are stored as 16 bit integers. Sometimes the data stored are floating point numbers, or the actual range of data is larger than 65536. In such cases the add and scale can be used to fit the actual data range into 0...65536. This is handled by the ToU16Sink and the KCD image reader classes, so normally this routine will not be called from user code.

  SetShutter 
SetShutter ( self,  shutter )

Change the shutter setting in the header

  SetSize 
SetSize (
        self,
        xsize,
        ysize,
        )

Change the size of the image.

Used by programs that generate new images or that change the size of existing images.

  SetWavelength 
SetWavelength (
        self,
        target,
        alpha1,
        alpha2,
        ratio,
        )

Change the header wavelength.

Used by programs that generate new images

  WasCorrectedFor 
WasCorrectedFor ( self,  s )

Look up correction type

  __getattr__ 
__getattr__ ( self,  attr )

Get attributes from the header Record by proxy

Exceptions   
AttributeError( 'Does not have _ attribute' )
  __getstate__ 
__getstate__ ( self )

Generate a storable version of the header

  __init__ 
__init__ ( self,  s )

Constructor.

arguments:

s

either another Header (in which case the information is copied) or a projtls.Record containing the header information.

Exceptions   
TypeError( "Cannot convert argument to header" )
  __setstate__ 
__setstate__ ( self,  state )

Re-Generate from a storable version

  copy 
copy ( self )

Make a copy of myself


Table of Contents

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