Skip to content

Commit

Permalink
fix(radcontrib): use subpath instead of using self in arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
mostaphaRoudsari authored and Chris Mackey committed Mar 9, 2022
1 parent eadf717 commit 4bae1eb
Showing 1 changed file with 30 additions and 12 deletions.
42 changes: 30 additions & 12 deletions pollination/pmv_comfort_map/_radcontrib.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ class RadianceContribEntryPoint(DAG):
description='A file with sun modifiers.'
)

@task(template=DaylightContribution)
@task(
template=DaylightContribution,
sub_paths={'sensor_grid': '{{grid_name}}.pts'}
)
def direct_sun_group(
self,
name=grid_name,
Expand All @@ -73,7 +76,7 @@ def direct_sun_group(
fixed_radiance_parameters='-aa 0.0 -I -ab 0 -dc 1.0 -dt 0.0 -dj 0.0 -dr 0',
sensor_count=sensor_count,
modifiers=sun_modifiers,
sensor_grid='grids/{{self.name}}.pts',
sensor_grid='grids',
conversion='0.265 0.670 0.065',
output_format='a', # make it ascii so we expose the file as a separate output
header='remove', # remove header to make it process-able later
Expand All @@ -86,7 +89,10 @@ def direct_sun_group(
}
]

@task(template=DaylightCoefficient)
@task(
template=DaylightCoefficient,
sub_paths={'sensor_grid': '{{grid_name}}.pts'}
)
def direct_sky_group(
self,
name=grid_name,
Expand All @@ -96,7 +102,7 @@ def direct_sky_group(
sensor_count=sensor_count,
sky_matrix=sky_matrix_direct,
sky_dome=sky_dome,
sensor_grid='grids/{{self.name}}.pts',
sensor_grid='grids',
conversion='0.265 0.670 0.065', # divide by 179
scene_file=octree_file_spec
):
Expand All @@ -107,7 +113,10 @@ def direct_sky_group(
}
]

@task(template=DaylightCoefficient)
@task(
template=DaylightCoefficient,
sub_paths={'sensor_grid': '{{grid_name}}.pts'}
)
def total_sky_spec_group(
self,
name=grid_name,
Expand All @@ -117,7 +126,7 @@ def total_sky_spec_group(
sensor_count=sensor_count,
sky_matrix=sky_matrix,
sky_dome=sky_dome,
sensor_grid='grids/{{self.name}}.pts',
sensor_grid='grids',
conversion='0.265 0.670 0.065', # divide by 179
scene_file=octree_file_spec
):
Expand All @@ -143,7 +152,10 @@ def output_matrix_math_group(
}
]

@task(template=DaylightCoefficient)
@task(
template=DaylightCoefficient,
sub_paths={'sensor_grid': '{{grid_name}}_ref.pts'}
)
def ground_reflected_sky_spec_group(
self,
name=grid_name,
Expand All @@ -153,7 +165,7 @@ def ground_reflected_sky_spec_group(
sensor_count=sensor_count,
sky_matrix=sky_matrix,
sky_dome=sky_dome,
sensor_grid='grids/{{self.name}}_ref.pts',
sensor_grid='grids',
conversion='0.265 0.670 0.065', # divide by 179
output_format='a', # make it ascii so we expose the file as a separate output
header='remove', # remove header to make it process-able later
Expand All @@ -166,7 +178,10 @@ def ground_reflected_sky_spec_group(
}
]

@task(template=DaylightCoefficient)
@task(
template=DaylightCoefficient,
sub_paths={'sensor_grid': '{{grid_name}}.pts'}
)
def total_sky_diff_group(
self,
name=grid_name,
Expand All @@ -176,7 +191,7 @@ def total_sky_diff_group(
sensor_count=sensor_count,
sky_matrix=sky_matrix,
sky_dome=sky_dome,
sensor_grid='grids/{{self.name}}.pts',
sensor_grid='grids',
conversion='0.265 0.670 0.065', # divide by 179
output_format='a', # make it ascii so we expose the file as a separate output
header='remove', # remove header to make it process-able later
Expand All @@ -189,7 +204,10 @@ def total_sky_diff_group(
}
]

@task(template=DaylightCoefficient)
@task(
template=DaylightCoefficient,
sub_paths={'sensor_grid': '{{grid_name}}_ref.pts'}
)
def ground_reflected_sky_diff_group(
self,
name=grid_name,
Expand All @@ -199,7 +217,7 @@ def ground_reflected_sky_diff_group(
sensor_count=sensor_count,
sky_matrix=sky_matrix,
sky_dome=sky_dome,
sensor_grid='grids/{{self.name}}_ref.pts',
sensor_grid='grids',
conversion='0.265 0.670 0.065', # divide by 179
output_format='a', # make it ascii so we expose the file as a separate output
header='remove', # remove header to make it process-able later
Expand Down

0 comments on commit 4bae1eb

Please sign in to comment.