Skip to content

Commit

Permalink
fix(viz): Add visualization steps
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkelkp committed Feb 26, 2024
1 parent bcb1b50 commit 410af27
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
19 changes: 19 additions & 0 deletions pollination/annual_daylight_enhanced/_post_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from pollination_dsl.dag import Inputs, GroupedDAG, task, Outputs
from pollination.honeybee_radiance_postprocess.post_process import AnnualDaylightMetrics
from pollination.honeybee_radiance_postprocess.post_process import GridSummaryMetrics
from pollination.honeybee_display.translate import ModelToVis


@dataclass
Expand Down Expand Up @@ -77,6 +78,24 @@ def grid_summary_metrics(
}
]

@task(template=ModelToVis, needs=[calculate_annual_metrics])
def create_vsf(
self, model=model,
grid_data=calculate_annual_metrics._outputs.annual_metrics,
active_grid_data='udi', output_format='vsf'
):
return [
{
'from': ModelToVis()._outputs.output_file,
'to': 'visualization.vsf'
}
]

visualization = Outputs.file(
source='visualization.vsf',
description='Annual daylight result visualization in VisualizationSet format.'
)

metrics = Outputs.folder(
source='metrics', description='metrics folder.'
)
Expand Down
9 changes: 9 additions & 0 deletions pollination/annual_daylight_enhanced/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,18 @@ def annual_metrics_postprocess(
{
'from': AnnualDaylightPostProcess()._outputs.grid_summary,
'to': 'grid_summary.csv'
},
{
'from': AnnualDaylightPostProcess()._outputs.visualization,
'to': 'visualization.vsf'
}
]

visualization = Outputs.file(
source='visualization.vsf',
description='Annual daylight result visualization in VisualizationSet format.'
)

metrics = Outputs.folder(
source='metrics', description='Annual metrics folder.'
)
Expand Down

0 comments on commit 410af27

Please sign in to comment.