DavidT3 / DAXA

Democratising Archival X-ray Astronomy (DAXA) is an easy-to-use Python module for downloading multi-mission X-ray telescope data and processing it into usable archives. Users can acquire entire archives, or filter observations based on ID/positions/time. Supports XMM; partial support eROSITA, Chandra, NuSTAR, Swift, Suzaku, ASCA, ROSAT, INTEGRAL
BSD 3-Clause "New" or "Revised" License
12 stars 0 forks source link

Downloading XMM data should be allowed to retry at least once #55

Open DavidT3 opened 1 year ago

DavidT3 commented 1 year ago

If the connection is refused, then it should be allowed to attempt at least one more time to download the data.

DavidT3 commented 1 year ago

There should also be a check for whether a zipped tar remains, because if so then I think something has gone wrong. This did happen as I tested re-processing all of XMM. So I ran a little script:

`import os from shutil import rmtree

dirs = os.listdir('.')

tars = [f for f in dirs if 'tar.gz' in f]

for tar in tars: obs_id = tar.split('.')[0] if obs_id in dirs: rmtree(obs_id) os.remove(tar)`

To identify remaining zips, and remove any ObsID directory with the same name.

I think this should probably be a checking step in the DAXA downloading process.