Skip to content

Commit

Permalink
Merge pull request #1 from earth-chris/create-collection-script
Browse files Browse the repository at this point in the history
add collections script with skysat target
  • Loading branch information
earth-chris authored Sep 4, 2024
2 parents 9024622 + 9a555d6 commit 0c15dce
Show file tree
Hide file tree
Showing 6 changed files with 1,953 additions and 15 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@ default_language_version:

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

- repo: https://github.com/pycqa/flake8
rev: 5.0.4
rev: 7.1.1
hooks:
- id: flake8
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"]

- repo: https://github.com/timothycrosley/isort
rev: 5.10.1
rev: 5.13.2
hooks:
- id: isort
args: ["-l 88", "--profile", "black", "."]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.6.0
hooks:
- id: check-yaml
- id: detect-private-key
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ init:
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

create:
conda env list | grep -q ${NAME} || conda create --name=${NAME} python=${PYVERSION} -y
conda env list | grep -q ${NAME} || conda create --name=${NAME} python=${PYVERSION} poetry -y
${CONDA} poetry install
${CONDA} pre-commit install

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

collections:
${CONDA} python scripts/generate_collections.py
${CONDA} python scripts/create-collections.py

pypi:
rm -rf dist/
Expand Down
1 change: 1 addition & 0 deletions earthlib/BRDFCorrect.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Routines to prepare datasets prior to unmixing"""

import math
import re
from typing import Callable
Expand Down
44 changes: 36 additions & 8 deletions earthlib/data/collections.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,13 +271,13 @@
"shortwave infrared 2"
],
"band_names": [
"Nadir_Reflectance_Band3",
"Nadir_Reflectance_Band4",
"Nadir_Reflectance_Band1",
"Nadir_Reflectance_Band2",
"Nadir_Reflectance_Band5",
"Nadir_Reflectance_Band6",
"Nadir_Reflectance_Band7"
"sur_refl_b03",
"sur_refl_b04",
"sur_refl_b01",
"sur_refl_b02",
"sur_refl_b05",
"sur_refl_b06",
"sur_refl_b07"
],
"band_widths": [
0.02,
Expand All @@ -288,7 +288,7 @@
0.024,
0.05
],
"collection": "MODIS/006/MCD43A4",
"collection": "MODIS/061/MOD09GA",
"scale": 0.0001
},
"NEON": {
Expand Down Expand Up @@ -1923,6 +1923,34 @@
"collection": "COPERNICUS/S2_SR_HARMONIZED",
"scale": 0.0001
},
"SkySat": {
"band_centers": [
0.4825,
0.555,
0.65,
0.82
],
"band_descriptions": [
"blue",
"green",
"red",
"near infrared"
],
"band_names": [
"B1",
"B2",
"B3",
"B4"
],
"band_widths": [
0.065,
0.08,
0.09,
0.16
],
"collection": null,
"scale": 0.0001
},
"SuperDove": {
"band_centers": [
0.441,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "earthlib"
version = "0.3.1"
version = "0.3.2"
description = "A global spectral library with earth engine tools for satellite land cover mapping."
authors = ["earth-chris <[email protected]>"]
license = "MIT"
Expand Down
Loading

0 comments on commit 0c15dce

Please sign in to comment.