Download Handler
- class CoSpecPy.download.DownloadHandler(download_method, no_of_connections, batch_size, download_folder)
Control acces to SDSS spectra
This class is used to handle all downloads from SDSS servers and can be customised by connection type and number to increase efficiency.
- download_method
Valid download method of either wget or aria2. Controls the download of SDSS spectra
- Type
str
- no_of_connections
For aria2 connection this defines the number of simultaneous connections to SDSS servers
- Type
int
- batch_size
Controls batch size of download (size of each chunk)
- Type
int
- download_folder
Path to desired download folder for all future downloads.
- Type
str
- clear_up()
Clear files away from the specified download_folder
- download_example()
Download the example short spectra list in the data directory
- download_spectra(download_file)
Download spectra from a file.
Given spectra list containing correctly formatted URLs, download using preferred method given in class initiation
- Parameters
download_file (str) – Path to the file containing the valid URLs
- get_DR12_quasars()
Get the 512MB DR12 catalogue for future matching
- get_DR14_quasars()
Get the 750MB DR14 catalogue for future matching