FITS Tutorial
How do I...
Retrieve FITS Images
This procedure describes how to download a set of FITS images corresponding to a list of locations that you provide. The SAS can be used to download the files interactively. SkyServer can be used to execute a more complex query to find the list of fields. Retrieving a very large number of fields is best done using bulk download tools.
Within SAS, starting from a list of locations, you get the FITS files as follows:
- First, if you have a list of
RUN
,CAMCOL
andFIELD
values orRA
andDEC
, you can access the SAS bulk fields search to get links to a list of fields: Choose the form associated with which type of search you are doing, and enter your list of values for each field, separated by spaces, commas (",") or pipes ("|"). For example, for RA and Dec:
228.66942|27.13082 228.75516 27.54503 228.60244,27.51250
- Clicking "submit" will return a list of fields in the table below.
- You can select which filters (u, g, r, i or z) to download with the check box at the top of the list, and which fields to download with the column of check boxes. Clicking "Download Images" will then download a "tar" file through your browser.
- To use the resulting images, you first need to unpack the tar
file, which can be done with the
tar
command in Unix. Most standard "zip" utilities can understand the tar format. - Once the files are unzipped, you should also be able to use ds9 or other display software to see your FITS file. You should be aware that one FITS image is 2048x1361 pixels, where 1 pixel = 0.396 arcsec.
Within SkyServer, one can execute a more complex set of queries on fields to get just the ones you want. To start, a simple example query can be generated with the SDSS Imaging Query Server (IQS):
- Under Parameters to Return, select "minimal" for the desired set of parameters for your query
from the scroll box. This will return a csv with the following parameters
- run
- rerun
- camcol
- field
- obj
- Under Position Constraints, click on the Proximity Search button.
- Cut and paste a CSV file with RA and Dec into the Proximity Search scroll box found under the heading "List of ra, dec, [sep]."
- Click on "Submit Request" at the top of the web form to submit your query.
- Use the results to input into the SAS service described above, or just use the button at the bottom of the list that will automatically query SAS.
The above methods are useful for retrieving a few hundred fields or so, but if you are retrieving many more than that it quickly becomes cumbersome. In that case, you should instead use the bulk data download tools. The paths to the corrected frames within wget are:
http://data.sdss3.org/sas/dr9/boss/photoObj/frames/[rerun]/[run]/[camcol]/frame-[band]-[run6]-[camcol]-[field].fits.bz2
As described in the bulk data download documentation, there is a
similar path usable with rsync. In either case, if you generate a list
of run
, camcol
, field
values
from a query, you can generate the list of frame files to
download.