mirror of
https://github.com/sbrl/research-rainfallradar
synced 2024-11-22 17:23:01 +00:00
and again
This commit is contained in:
parent
4cf0485e32
commit
dc159ecfdb
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ from .shuffle import shuffle
|
||||||
|
|
||||||
# TO PARSE:
|
# TO PARSE:
|
||||||
def parse_item(metadata, shape_water_desired, water_threshold=0.1):
|
def parse_item(metadata, shape_water_desired, water_threshold=0.1):
|
||||||
water_width_source, water_height_source, _water_channels_source = metadata["waterdepth"]
|
water_width_source, water_height_source = metadata["waterdepth"]
|
||||||
water_width_target, water_height_target = shape_water_desired
|
water_width_target, water_height_target = shape_water_desired
|
||||||
water_offset_x = math.ceil((water_width_source - water_width_target) / 2)
|
water_offset_x = math.ceil((water_width_source - water_width_target) / 2)
|
||||||
water_offset_y = math.ceil((water_height_source - water_height_target) / 2)
|
water_offset_y = math.ceil((water_height_source - water_height_target) / 2)
|
||||||
|
|
Loading…
Reference in a new issue