mnp.species_models.species_evaluation
Module Contents
Classes
Dataclass for holding parameters for species evaluation. |
|
Data
API
- mnp.species_models.species_evaluation.ID_COLNAME = 'id'
- mnp.species_models.species_evaluation.AREA_M_COLNAME = 'area_m'
- mnp.species_models.species_evaluation.EFF_AREA_M_COLNAME = 'effective_area_m'
- mnp.species_models.species_evaluation.EFF_AREA_KP_COLNAME = 'effective_area_kp'
- mnp.species_models.species_evaluation.IS_KP_COLNAME = 'is_key_population'
- mnp.species_models.species_evaluation.EFF_AREA_KP_NORM_COLNAME = 'effective_area_kp_norm'
- class mnp.species_models.species_evaluation.SpeciesEvaluationParameters
Dataclass for holding parameters for species evaluation.
- key_population_area: float = 1
- possibly_viable_threshold: float = 1
- viable_threshold: float = 1
- small_pop_threshold_area: float = 500
- small_pop_slope: float = 2
- pxl_area: float = 0
- class mnp.species_models.species_evaluation.SpeciesEvaluation(mnp_parameters: MNPParameters or None, species_code: str, hsi: mnp.species_models.habitat_suitability.HSI, clustering: mnp.species_models.clustering.ClusteringProcedure)
Initialization
Species evaluation class. Is the species viable or not?
- mnp_parameters: MNPParameters or None
Parameters for the MNP model.
- species_codestr
The code for the species to evaluate.
- hsiHSI or SubRegion
The HSI array or sub-region to evaluate.
- clusteringClusteringProcedure or SubRegion
The clustering procedure or sub-region to use.
- population_array(array_type: str, only_keypopulations=False) scipy.sparse.sparray | int
Make an array for this species evaluation, with some value in the cells of each population.
- array_type{‘binary’,’nkeys’}
The type of population array to make
- only_keypopulationsbool
retain only population of at least a key population in size
- arraynp.ndarray
array of this species’ populations
- trait_info() dict[str, float]
Return the values of this species traits
Dictionary with trait info
- evaluate_metapopulations() None
Evaluate metapopulations for the species
- calculate()
Calculate evaluation for this SpeciesModel.
The following results are calculated at species level :
populations = number of populations
populations_key_population = amount of populations that reach a key population in size
total_area_m = total area in meters
total_effective_area_m = total area in meters, corrected for suitability
total_effective_area_kp = total area in key populations, corrected for suitability
total_effective_area_kp_norm = total area in key populations, corrected for suitability, after normalisation
viability_class = viability class for this species: None, 1, 2 or 3
viability_class_description = label for the corresponding viability class
- update_viability_class()
Check if this species is viable and update the result dictionary.
sum_norm_keys = 0 –> 0
0 < sum_norm_keys < possibly_viable_threshold –> 1
possibly_viable_threshold <= sum_norm_keys < viable_threshold –> 2
sum_norm_keys >= viable_threshold –> 3
- update_results_dictionary()
Updates results dictionary.
- results() dict
Return result-dictionary.
- dict
Dictionary with species evaluation specs
- summary_table_to_file(output_path)
Write summary table with specifications of each population to .tif.vat.dbf file, as sidecar file to the <cover>/output/clustering/<species_code>.tif files