Create results dir if it does not exists
parent
6ef4f99cde
commit
24f1c61aa6
|
@ -141,6 +141,27 @@
|
|||
" station_type = \"intl\""
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"ename": "NameError",
|
||||
"evalue": "name 'os' is not defined",
|
||||
"output_type": "error",
|
||||
"traceback": [
|
||||
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
||||
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
|
||||
"\u001b[0;32m<ipython-input-2-38adb07b9031>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mos\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmakedirs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'results'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexist_ok\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
|
||||
"\u001b[0;31mNameError\u001b[0m: name 'os' is not defined"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"os.makedirs('results', exist_ok=True)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 11,
|
||||
|
|
|
@ -267,10 +267,7 @@ def make_ground_image(xst_filename,
|
|||
else:
|
||||
station_type = "intl"
|
||||
|
||||
try:
|
||||
os.mkdir('results')
|
||||
except FileExistsError:
|
||||
pass
|
||||
os.makedirs('results', exist_ok=True)
|
||||
|
||||
# Distill metadata from filename
|
||||
obsdatestr, obstimestr, _, rcu_mode, _, subbandname = cubename.rstrip(".dat").split("_")
|
||||
|
|
Loading…
Reference in New Issue