olivierhagolle / Start_maja

To process a Sentinel-2 time series with MAJA cloud detection and atmospheric correction processor
Other
51 stars 15 forks source link

Maja terminates with no output and strange messages #6

Closed Greforb closed 6 years ago

Greforb commented 6 years ago

I've been fiddling around with Docker and Maja and I believe I made it running on Ubuntu using Docker. I tried to run it using the start_maja.py script but so far without luck. It seems to start but then after a second it prints the following two lines, no error messages and then it just terminates:

/\<L1Cdirectory>/\<sitename>//S2?_OPER_PRD_MSIL1C*None\.SAFE/GRANULE/*32UUA\

create /\<Workdirectory>/\<sitename>/32UUA/MAJA_1_0_S2AS2B_NATIF/userconf

As you can see I tried to process the 32UUA tile.

I start the script in docker by mountiong in- and output dirs to some local dirs using the -v parameter for the docker command run. In the same command I start maja using the command:

python ./opt/maja/Start_maja/start_maja.py -f /opt/maja/Start_maja/folders.txt -c MAJA_1_0_S2AS2B_NATIF -t 32UUA -s mySite -d 20150704

I have the following L1C product in the L1CDirectory:

S2A_OPER_PRD_MSIL1C_PDMC_20160606T233127_R022_V20150704T101337_20150704T101337.SAFE

In the outputfolder it generates an empty folder called MAJA_1_0_S2AS2B_NATIF and nothing else.

Any clues to solve this would be highly appreciated!

olivierhagolle commented 6 years ago

It seems no L1C product was found, or at least no granule with tile 32UUA. I have updated the code to catch the error and print an error message with the directories where L1C products where searched.

Greforb commented 6 years ago

Thanks a lot. Got it running now, but getting the error:

L2BackwardProcessing need more than one input L1 image product.

Do I need to process more than one tile or do I need a number of records of the same tile? I don't understand?

olivierhagolle commented 6 years ago

Hi Greforb, Good news ! The interest of MAJA is the use of multi-temporal criteria to better detect cloud, shadows, and aerosols. So if you apply it to only one product, it will not produce better results than Sen2cor. Start_maja.py is meant to process a time series of images, chronologically. As it is a recurring process, it needs an initialisation phase, during which products may not be perfect. So we used a trick in the "backward mode", processing a set of products in anti chronological order, to get a good first L2A product, which is then used to process the rest of the time series in nominal (chronological) mode. Hope it helps ! Olivier

Greforb commented 6 years ago

So I have to add a number of scenes to the input dir with the tile that I wish to process? How many would be appropriate? Two? Five? Ten? The more the merrier? :) Also I'm now uncertain about the output of Maja; will it output BOA for the tile I process as a mean of the input tiles processed? Or can I control for which date I wish it to output BOA?

olivierhagolle commented 6 years ago

Yes. I would say at least 4, and the results keep improving until 8. It depends a little on cloud cover statistics. start_maja will output a L2A for each L1C, except if cloud cover is above 90%, where the processing is terminated, outputing a L2NOTV (not valid) folder.

Greforb commented 6 years ago

Ahhh. great information, thanks!

olivierhagolle commented 6 years ago

Hi, I guess I can close the issue. Feedback on your results is welcome. Olivier