Though a little later than I had hoped, as promised, I'm here to educate you folks about how to use the
HARPS archive. I'll save you the spiel on how it's the greatest resource ever, but know that I had to figure this all out on my own.
Manually. Eww.
As a foreword, this guide is designed for windows. Nothing used here is exactly high-tech, though, so doing this on other operating systems shouldn't be too bad.
Things you'll need:
- Access to the archive (so, uh, an internet connection)
- The systemic console. You can download it here, and tutorials on how to use it are here.
- A file unpacker-type thing. For windows, I recommend 7zip.
- Notepad, or an equivalent program.
- Microsoft Excel or an equivalent. I use OpenOffice here.
Now, to start off, let's find a suitable star. For the sake of this tutorial, I'll need one which doesn't have too many observations, and is preferably not an RV variable. I can't really know the latter in advance, but it we can make assumptions!
Lovis et al. (2011) is quite valuable in this regard, because tables 2 and 3 give a number of observations up to 2011 and an activity level, which can be used to estimate how much stellar variability will influence the RV measurements.
Not too many measurements, and inactive. Seems good. A brief analysis finds that the star is a moderately metal-poor G8 dwarf, so it's not exactly out of the ordinary. Let's head over to the archive!
Upon opening the page, you'll be greeted by this. There's quite a lot there, but we don't have to care about a good deal of it, so we won't. Instead, direct yourself towards these bits:
First, click the "Choose an instrument" dropdown and select HARPS. Unless you want FEROS observations for some reason, you should always select that option. Then, you'll need to type in our target in the "Target" box, which is "HD 224619". The "return max" box isn't relevant for this tutorial, but for stars with larger amounts of observations you'll need to increase that value. 5000 is the maximum.
Once you've done that, hit the green "search" button. You'll be presented by this:
Here we have a list of all the HARPS observations of our star. Take note of the text above the list; before continuing, you'll need an ESO account thing, so go ahead and do that now. The stuff in the orange box isn't relevant for this star, but do watch out for it - I can confirm the data is sometimes (not always) outlying.
Anyway, once you've set up your ESO account, you'll need to select your datasets for request. At the time of writing, all 22 observations of HD 224619 are public, so we can download them all. Hit the "MarkPublic" box above the list, then press "Request Marked Datasets". You'll then be moved over to this:
You don't need to worry about any of the things at the top, so press submit, and the mysterious ESO pixies will process your request. After a short while, you will be moved to a page that looks like this:
Now press "Select All", then "Download Selected". This will open up a new window, and after a few moments, ask you for a directory to download to. It's good to keep these organised, so I have a folder named "HARPS" and then have subfolders for each star. After selecting your directory, the files will start downloading:
The files are quite large, so this will probably take a while. You should probably do something else for a few minutes. If any of the downloads do happen to fail, wait until the rest finish and then press the "Retry failed" button at the bottom-left; that'll fix it.
After the downloads are finished, head over to where you set the files to go. You'll hopefully see something equivalent to this:
I'm pretty sure the file named "defaultSSL.keystore" has no use after the download, so you can delete that. Now you'll be left with a bunch of .tar files. Select them all, and (assuming you're using 7zip) click this:
That'll unpack the .tars into their contents, which are folders of the same name. Go ahead and delete the .tars now. You'll be left with a bunch of folders:
Look inside the first one. You should see six .fits files, but only the first two (the ones that have _bis_ and _ccf_ in their filenames) are important. This is the file format used by all extracted HARPS files which have been DRS'd, so get used to it! (also note that observations after ~September 2010 are nested in additional folders, though the format is the same)
Open up the one with _ccf_ in the name notepad or your equivalent. You should see a big string of text:
search (ctrl+f) for the string "CCF RVC", with the space. You should find one match, which is followed by a value:
That's our first radial velocity! Copy it, open up a second notepad/equivalent file, and paste that number in.
Then, go back to the other file and search for the string "CCF NOISE". Copy the value after it, and paste it in on your second file after the radial velocity. That's your error bar set.
Now search for "DRS BJD". Copy and paste the value before your radial velocity, which gives you your date of observation. Your second file should now look show something equivalent to this:
That's all the information you need from the _ccf_ file, so you can close it. Now, while it isn't strictly necessary, I find it very valuable to take note of the activity indicators that come with the radial velocity. So let's do that; I'll take my preferred activity indicators of the biswidth and the FWHM. Open up the file with _bis_ in the name, and search for "BIS SPAN":
Copy that, and put it somewhere on your other document (I put it after the error). That's the biswidth, in case there was any confusion.
Now search for "CCF FWHM". Copy and paste the value into your other document (I put it after the error and before the biswidth). That's the FWHM. Your second file should look like this now, depending on the order you pasted in your values:
Now go back and repeat the process for every folder. This can take a while, so be ready.
After toiling away, you should have pretty much this (labelled for your convenience)
If you do, then great! That's pretty much the hardest part over. Now, save your file and then open it in Excel or your equivalent - here we do some manual data processing.
We need to do some editing to the raw data because the format's all wrong - systemic needs the series to be in m/s and calibrated around 0, but all of these are in km/s and are all absolute. This is addressed with some simple maths (as in multiplying it by 1000), and an assumption; we assume that γ, which is the offset between the absolute velocity of the star and 0 km/s, is equal to the average value of our time series. systemic can handle datasets where γ is off by a few m/s, so this is a reasonable model assumption.
Space out your columns (right click on the column letter and press "new column"), then find the average radial velocity:
Subtract that value from each individual velocity:
And then multiply both the corrected RVs and the errors by 1000.
Repeat the process for the FWHM and the biswidth. Copy and paste the julian dates in the columns before all three processed datasets, and the errors too (the
supplement to Dumusque et al. (2012) indicates errors for the FWHM and biswidth are 2.35 and 2 times the RV error, respectively; from experience, these seem like reasonable approximations). You should end up with these, decimal places notwithstanding:
That's all the external processing we need to do. Copy and paste those into a notepad/ equivalent document, individually:
Save these as .vels files. You should probably have a specific filename format for these - I use [star name]_HARPSCCF for the RVs, and [star name]_HARPSCCF_[FWHM/biswidth], though "HARPSCCF" is a spot redundant for the archive.
Copy and rename a .sys file from the "datafiles" systemic folder (this is important, the format is unique). Open it in notepad/equivalent and replace the requested .vels and the name of the system. You will also need a mass of the star; while you could take one from literature, I recommend using the
PARAM interface. Using the T
eff and Fe/H from
Sousa et al. (2008), the V from
Høg et al. (2000) and the parallax from
van Leeuwen (2007), the interface outputs a mass of 0.822 ± 0.012 M
☉ (also an age of 9.554 ± 1.782 Gyr).
Copy and adjust your new .sys file for the FWHM and the biswidth. Your data is now ready for systemic! Copy and paste all six of your files into your "datafiles" systemic folder, and then open systemic. If all has gone well, you should see these:
As you can see, the biswidth is fairly flat, though a moderate peak appears close to the predicted rotational period (37.6 ± 3.8 d;
Lovis et al. (2011)). The FWHM shows a trend (3.26 ± 0.30 m/s) that is similar to other stars, but shows no other distinct residual peak. The radial velocities show moderate excess scatter (1.50 m/s), which does not preclude any periodicities; while the periodogram shows some power, none are distinct, so more data is needed to test the presence of companions.
So, that's my ever-so-slightly rambly tutorial. If you can't get it to work, ask me and I'll probably be able to help.
Also to touch on some subjects while it's relevant:
- HARPS is not immune to outliers. If you see a RV/FWHM/bis value that is hundreds or more m/s discrepant to others, it is fine to disregard it.
- For certain stars, the HARPS team adopts an observing strategy designed for nightly bins in order to reduce the effect of short-period oscillations. While this does produce the desired effect, Tuomi et al. (2013) showed that this can suppress peaks in the periodogram. I find it valuable to create time series of both binned and unbinned data from the archive, the former for reduced rms and the latter for more useful information on the data.
- For solar-type stars, the FWHM consistently shows a positive trend over time, generally on the order of a few m/s/yr. I don't have a very complete sample yet, but they seem to correlate with Teff like so:
- This implies that the FWHM trend is highest at ~K0 and decreases linearly to ~F5, but also decreases below K0 and is not present for M (the very small errors on two of the lowest points is not exactly real). This relation is not without outliers, though, so be aware of that.
But yeah, Have fun with the archive!