MarcYin / SIAC

A sensor invariant Atmospheric Correction (SIAC)
http://www2.geog.ucl.ac.uk/~ucfafyi/Atmo_Cor/
GNU Affero General Public License v3.0
61 stars 17 forks source link

Trouble using SIAC_S2 #6

Closed RonGitson closed 5 years ago

RonGitson commented 5 years ago

Hello,

In order to compare some satellite preprocessing methods, I wanted to process 1-C Sentinel 2 images downloaded from https://peps.cnes.fr/rocket/ with SIAC.

I installed siac with pip install https://github.com/MarcYin/SIAC/archive/master.zip in a conda environment, where I had previously specified conda install -c conda-forge gdal==2.3.3

However, after try with images from both 2015 and 2018 the process seem to freeze with the following error :

2019-06-12 15:31:38,944 - SIAC-V2.2.0 - INFO - Loading emulators.
Process Process-261:
Traceback (most recent call last):
  File "/home/eric/miniconda2/envs/siac/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/home/eric/miniconda2/envs/siac/lib/python3.6/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "/home/eric/miniconda2/envs/siac/lib/python3.6/site-packages/SIAC/multi_process.py", line 7, in fun
    q_out.put((i, f(x)))
  File "/home/eric/miniconda2/envs/siac/lib/python3.6/site-packages/SIAC/the_aerosol.py", line 595, in <lambda>
    f = lambda em: pkl.load(open(em, 'rb'), encoding = 'latin1')
_pickle.UnpicklingError: pickle data was truncated

I tried calling the SIAC_S2 function from ipython in the terminal, giving the path to the '.SAFE' file as sole argument.

MarcYin commented 5 years ago

It seems to be a problem with the downloaded emulator files (maybe broken), and can you do rm -r /home/eric/miniconda2/envs/siac/lib/python3.6/site-packages/SIAC/emus/* to delete them? When you start it again, it should be able to re-download the emulators files again from out server, or you can download the emulators from here: http://www2.geog.ucl.ac.uk/~ucfafyi/emus/ and put it into /home/eric/miniconda2/envs/siac/lib/python3.6/site-packages/SIAC/emus/.

RonGitson commented 5 years ago

Thank you very much! It seems to have done the trick!

MarcYin commented 5 years ago

Cheers.