How to download data using download_wget.pl (Version 1.1 upated on Feb 10,2021)

The download_wget.pl Perl script allows to download data from the HEASARC using the wget protocol. Before using this script, the user should have installed Perl (version 5.8.6 or greater) and wget (version 1.12 or greater). The script may be installed in any directory and it is set to search the perl library in "/usr/bin/perl". Click here to download the script.

How to use download_wget url

 
The download_wget.pl  Perl script downloads data to the local computer from 
the HEASARC archive using wget command and a url (e.g. download_wget.pl . 

The possible type of downloads are :

 a) single directory corresponding to a specific observation
 b) range of directories corresponding to a range of observations 
 c) single file 
 d) type of files 
 
a) The command for a single directory is : 

 >  download_wget.pl https://heasarc.gsfc.nasa.gov/FTP/nicer/data/obs/2018_01/1050020180/

  On the local computer the downloaded data are in the directory 1050020180/ maintaining  
  with the archive structure.

b) The command for a range of directories is :

 > download_wget.pl "https://heasarc.gsfc.nasa.gov/FTP/nicer/data/obs/2018_01/105002018[01]"

  On the local computer the downloaded data are in the directories 1050020180/ and 
  1050020181/. The archive structure is maintained within each directory.

c) The command for a single file is :

 > download_wget.pl https://heasarc.gsfc.nasa.gov/FTP/nicer/data/obs/2018_01/1050020180/auxil/ni1050020180.att.gz

  On the local computer the file is downloaded in the directory where the script is invoked. 

d) The command for multiple files with the same pattern : 

 > download_wget.pl "https://heasarc.gsfc.nasa.gov/FTP/nicer/data/obs/2018_01/*/auxil/ni*.att.gz"

  On the local computer the files are downloaded in the directory where the script is invoked.
  The archive structure is not maintained.


Within a given url wildcard are allowed to search specific files that are located in different 
directories with a well defined pattern. The wildcard completion allowed are * and [ ]. A 
maximum of two non consegutive wildcards are allowed for url. 
The url needs to be specified with double quotes if contains * or [ ]. 

If the transfer is interruped, the user may restart the same command in the same directory and only
the remaining files are downloaded.  


NOTE: The script does not allow to transfer data from an entire mission archive 
(e.g. https://heasarc.gsfc.nasa.gov/FTP/nicer) nor from two subsequent wild card directories
(e.g. "https://heasarc.gsfc.nasa.gov/FTP/nicer/data/obs/2018_01/*/*/ni*.att.gz").



HEASARC Home | Observatories | Archive | Calibration | Software | Tools | Students/Teachers/Public

Last modified: Thursday, 18-Feb-2021 13:19:54 EST