remoteFilesFound = Fido.search(timeRange, instrument, wavelengthWindow, timeSample)
print(remoteFilesFound)
print(len(glob.glob(os.path.join(fitsL1DataBasePath,'*.fits'))),' files in '+fitsL1DataBasePath)
input("Ready for data retrieval. Press [Enter] to continue, [ctrl-c] to exit...")
# Download data
if os.path.exists(fitsL1DataBasePath):
# retrieve files, skipping those already on disk.
print("Retrieving datasets...")
resultRecord=Fido.fetch(remoteFilesFound, path=os.path.join(fitsL1DataBasePath,'{file}'),
max_conn=1, overwrite=False)
if options.retry:
# retry based on the error list here.
if len(resultRecord.errors)>0:
# take a second crack at data retrieval
print("%d retrieval errors. Retry retrieving datasets..."%len(resultRecord.errors))
resultRecord=Fido.fetch(resultRecord, path=os.path.join(fitsL1DataBasePath,'{file}'),
max_conn=1, overwrite=True)