Open yibeichan opened 1 month ago
oh, i saw this
if os.path.exists(figuredir):
import shutil
shutil.rmtree(figuredir)
os.makedirs(figuredir)
else:
os.makedirs(figuredir)
but it's still a problem when running things parallel + slurm...
Hi,
I notice that when i use 2D brain data (cifti), there is no figured generated. I guess that's reasonable since it's not easy to plot surface region if no additional information given. but I don't understand the logic here:
if outputdir is None then wantfig = 0, why we still create a directory? this will cause problems when we run each session separately, the figure folder will always generated at cwd (where the code file is), and once the folder is generated for one session, the following sessions will have "FileExistsError".
the "FileExistsError" can be solved by adding an extra function to remove the folder everytime, just want to double check whether "if outputdir is None then wantfig = 0, and still create a directory" is the logic you prefer.
thanks!