Commit aaf10810 authored by Alexander Dornheim's avatar Alexander Dornheim
Browse files

Using GetData.getData in Goettingen_data_processor (reduce redundant code)

parent 458c91d7
......@@ -12,28 +12,13 @@ import proxtoolbox.Utilities.GetData as GetData
import urllib.request
import tarfile
#for downloading input data
import proxtoolbox.Utilities.GetData as GetData
def Goettingen_data_processor(config):
# Parameters of the forward problem
my_file = Path("../InputData/Phase/cell256.mat")
if not(my_file.is_file()):
print("Phase input data is missing.")
if GetData.query_yes_no("Do you want to download the phase input data?"):
urllib.request.urlretrieve("http://vaopt.math.uni-goettingen.de/data/Phase.tar.gz","../InputData/Phase.tar.gz", reporthook=GetData.dlProgress)
print("\nExtracting data...")
tar = tarfile.open("../InputData/Phase.tar.gz", "r:gz")
tar.extractall("../InputData/Phase/")
tar.close()
if not(my_file.is_file()):
print('***************************************************************************************')
print('* Input data still missing. Please try automatic download again or manually download *')
print('* http://num.math.uni-goettingen.de/data/Phase.tar.gz *')
print('* Save and unpack the Phase.tar.gz datafile in the *')
print('* ProxMatlab/InputData subdirectory *')
print('***************************************************************************************')
#make sure input data can be found, otherwise download it
GetData.getData('Phase')
experiment = config['experiment']
......
......@@ -27,7 +27,7 @@ from numpy.linalg import norm
from numpy.fft import fftshift
import proxtoolbox.Utilities as Utilities
#for loading data
#for downloading data
import proxtoolbox.Utilities.GetData as GetData
def JWST_data_processor(config):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment