Data in a model domain are easily queried and aggregated using the ModelSummary
class:
summary.
ModelSummary
(domain)¶Collect summarized results from the model domain. With each summary function call, no computations take place.
Rather, the to_compute
attribute is appended with the output dask
object, all of which are optimized and
computed only when the compute()
method is called.
Note
The to_compute
attribute maintains the order of summary function calls. The returned list from compute
will maintain summarized data in the call order.
Parameters: | domain – A Domain instance |
---|
average_age
(species=None, time=None, sex=None, group=None)¶Collect the average age from a domain, filtering by sub-populations
Parameters: |
|
---|
compute
()¶Compute all loaded summaries in the to_compute
attribute
Returns: | list of computed computed objects from to_compute attribute |
---|
fecundity
(species=None, time=None, sex=None, group=None, coeff=False)¶Collect the total fecundity using the given query
Parameters: |
|
---|---|
Returns: | ndarray of total offspring |
list_mortality_types
(species=None, time=None, sex=None, group=None)¶List the mortality names in the domain for the given query
Parameters: |
|
---|---|
Returns: | list of mortality names |
model_summary
()¶Summarize totals of each species and their parameters in the domain. This is used primarily to service the
data requirements of an excel output in logger.write_xlsx
Returns: | dict of species and their parameters |
---|
total_carrying_capacity
(species=None, time=None, sex=None, group=None)¶Collect the total carrying capacity in the domain for the given query.
Attention
Carrying capacity may be calculated for an entire species in the solver (see Numerical Solvers). As such, query results that are filtered by sex or age group will include carrying capacity for the entire species.
Parameters: |
|
---|---|
Returns: | ndarray of total carrying capacity |
total_mortality
(species=None, time=None, sex=None, group=None, mortality_name=None, as_population=True)¶Collect either the total population or the mortality parameter value for the given query
Parameters: |
|
---|---|
Returns: | ndarray of the mortality population or parameter |
total_offspring
(species=None, time=None, sex=None, group=None, offspring_sex=None)¶Collect the total offspring using the given query
Parameters: |
|
---|---|
Returns: | ndarray of total offspring |
total_population
(species=None, time=None, sex=None, group=None, age=None)¶Collect the sum of populations from a domain, filtering by sub-populations
Parameters: |
|
---|---|
Returns: | ndarray with the total population |