Skip to content

Commit

Permalink
use write_output_variable instead of hardcoded node name
Browse files Browse the repository at this point in the history
  • Loading branch information
zcernigoj committed Sep 15, 2023
1 parent 50b12d9 commit caab9d4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/pg_to_evalscript/evalscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,16 @@ def write(self):
function evaluatePixel(samples, scenes) {{
{self.write_datacube_creation()}
{(newline + tab).join([node.write_call() for node in self.nodes])}
forUserData = {{
outputDimensions: node_load1.dimensions,
outputDimensions: {self.write_output_variable()}.dimensions,
outputDatacubeMetadata: {{
shape: node_load1.data.shape,
stride: node_load1.data.stride,
offset: node_load1.data.offset
shape: {self.write_output_variable()}.data.shape,
stride: {self.write_output_variable()}.data.stride,
offset: {self.write_output_variable()}.data.offset
}}
}}
const finalOutput = {self.write_output_variable()}{".encodeData()" if self.encode_result else '.flattenToArray()'}
return Array.isArray(finalOutput) ? finalOutput : [finalOutput];
}}
Expand Down

0 comments on commit caab9d4

Please sign in to comment.