way to shapes

Post Reply
bsilva
Posts: 4
Joined: Wed Jun 12, 2019 11:09 am
company / institution: AWI
Location: Bremerhaven

way to shapes

Post 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
User avatar
fsteinmetz
Site Admin
Posts: 139
Joined: Fri Sep 07, 2018 1:34 pm
company / institution: Hygeos
Location: Lille, France
Contact:

Re: way to shapes

Post 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
bsilva
Posts: 4
Joined: Wed Jun 12, 2019 11:09 am
company / institution: AWI
Location: Bremerhaven

Re: way to shapes

Post 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)
Last edited by bsilva on Fri Sep 18, 2020 2:50 pm, edited 2 times in total.
bsilva
Posts: 4
Joined: Wed Jun 12, 2019 11:09 am
company / institution: AWI
Location: Bremerhaven

Re: way to shapes

Post 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
User avatar
fsteinmetz
Site Admin
Posts: 139
Joined: Fri Sep 07, 2018 1:34 pm
company / institution: Hygeos
Location: Lille, France
Contact:

Re: way to shapes

Post 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
bsilva
Posts: 4
Joined: Wed Jun 12, 2019 11:09 am
company / institution: AWI
Location: Bremerhaven

Re: way to shapes

Post 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
Post Reply