class foxes.core.MData(foxes.core.Data)[source]

Container for foxes model data.

Public members

MData(*args, name='mdata', **kwargs)[source]

Constructor

property n_states

The number of states

property n_turbines

The number of turbines

property chunki_states

The index of the states chunk

property chunki_points

The index of the points chunk

property n_chunks_states

The number of states chunks

property n_chunks_points

The number of points chunks

states_i0(counter=False)[source]

Get the state counter for first state in chunk

add(name, data, dims)[source]

Add data entry

get_slice(variables, s, dim_map={}, name=None, force=False)[source]

Get a slice of data.

classmethod from_dataset(ds, *args, callback=None, ...)[source]

Create Data object from a dataset

property name

The dictionary name

get_item(key, *deflt, prnt=True)[source]

Gets an item, prints readable error if not found

pop_item(key, *deflt, prnt=True)[source]

Pops an item, prints readable error if not found

__setitem__(key, value)[source]

Set self[key] to value.

__getitem__(key)[source]

x.__getitem__(y) <==> x[y]

update(*args, **kwargs)[source]

Update the dictionary with the key/value pairs from other, overwriting existing keys.

eval(globals=None, locals=None)[source]

Tries to evaluate all string values, recursively.

classmethod from_yaml(yml_file, verbosity=1)[source]

Reads a yaml file