Skip to content

Commit e55e7fd

Browse files
committed
Mostly fixing some small issues in the docstrings
and a little bit of formatting changes
1 parent 68310d5 commit e55e7fd

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

openet/ssebop/collection.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ def __init__(
6868
Output variables can also be specified in the method calls.
6969
cloud_cover_max : float, str
7070
Maximum cloud cover percentage (the default is 70%).
71-
- Landsat TOA: CLOUD_COVER_LAND
7271
- Landsat SR: CLOUD_COVER_LAND
7372
et_reference_source : str, float, optional
7473
Reference ET source (the default is None). Source must
@@ -328,6 +327,9 @@ def compute_vars(image):
328327

329328
variable_coll = variable_coll.merge(input_coll)
330329

330+
else:
331+
raise ValueError(f'unsupported collection: {coll_id}')
332+
331333
return variable_coll
332334

333335
def overpass(self, variables=None):
@@ -366,7 +368,7 @@ def interpolate(
366368
interp_days=32,
367369
use_joins=False,
368370
**kwargs
369-
):
371+
):
370372
"""
371373
372374
Parameters
@@ -509,9 +511,11 @@ def doy_image(input_img):
509511
)
510512
# elif isinstance(self.model_args['et_reference_source'], computedobject.ComputedObject):
511513
# # Interpret computed objects as image collections
512-
# daily_et_ref_coll = self.model_args['et_reference_source']\
513-
# .filterDate(self.start_date, self.end_date)\
514+
# daily_et_ref_coll = (
515+
# self.model_args['et_reference_source']
516+
# .filterDate(self.start_date, self.end_date)
514517
# .select([self.model_args['et_reference_band']])
518+
# )
515519
else:
516520
raise ValueError(
517521
f'unsupported et_reference_source: {self.model_args["et_reference_source"]}'
@@ -670,9 +674,7 @@ def aggregate_image(agg_start_date, agg_end_date, date_format):
670674
image_list.append(et_reference_img.float())
671675
if 'et_fraction' in variables:
672676
# Compute average et fraction over the aggregation period
673-
image_list.append(
674-
et_img.divide(et_reference_img).rename(['et_fraction']).float()
675-
)
677+
image_list.append(et_img.divide(et_reference_img).rename(['et_fraction']).float())
676678
if 'ndvi' in variables:
677679
# Compute average ndvi over the aggregation period
678680
ndvi_img = (

openet/ssebop/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def et_reference(self):
334334

335335
@lazy_property
336336
def et(self):
337-
"""Actual ET as fraction of reference times"""
337+
"""Actual ET as fraction of reference times reference ET"""
338338
return self.et_fraction.multiply(self.et_reference)\
339339
.rename(['et']).set(self._properties)
340340

openet/ssebop/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@ def c_to_k(image):
9292

9393

9494
def date_0utc(date):
95-
"""Get the 0 UTC time_start for a date
95+
"""Get the 0 UTC date for a date
9696
9797
Parameters
9898
----------
9999
date : ee.Date
100100
101101
Returns
102102
-------
103-
ee.Number
103+
ee.Date
104104
105105
"""
106106
return ee.Date.fromYMD(date.get('year'), date.get('month'), date.get('day'))

0 commit comments

Comments
 (0)