Skip to content

Commit 43efb68

Browse files
committedNov 18, 2024·
Move predictors to the aoh calculator submodule
1 parent 9eefd1c commit 43efb68

File tree

4 files changed

+8
-460
lines changed

4 files changed

+8
-460
lines changed
 

‎predictors/endemism.py

-257
This file was deleted.

‎predictors/species_richness.py

-197
This file was deleted.

‎scripts/run.sh

+7-5
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ python3 ./utils/persistencegenerator.py --input ${DATADIR}/species-info --datadi
9393
# Calculate all the AoHs
9494
littlejohn -j 200 -o ${DATADIR}/aohbatch.log -c ${DATADIR}/aohbatch.csv ${VIRTUAL_ENV}/bin/python3 -- ./aoh-calculator/aohcalc.py --force-habitat
9595

96+
# Calculate predictors from AoHs
97+
python3 ./aoh-calculator/summaries/species_richness.py --aohs_folder ${DATADIR}/aohs/current/ \
98+
--output ${DATADIR}/predictors/species_richness.tif
99+
python3 ./aoh-calculator/summaries/endemism.py --aohs_folder ${DATADIR}/aohs/current/ \
100+
--species_richness ${DATADIR}/predictors/species_richness.tif \
101+
--output ${DATADIR}/predictors/\
102+
96103
# Calculate the per species Delta P values
97104
littlejohn -j 200 -o ${DATADIR}/persistencebatch.log -c ${DATADIR}/persistencebatch.csv ${VIRTUAL_ENV}/bin/python3 -- ./deltap/global_code_residents_pixel.py
98105

@@ -132,8 +139,3 @@ do
132139
--b ${DATADIR}/deltap_final/summed_scaled_restore_0.25.tif \
133140
--output {$DATADIR}/analysis/restore_0.25_vs_${CURVE}.png
134141
done
135-
136-
python3 ./predictors/species_richness.py --aohs_folder ${DATADIR}/aohs/current/ --output ${DATADIR}/predictors/species_richness.tif
137-
python3 ./predictors/endemism.py --aohs_folder ${DATADIR}/aohs/current/ \
138-
--species_richness ${DATADIR}/predictors/species_richness.tif \
139-
--output ${DATADIR}/predictors/

0 commit comments

Comments
 (0)
Please sign in to comment.