> Just to be completely clear, though:
>
> 1. ADD_DBM doesn't use CHOP_THR, because the chop throw is
> specified as an argument.
>
> 2. ADD_DBM ouputs the CHOP_THR in pixels, so that it has to be
> manually changed before the image is run through remdbm. If I
> set SCUPIXSZ to something other than 1 and give a chop throw to
> add_dbm in pixels, the value that add_dbm writes to the header
> of the resultant dual-beam file is still in *pixels*.
Ignore the above. I see now that the problem was to do with the way
SCUPIXSZ was being handled. ADD_DBM does appear to be setting CHOP_THR to
the correct value in arcsec, as long as SCUPIXSZ is set correctly.
I'm still really stuck, though. I have used remdbm many times with actual
SCUBA data and it works fine. Yet with my simulated images it gives
nonsensical results. I must be missing a parameter or some necessary
condition my input image must satisfy. Please allow me to illustrate.
I start with an sdf file that I converted from a FITS file I made myself. I
amend the SCUPIXSZ keyword to set it to 1 (for the purposes of this simple
test) like this:
fitswrite cloud4 SCUPIXSZ value="1" amend comment=!
fitslist on cloud4 shows one and only one SCUPIXSZ value, correctly set to
1. Now I do this:
add_dbm cloud4 1 90 cloud4_dbm_1_90 nbeams=2
add_dbm cloud4 1 0 cloud4_dbm_1_0 nbeams=2
remdbm -out=cloud4_1_only cloud4_*dbm_1*
As expected, I get the original image back with some of the very fine-scale
structure removed. This is what I expect a chop to do: remove structure on
the spatial scale of the chop and its harmonics. But when I do this:
add_dbm cloud4 4 90 cloud4_dbm_4_90 nbeams=2
add_dbm cloud4 4 0 cloud4_dbm_4_0 nbeams=2
remdbm -out=cloud4_4_only cloud4_*dbm_4*
I get something that is almost identical to the original image, despite the
fact that there's plenty of structure in the image on scales of 4 pixels.
Worse still, when I run this:
add_dbm cloud4 5 90 cloud4_dbm_5_90 nbeams=2
add_dbm cloud4 5 0 cloud4_dbm_5_0 nbeams=2
remdbm -out=cloud4_5_only cloud4_*dbm_5*
I get total garbage: no trace of the structure in the original image, just a
5x5 pixel grid of seemingly random values.
All I'm doing is changing the chop throw. What am I doing wrong here? I
know that a real simulation would use three chops with non-overlapping
nulls, etc. but using a single chop should produce interpretable results.
Unless I greatly misunderstand, a single chop should remove structure on the
scale of the chop and its harmonics. It should not return the original
image. It should not produce a grid of random pixel values with no trace of
the original image.
In case it helps, I will try attaching the image I'm using.
Your help would be very much appreciated. Sorry if I'm missing something
obvious and wasting peoples' time.
Mike
|