Natural Modules
Bases: CompositeModule
, _PatchModuleProtocol
The Base Nature Module.
Note:
Look at this tutorial to understand the model structure.
This is NOT a raster layer, but can be seen as a container of different raster layers.
Users can create new raster layer (i.e., PatchModule
) by new
method.
By default, an initialized ABSESpy model will init an instance of this BaseNature
as nature
module.
Attributes:
Name | Type | Description |
---|---|---|
major_layer |
Optional[PatchModule]
|
The major layer of nature module. By default, it's the first layer that user created. |
total_bounds |
ndarray
|
The spatial scope of the model's concern. By default, uses the major layer of this model. |
Source code in abses/nature.py
major_layer
property
writable
¶
The major layer of nature module. By default, it's the first created layer.
total_bounds
property
¶
Total bounds. The spatial scope of the model's concern. If None (by default), uses the major layer of this model. Usually, the major layer is the first layer sub-module you created.
create_module ¶
Creates a submodule of the raster layer.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
module_cls |
Optional[Type[PatchModule]]
|
The custom module class. |
None
|
how |
Optional[HowCreation]
|
Class method to call when creating the new sub-module (raster layer).
So far, there are three options:
|
None
|
**kwargs |
Any
|
Any other arg passed to the creation method.
See corresponding method of your how option from |
{}
|
Returns:
Type | Description |
---|---|
PatchModule
|
the created new module. |