M84 and M86: Close friends?
Want to see simulations/practice? Click here
Here's the image/data we're working with:
And the initial hand mask of big bad stars and galaxies:
[Mhand.pl]
And the Good Old UN-mask: [sure it's crazy, but it works]
[MUN.pl]
Now, here's something new. To best mask out all the other galaxies and
stuff, we smooth with inner radius = 55, outer radius = 60, subtract
this off, and OBJ mask the subtraction.
(OBJmask has ngrow = 3, agrow = 3, hsigma = 2, blksize = -5)
[Mr5560sP1.pl on M.fits]
And, applying the unmask, we get:
[Mr5560sP1un.pl on M.fits]
ellipse is run with this mask
(as M.pl, and M.fit). First, ellipse is run on the mask with only the
left galaxy unmasked, which looks like this:
[MUN1.pl is UN mask for left galaxy.
UN1.pl is UN mask, but 0 and 1 are flipped, so it can be used as a
normal mask
Mr5560sP1un1.pl on M.fits:
[ellipse is centered at 698
1141 and fixed there. This is the brighest point in the image, and
marked by the small red circle above]
(the green circle in the middle is a bright star that messed up the fit
on previous attempts)
(fixed with PA = -65)
M1.dat: [runs to a fit out to 1431px]
And the original model (out to 1431px):
(extrapolated to 3000px)
[M1m.fits]
[M1mE.fits]
With its subtraction from the original image:
[M1ms.fits]
Now, we take this image, smooth on the same i55,o60 scale, subtract
that from the original, OBJmask it, and display that mask on top of the
original image:
(procedure, for my reference, to generate this image)
M1msr5560sP1 is obj mask
nproto> imarith M1msr5560sP1.pl * MUN2.pl M1msr5560sP1.pl
nproto> imarith M1msr5560sP1.pl + UN1.pl M1msr5560sP1.pl
nproto> imarith M1msr5560sP1.pl + Mhand.pl M1msr5560sP1.pl
-Center is indicated with red circle, at image coords of (1383, 996)
M1msr5560sP1.pl on M.fits (also M2.pl, I guess)
ellipse gets (M2.dat) (out to
2473 px)
and the model:
(out to 3000px)
[M2m.fits]
[M2mE.fits]
and the subtraction from the original image:
...and extrapolated...
[M2ms.fits]
[M2mEs.fits]
And now, subtracting both galaxy models from original image:
[Mms.fits]
Next step, use M2 fit subtraction to get a better fit of left galaxy....
Starting with previous image of extrapolated subtracted fit of M2:
[M2mEs.fits]
We re-smooth it on i55,o60 scale and subtract:
[M2mEs5560s.fits]
The OBJmask (with appropriate UNmasking) on this is:
[M2mEs5560sP1UN.pl on M.fits]
Now we will fit for the left galaxy...
(fix center on 698, 1141 px, fix PA at -65
Outputting to M1v2.dat [reached 2060px]
The model: (to 2060px)
extrapolated to 3000px
[M1v2m.fits]
[M1v2mE.fits]
The subtraction:
[M1v2ms.fits]
[M1v2mEs.fits]
Now, refitting the right galaxy with this as initial starting image,
using both the extrapolated and the non-extrapolated ones from above
Smoothing on i55,o60 and subtracting:
[M1v2ms5560s.fits]
[M1v2mEs5560s.fits]
... and OBJmasking this (with hand mask, too, of course, and UNmasking
the right galaxy, masking the left):
[M1v2ms5560sP1UN.pl on M.fits] [M1v2mEs5560sP1UN.pl
on M.fits]
And doing ellipse for these:
(center is fixed at 1383, 996, PA is fixed at -55)
[M2v3.dat (out to 828px)]
[M2v3E.dat (out to 994px)]
Only real data:
Extrapolated data:
If we use the previously un-extrapolated fit, we get these two
subtractions. The left is un-extrapolated, the right is extrapolated to
3000px
[M2v3ms.fits - real - to 993px]
[M2v3mEs.fits - extrapolated -
to 3000px]
If we use the previously extrapolated fit, we get these two
subtractions. Left is un-extrapolated again, and right is extrapolated:
[M2v3Ems.fits - real (this time) to 993px]
[M2v3EmEs.fits -
extrapolated to 3000px]
Quick comparisons:
For left galaxy
blue - M1.dat - first try
green - M1v2.dat - after M2 had been subtracted, M1 was refit
For right galaxy:
blue - M2.dat - first try after M1 had been subtracted off
green - M2v3.dat - second time around after M1 had been subtracted off
(and M1 was fit after M2 had been subtracted off)
magenta - M2v3e.dat - second time through but using extrapolated model
when subtracting off M1 (see here).
SIMULATIONS/PRACTICE - no real data
First we do some practice simulations...
e1.dat was done centered on left galaxy, e1v2.dat was done centered on
right galaxy.
#xc yc mag model rad ar pa
160 286 -12 devauc 6 2 -55
350 256 -12 devauc 5 1.1 10
e1.fits
Assigning the fit to start at the center of the left galaxy we get this
fit and model:
[Important note: I have set the center FIXED at the proper coordinates.
Without that, the fit blew up badly.]
[I have also fixed the position angle. This is great for the
theoretical ones, but in reality, probably will be tough...]
e1m.fits:
Now, we subtract this galaxy from the main image, and try to fit the
other galaxy (hopefully this is clever):
Here is the subtraction:
[e1ms.fits]
Fitting the 2nd galaxy, we get:
and the fit:
[e1msm.fits]
[the doughnut is from the other galaxy's center messing things up, this
might iterate out]
and the subtraction from the subtracted image:
Or, the subtraction from the original image:
Re-fitting this