Millepede-II V04-17-03
Public Member Functions | Private Attributes | List of all members
tinypede.MilleRecord Class Reference

Millepede-II (binary) record. More...

Inheritance diagram for tinypede.MilleRecord:

Public Member Functions

def __init__ (self, doublePrec=False)
 Create MP-II binary record. More...
 
def addData (self, dataList)
 Add data block to (end of) record. More...
 
def getData (self)
 Get data block from current position in record. More...
 
def printRecord (self)
 Print record. More...
 
def writeRecord (self, aFile)
 Write record to file. More...
 
def readRecord (self, aFile, aType)
 Read record from file. More...
 
def moreData (self)
 Locate next data block. More...
 
def specialDataTag (self)
 Get special data tag from block. More...
 

Private Attributes

 __doublePrecision
 flag for storage in as double values More...
 
 __position
 position in record, usually start of next data block; int More...
 
 __numData
 number of data blocks in record; int More...
 
 __recLen
 record length; int More...
 
 __iMeas
 position of value in current data block; int More...
 
 __iErr
 position of error in current data block; int More...
 
 __inder
 array with markers (0) and labels; array(int32) More...
 
 __glder
 array with values, errors and derivatives; (float32 or float64) More...
 

Detailed Description

Millepede-II (binary) record.

Containing information for local (track) and global fit.

The data blocks are collected in two arrays, a real array (containing float or double values) and integer array, of same length. A positive record length indicate float and a negative one double values. The content of the record is:

         real array              integer array    
     0   0.0                     error count (this record)  
     1   RMEAS, measured value   0                            __iMeas   -+
     2   local derivative        index of local derivative               |
     3   local derivative        index of local derivative               |
     4   ...                                                             | block
         SIGMA, error (>0)       0                            __iErr     |
         global derivative       label of global derivative              |
         global derivative       label of global derivative              |
         ...                                                            -+
         RMEAS, measured value   0                            __position
         local derivative        index of local derivative
         local derivative        index of local derivative
         ...
         SIGMA, error            0
         global derivative       label of global derivative
         global derivative       label of global derivative
         ...
         global derivative       label of global derivative   __recLen

Special data block (other/debug information). Contains no local derivatives and (error) SIGMA is negative (-Number of SPecial data words).

         real array              integer array
         0.0                     0                 __iMeas   -+
         -float(NSP)             0                 __iErr     |
         special data            special data                 | special block (2+NSP words)
         special data            special data                 |
         ...                                                 -+

Definition at line 75 of file tinypede.py.

Constructor & Destructor Documentation

◆ __init__()

def tinypede.MilleRecord.__init__ (   self,
  doublePrec = False 
)

Create MP-II binary record.

Definition at line 79 of file tinypede.py.

Member Function Documentation

◆ addData()

def tinypede.MilleRecord.addData (   self,
  dataList 
)

Add data block to (end of) record.

Parameters
dataListlist with measurement, error, labels and derivatives; list

Definition at line 101 of file tinypede.py.

References tinypede.MilleRecord.__glder, tinypede.MilleRecord.__inder, and tinypede.MilleRecord.__numData.

◆ getData()

def tinypede.MilleRecord.getData (   self)

Get data block from current position in record.

Returns
list with measurement, error, labels and derivatives; list

Definition at line 121 of file tinypede.py.

References tinypede.MilleRecord.__glder, tinypede.MilleRecord.__iErr, tinypede.MilleRecord.__iMeas, tinypede.MilleRecord.__inder, and tinypede.MilleRecord.__position.

◆ moreData()

def tinypede.MilleRecord.moreData (   self)

◆ printRecord()

def tinypede.MilleRecord.printRecord (   self)

Print record.

Definition at line 137 of file tinypede.py.

References tinypede.MilleRecord.__glder, and tinypede.MilleRecord.__inder.

◆ readRecord()

def tinypede.MilleRecord.readRecord (   self,
  aFile,
  aType 
)

Read record from file.

Parameters
aFile(binary) file
aTypefile type ('C' or 'F'ortran)

Definition at line 158 of file tinypede.py.

References tinypede.MilleRecord.__glder, tinypede.MilleRecord.__inder, and tinypede.MilleRecord.__recLen.

◆ specialDataTag()

def tinypede.MilleRecord.specialDataTag (   self)

Get special data tag from block.

Returns
tag or -1 for ordinary data block; int

Definition at line 206 of file tinypede.py.

References tinypede.MilleRecord.__glder, tinypede.MilleRecord.__iErr, tinypede.MilleRecord.__iMeas, and readMilleBinary.int.

◆ writeRecord()

def tinypede.MilleRecord.writeRecord (   self,
  aFile 
)

Write record to file.

Parameters
aFile(binary) file

Definition at line 146 of file tinypede.py.

References tinypede.MilleRecord.__doublePrecision, tinypede.MilleRecord.__glder, and tinypede.MilleRecord.__inder.

Member Data Documentation

◆ __doublePrecision

tinypede.MilleRecord.__doublePrecision
private

flag for storage in as double values

Definition at line 81 of file tinypede.py.

Referenced by tinypede.MilleRecord.writeRecord().

◆ __glder

tinypede.MilleRecord.__glder
private

◆ __iErr

tinypede.MilleRecord.__iErr
private

position of error in current data block; int

Definition at line 91 of file tinypede.py.

Referenced by tinypede.MilleRecord.getData(), tinypede.MilleRecord.moreData(), and tinypede.MilleRecord.specialDataTag().

◆ __iMeas

tinypede.MilleRecord.__iMeas
private

position of value in current data block; int

Definition at line 89 of file tinypede.py.

Referenced by tinypede.MilleRecord.getData(), tinypede.MilleRecord.moreData(), and tinypede.MilleRecord.specialDataTag().

◆ __inder

tinypede.MilleRecord.__inder
private

◆ __numData

tinypede.MilleRecord.__numData
private

number of data blocks in record; int

Definition at line 85 of file tinypede.py.

Referenced by tinypede.MilleRecord.addData(), and tinypede.MilleRecord.moreData().

◆ __position

tinypede.MilleRecord.__position
private

position in record, usually start of next data block; int

Definition at line 83 of file tinypede.py.

Referenced by tinypede.MilleRecord.getData(), and tinypede.MilleRecord.moreData().

◆ __recLen

tinypede.MilleRecord.__recLen
private

record length; int

Definition at line 87 of file tinypede.py.

Referenced by tinypede.MilleRecord.moreData(), and tinypede.MilleRecord.readRecord().


The documentation for this class was generated from the following file: