In [1]:
%matplotlib inline
import aplpy
#Select a colortable
color_table='gist_heat_r'

Here we setup the contours levels that we will use for the Herschel 500um maps. The two options are because the data might be in Jy/beam or MJy/sr.


In [2]:
Her500_Jybm=[3.0]
Her500_MJysr=[80.0]

Taurus


In [22]:
Data_File = 'Taurus_Herschel_500um.fits'
Region_File = 'Taurus_GAS_box.reg'
fig_Taurus = aplpy.FITSFigure(Data_File, hdu=1, north=True)
fig_Taurus.show_colorscale(cmap=color_table, vmin=0.0, vmax=70.0)
fig_Taurus.show_contour(Data_File, hdu=1, levels=Her500_MJysr, colors='white')
fig_Taurus.show_regions(Region_File)
fig_Taurus.ticks.set_color('black')
fig_Taurus.save('Taurus_region_Figure.pdf')


INFO:astropy:Deleting work directory /var/folders/z_/jnv7dl6s0ljb9tlh0gx65mj40000gn/T/tmpoWIdgE
INFO: Deleting work directory /var/folders/z_/jnv7dl6s0ljb9tlh0gx65mj40000gn/T/tmpoWIdgE [montage_wrapper.wrappers]
INFO
INFO:astropy:Auto-setting resolution to 300 dpi
: Auto-setting resolution to 300 dpi [aplpy.core]

Perseus


In [3]:
Data_File = 'Perseus_SPIRE_all_500mu.fits'
Region_File = 'Perseus_GAS_box.reg'
fig_Perseus = aplpy.FITSFigure(Data_File, hdu=1, north=True)
fig_Perseus.show_colorscale(cmap=color_table, vmin=0.0, vmax=2.625)
fig_Perseus.show_contour(Data_File, hdu=1, levels=Her500_Jybm, colors='white')
fig_Perseus.show_regions(Region_File)
fig_Perseus.ticks.set_color('black')
fig_Perseus.save('Perseus_region_Figure.pdf')


INFO:astropy:Deleting work directory /var/folders/kh/k9jffhhj5fb2jp8xcrkhbcjw0000gn/T/tmpXKXDG3
/Users/jpineda/code/aplpy/aplpy/labels.py:432: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  if self.coord == x or self.axis.apl_tick_positions_world[ipos] > 0:
/Users/jpineda/code/aplpy/aplpy/normalize.py:115: RuntimeWarning: invalid value encountered in less
  negative = result < 0.
INFO: Deleting work directory /var/folders/kh/k9jffhhj5fb2jp8xcrkhbcjw0000gn/T/tmpXKXDG3 [montage_wrapper.wrappers]
INFO
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/collections.py:650: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if self._edgecolors_original != str('face'):
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/collections.py:590: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if self._edgecolors == str('face'):
INFO:astropy:Auto-setting resolution to 220 dpi
: Auto-setting resolution to 220 dpi [aplpy.core]

Oph


In [4]:
Data_File = 'Oph_main_SPIRE_500.fits'
Region_File = 'Oph_GAS_box.reg'
fig_Perseus = aplpy.FITSFigure(Data_File, hdu=1, north=True)
fig_Perseus.show_colorscale(cmap=color_table, vmin=12, vmax=25.625)
fig_Perseus.show_contour(Data_File, hdu=1, levels=Her500_Jybm, colors='white')
fig_Perseus.show_regions(Region_File)
fig_Perseus.ticks.set_color('black')
fig_Perseus.save('Oph_region_Figure.pdf')


---------------------------------------------------------------------------
IOError                                   Traceback (most recent call last)
<ipython-input-4-41f634868a31> in <module>()
      1 Data_File = 'Oph_main_SPIRE_500.fits'
      2 Region_File = 'Oph_GAS_box.reg'
----> 3 fig_Perseus = aplpy.FITSFigure(Data_File, hdu=1, north=True)
      4 fig_Perseus.show_colorscale(cmap=color_table, vmin=12, vmax=25.625)
      5 fig_Perseus.show_contour(Data_File, hdu=1, levels=Her500_Jybm, colors='white')

/Users/jpineda/code/aplpy/aplpy/core.pyc in __init__(self, data, hdu, figure, subplot, downsample, north, convention, dimensions, slices, auto_refresh, **kwargs)

/Users/jpineda/code/aplpy/aplpy/decorators.pyc in _auto_refresh(f, *args, **kwargs)
     23     mydata.nesting = getattr(mydata, 'nesting', 0) + 1
     24     try:
---> 25         return f(*args, **kwargs)
     26     finally:
     27         mydata.nesting -= 1

/Users/jpineda/code/aplpy/aplpy/core.pyc in __init__(self, data, hdu, figure, subplot, downsample, north, convention, dimensions, slices, auto_refresh, **kwargs)
    252         else:
    253             self._data, self._header, self._wcs = self._get_hdu(data, hdu, north, \
--> 254                 convention=convention, dimensions=dimensions, slices=slices)
    255             self._wcs.nx = self._header['NAXIS%i' % (dimensions[0] + 1)]
    256             self._wcs.ny = self._header['NAXIS%i' % (dimensions[1] + 1)]

/Users/jpineda/code/aplpy/aplpy/core.pyc in _get_hdu(self, data, hdu, north, convention, dimensions, slices)
    334             # Check file exists
    335             if not os.path.exists(filename):
--> 336                 raise IOError("File not found: " + filename)
    337 
    338             # Read in FITS file

IOError: File not found: Oph_main_SPIRE_500.fits

In [ ]: