GeneralBrokenLines V03-00-00
gblpy
Public Member Functions | Private Attributes | List of all members
gblpy.mille.MilleRecord Class Reference

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

Inheritance diagram for gblpy.mille.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)
 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 76 of file mille.py.

Constructor & Destructor Documentation

◆ __init__()

def gblpy.mille.MilleRecord.__init__ (   self,
  doublePrec = False 
)

Create MP-II binary record.

Definition at line 80 of file mille.py.

Member Function Documentation

◆ addData()

def gblpy.mille.MilleRecord.addData (   self,
  dataList 
)

Add data block to (end of) record.

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

Definition at line 102 of file mille.py.

References gblpy.mille.MilleRecord.__glder, gblpy.mille.MilleRecord.__inder, and gblpy.mille.MilleRecord.__numData.

◆ getData()

def gblpy.mille.MilleRecord.getData (   self)

Get data block from current position in record.

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

Definition at line 122 of file mille.py.

References gblpy.mille.MilleRecord.__glder, gblpy.mille.MilleRecord.__iErr, gblpy.mille.MilleRecord.__iMeas, gblpy.mille.MilleRecord.__inder, and gblpy.mille.MilleRecord.__position.

◆ moreData()

def gblpy.mille.MilleRecord.moreData (   self)

◆ printRecord()

def gblpy.mille.MilleRecord.printRecord (   self)

Print record.

Definition at line 138 of file mille.py.

References gblpy.mille.MilleRecord.__glder, and gblpy.mille.MilleRecord.__inder.

◆ readRecord()

def gblpy.mille.MilleRecord.readRecord (   self,
  aFile 
)

Read record from file.

Parameters
aFile(binary) file

Definition at line 158 of file mille.py.

References gblpy.mille.MilleRecord.__glder, gblpy.mille.MilleRecord.__inder, and gblpy.mille.MilleRecord.__recLen.

◆ specialDataTag()

def gblpy.mille.MilleRecord.specialDataTag (   self)

Get special data tag from block.

Returns
tag or -1 for ordinary data block; int

Definition at line 196 of file mille.py.

References gblpy.mille.MilleRecord.__glder, gblpy.mille.MilleRecord.__iErr, and gblpy.mille.MilleRecord.__iMeas.

◆ writeRecord()

def gblpy.mille.MilleRecord.writeRecord (   self,
  aFile 
)

Write record to file.

Parameters
aFile(binary) file

Definition at line 147 of file mille.py.

References gblpy.mille.MilleRecord.__doublePrecision, gblpy.mille.MilleRecord.__glder, and gblpy.mille.MilleRecord.__inder.

Member Data Documentation

◆ __doublePrecision

gblpy.mille.MilleRecord.__doublePrecision
private

flag for storage in as double values

Definition at line 82 of file mille.py.

Referenced by gblpy.mille.MilleRecord.writeRecord().

◆ __glder

gblpy.mille.MilleRecord.__glder
private

◆ __iErr

gblpy.mille.MilleRecord.__iErr
private

position of error in current data block; int

Definition at line 92 of file mille.py.

Referenced by gblpy.mille.MilleRecord.getData(), gblpy.mille.MilleRecord.moreData(), and gblpy.mille.MilleRecord.specialDataTag().

◆ __iMeas

gblpy.mille.MilleRecord.__iMeas
private

position of value in current data block; int

Definition at line 90 of file mille.py.

Referenced by gblpy.mille.MilleRecord.getData(), gblpy.mille.MilleRecord.moreData(), and gblpy.mille.MilleRecord.specialDataTag().

◆ __inder

gblpy.mille.MilleRecord.__inder
private

◆ __numData

gblpy.mille.MilleRecord.__numData
private

number of data blocks in record; int

Definition at line 86 of file mille.py.

Referenced by gblpy.mille.MilleRecord.addData(), and gblpy.mille.MilleRecord.moreData().

◆ __position

gblpy.mille.MilleRecord.__position
private

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

Definition at line 84 of file mille.py.

Referenced by gblpy.mille.MilleRecord.getData(), and gblpy.mille.MilleRecord.moreData().

◆ __recLen

gblpy.mille.MilleRecord.__recLen
private

record length; int

Definition at line 88 of file mille.py.

Referenced by gblpy.mille.MilleRecord.moreData(), and gblpy.mille.MilleRecord.readRecord().


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