-
Notifications
You must be signed in to change notification settings - Fork 1
4) Downloading spectra
The easiest way to download all spectra of a given star is using the function getALLdata. Again using CoRoT-7 as an example with
user.getALLdata('CoRoT-7')
it should download all the spectra found to you astroquery cache folder (not very useful). To solve this you can include other parameters in the function
user.getALLdata('CoRoT-7', downloadPath = '/home/user/spectrafolder', date = '2015-01-23', SNR = 50)
This way we will make the download of CoRoT-7 spectra with signal-to-noise ratio higher than 50, from observations after the 23rd of January 2015, and all will be download it to /home/user/spectrafolder folder.
Another useful function is the 'getFILEdata' function. This allows you to given a file of stars download all the spectra available of them.
user.getFILEdata('file.txt', header = 1)
will read the 'file.txt' (the stars should be the first column!), use the first line as header and download the spectra it found from them. The is of course options for the downloadPath, date, and SNR in this function as well.
Searching for stars...