Package pyraf :: Module irafpar
[hide private]
[frames] | no frames]

Module irafpar

source code

irafpar.py -- parse IRAF .par files and create lists of IrafPar objects

$Id: irafpar.py 803 2007-10-08 13:52:49Z rij $

R. White, 2000 January 7

Classes [hide private]
  _EmptyClass
  IrafPar
Non-array IRAF parameter base class
  IrafArrayPar
IRAF array parameter class
  _StringMixin
IRAF string parameter mixin class
  IrafParS
IRAF string parameter class
  IrafParAS
IRAF string array parameter class
  IrafParPset
IRAF pset parameter class
  IrafParL
IRAF list parameter base class
  IrafParLS
IRAF string list parameter class
  IrafParCursor
Base class for cursor parameters
  IrafParGCur
IRAF graphics cursor parameter class
  IrafParImCur
IRAF image display cursor parameter class
  IrafParUKey
IRAF user typed key parameter class
  _BooleanMixin
IRAF boolean parameter mixin class
  IrafParB
IRAF boolean parameter class
  IrafParAB
IRAF boolean array parameter class
  _IntMixin
IRAF integer parameter mixin class
  IrafParI
IRAF integer parameter class
  IrafParAI
IRAF integer array parameter class
  _RealMixin
IRAF real parameter mixin class
  IrafParR
IRAF real parameter class
  IrafParAR
IRAF real array parameter class
  ParCache
Parameter cache that updates from .par file when necessary
  IrafParList
List of Iraf parameters
Functions [hide private]
 
warning(msg, strict=0, exception=SyntaxError, level=0) source code
 
IrafParFactory(fields, filename=None, strict=0)
IRAF parameter factory
source code
 
makeIrafPar(init_value, datatype=None, name="<anonymous>", mode="h", array_size=None, list_flag=0, min=None, max=None, enum=None, prompt="", strict=0, filename=None)
Create an IrafPar variable
source code
 
isParField(s)
Returns true if string s appears to be a parameter field
source code
 
_printVerboseDiff(list1, list2)
Print description of differences between parameter lists
source code
 
_extractDiffInfo(list) source code
 
_printHiddenDiff(pd1, hd1, pd2, hd2) source code
 
_printDiff(pd1, pd2, label) source code
 
_readpar(filename, strict=0)
Read IRAF .par file and return list of parameters
source code
 
_getChoice(s, strict) source code
Variables [hide private]
  _string_types = ['s', 'f', 'struct']
  _string_list_types = ['*struct', '*s', '*f', '*i']
  _real_types = ['r', 'd']
  _typedict = {'string': 's', 'char': 's', 'file': 'f', 'struct'...
  _getFieldDict = minmatch.MinMatchDict()
  _setFieldDict = minmatch.MinMatchDict()
  _IrafPar_attr_dict = {"name": None, "type": None, "mode": None...
  _changedFlag = 1
  _cmdlineFlag = 2
  _re_d = re.compile(r'[Dd]')
  _re_colon = re.compile(r':')
  _re_field = re.compile(field, re.DOTALL)
  _re_bstrail = re.compile(r'\\*$')
  _re_choice = re.compile(r'\|')

Imports: os, sys, re, types, irafimcur, irafukey, irafutils, minmatch, epar, tpar, INDEF, Verbose, yes, no, gki, copy, iraf, FileCache


Function Details [hide private]

IrafParFactory(fields, filename=None, strict=0)

source code 

IRAF parameter factory

fields is a list of the comma-separated fields in the .par file. Each entry is a string or None (indicating that field was omitted.)

Set the strict parameter to non-zero value to do stricter parsing (to find errors in .par files.)


Variables Details [hide private]

_typedict

Value:
{'string': 's', 'char': 's', 'file': 'f', 'struct': 'struct', 'int': '\
i', 'bool': 'b', 'real': 'r', 'double': 'd', 'gcur': 'gcur', 'imcur': \
'imcur', 'ukey': 'ukey', 'pset': 'pset',}

_IrafPar_attr_dict

Value:
{"name": None, "type": None, "mode": None, "value": None, "min": None,\
 "max": None, "choice": None, "choiceDict": None, "prompt": None, "fla\
gs": 0,}