
Detectability of orangutan nests at satellite resolution (Pleiades Neo, 30 cm) - simulation code and results - sim.py: sensor degradation model (Gaussian optics + detector integration, MTF ~0.15 at Nyquist; 1 % noise; products: colour, panchromatic, pansharpened 30 cm / 1.2 m)- expB2.py: paired implant design (32 real nests rescaled to 0.8-1.3 m and inserted into nest-free canopy chips from the PeerJ "Without_nest" frames; the same chip without the nest is the control) BLEND=alpha|poisson python3 expB2.py frozen -> frozen ResNet50 features + logistic regression BLEND=alpha|poisson python3 expB2.py cnn -> small CNN trained at satellite pixel size Five-fold cross-validation grouped by nest; AUC with 95 % bootstrap CI over nests; recall at 5 % and 1 % false-positive rate.- nestloc.json: centre and diameter (px) of each nest in the "nests pictures" folder- res_*.json: results- make_figure2.py: Figure 2 (AUC versus resolution)- make_figure3.py: Figure 3 (dedicated network AUC, nests found vs false-alarm rate, individuals relocated)Assumption: native GSD 3.5 cm (Canon S100, f = 5.2 mm, ~100 m above the canopy). Additional analyses (from nests to individuals)- run_strict.py: recall at strict false-alarm rates (21 000 held-out nest-free chips) -> res_strict.json- reg_test.py + run_twodate.py: co-registration of consecutive frames and two-date change detection -> res_twodate.json- sim_spatial.py, sim_lift.py: forest blocks of 1 km2, nests along travel paths, block flagging -> res_spatial*.json, res_lift.json Published detector and Grad-CAM (Sections 3.1 and 3.2)- detect.py, detect_sizes.py: detector of Wich et al. (2025) applied to the PeerJ frames (tiles, and whole frames at 640/1280/1920 px) -> dets_native.json, dets_sizes.json- tm.py: template matching of the 32 close-up nest photographs against the drone frames -> tm.json- gradcam.py: retrains the dedicated CNN on the same chips and computes Grad-CAM maps on held-out nests -> gradcam_chips.csv, gradcam_examples.npy (not included, regenerated by the script)- make_figure_gradcam.py: Figure 2 (Grad-CAM); make_figure2.py now draws Figure 3 and make_figure3.py Figure 4 Statistical analyses (R)- export_for_R.py: writes the per-chip CSV files used by R- stats_R/analysis.R: all statistical tests (pROC: AUC with DeLong CI; lme4: mixed-effects logistic regression, odds ratios; Wilcoxon, Fisher, McNemar and binomial tests). Open stats_R/nest_stats.Rproj in RStudio and run source("analysis.R"). Output: stats_R/results_R.txt (R 4.3.3, pROC 1.18.5, lme4 1.1.35.1). Sensitivity to sensor sharpness (Section 4.2)- sim.py now reads SIGMA_K (default 0.542, MTF at Nyquist ~0.15; 0.391 gives ~0.30)- SIGMA_K=0.391 BLEND=mtf30 python3 mtf_sensitivity.py -> res_B2_cnn_mtf30.json
