Skip to content

Commit

Permalink
Merge pull request #154 from descarteslabs/feat/require_bands-param
Browse files Browse the repository at this point in the history
Add the require_bands arg and document it.
  • Loading branch information
jpoehnelt authored Aug 3, 2017
2 parents 6f741f5 + 84929f5 commit a1add99
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions descarteslabs/services/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,15 @@ def bands(self, products=None, limit=None, offset=None, wavelength=None, resolut
r = self.session.post('/bands/search', json=kwargs)
return r.json()

def derived_bands(self, bands=None, limit=None, offset=None):
def derived_bands(self, bands=None, require_bands=None, limit=None, offset=None):
"""Search for predefined derived bands that you have access to.
:param list(str) bands: A list of source bands that must be part of
the derived band i.e ["nir"]
:param list(str) bands: Limit the derived bands to ones that can be
computed using this list of spectral bands.
e.g ["red", "nir", "swir1"]
:param bool require_bands: Control whether searched bands must contain
all the spectral bands passed in the bands param.
Defaults to False.
:param int limit: Number of results to return.
:param int offset: Index to start at when returning results.
"""
Expand Down

0 comments on commit a1add99

Please sign in to comment.