Skip to content

Commit 0c15dce

Browse files
authored
Merge pull request #1 from earth-chris/create-collection-script
add collections script with skysat target
2 parents 9024622 + 9a555d6 commit 0c15dce

File tree

6 files changed

+1953
-15
lines changed

6 files changed

+1953
-15
lines changed

.pre-commit-config.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@ default_language_version:
33

44
repos:
55
- repo: https://github.com/ambv/black
6-
rev: 22.6.0
6+
rev: 24.8.0
77
hooks:
88
- id: black
99
args: ["earthlib", "--line-length=88", "--target-version=py310"]
1010

1111
- repo: https://github.com/pycqa/flake8
12-
rev: 5.0.4
12+
rev: 7.1.1
1313
hooks:
1414
- id: flake8
1515
args: ["--select=C,E,F,W,B,B950", "--max-line-length=88", "--ignore=E203,E501,W503,F401,F403,E266,F821", "--exclude=bin,ipython,legacy,plots"]
1616

1717
- repo: https://github.com/timothycrosley/isort
18-
rev: 5.10.1
18+
rev: 5.13.2
1919
hooks:
2020
- id: isort
2121
args: ["-l 88", "--profile", "black", "."]
2222

2323
- repo: https://github.com/pre-commit/pre-commit-hooks
24-
rev: v4.3.0
24+
rev: v4.6.0
2525
hooks:
2626
- id: check-yaml
2727
- id: detect-private-key

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ init:
2626
poetry add --lock --group dev "ipython^8.5.0" jupyter geemap pre-commit pytest pytest-cov pytest-xdist twine mkdocs mkdocs-material mkdocstrings[python] mkdocs-jupyter livereload
2727

2828
create:
29-
conda env list | grep -q ${NAME} || conda create --name=${NAME} python=${PYVERSION} -y
29+
conda env list | grep -q ${NAME} || conda create --name=${NAME} python=${PYVERSION} poetry -y
3030
${CONDA} poetry install
3131
${CONDA} pre-commit install
3232

3333
test:
3434
${CONDA} pytest -n auto --cov --no-cov-on-fail --cov-report=term-missing:skip-covered
3535

3636
collections:
37-
${CONDA} python scripts/generate_collections.py
37+
${CONDA} python scripts/create-collections.py
3838

3939
pypi:
4040
rm -rf dist/

earthlib/BRDFCorrect.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Routines to prepare datasets prior to unmixing"""
2+
23
import math
34
import re
45
from typing import Callable

earthlib/data/collections.json

+36-8
Original file line numberDiff line numberDiff line change
@@ -271,13 +271,13 @@
271271
"shortwave infrared 2"
272272
],
273273
"band_names": [
274-
"Nadir_Reflectance_Band3",
275-
"Nadir_Reflectance_Band4",
276-
"Nadir_Reflectance_Band1",
277-
"Nadir_Reflectance_Band2",
278-
"Nadir_Reflectance_Band5",
279-
"Nadir_Reflectance_Band6",
280-
"Nadir_Reflectance_Band7"
274+
"sur_refl_b03",
275+
"sur_refl_b04",
276+
"sur_refl_b01",
277+
"sur_refl_b02",
278+
"sur_refl_b05",
279+
"sur_refl_b06",
280+
"sur_refl_b07"
281281
],
282282
"band_widths": [
283283
0.02,
@@ -288,7 +288,7 @@
288288
0.024,
289289
0.05
290290
],
291-
"collection": "MODIS/006/MCD43A4",
291+
"collection": "MODIS/061/MOD09GA",
292292
"scale": 0.0001
293293
},
294294
"NEON": {
@@ -1923,6 +1923,34 @@
19231923
"collection": "COPERNICUS/S2_SR_HARMONIZED",
19241924
"scale": 0.0001
19251925
},
1926+
"SkySat": {
1927+
"band_centers": [
1928+
0.4825,
1929+
0.555,
1930+
0.65,
1931+
0.82
1932+
],
1933+
"band_descriptions": [
1934+
"blue",
1935+
"green",
1936+
"red",
1937+
"near infrared"
1938+
],
1939+
"band_names": [
1940+
"B1",
1941+
"B2",
1942+
"B3",
1943+
"B4"
1944+
],
1945+
"band_widths": [
1946+
0.065,
1947+
0.08,
1948+
0.09,
1949+
0.16
1950+
],
1951+
"collection": null,
1952+
"scale": 0.0001
1953+
},
19261954
"SuperDove": {
19271955
"band_centers": [
19281956
0.441,

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "earthlib"
3-
version = "0.3.1"
3+
version = "0.3.2"
44
description = "A global spectral library with earth engine tools for satellite land cover mapping."
55
authors = ["earth-chris <[email protected]>"]
66
license = "MIT"

0 commit comments

Comments
 (0)