v_sim.ScalarFieldData¶
- Subclasses:
 None
Methods¶
- Inherited:
 v_sim.ScalarField (19), GObject.Object (37), v_sim.Boxed (2), v_sim.Pointset (9)
- Structs:
 
class  | 
  | 
class  | 
  | 
  | 
|
  | 
Virtual Methods¶
Properties¶
- Inherited:
 
Signals¶
- Inherited:
 
Fields¶
- Inherited:
 
Name  | 
Type  | 
Access  | 
Description  | 
|---|---|---|---|
parent  | 
r  | 
Class Details¶
- class v_sim.ScalarFieldData(**kwargs)¶
 - Bases:
 - Abstract:
 No
- Structure:
 
An opaque structure for the scalar field.
- classmethod new_fromFile(filename, table, cancel, callback, *user_data)¶
 - Parameters:
 filename (
str) – the path to the file to be loaded ;table ({
object:object} orNone) – a set of different options (can beNone).cancel (
Gio.CancellableorNone) – aGio.Cancellableobject.callback (
Gio.AsyncReadyCallbackorNone) – a callback when the load finishes.user_data (
objectorNone) – some user data to pass to the callback.
- Returns:
 a
GLib.Listto store read field(s).- Return type:
 
Read the given file and try to load it as a scalar field file. If succeed, all read fields are appended to the fieldList argument. If an error occurs, it is stored into error. When entering the routine, error must be
None. If table is given, it means that the caller routine gives some options to the loader routine. These options are a set of names and values.If the file contains several fields, they must be loaded and added to fieldList.
- classmethod new_fromFileSync(filename, table, cancel)¶
 - Parameters:
 filename (
str) – the path to the file to be loaded ;table ({
object:object} orNone) – a set of different options (can beNone).cancel (
Gio.CancellableorNone) – aGio.Cancellableobject.
- Raises:
 - Returns:
 a
GLib.Listto store read field(s).- Return type:
 
Like
v_sim.ScalarFieldData.new_fromFile(), but synchronous.New in version 3.8.
- getArray()¶
 - Returns:
 a pointer on the allocated data array.
- Return type:
 [
float]
The data are stored z first in a flatten array.
New in version 3.7.
- set(data, xyzOrder)¶
 - Parameters:
 data ([
float]) – an array containing data to be copied ;xyzOrder (
v_sim.ScalarFieldDataOrder) – a boolean.
Set the data of the given self. The array data should be stored in z direction first, followed by y and x if xyzOrder is
False, or in the other order whenTrue. The number of elements in the x, y and z directions are read from field->priv->nElements. Then usev_sim.ScalarField.setGridSize() before using this method.