mArchiveGet
- Description:
- Retrieve a single FITS image from a remote archive, using a basic URL GET but with a structured output.
- Syntax:
- mArchiveGet [-d] [-r] remoteref localfile
Switches:
- -d
- Print additional debugging information.
- -r
- "Raw" mode - use a raw HTTP GET (no "HTTP/1.1" etc in the header); necessary for communication with some servers.
Arguments:
- remoteref
- URL of remote FITS file to retrieve (should be in quotes). See mArchiveList for more information.
- localfile
- Full path/filename of the retrieved file.
- Results:
- [struct stat="OK", count="bytes"]
- If remoteref points to a g-zipped 2MASS QuickLook image, the image will be unzipped during transfer.
Examples:
- $ mArchiveGet "http://irsa.ipac.caltech.edu/cgi-bin/FileDownload/ nph-download?raw=1&ref=/ti08/971024n/s009/ image/j10090244.fits.gz" j10090244.fits
- [struct stat="OK", count="2111040"]
Return Codes:
- [struct stat="OK", count="bytes"]
- [struct stat="ERROR", msg="Usage: mArchiveGet [-d] [-d] remoteref localfile"]
- [struct stat="ERROR", msg="Output file (localfile) open failed"]
- [struct stat="ERROR", msg="Invalid URL string (must start 'http://')"]
- [struct stat="ERROR", msg="No data reference given in URL"]
- [struct stat="ERROR", msg="Illegal port number in URL"]
- [struct stat="ERROR", msg="Illegal return from select()"] (data transfer error)
- [struct stat="ERROR", msg="Connection timed out"]