I'm having a problem with getting ccxymatch to plate solve an image when extracting data from USNO A2.0 vs B1.0. I have A2.0 locally, but B2.0 I have to download via a small Perl script I wrote to use the CGI interface. The image is actually [b:6bb165554e]already[/b:6bb165554e] plate solved. What I'm trying to do is "fix" my script. However,Because the image has a plate solution, I can load it into ds9 and my shell script wrapper marks the stars found by sextractor using one color and those extracted from the catalog in another. I can see a moderate number of overlaps from either B1.0 or A2.0. But B2.0 gives a noticeably better set of overlaps with sextractor.I've got nmatch set to 50, I set the place scale to be very nearly correct (3 arc-sec/pixel when the solution is 3.1), and the RA and DEC for the place (from the nominal pointing) are good within an arc-minute. The object is NGC 7209, an open cluster. B1.0 includes stars in the cluster, A2.0 seems not to (or not much).The script pulls stars out from the catalog within one degree of the nominal pointing. My FOV is about 45'x30' so this is a bit more than the FOV, but not horribly excessive. The script then feeds different magnitude ranges into a reference file, then invokes ccxymatch. These images are specifically for pointing corrections (which I'm tryting to automate), and are not very deep; good S/N is really only down to mag 16. So the filter starts with stars from mag 9--13 and increase each limit by one after each failure. With B1.0, this very quickly gets a match. With A2.0, it never gets a match.Again, since I already have a plate solution, the script actually loads the image and markers from sextractor and the catalog extract into ds9 while it runs so I get visual feedback on how things are progression. It [b:6bb165554e]looks[/b:6bb165554e] like there ought to be enough stars matching for a solve, but ccxymatch fails repeatedly.Any tips on parameters to use? This uses nmatch=60, but I've tried 40, 50, and finally 60. All work when the extract is from B1.0; none when it is from A2.0. Here is the IRAF script invoked from my wrapper:
1:6BB165554E Formatted Code
#!/usr/local/bin/ecl
# Automatically find the plate solution.
cl.logregen=no
images
imcoords
tv
printf("args = %s\n", args)
{
string sources
string field
string match
string platesol
string residuals
string image
sources = args+".sources_bright"
field = args+".usno_bright"
match = args+".ccxymatch"
platesol = args+".platesol"
residuals = args+".residuals"
image = args+".fit"
# Remove the old files for idempotency
printf ("!rm -f %s %s\n", match, residuals) | cl()
printf ("ccxymatch %s %s %s 6 12 matching=triangles nmatch=60 xmag=3 ymag=3 verbose=yes\n", sources, field, match)
printf ("ccxymatch %s %s %s 6 12 matching=triangles nmatch=60 xmag=3 ymag=3 nreject=30 verbose=yes\n", sources, field, match) | cl()
printf ("ccmap input=%s database=%s results=%s images=%s lngcolumn=1 latcolumn=2 xcolumn=3 ycolumn=4 update=yes interactive=no verbose=no\n", match, platesol, residuals, image)
printf ("ccmap input=%s database=%s results=%s images=%s lngcolumn=1 latcolumn=2 xcolumn=3 ycolumn=4 update=yes interactive=no verbose=no\n", match, platesol, residuals, image) | cl()
}
logout
[/code:1:6bb165554e]