Writing Scripts To Create Mosaics: A 3-color mosaic of the Pleiades

Because Montage is designed as a toolkit, it is easy to create your own scripts to generate custom mosaics and run them them on your desktop. You can get access these scripts from the contributed software page.

3-color mosaic of the Pleaides

3-color mosaic of the Pleaides

Here, we analyze one such script as a guide to how to go about writing your own. The bash script below, courtesy of Inseok Song (U. Georgia), uses Montage v3.0 to create a 3 x 3 three-color mosaic of the Pleiades from on-line Digitized Sky Survey (DSS2) data.

Here are the steps:

For each band:

1.  Call mArchiveList to get a list of DSS images that cover the input region.

2. Call mArchiveExec to download all the images.

3. Call mImgtbl to extract the FITS header geometry information from a set of files and create an ASCII image metadata table.

4. Call mProjExec to reproject the images.

5. Call mAdd to co-add the reprojected images into a mosaic.

And finally:

6. Call mJPEG to create a three-color JPEG, where DSS2B/DSS2R/DSS2IR data are represented as blue/green/red, respectively. A gaussian-log image scale is used with a valid data range between -1 sigma and 99.999% of the maximum image value.

To create your own image, you must create your own mosaic image definition file (e.g. pleiades.hdr; see below), and change the center position and size of your image in the mArchiveList command.

Contents of pleiades.bash

  # Pleiades Image creation BASH script.
  # Inseok Song, 2007
  for bands in DSS2B DSS2R DSS2IR; do echo Processing ${bands};
  mkdir $bands;
  cd $bands;
  mkdir raw projected;
  cd raw;
  mArchiveList dss ${bands} "56.5 23.75" 3 3 remote.tbl;
  mArchiveExec remote.tbl;
  cd .. ;
  mImgtbl raw rimages.tbl ;
  mProjExec -p raw rimages.tbl ../pleiades.hdr projected stats.tbl ;
  mImgtbl projected pimages.tbl ;
  mAdd -p projected pimages.tbl ../pleiades.hdr ${bands}.fits ;
  cd .. ;

  mJPEG -blue DSS2B/DSS2B.fits -1s 99.999% gaussian-log \
        -green DSS2R/DSS2R.fits -1s 99.999% gaussian-log \
        -red DSS2IR/DSS2IR.fits -1s 99.999% gaussian-log \
        -out DSS2_BRIR.jpg

Contents of pleiades.hdr

  BITPIX = -64
  NAXIS = 2
  NAXIS1 = 4801
  NAXIS2 = 4800
  CTYPE1 = 'RA---TAN'
  CRVAL1 = 56.500000
  CRVAL2 = 23.750000
  CRPIX1 = 2401.000000
  CRPIX2 = 2400.500000
  CDELT1 = -0.000625000
  CDELT2 = 0.000625000
  CROTA2 = 0.000000
  EQUINOX = 2000.0
This entry was posted in astronomy, astronomy images, Image mosaic, Image processing, Images, software and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s