aeromaps.models.parameters¶
Utilities for loading, storing, and converting AeroMAPSProcess self.parameters.
Parameters ¶
Container for AeroMAPSProcess input parameters TODO: is that the most appropriate description?
to_dict ¶
to_dict()
Return a dictionary representation of the parameters.
Returns:
| Type | Description |
|---|---|
data
|
Dictionary mapping attribute names to their values. |
Source code in aeromaps/models/parameters.py
18 19 20 21 22 23 24 25 26 27 | |
from_dict ¶
from_dict(data)
Update attributes from a dictionary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Dictionary of parameter names and values to set on the instance. |
required |
Source code in aeromaps/models/parameters.py
29 30 31 32 33 34 35 36 37 38 39 | |
write_json ¶
write_json(file_name='parameters.json')
Write parameters to a JSON file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_name
|
Path to the output JSON file. |
'parameters.json'
|
Source code in aeromaps/models/parameters.py
41 42 43 44 45 46 47 48 49 50 51 | |
read_json ¶
read_json(file_name='parameters.json')
Read parameters from a JSON file and update the instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_name
|
Path to the input JSON file. |
'parameters.json'
|
Source code in aeromaps/models/parameters.py
53 54 55 56 57 58 59 60 61 62 63 64 65 | |
read_json_direct ¶
read_json_direct(parameters_dict)
Load parameters from a dictionary-like object and update the instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parameters_dict
|
Dictionary or object containing parameter keys and values. |
required |
Source code in aeromaps/models/parameters.py
67 68 69 70 71 72 73 74 75 76 77 78 79 | |