Skip to content

Commit

Permalink
Merge pull request #52 from EmanuelCastanho/ocean-indices-branch
Browse files Browse the repository at this point in the history
Ocean indices branch: OSI, PI and FAI
  • Loading branch information
davemlz committed May 16, 2024
2 parents a89bc6b + eed0d2d commit e6a3a7d
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 9 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,10 @@ Additional index parameters also follow a standard:
- `slb`: Soil line intercept.
- `PAR`: Photosynthetically Active Radiation.
- `k`: Slope parameter by soil used for NIRvH2.
- `lambdaN`: NIR wavelength used for NIRvH2 and NDGI.
- `lambdaR`: Red wavelength used for NIRvH2 and NDGI.
- `lambdaG`: Green wavelength used for NDGI.
- `lambdaN`: NIR central wavelength.
- `lambdaR`: Red central wavelength.
- `lambdaG`: Green central wavelength.
- `lambdaS1`: SWIR1 central wavelength.

The kernel indices are constructed using a special type of parameters:

Expand Down
11 changes: 8 additions & 3 deletions src/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,22 @@
},
"lambdaG": {
"short_name": "lambdaG",
"description": "Green wavelength (nm) used for NDGI",
"description": "Green central wavelength (nm)",
"default": None,
},
"lambdaR": {
"short_name": "lambdaR",
"description": "Red wavelength (nm) used for NIRvH2 and NDGI",
"description": "Red central wavelength (nm)",
"default": None,
},
"lambdaN": {
"short_name": "lambdaN",
"description": "NIR wavelength (nm) used for NIRvH2 and NDGI",
"description": "NIR central wavelength (nm)",
"default": None,
},
"lambdaS1": {
"short_name": "lambdaS1",
"description": "SWIR1 central wavelength (nm)",
"default": None,
},
"sla": {
Expand Down
27 changes: 27 additions & 0 deletions src/indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -2178,5 +2178,32 @@ class SpectralIndices(BaseModel):
date_of_addition="2024-05-16",
contributor="https://github.com/davemlz",
),
OSI=SpectralIndex(
short_name="OSI",
long_name="Oil Spill Index",
formula="(G + R)/B",
reference="https://doi.org/10.1016/j.mex.2021.101327",
application_domain="water",
date_of_addition="2024-05-03",
contributor="https://github.com/emanuelcastanho",
),
PI=SpectralIndex(
short_name="PI",
long_name="Plastic Index",
formula="N/(N + R)",
reference="https://doi.org/10.3390/rs12162648",
application_domain="water",
date_of_addition="2024-05-03",
contributor="https://github.com/emanuelcastanho",
),
FAI=SpectralIndex(
short_name="FAI",
long_name="Floating Algae Index",
formula="N - (R + (S1 - R)*((lambdaN - lambdaR)/(lambdaS1 - lambdaR)))",
reference="https://doi.org/10.1016/j.rse.2009.05.012",
application_domain="water",
date_of_addition="2024-05-03",
contributor="https://github.com/emanuelcastanho",
),
)
)
7 changes: 4 additions & 3 deletions src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ class Bands(Enum):
F_DELTA = "fdelta"
EPSILON = "epsilon"
SLOPE_PARAMETER_SOIL = "k"
WAVELENGTH_NIR = "lambdaN"
WAVELENGTH_RED = "lambdaR"
WAVELENGTH_GREEN = "lambdaG"
CENTRAL_WAVELENGTH_NIR = "lambdaN"
CENTRAL_WAVELENGTH_RED = "lambdaR"
CENTRAL_WAVELENGTH_GREEN = "lambdaG"
CENTRAL_WAVELENGTH_SWIR1 = "lambdaS1"
HV = "HV"
HH = "HH"
VV = "VV"
Expand Down

0 comments on commit e6a3a7d

Please sign in to comment.