Page 1 of 1
way to shapes
Posted: Thu Sep 17, 2020 10:15 am
by bsilva
Dear from Hygeos,
Do you have any idea of how polymer processing would build the following shapes?
Code: Select all
File "/polymer/polymer/utils.py", line 210, in raiseflag
bitmask[condition.astype('bool') & notraised] += flag_value
ValueError: operands could not be broadcast together with shapes (0,1000) (200,1000)
How to avoid that Error?
Yours sincerely,
Brenner
Re: way to shapes
Posted: Thu Sep 17, 2020 10:47 am
by fsteinmetz
Hi Brenner,
I assume that condition
has a height of zero, but I couldn't say more without knowing the context.
The full python error message could be helpful. Which sensor are you processing ?
Cheers,
François
Re: way to shapes
Posted: Fri Sep 18, 2020 10:27 am
by bsilva
Hi François,
Thank you for your answer.
I am processing simulated data of the EnMAP mission and setting parameters starting with a GENERIC sensor in polymer.
The problem I have mentioned seems to be related to the input dataset.
The polymer successfully processes a 30 x 1000 grid and also 100 x 1000 grid but fails - in a second processing block -
while processing a 1024 x 1000 grid (see below).
Cheers,
Brenner
Code: Select all
Starting processing at 2020-09-18 10:54:54.443315
Processing block: size (100, 1000), offset (0, 0)
Processing block: size (100, 1000), offset (100, 0)
ERROR:
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/bsilva/PycharmProjects/polymer/polymer/main.py", line 517, in run_atm_corr
for block in block_iter:
File "/home/bsilva/PycharmProjects/polymer/polymer/main.py", line 399, in process_block
c.preprocessing(block)
File "/home/bsilva/PycharmProjects/polymer/polymer/main.py", line 71, in preprocessing
raiseflag(block.bitmask,
File "/home/bsilva/PycharmProjects/polymer/polymer/utils.py", line 210, in raiseflag
bitmask[condition.astype('bool') & notraised] += flag_value
ValueError: operands could not be broadcast together with shapes (0,1000) (100,1000)
----------------------------------------------------------------------
Ran 1 test in 692.896s
FAILED (errors=1)
Re: way to shapes
Posted: Fri Sep 18, 2020 2:49 pm
by bsilva
Hi François,
When I execute polymer and the block size is less than the grid size, it looks like processing takes place in more than one step:
Processing block: size (20, 1000), offset (0, 0)
Processing block: size (10, 1000), offset (20, 0)
then processing is interrupted, because two compined grids are not of same shape at:
"../polymer/polymer/utils.py", line 210, in raiseflag
apparently one of the grids does not get the corresponding offset and I get the error:
ValueError: operands could not be broadcast together with shapes (0,1000) (100,1000)
Am I on the wrong lead, missing something, or how to solve that?
Cheers,
Brenner
Re: way to shapes
Posted: Mon Sep 21, 2020 8:37 am
by fsteinmetz
Hi Brenner,
I suspect that the issue might be in the Level1 class, but I did not understand which Level1 class you have used: which one is it ?
Cheers,
François
Re: way to shapes
Posted: Mon Sep 21, 2020 11:42 am
by bsilva
Hi François,
I have written a level 1 class, still under construction, and I will check it again with the help of your hint.
Cheers,
Brenner