Suppose that you are interested in a subset of RC3 galaxies that are large enough that it can affect the imaging data of a part of the sky that your telescope is pointing at.
SELECT *FROM RC3 WHERE radius >0.1
AND 10 < new_ra < 50
AND 50 <new_dec <80
AND in_SDSS_footprint = 1
This SQL result is ran on the rc3 database and the query result is stored in catalogSubset.txt.
cat catalogSubset.txt
ID PGC_number ra dec radius new_ra new_dec new_radius in_SDSS_footprint clean error 808 2429 10.09375 41.6863888889 0.155173928366 0.1557285 33.601742 0.0043016748332 1 1 0 852 2557 10.685 41.2688888889 1.70144829063 0.0 0.0 0.0 1 1 0 1295 3844 16.2016666667 2.11944444444 0.138298909229 0.1557285 33.601742 0.0043016748332 1 1 0 2023 5818 23.4620833333 30.6602777778 0.617758535655 0.0 0.0 0.0 1 1 3 7342 21396 114.227083333 65.5994444444 0.190905638112 114.0811276 65.6216216 0.0631498144493 1 0 0 8897 27077 143.040416667 21.5005555556 0.104910451193 143.1492854 21.6413199 0.00948562047997 1 0 0 9295 28630 148.889583333 69.0666666667 0.22951905907 148.888495 69.0654192 0.0897604255636 1 1 0 11134 34697 170.067916667 13.5894444444 0.123259032594 170.0670631 13.59372 0.0872663485941 1 1 0 12812 39346 184.180833333 69.4655555556 0.182313469027 184.3071389 69.3370654 0.0160431961195 1 1 2 12813 39348 184.180833333 -3.43222222222 0.182313469027 184.18366 -3.43027 0.0235312692638 1 1 0 12837 39422 184.375 37.8075 0.138298909229 184.3729232 37.8075902 0.091900762805 1 1 0 12879 39600 184.74125 47.3044444444 0.155173928366 0.0 0.0 0.0 1 0 0 13181 40596 186.457916667 33.5461111111 0.109854728433 186.4561382 33.5464752 0.0517931595823 1 1 0 13591 42038 189.085833333 25.9847222222 0.132074432969 0.0 0.0 0.0 1 1 0 13778 42637 190.532083333 32.5411111111 0.129068051834 190.5330441 32.5454996 0.0650957809472 1 1 0 13853 42863 190.991666667 32.1716666667 0.126130104288 190.9590541 32.1371917 0.0769676853915 1 1 0 14974 46153 198.955416667 42.035 0.104910451193 0.0 0.0 0.0 1 1 0 16122 50063 210.802083333 54.3486111111 0.240335959075 0.0 0.0 0.0 1 1 3 17248 54074 227.2 67.1955555556 0.219188999763 226.8622934 67.0289581 0.0131038673558 1 1 0 17331 54470 228.974166667 56.3294444444 0.104910451193 228.9728916 56.3296267 0.0772562584855 1 0 0 18722 60095 260.051666667 57.9152777778 0.275942601788 0.0 0.0 0.0 1 0 0 20208 65001 308.716666667 60.1541666667 0.138298909229 308.107697 59.8589268 0.00303577533571 1 0 2
cd ../pipeline/
/Users/dorislee/Desktop/GSoC2014/rc3-sdss/pipeline
from rc3 import RC3
from rc3Catalog import RC3Catalog
WARNING: AstropyDeprecationWarning: ConfigurationItem has been deprecated in astropy 0.4. Use ConfigItem objects as members of ConfigNamespace subclasses instead. See ConfigNamespace for an example. [astropy.config.configuration] WARNING:astropy:AstropyDeprecationWarning: ConfigurationItem has been deprecated in astropy 0.4. Use ConfigItem objects as members of ConfigNamespace subclasses instead. See ConfigNamespace for an example.
subset = RC3Catalog()
subsetlst= subset.initSubset("../Documentation/catalogSubset.txt")
print [str(x) for x in subsetlst]
['<RC3Obj2429>', '<RC3Obj2557>', '<RC3Obj3844>', '<RC3Obj5818>', '<RC3Obj21396>', '<RC3Obj27077>', '<RC3Obj28630>', '<RC3Obj34697>', '<RC3Obj39346>', '<RC3Obj39348>', '<RC3Obj39422>', '<RC3Obj39600>', '<RC3Obj40596>', '<RC3Obj42038>', '<RC3Obj42637>', '<RC3Obj42863>', '<RC3Obj46153>', '<RC3Obj50063>', '<RC3Obj54074>', '<RC3Obj54470>', '<RC3Obj60095>', '<RC3Obj65001>']
print(subsetlst[0])
<RC3Obj2429>
We can now perform mosaicing functions to the whole subset of the catalog by storing this list inside the instance variable allObj.
subset.allObj = subsetlst
Additional information stored inside RC3 Catalog Objects
print (subset.equinox)
print(subset.frame)
J2000 fk5
from sdss import SDSS
sdss = SDSS()
You can mosaic all the RC3 objects inside the Catalog subset
subset.mosaicAll(sdss)
This mosaics all the galaxies that lies inside the subset. Then we display all the mosaiced color image as a single png by montaging them together using GraphicsMagick.
import os
os.mkdir("Mosaic")
os.system("find . -name '*.tiff' -type f -exec cp {} ./Mosaic \;")
os.system ("gm montage *.tiff montage.png")
256
from IPython.core.display import Image
Image(filename="montage.png")