The Open FUSION Toolkit 1.0.0-beta6
Modeling tools for plasma and fusion research and engineering
Loading...
Searching...
No Matches
histfile Class Reference

Detailed Description

Class for loading and analyzing a structured OFT binary file.

Public Member Functions

 __getitem__ (self, key)
 __init__ (self, filename)
 Load and parse binary file into Python representation.
 __iter__ (self)
 __repr__ (self)
 Print information about the file.
 get (self, keyname, value=None)
 items (self)
 keys (self)
 save_to_hdf5 (self, filename)
 Convert data to HDF5 format.
 save_to_matlab (self, filename)
 Convert data to MATLAB format.

Public Attributes

 content = handle.read()
 dim = None
dict field_descriptions = {}
list field_repeats = []
list field_sizes = []
list field_tags = []
list field_types = []
list header = []
str line_fmt = '{0}'.format(self.dim[0]*self.dim[1]) + self.field_types[0]
list line_length = self.field_sizes[0]*self.dim[0]*self.dim[1]
int nfields = int(base_dict['nfields'])
int nlines = 0
int offset = data_reg

Protected Attributes

dict _data = {}
 _filename = filename

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
filename )

Load and parse binary file into Python representation.

Member Function Documentation

◆ __getitem__()

__getitem__ ( self,
key )

◆ __iter__()

__iter__ ( self)

◆ __repr__()

__repr__ ( self)

Print information about the file.

◆ get()

get ( self,
keyname,
value = None )

◆ items()

items ( self)

◆ keys()

keys ( self)

◆ save_to_hdf5()

save_to_hdf5 ( self,
filename )

Convert data to HDF5 format.

◆ save_to_matlab()

save_to_matlab ( self,
filename )

Convert data to MATLAB format.

Member Data Documentation

◆ _data

_data = {}
protected

◆ _filename

_filename = filename
protected

◆ content

content = handle.read()

◆ dim

dim = None

◆ field_descriptions

dict field_descriptions = {}

◆ field_repeats

list field_repeats = []

◆ field_sizes

field_sizes = []

◆ field_tags

field_tags = []

◆ field_types

list field_types = []

◆ header

list header = []

◆ line_fmt

str line_fmt = '{0}'.format(self.dim[0]*self.dim[1]) + self.field_types[0]

◆ line_length

list line_length = self.field_sizes[0]*self.dim[0]*self.dim[1]

◆ nfields

nfields = int(base_dict['nfields'])

◆ nlines

nlines = 0

◆ offset

int offset = data_reg

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