|
MExtract Software Module
|
|
Detects and Measures All Objects Brighter Than a Threshold Value
|

|
- Detect and measure the properties of sources in an image
- Extracts brightness, position, and shape information into a data table
- Applicable for research activities in precision low-light imaging
- Compatible with Mira Pro and Mira MX
|
|
|
|
|
|
|
|
Outline
|
The following information is an extract from a page from the Mira Pro User's Guide,
with internal hyperlinks omitted. The methods described here are available in Mira Pro
and Mira MX (version 7.60 and later).
Source extraction involves the automated detection of objects in an image
and the subsequent extraction of their brightness, position, and
shape information into a data table. The final collection of source data
contains coordinates, luminance, ellipticity and many other properties. The
diverse applications for source extraction include many research activities in
precision low-light imaging.
The example given here shows an astronomy
application involving measuring the FWHM of many point sources on an image.
Other astronomical applications include generating object lists for multi-object
photometry, mapping optical aberrations and CCD artifacts, counting galaxies,
and discovering variable stars by comparing the luminance of the same source
through a stack of images.
This tutorial shows you how use the MExtract module to detect and measure
the properties of sources in an image. These tools are accessed from the
Measure > Extract Sources command for an Image Window. In this
tutorial it is used to examine the FWHM values for many point sources in a small
region of an image.
|
|
|
|
Overview
|
Source extraction involves the detection and measurement of all objects brighter
than a threshold value. The first step in source extraction involves
determination of the background level. Knowing the background at each point,
each pixel can be tested against the threshold above background; if the pixel
exceeds the threshold, it is tagged as a source candidate.
All candidate pixels are then collected into objects completely separated from
others by a boundary at the specified threshold level. In this way, the sources
are like islands poking above sea level. Source properties such as luminance,
ellipticity, area, and others are then computed. The final processing step
involves filtering this source list to retain only the sources that meet criteria
such as being within a certain range of area or ellipticity.
The list of sources extracted from the image may then be further analyzed using
Mira tools or saved for analysis by other software. This series of steps is called
the "source extraction pipeline". Not all steps are required but, in this tutorial,
we will use the full pipeline and then do some analysis of the results.
|
|
|
|
Getting Started
|
To begin, use the File > Open command to load the Open dialog.
As shown below, select the sample image BL-CAM-2.fts and click
[Open] to display it in Mira.
|
|
|
 |
|
|
After opening the image, click the Measure > Extract Sources command
in the pull-down menu. This opens the Source Extraction Toolbar which
operates all the commands of the Source Extraction package. As typical in Mira,
the toolbar opens on the left border of the image window with marking mode active:
|
|
|
 |
|
|
The Source Extraction Toolbar works different than most toolbars in that there
are no interactive marking modes. The toolbar commands are shown here:
|
|
|
 |
|
|
The
button will execute the source extraction pipeline, which is a chain of procedural steps
involved in detecting and measuring all the sources meeting your criteria. These
steps are configured in the Source Extraction Preferences dialog which is
opened by the button. On the toolbar, click now to open the preferences dialog
Setup all the preferences as shown on the following 5 pages of the dialog:
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
After you have set all preferences as shown above, click [OK] to accept your
set close the dialog. Mira remembers all these settings. If you run the Source Extraction
pipeline again and you want to use the same settings, you do not need to open this
dialog and re-configure them.
|
|
|
|
Running The Extraction Pipeline
|
To run the extraction, click the
button on the toolbar. After some number of seconds, the Source Extraction Messages
window will open like this:
|
|
|
 |
|
|
The Messages window was created because the Verbose
box was checked on the Procedure page. This is a standard Mira
Text Editor window, so the results listed here can be edited or
saved for your records.
There are a number of things to be learned from the Messages window.
The first interesting point is that 185 sources were identified inside the
rectangular region of the image cursor. However, setting a minimum area of
4 pixels discarded 102 of them, leaving 83 sources 4 pixels or larger. At
this low threshold above background, we detected quite a few hot
pixels very small object which are mostly just warm pixels.
You could verify this by re-running the pipeline after making changes on the
Filter page: On the Filter page, uncheck Min Area
and set Max Area = 2 pixels. Also notice that the Finding, Detecting,
and Filtering steps required a very small amount of time to complete, but it
took approximately 100 times as long to compute Precision FWHM values in the
Post Processing step. Therefore, if you re-run the pipeline to count the number
of tiny bumps, the "computationally expensive" FWHM step is not necessary and
should be turned off.
The output from our extraction run looks like the image below.
This was zoomed 2x to show the sources with better separation.
|
|
|
 |
|
|
Using the magnify mode or your mouse thumbwheel, zoom the image to 4x so it
looks like the picture below. You can now see the kinds of sources that were
detected. Notice how bright the faintest objects are compared with the sky
noise. This makes it apparent how well Mira's centroiding algorithm works for
faint sources. Look at object 68 in particular.
|
|
|
 |
|
|
Since we selected Report Method = "No Report" on the
Procedure page, the source properties extracted from
BL-CAM-2.fts were not listed anywhere. Choosing not to display the
results can save time if a large number of objects are detected, especially
if you do not know if you want to save them (Hint: You can maximize the
scrolling speed of the report window by keeping Auto-optimizing the column widths).
However, you can view the information after the fact. In this case,
only 83 sources passed the filtering and that is quick to display in a Report
window. Click to open the Source Extraction Preferences dialog and
select the Procedure page. Click the [List] button and the
Report window opens as in the picture below (this is shown scrolled
down to object 66). Close the Preferences dialog so you can continue
using the other windows.
|
|
|
 |
|
|
If you want to save these results, make sure the Report window is top-most and
use the File > Save As command to save it to a text file.
|
|
|
|
Analyzing the Extraction Data
|
You can do many things with the tabular data in a Report window,
including save it to a text file, copying onto the Windows Clipboard,
or rearranging the columns and sorting the rows to make comparisons (see
Arranging Report Data). In addition, you can create a Scatter Plot
to examine relationships between the source properties.
Make the Source Extraction Report the top-most window and click the
View > Scatter Plot command in the pull-down menu. You can also
access commands like Scatter Plot by right-clicking inside the Report window to
open it Context Menu. The Scatter Plot command opens a setup dialog
like this one:
|
|
|
 |
|
|
In the Scatter Plot dialog, you select which columns of report data to
plot on the horizontal and vertical axes. Optionally, you can also set a title
and select columns containing data to be used as error bars. As shown above, use
the two left-hand list boxes to select "Lum" as the X Axis Variable and
"FWHM" as the Y Axis Variable. This will produce a graph showing FWHM
versus Luminance for all the sources that were extracted from the BL-CAM-2.fts
image. Click [Plot] to create the graph like this:
|
|
|
 |
|
|
Notice that a single point with FWHM near 600 has set the plot scale so that the
other points are all crunched together near the bottom. We will investigate this
particular source later. At the moment, let's have a closer look at the other
FWHM values. On the Plot Toolbar, click to enter Expand Mode and
drag a rubberband around the plot region to zoom in as shown below:
|
|
|
 |
|
|
We can see that the typical FWHM is around 3.2 pixels. The increased scatter in
FWHM at very low luminance is to be expected because the measurement becomes
dominated by sky noise. The higher values of FWHM could be faint galaxies or
could just be random fluctuations for very faint stars. We can examine them more
closely using the same method we will use for the object we noted above as
having a FWHM near 600.
Which object is that? You could scroll through the table to find it but there
is an easier way. In the Report window, click the FWHM column header to sort
the source list by value. If it sorts in the wrong sense, with the smallest
value at the top of the list, click again to get the largest value at the top
of the list. Right-click on the cell containing the value FWHM value of 577
to open the Context Menu for this Report window. Notice that the value highlights
underneath the menu as shown below. In the menu, select Go To Object as shown here:
|
|
|
 |
|
|
The Go To Object command shifts the displayed image to the position
of the object who's table cell was highlighted. If you expose the
Image Window containing BL-CAM-2.fts, you will see it centered
as shown below. The zoom value was set on the Procedure page of the
Source Extraction Preferences dialog.
|
|
|
 |
|
|
Why did Mira calculate a FWHM value of 577 for this object? To answer that
question, click the button on the left end of the Image Toolbar to enter
Roam Mode (so that clicking on the image does not execute any command from
a toolbar). Now hold down the Shift key and click the mouse pointer on the
star to center the Image Cursor at that point. Then click the button
on the main toolbar to create a Radial Profile Plot like the one shown below.
|
|
|
 |
|
|
The object of interest is on the left, centered at a radius value of 0.
The huge scatter of points on the right correspond to the extremely bright star
just above the target star in the Image Window. Notice the FWHM value of 1037
pixels listed in the caption above the plot box. It is clear that the FWHM
measurement could not cope with the extremely bright star in the nearby
background, which made the measurement invalid.
There is another object of interest in this report window. If you sort the
FWHM list again, the object at the small end has the value -1.#IND, which is
computer speak for a numerical value that could not be computed.
Usually this means that the object is just too faint to get a numerically stable
solution for the FWHM. Right-click on this value and repeat the Go To Object command.
|
|
|
 |
|
|
The Go To Object command centers the Image Window on the point like this:
|
|
|
 |
|
|
That is one really faint object. Again, the FWHM value could not be calculated
because the object was just so faint that the solution gave a nonsensical result.
Still, the centroid coordinate appears to be accurate even at this incredibly low
brightness level.
In this Tutorial we have shown how to setup and use the MExtract module to
detect and extract information about sources in the image. Using a similar strategy
but with different parameters such as filtering limits, one can use the
Extract Sources command and other Mira tools to do such varied projects as
counting bad pixels, characterizing optical aberrations across the field of view,
or hunting for galaxies using their higher ellipticity and lower values of CI or
higher FWHM as classification criteria.
|
|
|
Notice
|
We are constantly checking the accuracy of the technical data. We are prepared to provide
more detailed information on request. Technical data is subject to change without notice.
|
|
|
|
|