Table of Contents

Class: FtuFttAction FtuFttAction.py

Class to contain the keywords of one Translation Action.

General comments to usage of class:

  • All keywords must be given in the Short-FITS format.

  • First FITS header has the number 0.

  • For the Translation Actions the following constant names defined are:

    • ftuACTION_UNDEF

    • ftuACTION_ADD

    • ftuACTION_CHANGE

    • ftuACTION_RENAME

    • ftuACTION_MOVE

    • ftuACTION_COPY

    • ftuACTION_REMOVE

    These are defined in the module "FtuFttDefs".

Base Classes   
FtuFttActionBase.FtuFttActionBase
Methods   
__dumpAddChangeAction
__dumpCopyAction
__dumpMoveAction
__dumpRemoveAction
__dumpRenameAction
__init__
__setAddChangeActionFromFtt
__setCopyActionFromFtt
__setMoveActionFromFtt
__setRemoveActionFromFtt
__setRenameActionFromFtt
dumpBuf
getHdr
getKey
getSrcHdr
getSrcKey
getTrgHdr
getTrgKey
setActionFromFtt
setAddAction
setChangeAction
setCopyAction
setHdr
setKey
setMoveAction
setRemoveAction
setRenameAction
setSrcHdr
setSrcKey
setTrgHdr
  __dumpAddChangeAction 
__dumpAddChangeAction ( self,  action )

Dump the contents of an Add or Change Translation Action into a string object and return this.

action: Translation Action: FtuFttAction.ftuACTION_ADD or FtuFttAction.ftuACTION_CHANGE.

Returns: String buffer with the PAF print out of the Translation Action.

  __dumpCopyAction 
__dumpCopyAction ( self )

Dump the contents of a Copy Translation Action into a string object and return this.

Returns: String buffer with the PAF print out of the Translation Action.

  __dumpMoveAction 
__dumpMoveAction ( self )

Dump the contents of a Move Translation Action into a string object and return this.

Returns: String buffer with the PAF print out of the Translation Action.

  __dumpRemoveAction 
__dumpRemoveAction ( self )

Dump the contents of a Copy Translation Action into a string object and return this.

Returns: String buffer with the PAF print out of the Translation Action.

  __dumpRenameAction 
__dumpRenameAction ( self )

Dump the contents of a Rename Translation Action into a string object and return this.

Returns: String buffer with the PAF print out of the Translation Action.

  __init__ 
__init__ (
        self,
        action=ftuACTION_UNDEF,
        srcKey="",
        srcHdr=-1,
        trgKey="",
        trgHdr=-1,
        valueSrcList=None,
        fct="",
        )

Constructor method to initialize the object. It it possible to set the various fields of the Translation Action contained in the object.

action: Type of Translation Action. The actions are defined in the module FtuFttAction.

srcKey: Source keyword for the translation.

srcHdr: Source header for the translation.

trgKey: Target keyword name.

trgHdr: Target header for the translation.

valueSrcList: Python List of FtuFttValueSrc objects.

fct: The Translation Action Conversion Function.

  __setAddChangeActionFromFtt 
__setAddChangeActionFromFtt (
        self,
        action,
        keyCount,
        fttPafObj,
        )

Extract an Add or Change Translation Action from an FTT.

action: Action to extract: FtuFttAction.ftuACTION_ADD or FtuFttAction.ftuACTION_CHANGE.

keyCount: The present key count.

fttPafObj: Reference to the FTT Object.

Returns: Key counter in the FTT object.

  __setCopyActionFromFtt 
__setCopyActionFromFtt (
        self,
        keyCount,
        fttPafObj,
        )

Extract a Copy Translation Action from an FTT.

keyCount: The present key count.

fttPafObj: Reference to the FTT Object.

Returns: Key counter in the FTT object.

  __setMoveActionFromFtt 
__setMoveActionFromFtt (
        self,
        keyCount,
        fttPafObj,
        )

Extract a Move Translation Action from an FTT.

keyCount: The present key count.

fttPafObj: Reference to the FTT Object.

Returns: Key counter in the FTT object.

  __setRemoveActionFromFtt 
__setRemoveActionFromFtt (
        self,
        keyCount,
        fttPafObj,
        )

Extract a Remove Translation Action from an FTT.

keyCount: The present key count.

fttPafObj: Reference to the FTT Object.

Returns: Key counter in the FTT object.

  __setRenameActionFromFtt 
__setRenameActionFromFtt (
        self,
        keyCount,
        fttPafObj,
        )

Extract a Rename Translation Action from an FTT.

keyCount: The present key count.

fttPafObj: Reference to the FTT Object.

Returns: Key counter in the FTT object.

  dumpBuf 
dumpBuf ( self )

Dump the Translation Action in a string buffer in PAF format.

Returns: String buffer with the PAF representation of the Translation Action.

  getHdr 
getHdr ( self )

Return header number for Translation Action.

Returns: Header number.

  getKey 
getKey ( self )

Return keyword set for the Translation Action.

Returns: Keyword.

  getSrcHdr 
getSrcHdr ( self )

Return Source Header for the Translation Action.

Returns: Source Header.

  getSrcKey 
getSrcKey ( self )

Return Source Key for the Translation Action.

Returns: Source Key.

  getTrgHdr 
getTrgHdr ( self )

Return Target Header for Translation Action.

Returns: Target Header.

  getTrgKey 
getTrgKey ( self )

Return the Target Key for the Translation Action.

Returns: Target Key.

  setActionFromFtt 
setActionFromFtt (
        self,
        keyCount,
        fttPafObj,
        )

Extract a Translation Action from an FTT Object. It is supposed that the "keyCount" parameters points to the first keyword in the block which the Translation Action constitutes.

keyCount: The present key count.

fttPafObj: Reference to the FTT Object.

Returns: Key counter in the FTT object.

Exceptions   
exceptions.Exception

  setAddAction 
setAddAction (
        self,
        key,
        hdr=0,
        valueSrcList=None,
        fct="",
        )

Set up the object for an Add Translation Action.

key: Keyword which to add.

hdr: FITS header in which the keyword should be added.

valueSrcList: Python List of FtuFttValueSrc objects.

fct: Translation Action Conversion Function to invoke when doing the translation.

Returns: Reference to object itself.

  setChangeAction 
setChangeAction (
        self,
        key,
        hdr=0,
        valueSrcList=None,
        fct="",
        )

Set up the object for a Change Translation Action.

key: Keyword which to add.

hdr: FITS header in which the keyword should be added.

valueSrcList: Python List of FtuFttValueSrc objects.

fct: Translation Action Conversion Function to invoke when doing the translation.

Returns: Reference to object itself.

  setCopyAction 
setCopyAction (
        self,
        srcKey,
        srcHdr,
        trgKey,
        trgHdr,
        fct="",
        )

Set up the object for a Copy Translation Action.

srcKey: Keyword to be copied.

srcHdr: Header from which to take the keyword.

trgKey: Name of target keyword.

trgHdr: Header in which the copied keyword should be stored.

fct: Function to convert the keyword before writing it in the target header.

Returns: Reference to object itself.

  setHdr 
setHdr ( self,  hdr )

Set header number for the Translation Action.

hdr: Header number.

Returns: Reference to object itself.

  setKey 
setKey ( self,  key )

Set the keyword of the Translation Action.

key: Name of keyword.

Returns: Reference to object itself.

  setMoveAction 
setMoveAction (
        self,
        key,
        srcHdr,
        trgHdr,
        fct="",
        )

Set up the object for a Move Translation Action.

key: Keyword to be moved.

srcHdr: Source header from which the keyword should be taken.

trgHdr: Target header to which the keyword should be moved.

fct: Function to convert the keyword before writing it back to the FITS header.

Returns: Reference to object itself.

  setRemoveAction 
setRemoveAction (
        self,
        keyList,
        hdr=0,
        )

Set up the object for a Copy Translation Action.

keyList: Comma separated list of keyword names for keys that should be removed.

hdr: Header from which to remove the keyword(s).

Returns: Reference to object itself.

  setRenameAction 
setRenameAction (
        self,
        srcKey,
        trgKey,
        hdr=0,
        fct="",
        )

Set up the object for a Rename Translation Action.

srcKey: Keyword to be renamed.

trgKey: New name for the keyword to be renamed.

hdr: Header in which the keyword is contained.

fct: Function used to convert the keyword before writing it back to the FITS header.

Returns: Reference to object itself.

  setSrcHdr 
setSrcHdr ( self,  srcHdr )

Set Source Header for the Translation Action.

srcHdr: Source Header.

Returns: Reference to object itself.

  setSrcKey 
setSrcKey ( self,  srcKey )

Set the Source Key for the Translation Action.

srcKey: Source Key.

Returns: Reference to the object itself.

  setTrgHdr 
setTrgHdr ( self,  trgHdr )

Set Target Header for the Translation Action.

trgHdr: Target Header.

Returns: Reference to object itself.

  setTrgKey 
setTrgKey ( self,  trgKey )

Set Target Key for the Translation Action.

trgKey: Target Key.

Returns: Reference to object itself.


Table of Contents

This document was automatically generated on Thu Feb 22 17:08:59 2001 by HappyDoc version r1_3