deepSSF 0.2.1__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {deepssf-0.2.1 → deepssf-0.2.2}/PKG-INFO +8 -3
- {deepssf-0.2.1 → deepssf-0.2.2}/README.md +7 -2
- {deepssf-0.2.1 → deepssf-0.2.2}/src/deepssf/__init__.py +1 -1
- {deepssf-0.2.1 → deepssf-0.2.2}/tests/test_deepssf.py +16 -11
- {deepssf-0.2.1 → deepssf-0.2.2}/.github/workflows/ci.yml +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/.github/workflows/publish.yml +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/.gitignore +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/.pre-commit-config.yaml +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/CHANGELOG.md +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/CITATION.cff +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/LICENSE +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/Package_generation_process.md +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/environment.yml +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example.html +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example.ipynb +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-15-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-17-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-19-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-21-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-23-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-24-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-25-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-27-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-28-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-29-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-30-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-32-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/figure-html/cell-7-output-1.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/libs/bootstrap/bootstrap-138a6193a3bd40baf1e627da441a4734.min.css +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/libs/bootstrap/bootstrap-icons.css +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/libs/bootstrap/bootstrap-icons.woff +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/libs/bootstrap/bootstrap.min.js +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/libs/clipboard/clipboard.min.js +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/libs/quarto-html/anchor.min.js +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/libs/quarto-html/popper.min.js +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/libs/quarto-html/quarto-syntax-highlighting-7f8f88aac4f3542376d5c11b86a4c14d.css +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/libs/quarto-html/quarto.js +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/libs/quarto-html/tabsets/tabsets.js +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/libs/quarto-html/tippy.css +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/deepssf_train_validate_example_files/libs/quarto-html/tippy.umd.min.js +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/examples/references.bib +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/icons/both_icons.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/icons/deepSSF_hex_textured_Python.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/icons/deepSSF_hex_textured_R.png +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/pyproject.toml +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/src/deepssf/data.py +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/src/deepssf/datasets/data/buffalo_djelk_id2005.csv +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/src/deepssf/datasets/data/ndvi_2005.tif +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/src/deepssf/datasets/data/slope_2005.tif +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/src/deepssf/model.py +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/src/deepssf/simulate.py +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/src/deepssf/train.py +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/src/deepssf/utils.py +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/src/deepssf/validate.py +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/styles.css +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/tests/__init__.py +0 -0
- {deepssf-0.2.1 → deepssf-0.2.2}/tests/test_smoke.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: deepSSF
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Deep learning step selection functions for predicting animal movement.
|
|
5
5
|
Project-URL: Homepage, https://swforrest.github.io/deepSSF/
|
|
6
6
|
Project-URL: Repository, https://github.com/swforrest/deepssf
|
|
@@ -83,13 +83,18 @@ print(deepssf.__version__)
|
|
|
83
83
|
If you are coming from R, think of a conda environment the way you think of
|
|
84
84
|
an `renv` project library — it is a self-contained Python installation that
|
|
85
85
|
keeps this project's packages separate from everything else on your computer.
|
|
86
|
-
The steps below create one for
|
|
86
|
+
The steps below create one for deepSSF and should take about five minutes.
|
|
87
87
|
|
|
88
88
|
### 1. Install Miniconda (once, system-wide)
|
|
89
89
|
|
|
90
90
|
Download and run the installer from the
|
|
91
91
|
[official Miniconda page](https://docs.anaconda.com/miniconda/).
|
|
92
92
|
|
|
93
|
+
If you click 'Download' towards the top right, the links to download
|
|
94
|
+
Miniconda are towards the bottom of the page - the links at the top are
|
|
95
|
+
for the Anaconda Distribution, which has thousands of pacakges and is
|
|
96
|
+
not necessary to get things up and running initially.
|
|
97
|
+
|
|
93
98
|
- **Windows**: use the **Anaconda Prompt** for all subsequent commands, and
|
|
94
99
|
choose an install path that contains **no spaces** (e.g. `C:\miniconda3`).
|
|
95
100
|
- **macOS / Linux**: a normal terminal works fine.
|
|
@@ -101,7 +106,7 @@ Download and run the installer from the
|
|
|
101
106
|
### 2. Create the environment
|
|
102
107
|
|
|
103
108
|
```bash
|
|
104
|
-
git clone https://github.com/swforrest/
|
|
109
|
+
git clone https://github.com/swforrest/deepssf_package
|
|
105
110
|
cd deepssf
|
|
106
111
|
conda env create -f environment.yml
|
|
107
112
|
```
|
|
@@ -44,13 +44,18 @@ print(deepssf.__version__)
|
|
|
44
44
|
If you are coming from R, think of a conda environment the way you think of
|
|
45
45
|
an `renv` project library — it is a self-contained Python installation that
|
|
46
46
|
keeps this project's packages separate from everything else on your computer.
|
|
47
|
-
The steps below create one for
|
|
47
|
+
The steps below create one for deepSSF and should take about five minutes.
|
|
48
48
|
|
|
49
49
|
### 1. Install Miniconda (once, system-wide)
|
|
50
50
|
|
|
51
51
|
Download and run the installer from the
|
|
52
52
|
[official Miniconda page](https://docs.anaconda.com/miniconda/).
|
|
53
53
|
|
|
54
|
+
If you click 'Download' towards the top right, the links to download
|
|
55
|
+
Miniconda are towards the bottom of the page - the links at the top are
|
|
56
|
+
for the Anaconda Distribution, which has thousands of pacakges and is
|
|
57
|
+
not necessary to get things up and running initially.
|
|
58
|
+
|
|
54
59
|
- **Windows**: use the **Anaconda Prompt** for all subsequent commands, and
|
|
55
60
|
choose an install path that contains **no spaces** (e.g. `C:\miniconda3`).
|
|
56
61
|
- **macOS / Linux**: a normal terminal works fine.
|
|
@@ -62,7 +67,7 @@ Download and run the installer from the
|
|
|
62
67
|
### 2. Create the environment
|
|
63
68
|
|
|
64
69
|
```bash
|
|
65
|
-
git clone https://github.com/swforrest/
|
|
70
|
+
git clone https://github.com/swforrest/deepssf_package
|
|
66
71
|
cd deepssf
|
|
67
72
|
conda env create -f environment.yml
|
|
68
73
|
```
|
|
@@ -7,7 +7,7 @@ expose the things you want people to rely on. Internal helpers stay private.
|
|
|
7
7
|
|
|
8
8
|
# Single source of truth for the version. hatchling reads this string at build
|
|
9
9
|
# time (see pyproject.toml [tool.hatch.version]). Bump it when you release.
|
|
10
|
-
__version__ = "0.2.
|
|
10
|
+
__version__ = "0.2.2"
|
|
11
11
|
|
|
12
12
|
from deepssf.data import (
|
|
13
13
|
MovementDataset,
|
|
@@ -371,7 +371,7 @@ def test_make_simulation_inputs_hour_wraps():
|
|
|
371
371
|
|
|
372
372
|
|
|
373
373
|
def test_simulate_next_step_returns_coords_and_tensors(small_params):
|
|
374
|
-
"""simulate_next_step returns new coordinates
|
|
374
|
+
"""simulate_next_step returns new coordinates."""
|
|
375
375
|
import math
|
|
376
376
|
|
|
377
377
|
import rasterio.transform
|
|
@@ -396,15 +396,12 @@ def test_simulate_next_step_returns_coords_and_tensors(small_params):
|
|
|
396
396
|
scalars = torch.zeros(1, 4)
|
|
397
397
|
bearing = torch.zeros(1, 1)
|
|
398
398
|
|
|
399
|
-
new_x, new_y,
|
|
399
|
+
new_x, new_y, px, py = simulate_next_step(
|
|
400
400
|
model, rasters, scalars, bearing, window_size=W,
|
|
401
401
|
x_loc=W * 25 / 2, y_loc=W * 25 / 2, transform=transform,
|
|
402
402
|
)
|
|
403
403
|
assert isinstance(new_x, float)
|
|
404
404
|
assert isinstance(new_y, float)
|
|
405
|
-
assert hab.shape == (W, W)
|
|
406
|
-
assert move.shape == (W, W)
|
|
407
|
-
assert step.shape == (W, W)
|
|
408
405
|
assert 0 <= px < W
|
|
409
406
|
assert 0 <= py < W
|
|
410
407
|
|
|
@@ -676,11 +673,19 @@ def test_prepare_movement_df_has_dx_dy():
|
|
|
676
673
|
|
|
677
674
|
assert "dx" in df.columns
|
|
678
675
|
assert "dy" in df.columns
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
676
|
+
|
|
677
|
+
dx = df["dx"].to_numpy(dtype=float)
|
|
678
|
+
dy = df["dy"].to_numpy(dtype=float)
|
|
679
|
+
x1 = df["x1_"].to_numpy(dtype=float)
|
|
680
|
+
x2 = df["x2_"].to_numpy(dtype=float)
|
|
681
|
+
y1 = df["y1_"].to_numpy(dtype=float)
|
|
682
|
+
y2 = df["y2_"].to_numpy(dtype=float)
|
|
683
|
+
|
|
684
|
+
assert np.isfinite(dx).all()
|
|
685
|
+
assert np.isfinite(dy).all()
|
|
686
|
+
|
|
687
|
+
np.testing.assert_allclose(dx, x2 - x1)
|
|
688
|
+
np.testing.assert_allclose(dy, y2 - y1)
|
|
684
689
|
|
|
685
690
|
|
|
686
691
|
def test_filter_steps_by_window_removes_large_steps():
|
|
@@ -775,7 +780,7 @@ def test_fit_returns_loss_history(small_params):
|
|
|
775
780
|
optimisers, schedulers = make_optimisers(model)
|
|
776
781
|
history = fit(
|
|
777
782
|
model,
|
|
778
|
-
|
|
783
|
+
image_trim_pixels=3, # number of conv layers (used only for snapshots)
|
|
779
784
|
window_size=H, # spatial crop size (used only for snapshots)
|
|
780
785
|
dl_train=_DL(),
|
|
781
786
|
dl_val=_DL(),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|