Contributions¶
This sub-package of simkit contains contributions that are considered important parts of development, but have not been merged into the core sub-package yet.
Readers¶
Custom data readers including simkit.contrib.readers.ArgumentReader
,
simkit.contrib.readers.DjangoModelReader
and
simkit.contrib.readers.HDF5Reader
.
Argument Reader¶
-
class
simkit.contrib.readers.
ArgumentReader
(parameters, meta=None)[source]¶ Read arguments passed directly to a simulation.
The argument parameters dictionary should have two keys: args and kwargs which consist of the names and attributes of the positional and keyword arguments respectively. For example:
{ 'GHI': {'units': 'W/m**2', 'isconstant': False, 'argpos': 0}, 'azimuth': {'units': 'degrees', 'isconstant': False, 'argpos': 1}, 'DNI': {'units': 'W/m**2', 'isconstant': False}, 'zenith': {'units': 'degrees', 'isconstant': False} }
-
apply_units_to_cache
(data)[source]¶ Applies units to data when a proxy reader is used. For example if the data is cached as JSON and retrieved using the
JSONReader
, then units can be applied from the original parameter schema.- Parameters
data – Data read by proxy reader.
- Returns
data with units applied
-
is_file_reader
= False¶ True if reader accepts
filename
argument
-