The SDSS images from Stripe 82 need to reside on your local machine to run some of the LSST tutorials (see: Process SDSS Stripe 82 Images). You must have the LSST Stack installed on your system (see LSST Stack Installation) to proceed. The commands listed in the code blocks below primarily assume you are using the bash shell; analogous commands for (t)csh should work as well. If you have not already done so, load the LSST environment: where
Load the LSST Environment
$INSTALL_DIR is the directory where the LSST Stack was installed.
You must have the LSST Stack installed on your system (see LSST Stack Installation) to proceed. The commands listed in the code blocks below primarily assume you are using the bash shell; analogous commands for (t)csh should work as well. If you have not already done so, load the LSST environment:
Download Tutorials Package
If you have not already done so, download the tutorials package, which includes a utility for generating the URLs for images in the SDSS archive. Fetch the package from the LSST source code repository to a working directory, and set up an environment variable:
Configure the Data
An area of interest, a 0.2° x 0.2° region of SDSS Stripe 82 in the r-band, was defined in the tutorial Process SDSS Stripe 82 Images. Even this relatively limited area requires over 700 SDSS fields of input data.
Acquire the Data
Install the Astrometry Catalog
Acquire and install the astrometry_net_data package for Stripe 82 to enable astrometric solutions (a capability not used in this example) and matching the astrometric catalog to detected sources:
Note: The astrometry_net_data package is roughly 38 MB.
Fetch the SDSS DR7 Data
The DR7 data can be acquired from the SDSS archive at http://das.sdss.org/imaging/. The data must include the asTrans, fpC, fpM, psField, and tsField files, with a file structure mirroring that of the SDSS server. (See the SDSS Data Processing & Products page for data product definitions.) Starting from the file of image IDs that was generated by the
refCoaddList.py script in the tutorial:
genRetrieveList.py script in the tutorials package to generate a set of URLs to the needed data products in the SDSS archive, then use wget to both retrieve the files from the SDSS archive and preserve the native directory structure:
The download of these ~700 fields may take up to an hour and consume ~2.7 GB of disk space. Once retrieved, the data will be located in subdirectories like the following:
Create a Registry
A registry file must be created to contain essential meta-data (filter used, sky coverage, etc.) from the input image file headers for later use. Create one and place it in your data repository:
Setup a Database Server
A database server, and the
SeasonFieldQuality database table, is necessary for following the Summer 2013 demo (Process SDSS Stripe 82 Images) to co-add and perform forced photometry on Stripe 82 images. If you have write access to the database server at NCSA this step is unnecessary.
Scisql requires version 5 of MySQL. (See for example: http://dev.mysql.com/downloads/mysql/ As of writing, lsst-db.ncsa.illinois.edu is running the Oracle-supported MySQL, though this may change.) Check that you can connect to your new database server and create databases.
Scisql deploys a number of database UDFs for spatial indexing, spherical geometry, and common astronomical operations like converting between flux and magnitudes. To install scisql, see https://github.com/smonkewitz/scisql or follow these steps recently tested on OS X 10.11.
Check that the scisql libraries and deploy scripts are in $PREFIX.
Next, deploy the UDFs.
Note, to find the socket for your mysql installation, run:
mysqladmin variables -u root -p
Back in your mysql client, check that the scisql UDFs have been successfully installed:
Create the SDSS_quality_db
To create a copy of the SDSS quality database locally, create a database on your server.
Finally, download the mysqldumps and load into your local server: