Position angles of images

503 views
Skip to first unread message

Dominic Ford

unread,
Oct 7, 2014, 8:02:11 PM10/7/14
to astro...@googlegroups.com
I think there's a bug in the field rotation angles returned by astrometry.net.

For example, in this widefield DSLR image <http://nova.astrometry.net/user_images/421146> the annotated star chart shows that a good match to the image has been achieved, but the following is reported:

"Orientation:
 Up is 13.5 degrees E of N"

That's simply not true: up is fairly close to south. I was wondering whether up was in fact 13.5 degrees E of S, but that still seems several degrees out.

Moreover, if I upload images taken by the same fixed camera a minute earlier or later, I get reported orientations that vary by >10 degrees, despite the images differing by less than a degree in their actual rotation angles (the sky's rotated much less than a degree in a minute), and all appearing to be well matched according to the annotated star charts. Am I misinterpreting what the orientation angle means?

Thanks in advance for any help with this. We're hoping to use your code in a schools outreach program where kids will be able to take pictures of the sky and us tell them what bit of the sky they're pointing the camera at. Astrometry.net looks like it'll be the perfect tool for the job once we've got past these teething issues. We will, of course, be crediting you!

-----
Dr Dominic Ford
In-The-Sky.org

Dustin Lang

unread,
Oct 7, 2014, 8:14:17 PM10/7/14
to astro...@googlegroups.com

Orientation is often a source of confusion.

Partly this comes from the JPEG-to-FITS conversion -- there is a difference in opinion on which way is up.  The values we report are for the FITS image.  The orientation is computed simply from the WCS CD matrix terms:

        det = self._det_cd()
        if det >= 0:
            parity = 1.
        else:
            parity = -1.
        T = parity * self.cd11 + self.cd22
        A = parity * self.cd21 - self.cd12
        orient = -math.degrees(math.atan2(A, T))


As for images taken a short time apart with different reported orientations: on the "upload" page on nova.astrometry.net, under "advanced settings", try checking the "CRPIX in center" option and see if that helps.  The orientation in reported *at the tangent point*, and for wide-field images the effective orientation can vary a lot across the image.

cheers,
--dustin

Dominic Ford

unread,
Oct 7, 2014, 8:32:44 PM10/7/14
to astro...@googlegroups.com
Thanks, Dustin, that's very helpful!

Is there a command-line option for solve-field which does the same thing as checking "CRPIX in center" on the web interface?

If needs be, I can delve into the FITS headers, but it's probably simpler if I can avoid that.

I used the web interface to upload a sample image so you could see it, but for my project I'm trying to get a raspberry pi hanging off the back of a camera to figure out where the camera is pointing, so it needs to run locally!

Best wishes,

Dominic.

Andrew Hood

unread,
Oct 7, 2014, 8:45:05 PM10/7/14
to astro...@googlegroups.com
On 08/10/2014 11:32 AM, Dominic Ford wrote:
> Thanks, Dustin, that's very helpful!
>
> Is there a command-line option for solve-field which does the same
> thing as checking "CRPIX in center" on the web interface?
>
--crpix-center

You can get the myriad of options with "solve-field -h".

Andrew

--
There's no point in being grown up if you can't be childish sometimes.
-- Dr. Who

Dominic Ford

unread,
Mar 11, 2016, 11:16:58 AM3/11/16
to astrometry
Having convinced myself I'd fixed this problem 18 months ago, it seems to be causing me headaches again!

I've got a network of cameras pointing at the sky with wide-angle fish-eye lenses. The width of field is around 80 degrees, though I tend to pass astrometry.net only the central 50 degrees or so, where lens distortions are less bad. I'm using astrometry.net to work out what direction each camera is pointing in. I'm finding I can get really accurate fixes on the RA and Dec of the centre of the field, but the position angles are all over the place.

The command line I'm using is:

timeout 2m /usr/local/astrometry/bin/solve-field --no-plots --crpix-center --overwrite my_image.png

As an example, the output from two images taken 16 minutes apart is pasted below, and is fairly representative of the results I'm getting. The altitude and azimuth of the camera is consistently computed to around 0.2 degree precision. But the position angles are changing by 15 degrees or more.

Is the problem that even with the --crpix-center option, the position angle is being computed at a point in the frame that isn't the center, and in these wide-field images, that makes a huge difference? Otherwise I'm a bit stumped!

Thanks,

Dominic.

PS - I got in touch with you a while ago to mention that I was working on a public outreach project, using CCTV cameras (and astrometry.net) to triangulate the 3D trajectories of meteors, satellites, planes, etc. We've had a lot of major delays because the data's been a lot harder to deal with than we were expecting, but we're hoping to go public soon, and you'll certainly get a credit! :-)


Reading input file 1 of 1: "20150927193000_Bury-Allman_frame_BS1_LC0.png_tmp3.png"...
Extracting sources...
simplexy: found 422 sources.
Solving...
Reading file "./20150927193000_Bury-Allman_frame_BS1_LC0.png_tmp3.axy"...
Field 1 did not solve (index index-4119.fits, field objects 1-10).
Field 1 did not solve (index index-4118.fits, field objects 1-10).
Field 1 did not solve (index index-4117.fits, field objects 1-10).
Field 1 did not solve (index index-4116.fits, field objects 1-10).
Field 1 did not solve (index index-4115.fits, field objects 1-10).
Field 1 did not solve (index index-4114.fits, field objects 1-10).
Field 1 did not solve (index index-4119.fits, field objects 11-20).
Field 1 did not solve (index index-4118.fits, field objects 11-20).
Field 1 did not solve (index index-4117.fits, field objects 11-20).
Field 1 did not solve (index index-4116.fits, field objects 11-20).
Field 1 did not solve (index index-4115.fits, field objects 11-20).
Field 1 did not solve (index index-4114.fits, field objects 11-20).
Field 1 did not solve (index index-4119.fits, field objects 21-30).
Field 1 did not solve (index index-4118.fits, field objects 21-30).
Field 1 did not solve (index index-4117.fits, field objects 21-30).
Field 1 did not solve (index index-4116.fits, field objects 21-30).
Field 1 did not solve (index index-4115.fits, field objects 21-30).
Field 1 did not solve (index index-4114.fits, field objects 21-30).
Field 1 did not solve (index index-4119.fits, field objects 31-40).
Field 1 did not solve (index index-4118.fits, field objects 31-40).
Field 1 did not solve (index index-4117.fits, field objects 31-40).
Field 1 did not solve (index index-4116.fits, field objects 31-40).
Field 1 did not solve (index index-4115.fits, field objects 31-40).
Field 1 did not solve (index index-4114.fits, field objects 31-40).
Field 1 did not solve (index index-4119.fits, field objects 41-50).
Field 1 did not solve (index index-4118.fits, field objects 41-50).
  log-odds ratio 34.1611 (6.85485e+14), 68 match, 3 conflict, 78 distractors, 182 index.
  RA,Dec = (184.433,78.3765), pixel scale 492.548 arcsec/pix.
  Hit/miss:   Hit/miss: --+++---+++--+++---+++--+--++--+++++-++++--+c+---+-++---++++-++-+---+----+--+---++-c--+++++---++--++
Field 1 did not solve (index index-4117.fits, field objects 41-50).
  log-odds ratio -1.38629 (0.25), 0 match, 0 conflict, 1 distractors, 182 index.
  RA,Dec = (184.433,78.3765), pixel scale 485.662 arcsec/pix.
  log-odds ratio 30.1595 (1.25338e+13), 76 match, 7 conflict, 21 distractors, 339 index.
  RA,Dec = (184.639,78.5336), pixel scale 485.53 arcsec/pix.
  Hit/miss:   Hit/miss: c+c+++++++++-+++++-++++++++++++-+--+++++++++-++++++++-+--+++c-+c+++-+c-+-+++++-++++-c+--c+-++++-++-+
Field 1: solved with index index-4116.fits.
Field 1 solved: writing to file ./20150927193000_Bury-Allman_frame_BS1_LC0.png_tmp3.solved to indicate this.
Field: 20150927193000_Bury-Allman_frame_BS1_LC0.png_tmp3.png
Field center: (RA,Dec) = (184.200786, 78.567304) deg.
Field center: (RA H:M:S, Dec D:M:S) = (12:16:48.189, +78:34:02.295).
Field size: 60.5385 x 42.1925 degrees
Field rotation angle: up is -65.949 degrees E of N

*** Computed orientation of camera: Alt:   46.30 deg. Az:  -15.03 deg.



Reading input file 1 of 1: "20150927194600_Bury-Allman_frame_BS1_LC0.png_tmp3.png"...
Extracting sources...
simplexy: found 838 sources.
Solving...
Reading file "./20150927194600_Bury-Allman_frame_BS1_LC0.png_tmp3.axy"...
Field 1 did not solve (index index-4119.fits, field objects 1-10).
Field 1 did not solve (index index-4118.fits, field objects 1-10).
Field 1 did not solve (index index-4117.fits, field objects 1-10).
Field 1 did not solve (index index-4116.fits, field objects 1-10).
Field 1 did not solve (index index-4115.fits, field objects 1-10).
Field 1 did not solve (index index-4114.fits, field objects 1-10).
Field 1 did not solve (index index-4119.fits, field objects 11-20).
Field 1 did not solve (index index-4118.fits, field objects 11-20).
Field 1 did not solve (index index-4117.fits, field objects 11-20).
Field 1 did not solve (index index-4116.fits, field objects 11-20).
Field 1 did not solve (index index-4115.fits, field objects 11-20).
Field 1 did not solve (index index-4114.fits, field objects 11-20).
Field 1 did not solve (index index-4119.fits, field objects 21-30).
Field 1 did not solve (index index-4118.fits, field objects 21-30).
Field 1 did not solve (index index-4117.fits, field objects 21-30).
Field 1 did not solve (index index-4116.fits, field objects 21-30).
Field 1 did not solve (index index-4115.fits, field objects 21-30).
Field 1 did not solve (index index-4114.fits, field objects 21-30).
Field 1 did not solve (index index-4119.fits, field objects 31-40).
Field 1 did not solve (index index-4118.fits, field objects 31-40).
Field 1 did not solve (index index-4117.fits, field objects 31-40).
Field 1 did not solve (index index-4116.fits, field objects 31-40).
Field 1 did not solve (index index-4115.fits, field objects 31-40).
Field 1 did not solve (index index-4114.fits, field objects 31-40).
Field 1 did not solve (index index-4119.fits, field objects 41-50).
Field 1 did not solve (index index-4118.fits, field objects 41-50).
  log-odds ratio 24.6405 (5.02637e+10), 38 match, 2 conflict, 29 distractors, 176 index.
  RA,Dec = (188.855,78.3976), pixel scale 489.181 arcsec/pix.
  Hit/miss:   Hit/miss: --++--c++c+++++---+++++----+--++++++++-----++++-+--++-+-++-+---++--++(best)+-----+----++---+------------++
Field 1: solved with index index-4117.fits.
Field 1 solved: writing to file ./20150927194600_Bury-Allman_frame_BS1_LC0.png_tmp3.solved to indicate this.
Field: 20150927194600_Bury-Allman_frame_BS1_LC0.png_tmp3.png
Field center: (RA,Dec) = (188.418474, 78.429439) deg.
Field center: (RA H:M:S, Dec D:M:S) = (12:33:40.434, +78:25:45.981).
Field size: 60.6957 x 42.6632 degrees
Field rotation angle: up is -84.3152 degrees E of N

*** Computed orientation of camera: Alt:   46.25 deg. Az:  -15.23 deg.

Dustin Lang

unread,
Mar 11, 2016, 11:26:54 AM3/11/16
to astrometry
Could you please post these two images, or submit them to nova.astrometry.net and post link to the job pages?

I can't think of an obvious reason for this being unstable, even with --crpix-center

thanks,
--dstn

Dominic Ford

unread,
Mar 11, 2016, 11:55:18 AM3/11/16
to astrometry
The images are two out of the attached sequence of 20. The images have been processed to remove lens distortion and there's been some sky background subtraction too.

On most of the images, astrometry.net fails, I suspect because of residual lens distortion.

Thanks a lot for your help!

Dominic.
20150927191600-Bury-Allman.tar.gz

Dominic Ford

unread,
Mar 11, 2016, 12:01:08 PM3/11/16
to astrometry
Just realised I'm possibly being completely dumb. Is the issue that it's just pointing quite close to the pole, so a small positional error creates a huge error in position angle? 20 degrees of position angle seems like a lot, but might be consistent with the 0.2 degree variation in sky position.

In which case possibly I'm better off just assuming that the camera is always level...

Dustin Lang

unread,
Mar 11, 2016, 2:16:56 PM3/11/16
to astrometry
Yeah, it looks like with these super wide-field images, the solution flops around a fair bit depending on which set of stars match.

Reply all
Reply to author
Forward
0 new messages