Other Elliptical Galaxies (not M87)
This is a random elliptical taken from the VMF image... NGC4473 (or V.fits as it is
in the file system)
Here's the Flow Chart Plan of
everything:
So Simple It's Stupid
version (SSIS) (link)
Run ellipse on the raw image
(above) - fit generated
Slightly Less Than
Stupid version (SLTS) (link)
Hand-make a Mask eliminating the bright star below and to
the left of the galaxy, and the effects of the bright star on the far
left.
Run ellipse on the Hand
Masked image - fit generated
Simple version (link)
Raw image (above)
Smoothing Raw image (varying degrees -
separate page)
Subtraction of Smoothed image from Raw image
Object detection on Smoothed Subtracted image makes Mask
Center of Galaxy Mask generated and combined with above Mask
Mask applied to Raw image and ellipse
package run - fit generated
Not So Simple
(iterative)
version (NSS): (link)
Raw image (above)
Same steps as Simple Version
[Now it starts getting interesting]
ellipse fit used to make Theoretical image
Theoretical image subtracted from Raw image
Object detection on Theoretical Subtracted image makes Mask2
Mask2 applied to Raw image and ellipse
package run - fit2 generated
[can stop here or continue with another iteration]
ellipse fit2 used to make Theoretical2 image
Theoretical2 image subtracted from Raw image
Object detection on Theoretical2 Subtracted image makes Mask3
Mask3 applied to Raw image and ellipse
package run - fit3 generated
[can stop here or continue with another iteration]
ellipse fit3 used to make Theoretical3 image
Theoretical3 image subtracted from Raw image
Object detection on Theoretical3 Subtracted image makes Mask4
Mask4 applied to Raw image and ellipse
package run - fit4 generated
[can stop here or continue with another iteration]
So
Simple It's Stupid version (SSIS)
First analysis, starting guess was inputted and it seemed to work.
Didn't converge at SMA > 87, but otherwise ok:
want to track the changes in these graphs throughout our methods? click
here for click-through-able graphs
back to flowchart/menu
Slightly
Less Than Stupid version (SLTS)
Hand Masking
This is pretty straightforward, I just mask out the obviously bad
regions around the bright stars, especially to remove those pixel
column bleeds.
Here is the image with the regions to be hand-masked overlaid:
Here is the resulting Hand Mask overlaid on the image: Vhand.pl on
V.fits
[made by sshing into swayback, saving the above regions as V.reg (in a
certain format, IRAF PROS I think?) and typing mkmask.pl -image V. This outputs a
mask file called RMV.pl, which I then moved to Vhand.pl.]
And when we run ellipse on
this, including the mask (which Vhand.pl was renamed to V.pl so that it
would be recognised AND V.fits was renamed to V.fit so that the mask
works)
we get:
want to see how this compared to the one without the hand mask? click
here for click-through-able view of these graphs
back to flowchart/menu
Simple
version
Smoothing
Many variations of smoothing parameters were tried (most
likely an unecessary number) and are detailed on the smoothing page.
The parameters decided on were an inside radius of 3 and outside radius of 8, and subtracted from the original
image, eliminating much of the galaxy.
iraf syntax to create this
image:
rmed V.fits output = Vr38.fits rinner = 3
router = 8 [smoothing the image]
imarith V.fits - Vr38.fits
Vr38s.fits
[subtracting
the image]
Object Detection
As before we use both OBJmask for this
detection. First, the Vhand.pl Hand Mask from above is
used as the input Bad Pixel Mask. Other parameters are the same as when
we used this before (see this page).
The parameters we are varying, as before, are the block size and the
hsigma value for cutoff. As was found best to remove the stars before,
we use:
blksize -5, hsigma 2
and generate Vr38sP1.pl,
shown here overlaid on Vr38s.fits (smooth subtracted image):
Just by eye, this looks to be a pretty good masking job.
When overlaid on the original V.fits, this is basically what ellipse will see when it does its
analysis:
Now, this mask is copied to V.pl, so that it can be read when doing ellipse on V.fit [note V.fit, not
V.fits, for ellipse's sake].
ellipse gives this result:
BARF!
Error in 1st and 2nd harmonic fit.
Please, verify output table.
ERROR: No meaningful solution.
BARF!
It could not find the object center and so I inputted the guess of
(392, 246), but it still vomitted up the above error messages,
OBVIOUSLY due to the fact that it's trying to start fitting the
galaxy close enough to the center that I've just MASKED OUT.
How to fix this? Make an UN-mask of the central galaxy region to KEEP,
regardless of the OBJmasking at this point. The UN-mask is made by
first looking at the original smoothed image, Vr58.fits:
Now we look at the contour on this image that splits on the pixel value
of 200:
The only areas that reach this intensity level are the galaxy center
and the two nearby stars. As both stars are masked in the Hand Mask,
they will still be masked in the final mask.
In order to make this UN-mask, we use imexpr
to read in the smoothed image (Vr58.fits), check which pixels have
values greater than 200, and set their values to 0 (black), setting all
other pixels to 1 (white).
To generate the Hand Mask + OBJ Mask + UN Mask we use the following imarith command:
imarith Vr38sP1.pl * Vun.pl
Vr38sP1un.pl
This mask is now overlaid on the original V.fits image
and the center of the galaxy is visible:
As before, this Vr38sP1un.pl file is copied to V.pl so that it can be
inputted (with V.fit) to ellipse
to do the fit:
NOTE: Now we add a sigma clipping of 1.5 (1 iteration) above and below
in the distribution
[Vr38sP1un.dat]
This fit has no troubles being generated except at radii of 140 pixels
or more, and for the inner half-pixel.
back to flowchart/menu
Not
So Simple
version (NSS)
Start out with the fit generated in the Simple version, and now we're
going generate a theoretical ellipcital galaxy based on it.
This is accomplished with the bmodel
task (in the isophote package
with ellipse):
table =
Vr38sP1un.dat isophote table
output = Vr38sP1unM.fits
output (model) image
(parent
=
V.fits) parent image
(fulltab=
yes) use full range of `SMA' from table ?
(minsma
=
1.) minimum modelling SMA
(maxsma
=
1.) maximum modelling SMA
(backgr
=
0.) background value
(interp
=
spline) interpolation algorithm
(highar
=
no) add higher harmonics ?
(verbose=
no) print info ?
(mode
=
ql)
And this spits out: Vr38sP1unM.fits
This nice and pretty smooth elliptical galaxy model is now subtracted
from our original Raw Image (with imarith)
to get this: Vr38sP1unMs.fits
This image is now used like our Raw Image was before, and the
OBJmasking is done on it.
First, the central region of the galaxy is marked with a region as the
data contained within it is almost certainly dubious:
We add this to our Hand Mask from before and now have a Hand + Center
mask, called Vhandcent1.pl, shown here overlaid on Vr38sP1unMs.fits:
Using imexam, there are some
important things to note on this image:
When checking statistics on the 25 pixels around various areas outside
of the region that the galaxy has been subtracted here are some example
mean values:
1.85 +/- 2.941
3.356 +/- 3.153
3.925 +/- 6.264
Inside the subtracted region we find means of:
2.796 +/- 6.847
-0.3678 +/- 3.657
-1.953 +/- 3.546
1.262 +/- 3.19
The theoretical galaxy fit drops down to 6 counts around its edges,
corresponding to a surface brightness of 27.254
Running OBJmask on this image with
blksize -5, hsigma 2
like we did before, we get: (Vr38sP1unMsP1.pl overlaid on
Vr38sP1unMs.fits)
Again we force the center of the galaxy to be unmasked by using the
UNmask from before, which gives us:
(Vr38sP1unMsP1.pl overlaid on V.fits)
This doesn't look great - it seems like there (maybe?) are obvious
stars being missed (before was worse, it has improved since the galaxy
fit was made larger, and the cutoff is less dramatic)
Irregardless, let's take this new object mask and run ellipse through it just to see.
Here's what it fits:
And using bmodel to recreate
the galaxy we get:
Subtracting from the Raw Image, as before, we get:
[Vr38sP1unMsP1Ms.fits]
So, same dark oval from the subtraction, but maybe running OBJmask
again on it will help?
Let's give it a try! block size 5, hsigma 2 like before:
[Vr38sP1unMsP1Ms.fits with Vr38sP1unMsP1MsP1.pl overlay]
Let's overlay this mask on the original V.fits image:
[V.fits with Vr38sP1unMsP1MsP1.pl overlay]
and perform the UNmasking to get Vr38sP1unMsP1MsP1un.pl:
Now we do ellipse on this and
it makes this fit:
This reflects the 3rd iteration through this
procedure. Combining all of the results from all 3 iterations (as well
as the first time, performed on just the hand-masked version), we get
this:
blue - Hand
mask green - First
masking run magenta - Second
masking run cyan - Third
masking run
Note, in the X,Y plot, 'radius' might be misleading... it's actually
just coordinate positions in pixels or arcseconds
Now, without all the intermediate steps, (well they exist in a folder
called /Virgo/m87/other/new/1sig/ and are included after the collection
of these graphs) we do this same thing but with +1 sigma cutoff in the OBJmask part
blue - Hand
mask green - First
masking run magenta - Second
masking run cyan - Third
masking run
Finally, compare with the version performed on a larger cropped image:
(more details on how this was obtained)
Want to compare this with published data on this same galaxy? Here you go!
Finally, what if we don't give it any mask and just say "Hi ellipse, please fit this galaxy,
I'm not telling you anything about it"? Well then ellipse does this:
(the points past about 100 pixel SMA all had fits that diverged - stop
code 4. aka BAD)
Well, great.
Details for hsigma = 1:
OBJmasking on smoothed image : hsigma 1 on Vr38s.fits overlay =
Vr38sp1.pl
used UNmask to keep galaxy center,
At this time it was necessary to make a Vun2.pl that went down to
intensity levels of 100, instead of 200, as the above image was not
enough for ellipse to work
with
ellipse did its best on this
and spat out:
Make the fit,
(note it's BIGGER than before)
subtract it from V.fits, and we get:
Vr38sp1unMs.fits
OBJmask this and get
Vr38sp1unMsP1.fits
(note the ring is still there, but maybe a little better than before)
UN mask it so ellipse doesn't
explode:
Doing ellipse, it gets:
And the actual fit looks like:
Subtracting from V.fits:
Vr38sp1unMsP1unMs.fits
Final round of OBJmasking:
[Vr38sp1unMsP1unMsP1.pl on Vr38sp1unMsP1unMs.fits]
UNmasking and applying to V.fits:
[Vr38sp1unMsP1unMsP1un.pl on V.fits]
Well, ellipse, do your stuff!
Ok , so now you know where
all the curves on the above plot came from.
on to M87 (?)
back to fake data
back to Virgo main page