Skip to content

Commit

Permalink
Merge pull request #7 from quantifyearth/mwd-star-related-changes
Browse files Browse the repository at this point in the history
Some STAR pipeline related changes
  • Loading branch information
mdales authored Dec 11, 2024
2 parents 0df522e + 4e35054 commit a0f3cf0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
11 changes: 7 additions & 4 deletions aohcalc.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,13 @@ def aohcalc(

area_map = ConstantLayer(1.0)
if area_path:
area_map = UniformAreaLayer.layer_from_file(area_path)

range_total = (range_map * area_map).sum()
try:
area_map = UniformAreaLayer.layer_from_file(area_path)
except ValueError:
area_map = RasterLayer.layer_from_file(area_path)


layers = habitat_maps + [min_elevation_map, max_elevation_map, range_map]
layers = habitat_maps + [min_elevation_map, max_elevation_map, range_map, area_map]
try:
intersection = RasterLayer.find_intersection(layers)
except ValueError:
Expand All @@ -129,6 +130,8 @@ def aohcalc(
for layer in layers:
layer.set_window_for_intersection(intersection)

range_total = (range_map * area_map).sum()

result = RasterLayer.empty_raster_layer_like(
min_elevation_map,
filename=result_filename,
Expand Down
1 change: 1 addition & 0 deletions validation/collate_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def collate_data(
"id_no",
"class_name",
"family_name",
"scientific_name",
"season",
"elevation_upper",
"elevation_lower",
Expand Down

0 comments on commit a0f3cf0

Please sign in to comment.