Skip to content

Instantly share code, notes, and snippets.

@SpheMakh
Created May 27, 2024 09:05
Show Gist options
  • Save SpheMakh/9fec3253d89b82a0575f9dd68d224367 to your computer and use it in GitHub Desktop.
Save SpheMakh/9fec3253d89b82a0575f9dd68d224367 to your computer and use it in GitHub Desktop.
katdal download workaround
import stimela
import time
INDIR = "input"
MSDIR = "msdir"
URL = "PLACE YOUR DOWNLOAD LINK and TOKEN HERE"
MS = "NAME OF OUTPUT MS HERE"
stimela.register_globals()
keepatit = True
count = 1
while True:
recipe = stimela.Recipe("Download reticulum", JOB_TYPE="singularity", indir=INDIR, msdir=MSDIR, outdir=MSDIR)
recipe.add("cab/mvftoms" , "getdata", {
"archive-url": [URL],
"output-ms": MS,
})
try:
recipe.run()
break
except:
print("Run failed, going again.")
time.sleep(10)
keepatit = True
count += 1
if count > 100:
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment