Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ocean indices branch: OSI, PI and FAI #52

Merged
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -2115,5 +2115,32 @@ class SpectralIndices(BaseModel):
date_of_addition="2024-04-08",
contributor="https://github.com/gagev",
),
OSI=SpectralIndex(
short_name="OSI",
long_name="Oil Spill Index",
formula="(G + R)/B",
reference="https://doi.org/10.29117/quarfe.2021.0020",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The DOI is not working. Could you please update?

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