[daip] Bug and gotcha feature in NINER (31DEC18) {External}
Eric Greisen
egreisen at nrao.edu
Thu Sep 26 13:33:51 EDT 2024
Actually, I think the code is correct except for the -2 typo with East to the left and North at the top. I added things to the help file (for 31DEC24 not your antique).
Built-in gradient masks. The first 8 "coordinate"
masks, assuming the image has North to the top and East
to the left, produce positive values when traversing
from the coordinate (e.g. North to South) when the image
values are increasing. If the image is not in the
usual configuration, the "coordinate" names are
misleading. The matrices are applied as stated.
NORT, NE, EAST, SE SOUT, SW, WEST, NW:
these are special cases of NINE. The kernels are
arranged so that they are directional derivative
filters. The output picture resembles a landscape
viewed from above with illumination at a glancing
angle from some direction. Note that the coordinate
labels assume that the image is oriented with the
North at the top and East at the left. With the
illumination from the north, for example, the north
side of a peak will be bright (positive) and the
south side will be dark (negative).
Cheers
Eric Greisen
________________________________
From: Daip <daip-bounces at listmgr.nrao.edu> on behalf of Patrick Leahy via Daip <daip at listmgr.nrao.edu>
Sent: Thursday, September 26, 2024 10:18 AM
To: aipsmail <aipsmail at nrao.edu>
Cc: Phoebe Ryder <phoebe.ryder at postgrad.manchester.ac.uk>
Subject: [daip] Bug and gotcha feature in NINER (31DEC18) {External}
Hello AIPS - hope that's still Eric:
This is about NINER version 31DEC18 (the only version we have installed at Jodrell Bank). I checked CHANGES.DOC to see if this has been fixed in more recent version, but I don't think so: NINER is only mentioned on item 15763. April 19, 2022, which doesn't look as if it relates to what we see.
BUG: OPCODE = 'NORT' gives a positive answer if the intensity is increasing from north to south, while OPCODE='SOUT' gives a positive answer if intensity is increasing south to north - these are the wrong way round and not what would be produced by the 3x3 grids shown in the HELP. I'm guessing that the masks are swapped although I haven't looked into the code.
FEATURE: OPCODE 'EAST' and 'WEST' give the results expected from the masks in HELP (although I think there is a typo in the WEST mask which has a -2 in the RH row where I would expect a -1).
However, these are defined as on a map looking down, not up, i.e. they imply that East is on the right. The NE, SE, SW, NW masks are consistent with this. Rather than changing the code I'd suggest that this was just highlighted in the task description, i.e. add "NB: NINER's compass points are defined with East on the right, i.e. the geographical, not astronomical convention."
A simple test to show this (which we have done) is to run NINER on a PATGN image containing a large Gaussian.
Best wishes,
Paddy Leahy and Phoebe Ryder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listmgr.nrao.edu/pipermail/daip/attachments/20240926/4ac9b46e/attachment-0001.html>
More information about the Daip
mailing list