johntruckenbrodt/pyroSAR

Correct Documentation: use of gpt()

Closed this issue · 2 comments

In the example for the use of gpt() I noticed that an argument is missing: tmpdir seems to have become a required argument by now. I'm opening this issue here because I don't know in what form that fact should be worked into the example. I would suggest this:

from pyroSAR.snap.auxil import gpt
import tempfile

gpt('outname_proc.xml', tmpdir=tempfile.gettempdir())

You found another one 😅, thanks a lot @jonathom. Principally your idea is a good one, but I do not want to promote to directly write to the system's temporary directory. Multiple gpt calls could write to it and this would clash with the cleanup mechanism. So in the PR I have gone the easy route to just declare tmpdir='.'. Is it clearer now?

Yes, makes more sense. Perfect!