Wednesday, June 8, 2016

Notes on Plume et al. (2012), "A direct measurement of the total gas column density in Orion KL"


I read the following paper yesterday as part of my Nitrogen / HCN in Orion KL background.

http://adsabs.harvard.edu/abs/2012ApJ...744...28P  
Plume et al. (2012)

(which has my advisor as second-author).



Here's the abstract:
The large number of high-J lines of C18O available via the Herschel Space Observatory provide an unprecedented ability to model the total CO column density in hot cores. Using the emission from all the observed lines (up to J = 15-14), we sum the column densities in each individual level to obtain the total column after correcting for the population in the unobserved states. With additional knowledge of source size, V LSR, and line width, and both local thermodynamic equilibrium (LTE) and non-LTE modeling, we have determined the total C18O column densities in the Extended Ridge, Outflow/Plateau, Compact Ridge, and Hot Core components of Orion KL to be 1.4 × 1016 cm-2, 3.5 × 1016 cm-2, 2.2 × 1016 cm-2, and 6.2 × 1016 cm-2, respectively. We also find that the C18O/C17O abundance ratio varies from 1.7 in the Outflow/Plateau, 2.3 in the Extended Ridge, 3.0 in the Hot Core, and to 4.1 in the Compact Ridge. This is in agreement with models in which regions with higher ultraviolet radiation fields selectively dissociate C17O, although care must be taken when interpreting these numbers due to the size of the uncertainties in the C18O/C17O abundance ratio.
My takeaway from the paper is this:
Basically, there's a super important star-forming cloud called Orion KL (the Kleinmann-Low nebula within the Orion Nebula Cluster), which contains a "Hot Core" of special interest to me, as well as other less-interesting (to me) components like outflows and ridges.

The data was collected from the Herschel "HEXOS" program, which used 45 hours of Herschel time on the HIFI instrument (the Herschel instrument most like a radio receiver, with amazingly high spectroscopic performance) in order to make a deep and complete scan that covers more than 1000 GHz (!!!) of spectral coverage from 480–1900 GHz. Orion KL was one of 4(ish) targets. The HEXOS program is described here:
http://adsabs.harvard.edu/abs/2010A%26A...521L..20B
Bergin et al. (2010)

Parameters of the Hot Core used:
T= 150 K,   Size = 10'',   VLSR = 3–4 km s−1,   n = 107 cm−3

In this study, these authors measured, precisely, the total amount of *emitting* C18O gas towards the hot core (and the other, velocity-separated components) just from directly summing the emission over nine C18O transitions (seven from HIFI and two from ground-based CSO) between J=2–1 and J=15–14. This measurement is model-independent, i.e. independent of temperature and density. It's denoted , and for the Hot Core its value is . Then, by making use of a "correction factor" (which *is* somewhat model-dependent – the authors make use of an LVG model and use some assumptions about density and temperature), they can calculate the total amount of C18O via this equation: . For the Hot Core they find = 1.69, giving
= .
They note that, after doing both LTE (via WEEDS) and non-LTE (via RADEX) modeling, the derived value is consistent to the 5–10% level, and adopt LTE values for subsequent analysis. The high densities in Orion KL make LTE a reasonable assumption.

They also derive an H2 column density. They use a flat factor of 500 × 104 (with no reference given) to convert between C18O and H2 "to obtain the canonical H2 column density in these regions". For the Hot Core they find per cm^2.

Other notes:
"From our non-LTE analysis, we have found that all C18O and C17O lines in all components are optically thin." Hot Core τ ≤ 0.15 for all transitions of C18O.

"Canonical CO: C18O abundance ratio of 500" - no reference given, again.

Uncertainties are from size of source uncertainty - if Hot Core size is decreased by 20%, then column density increases by  24%. If size is increased by 20%, then column density decreases by 21%.

The total error budget therefore includes:
  • 15% HIFI calibration error
  • ~7.5% error introduced by using LTE models
  • Column density errors introduced by 20% variations in source size.
The uncertainties presented in Tables 3 and 4, thus, reflect these errors added in quadrature. (NB: This feels a little like playing fast-and-loose with statistics, although I wouldn't know how to make it better.)

Final notes from Tom:
This'll be a super important paper to cite for my derivation of the H2 column density. Some of the uncertainty sources may have been reduced or resolved in the post-ALMA age (I mean to say that the 10'' source size may no longer just be an "estimate", and I could do the corrections for source size / column density errors myself). Also the X factor assumed might have improved or be update-able. What's next for me? Tracking down the H2-to-dust conversion. Nieva?


Tuesday, May 31, 2016

Blog purpose update

The blog posts I've made in the past couple weeks have the following purpose:

Sometimes when I am working on a technical issue in my research, I'll google some general keywords and hope a solution comes up. These blog posts have been intended to address specific solutions to the problems I encountered, such that they would have been helpful when I first encountered the issue and googled them.

Right now I'm not blogging for a wide readership, but if something you find here is helpful, I'm glad.

print more source code in the IPython debugger

This hardly deserves its own post, but I was doing some IPython debugging and wanted to see a little bit more source code than the few lines of context that it showed me by default. It turns out you can type "list" at the debugger prompt to see more.

Friday, May 27, 2016

How to manually extract the flux (in Jy) from a datacube of flux density (in Jy/beam)

I'm working with interferometric data from NOEMA. I have a datacube with intensity values that are in the units of "Jy/beam" (janskys per beam). My goal was to extract the flux (in regular janskys, or Jy) corresponding to the central source in these observations. This involved two hang-ups:

1. Selecting the pixels corresponding to the clean beam shape and size
2. Correctly calculating the beam area to match convention and get the proper number of janskys out.

I'm pretty sure that tools like CASA and gildas/mapping have already figured this stuff out, but for my purposes I wanted to extract the flux using my own tooling so that I could have more control (and have it be more reproducible); additionally, I'm not familiar enough with CASA or gildas to know where to start.

For issue #1, I needed to figure out how to select a rotated ellipse with major/minor axes corresponding to my beam. I found this math-stackexchange post super helpful in getting the Cartesian coordinates defining such an ellipse:

http://math.stackexchange.com/questions/426150/what-is-the-general-equation-of-the-ellipse-that-is-not-in-the-origin-and-rotate

In the following code snippet, you can see how I pulled this off:

For Issue #2, I needed to know how exactly the beam area was defined, which wasn't obvious. I was told (by gildas/mapping and by the FITS header of my datacube) that the beam major and minor FWHM were 1.9 and 1.0 arcseconds, respectively. But what ellipse, exactly, defines the beam area? Is it the ellipse with major and minor axes equal to the FWHM listed previously, or was it an ellipse that used Gaussian sigmas as its major and minor axes? A FWHM and a Gaussian sigma (or "c") differ by the following factor:

so the impact on the area calculation could be fairly large.

Guided by the following astropy documentation page:
http://docs.astropy.org/en/stable/api/astropy.units.equivalencies.brightness_temperature.html
I concluded that it was the ellipse with this area:
>>> bmaj = 15*u.arcsec
>>> bmin = 15*u.arcsec
>>> fwhm_to_sigma = 1./(8*np.log(2))**0.5
>>> beam_area = 2.*np.pi*(bmaj*bmin/fwhm_to_sigma**2)
(where I assume 'bmaj' and 'bmin' are the FWHM of the beam).
In the above example, there is a typo in the last line (already noted here: https://github.com/astropy/astropy/pull/4766 and ready to be fixed in the next astropy release) where the fwhm_to_sigma factor should be multiplied, not divided.

This page is probably also super helpful:
https://www.cv.nrao.edu/course/astr534/Interferometers2.html
especially this bit:

The beam solid angle of a Gaussian beam with HPBW 0 is

A=024ln2 



Ultimately I chose to extract flux corresponding to a "three-sigma" ellipse around the source, in order to capture the whole beam's flux.

I confirmed that my conversion was correct by looking at the integrated flux of a bright line in the "go view" mapping tool and comparing it to the integrated flux that I computed.
Blue: integrated flux (Jy) over the whole source size. Green: flux density (Jy/beam) at the central pixel.
gildas/mapping, showing basically the same as above, except that here the integrated flux is from a rectangular selection (the zoom window) rather than a more careful ellipse.



Wednesday, May 25, 2016

How to export a NOEMA datacube into FITS

This is a post to demonstrate how I got a spectrum from NOEMA (formerly PdBI) interferometry to export to FITS.

I have my data located in the following directory:

directory:
/Users/tsrice/Documents/Data/NOEMA/W15AI/maps

file:
l1455irs1_WIDEX.lmv-clean

$ mapping
MAPPING> fits widex_clean_cube.fits from l1455irs1_WIDEX.lmv-clean

I then load it into Python (in a pylab/IPython environment) like this, with astropy:

In [19]: widex_clean_cube, widex_clean_header = astropy.io.fits.getdata("widex_clean_cube.fits", header=True)

Wednesday, May 18, 2016

How to get a NOEMA spectrum to load in CLASS

This is a post to demonstrate how I got a spectrum from NOEMA (formerly PdBI) interferometry to load into CLASS.

I have my data located in the following directory:

directory:
/Users/tsrice/Documents/Data/NOEMA/W15AI/maps

file:
l1455irs1_WIDEX.lmv-clean

then I did this in CLASS, from the "maps" directory:
$ class
LAS >
file out mycube.bin single
lmv l1455irs1_WIDEX.lmv-clean
file in mycube.bin

! this makes a box 2'' x 2'' to extract spectra from:
set match 2
find /offset 0 0

set weight equal
average /nocheck position

plot


I learned this from the following page (102):

in this tutorial:

I have bothered with all of these steps in order to get WEEDS to work on a NOEMA spectrum.