From cbb11b4c8fa7d913293a3123e9451fca8a34120f Mon Sep 17 00:00:00 2001 From: Marius Millea Date: Tue, 16 Apr 2024 23:26:15 -0700 Subject: [PATCH] fix get_data --- act_dr6_lenslike/act_dr6_lenslike.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/act_dr6_lenslike/act_dr6_lenslike.py b/act_dr6_lenslike/act_dr6_lenslike.py index fe2775d..f617eb9 100644 --- a/act_dr6_lenslike/act_dr6_lenslike.py +++ b/act_dr6_lenslike/act_dr6_lenslike.py @@ -54,7 +54,7 @@ def get_data(data_url="https://lambda.gsfc.nasa.gov/data/suborbital/ACT/ACT_dr6/ if version is None: version = default_version - data_filename = f"f{data_filename_root}_{version}.tgz" + data_filename = f"{data_filename_root}_{version}.tgz" file_dir = os.path.abspath(os.path.dirname(__file__)) data_dir = f"{file_dir}/data/{version}/" @@ -64,7 +64,7 @@ def get_data(data_url="https://lambda.gsfc.nasa.gov/data/suborbital/ACT/ACT_dr6/ import tarfile orig_cwd = os.getcwd() - os.mkdir(os.path.join(file_dir, data_dir)) + os.makedirs(os.path.join(file_dir, data_dir), exist_ok=True) os.chdir(os.path.join(file_dir, data_dir)) print('Downloading data {} and placing it in likelihood folder.'.format(data_filename))