FATE
simulationR/POST_FATE.binaryMaps.R
POST_FATE.binaryMaps.Rd
This script is designed to produce raster maps of PFG presence
/ absence for one (or several) specific FATE
simulation year.
POST_FATE.binaryMaps(
name.simulation,
file.simulParam = NULL,
years,
method,
method1.threshold = 0.05,
method2.cutoff = NULL,
opt.no_CPU = 1
)
a string
corresponding to the main directory
or simulation name of the FATE
simulation
default NULL
.
A string
corresponding to the name of a parameter file that will be contained into
the PARAM_SIMUL
folder of the FATE
simulation
an integer
, or a vector
of integer
,
corresponding to the simulation year(s) that will be used to extract PFG
abundance maps
an integer
to choose the transformation method : 1
(relative abundance) or 2
(optimizing TSS) (see
Details
)
default 0.05
.
If method = 1
,
minimum relative abundance required for each PFG to be considered as present
in the concerned pixel
default NULL
.
If method = 2
, a
data.frame
with 3 columns : year
, PFG
, cutoff
(see Details
)
(optional) default 1
.
The number of
resources that can be used to parallelize the unzip/zip
of raster
files
Two folders are created :
BIN_perPFG
_allStrata
containing presence / absence raster maps for each PFG across all strata
BIN_perPFG
_perStrata
containing presence / absence
raster maps for each PFG for each stratum
(if pixel abundances per PFG
per stratum were saved (see PRE_FATE.params_globalParameters
))
This function allows to obtain, for a specific FATE
simulation and
a specific parameter file within this simulation, raster maps of PFG
presence / absence.
For each PFG and each selected simulation year, raster maps are retrieved
from the results folder ABUND_REL_perPFG_allStrata
and lead to the
production of as many maps as those found :
1
fixed thresholdrelative abundance maps are transformed
into binary maps according to the threshold given by
method1.threshold
:
$$abund\_rel_{\text{ PFG}_i} > \text{method1.threshold} \;\;
\Leftrightarrow \;\; 1$$
2
optimizing TSSrelative abundance maps are transformed
into binary maps according to the cutoff
found
with the POST_FATE.graphic_validationStatistics
function :
$$abund\_rel_{\text{ PFG}_i} > \text{method2.cutoff}_{\text{ PFG}_i} \;\;
\Leftrightarrow \;\; 1$$
It requires that the POST_FATE.relativeAbund
function has been run and that the folder ABUND_REL_perPFG_allStrata
exists.
If method = 2
, it requires that the
POST_FATE.graphic_validationStatistics
function has been run.
If pixel abundances per PFG per stratum were saved (see
PRE_FATE.params_globalParameters
), binary maps per stratum are
obtained by multiplying raster maps from ABUND_perPFG_perStrata
folder
by corresponding raster maps from BIN_perPFG_allStrata
folder.
These binary raster
files can then be used by other
functions :
to produce graphics of PFG modelled presence vs
PFG Habitat Suitability maps
(see
POST_FATE.graphic_mapPFGvsHS
)