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

Some STAR pipeline related changes #7

Merged
merged 2 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
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
Loading