The Sizes of HII Regions#

Imad Pasha, Yasmeen Asali, William Cerny, Sebastian Monzon (Yale University)

Description: Investigate an \(H\alpha\) image of M33 to determine the size of HII regions in the galaxy.

Intended Audience: Beginner to Intermediate Undergraduate

tags: library:matplotlib, control-flow:functions, visualization, astronomical-images

Requirements: requirements.txt

Last Updated: July 23, 2024

Learning Objectives

  • Write basic functions in Python.

  • Be able to appropriately scale and view FITS images.

  • Write functions to carry out analyses on images.

Introduction#

Stars form of many different masses (from much smaller than the sun to much larger), with many more low mass stars forming than massive stars. While very few high mass (e.g., 3-10+ \(M_{\odot}\)) stars form at a time in a galaxy, they have an outsized effect, dominating the light of the low mass stars (though they live much shorter lives). They are also the only stars (dubbed O-type) who put out significant light in the ultraviolet part of the spectrum. We know that our own sun does emit some light in the UV (that’s the more high energy, dangerous light that can give us cancer, hence sunscreen), but these stars pump out most of their light in the UV.

UV light has enough energy to ionize the atoms in gas (especially hydrogen gas), which means to knock the bound electron out of the atom and leave behind a proton and an electron. In some equilibrium, these electrons recombine with protons, and the electrons cascade through several energy levels as they fall toward the ground (most bound) state. For each gap they drop, the atom emits a photon with an equivalent energy to the difference between the levels traversed.

This process of recombination produces light at specific wavelengths, so when you look at planetary nebulae, star forming regions, or supernova remnanta (see below), the colors are representitive of the different elements and energy levels being traversed.

eagle nebula The Eagle Nebule, where we can see the hollow region being blown out by young stars (with the famous pillars of creation remaining), soon to be whittled down. Credit: ESO

Bright, young stars actually put out enough radiation to “blow out” and push on the gas remaining from the clouds from which they formed. This carves our roughly spherical regions known as Strömgen spheres, the inner boundary of which is usually lit up in this ionized emission. The size of the sphere blown out depends on the total amount of flux coming from the bright stars, which in turn depends on how many of them there are.

In this exercise, we will be using an image of M33 taken by the Dragonfly Spectral Line Mapper.

You can download it here (right click and save as a .fits file).

If you open it up in DS9, or in Python with the right settings, you should see something like the following:

In our image of M33, we can see lots of these roughly spherical regions being highlighted by the narrow, H\(\alpha\) filter being used to observe the galaxy. By measuring their size in pixels and using our knowledge of the distance to M33, we can perform some simple trigonometry to determine their actual physical sizes. As a bonus, we can then roughly estimate the number of O-type stars responsible for the visible HII region. (note that Starforming region and HII region are roughly synonymous; HII is the chemical name for ionized hydrogen).

Finding a Region#

While we can see by eye lots of small HII regions scattered around M33 in our image, to do a more careful analysis of the sizes we will need a way to crop our images to just focus on one HII region at a time.

There are fundamentally two ways to carry out this crop. We can work in units of image pixels, and use array indexing and slicing to select subarrays containing out HII regions. Or, we could use our wcs objects to pick central coordinates on the sky and a size (in sky angular units) to crop in on, and use an astropy tool to do the crop.

In this exercise, we will work with the pixels, as it will be good practice for our array indexing and slicing.

Now that we have a set of starting coordinates, we want to crop our image down to a certain window around our coordinates which contain the HII region.

You should hopefully now have a nice, circular feature filling most of your plotted image. This is our HII region!

In order to estimate its radius in pixels, we’d like to place a circle down that lines up with the ridge of emission defining the circle (and adjust our center as needed, as our by-eye estimate from the full image was likely not perfect.

Size Trigonometry#

Now that we have a measurement of \(R_{HII}\) in pixels, we need to begin converting this to a physical scale. We can do this because we know the pixel scale of our detector, that is, how many angular degrees (here we’ll use the arcsecond) on sky does one pixel subtend. For example, if we have a pixel scale of 2.2, that means each pixel subtends 2.2 arcseconds on sky (roughly 0.0006 degrees).

We can then make a triangle — the long edge is the distance in physical units to M33. The short edge is the length we want, the physical radius of the HII region, and \(\theta\) is our measured angular radius, obtained by multiplying the radius in pixels by the pixel scale.

triangle of distance and radius

Number of OB Stars#

Now that we know the physical size of the HII region (not a trivial feat!) we can actually go further. In a back-of-the-envelope sense, the radius of the full HII region can be approximated as that of a Strömgren sphere around a “single” high energy star.

The formula for this radius is

\[ r_S = \left(\frac{3N^*}{4\pi\alpha n^2}\right)^\frac{1}{3} \]

where \(N^*\) is the ionizing photon rate from the OB star (typically \(\sim 10^{49}\) photon s\(^{-1}\)), \(\alpha \sim 3\times10^{-13}\) cm\(^{3}\) s\(^{-1}\) is the recombination coefficient, and \(n\sim 10\) cm\(^{-3}\) is the number density.

We know \(r_S\).

Throughout the course of this lab, you have written several shorter (and longer) functions. For our implot function, it is hopefully clear why having that function around is handy — to set everything we included every time we wanted to quickly view some fits file or local array would be onerous; this function now makes it very easy to get a useful result in a simple one line call, with plenty of room to specify options if we desire.

On the other hand, functions are most useful for reusable bits of code. Thus far, though, we only measured one HII region. In theory, all of the computations we did along the way could have been done directly in our script or notebook and it would not have been that disorganized of a file.

Let’s now demonstrate why writing functions was useful, even for the small steps.