Package wcdb :: Module models :: Class PropertyValue
[hide private]
[frames] | no frames]

Class PropertyValue

source code



Property value

Nested Classes [hide private]
  Meta
Instance Methods [hide private]
 
path(self)
The path to the dataset within the simulation h5 file
source code
 
dataset(self)
The H5Py Dataset object for this property.
source code
 
set_data(self, data) source code
 
add_data(self, ts)
This method is for adding new time slices to the data.
source code
 
get_dataset(self, rowLabels=None, colLabels=None) source code
 
get_dataset_slice(self, rowLabels=None, colLabels=None) source code
 
__unicode__(self) source code
Class Variables [hide private]
  simulation = models.ForeignKey('Simulation', related_name= 'pr...
  property = models.ForeignKey('Property', related_name= 'values')
  shape = ListField(null= True, blank= True)
  dtype = models.CharField(max_length= 255, null= True, blank= T...
  _filled = models.IntegerField(default= 0)
Method Details [hide private]

path(self)

source code 
The path to the dataset within the simulation h5 file 

Decorators:
  • @property_tag

dataset(self)

source code 
The H5Py Dataset object for this property. 

Decorators:
  • @property_tag

add_data(self, ts)

source code 

This method is for adding new time slices to the data.

Arguments
    name        type
    ----------------------
    ts      | numpy.array


This method requires that ts.shape be the same lengh as the
shape as self.dataset.shape, and the last dimension of ts is less than 
the number indices available in self.dataset.

That is, len(ts.shape) == len(self.dataset.shape)

For example: 
    If self.dataset.shape is (2,3,4), you must pass in a tuple of
    shape (2,3,x). 

    If ts == {{0, 1}, {2, 3}, {4, 5}} then it will fail.

    Instead, it should be ts == {{[0], [1]}, {[2], [3]}, {[4], [5]}}


Class Variable Details [hide private]

simulation

Value:
models.ForeignKey('Simulation', related_name= 'property_values')

dtype

Value:
models.CharField(max_length= 255, null= True, blank= True)