{ "metadata": { "name": "", "signature": "sha256:a25ec1e43b15e576412bf018589ba78834060a16d0f880c3b9035a4cbc322f7c" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Post-processing procedures" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "After running mosaic_all for the whole catalog, there should be a directory containing all data product with the mosaicked galaxies sorted in directory with their PGC name. Along with a lot of intermediary rfits created for mosaciking. These can be deleted if unused." ] }, { "cell_type": "code", "collapsed": false, "input": [ "rm SDSS_*.fits" ], "language": "python", "metadata": {}, "outputs": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "It is generally safer to save a backup copy of the whole data product file, so that you can always start from this step instead of taking a whole week to regenerate the data product." ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Creating a Searchable Database" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The Python sqlite3 module can be used to generate the " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "1) Collect all relavant text output inside one directory. Information from these outputs tells us how each RC3 galaxy behaved during the mosaic run, including error information, coverage and clean photometry check." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "2) Change path locations inside script/rc3_database.py." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "3) Run rc3\\_database.py. The text files are parse and the information is recorded inside the rc3.db generated. The paths to data product is also stored for the HTML and PHP script to read." ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "File Path Location" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Inside the rc3.db the path location is stored as \n", "\n", " $PATH/// \n", " \n", "where $PATH refers to the directory containing all the data product." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "However the data product generated by the program is as :\n", "\n", " $PATH/// " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Therefore, we run the bash script on all the data product to add the additional directory:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "for SUBDIR in `find SDSS_run_result -maxdepth 1 -type d | tail -n +2` ;\n", "do\n", " OBJA=\"${SUBDIR}/sdss\"\n", " mkdir -p $OBJA\n", " for j in `find $SUBDIR -maxdepth 1 | tail -n +2` ;\n", " do\n", " echo $j\n", " mv $j $OBJA \n", " done\n", "done" ], "language": "python", "metadata": {}, "outputs": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This may seem extraneous but is helpful in organization of data when there are data from multiple surveys. In those cases, mosaics of a particular object of interest can be retreived from multiple surveys." ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Generating Image Gallery" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "1) In the directory with all the PGC directory of mosaicked galaxy, execute:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "mkdir Mosaic\n", "find . -name \"*.tiff\" -type f -exec cp {} ./Mosaic \\; " ], "language": "python", "metadata": {}, "outputs": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This copies all the color images inside the Mosaic directory." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "2) Copy the script script/thumbnail\\_process.py to the directory containing Mosaic/ and execute it on this data. The script takes in the Mosaic directory, keeps only the __BEST__ images, convert them into gif thumbnails and store them inside img/ directory." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "3)Copy img/ to where all the html/php files are. (Alternatively, you can simply keep the storage location for img/ and change the path in gallery.php)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "4) gallery.php automatically detects the files inside the img and displays them on the webpage, and is hyperlinked to the info page for each galaxy." ] }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }