Package fabio :: Module edfimage :: Class Frame
[hide private]
[frames] | no frames]

Class Frame

source code

object --+
         |
        Frame

A class representing a single frame in an EDF file

Instance Methods [hide private]
 
__init__(self, data=None, header=None, header_keys=None, number=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
parseheader(self, block)
Parse the header in some EDF format from an already open file
source code
 
swap_needed(self)
Decide if we need to byteswap
source code
 
getData(self)
Unpack a binary blob according to the specification given in the header
source code
 
setData(self, npa=None)
Setter for data in edf frame
source code
python string with the concatenation of the ascii header and the binary data block
getEdfBlock(self, force_type=None)
Returns: ascii header block
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  data
Unpack a binary blob according to the specification given in the header

Inherited from object: __class__

Method Details [hide private]

__init__(self, data=None, header=None, header_keys=None, number=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

parseheader(self, block)

source code 

Parse the header in some EDF format from an already open file

Parameters:
  • block (string, should be full ascii) - string representing the header block
Returns:
size of the binary blob

getData(self)

source code 

Unpack a binary blob according to the specification given in the header

Returns:
dataset as numpy.ndarray

getEdfBlock(self, force_type=None)

source code 
Parameters:
  • force_type (string or numpy.dtype) - type of the dataset to be enforced like "float64" or "uint16"
Returns: python string with the concatenation of the ascii header and the binary data block
ascii header block

Property Details [hide private]

data

Unpack a binary blob according to the specification given in the header

Get Method:
getData(self) - Unpack a binary blob according to the specification given in the header
Set Method:
setData(self, npa=None) - Setter for data in edf frame
Delete Method:
'property: (edf)frame.data, uncompress the datablock when needed'