Yet another Position Angle question...

168 views
Skip to first unread message

Sebastián García Rojas

unread,
Aug 25, 2020, 10:13:34 AM8/25/20
to astrometry
I'm having problems with the detected orientation of some images when running astrometry locally, where the reported orientation is is almost 180 degrees off - actually, the actual result and the expected result seem to be complementary to 180 degrees.

I've been reading many posts and I got to explanations about the image parity/flipping but I'm having issues regardless the parity. These two images are the same but flipped, and nova.astrometry.net correctly reports the PA is roughly North up:


But when I run these images on my local astrometry copy, I get orientation_center 178.3784 for both images. So far I've tried:

- versions 0.80 and 0.82
- index files 41**, 42** and 5***

In all cases. I'm getting 178.3 degrees instead of 1.7. Note both angles sum 180, maybe that's a hint but I'm running out of ideas. What am I missing? Any help would be appreciated.

JP

unread,
Aug 25, 2020, 2:17:45 PM8/25/20
to astrometry
The images are the same, but one is reflected horizontally (parity inversion, or flipped, etc.). That likely causes some problems for the flipped image. Do you need both images to have a solution? Or only the un-flipped image?

The un-flipped image with WCS solution can be downloaded here:

Sebastián García Rojas

unread,
Aug 25, 2020, 2:40:21 PM8/25/20
to astrometry
Well, if at least one of the two images resulted in the right answer... but both are wrong.

I googled about wrong position angles and many said it could be related to the parity, so I tried the normal image and the flipped one. In both cases nova.astrometry.net gives the correct angle and my local copy does not. I tried different library versions as well as different index files. I'm not sure what I'm doing wrong...

Sebastián García Rojas

unread,
Aug 26, 2020, 2:06:01 PM8/26/20
to astrometry
JP,

Thanks for attaching the FITS file. I've downloaded it and ran it through wcsinfo, I got orientation_center 178.36145

That's exactly what I get locally and I believed it was wrong because nova.astrometry.net shows that "Up is 1.69 degrees E of N".

I thought the orientation solved by solve-field was East from North, am I interpreting this wrongly?


On Tuesday, August 25, 2020 at 3:17:45 PM UTC-3 JP wrote:

JP

unread,
Aug 26, 2020, 2:14:21 PM8/26/20
to astrometry
Here is what I see Sebastián. The image is tilted slightly CCW, i.e., by about ~1.7 degrees counter clock wise.

Sebastián García Rojas.jpg


Sebastián García Rojas

unread,
Aug 26, 2020, 2:23:06 PM8/26/20
to astrometry
That's exactly right, that's the value I'm expecting, and the value I see on nova.astrometry.net.

However, if you download the wcs.fits in this job,  when I run wcsinfo wcs.fits I get all the header fields, one of which is: orientation_center 178.37516. I get the same value for the flipped image.

What does that field mean then? How do I get to 1.7 deg from 178.3 deg? Should I always do 180 - orientation, or am I missing something?

JP

unread,
Aug 26, 2020, 2:35:26 PM8/26/20
to astrometry
I actually don't follow what the problem is. When you use the un-flipped image you get a good solution. When you use the flipped image you get a flipped (about 180 degrees) rotation angle. Seems sensible to me.

If you NEED the flipped image, then for sure it is going to have a different solution. The parameters will be different.

Otherwise, just use the un-flipped image??? I'm not sure what you're trying to do with the flipped image or why you need it. But certainly its solution will have different parameters than the unflipped image.

Cheers.


Sebastián García Rojas

unread,
Aug 26, 2020, 3:46:45 PM8/26/20
to astrometry
The problem is I'm not seeing what you are describing.

Both the flipped and unflipped versions show "Up is 1.69 degrees E of N" (which is correct in both cases, the upper side of the picture is roughly North), and the FIT headers in both cases say orientation_center ~178.3 degrees.

Sebastián García Rojas

unread,
Aug 26, 2020, 4:00:43 PM8/26/20
to astrometry
Forget about the flipped vs. unflipped version - I just flipped it to try it out, because many people said the solution would depend on the image parity - but as far as I can see, that's not the case because both images are solved just fine on nova.astrometry.net while both have the "wrong" orientation in the headers. I don't actually think it's wrong, it's just it doesn't seem to be "degrees E of N" which is what I expected.

The question is, how does nova.astrometry.net get to the correct 1.69 value when the wcs.fits file has an orientation header set at 178.3 degrees? I'm wondering what that header orientation actually means so I can do the proper calculation to get to the right position angle.

Dustin Lang

unread,
Aug 26, 2020, 5:10:09 PM8/26/20
to Sebastián García Rojas, astrometry
What image format are you using?  FITS or jpeg?  The orientation values are confusing because we convert to FITS and report values for that in the local version.  The nova web interface adds an extra flip, Iirc.


--
You received this message because you are subscribed to the Google Groups "astrometry" group.
To unsubscribe from this group and stop receiving emails from it, send an email to astrometry+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/astrometry/125a9ec6-148d-4325-8867-f717364a3265n%40googlegroups.com.

Sebastián García Rojas

unread,
Aug 26, 2020, 5:45:10 PM8/26/20
to astrometry
I'm using JPG.

What's that conversion / extra flipping? From my tests, images with positive declination seem to have an East of South orientation in the headers, while images with negative declinations seem to have a West of South orientation. Doing 180 - orientation, or orientation - 180 respectively, I seem to arrive at the correct angle for the images I tried.

Is this how it's supposed to work, or is it a coincidence that I got the right values doing this?

Dustin Lang

unread,
Aug 26, 2020, 6:00:45 PM8/26/20
to Sebastián García Rojas, astrometry
Here's the computation.  It does not know about RA,Dec, only CD matrix and parity.


Dustin Lang

unread,
Aug 26, 2020, 6:02:50 PM8/26/20
to Sebastián García Rojas, astrometry
and ugh, here's that extra flip in the web version

Sebastián García Rojas

unread,
Aug 27, 2020, 1:45:13 PM8/27/20
to Dustin Lang, astrometry
Oh, that's progress, thank you Dustin! Now I know I'm not going crazy :)

Is it possible that the PA reported in the website is actually West of North, instead of East of North? Check this image http://nova.astrometry.net/user_images/3944010 - according to what I see on Stellarium, Aladin Lite, _and the last sky plot on the same page_, North is to the bottom right of the picture.

On non-flipped pictures like this one, I understand East is actually to the left of North on the celestial sphere when North is up. However, on the website you can read "Up is 224 degrees E of N" but if North is at the bottom right and East is left of North, then the PA seems to be 136 instead of 224.

The previous picture also seems to be showing this behavior now that I take a closer look. I was so focused on the North that I didn't pay attention to East/West. The CCDLAB screenshot JP sent yesterday shows the picture is rotated 1.7 degrees clockwise from North, which would be 1.7 degrees West of North instead of East. Or am I missing something?

image.png

Sebastián García Rojas

unread,
Aug 31, 2020, 10:32:50 AM8/31/20
to astrometry
Here I have 1 more example, annotated with North/East indicators. Then I flipped it a couple of times to see what I would get:


As you can see, in all cases the orientations seems to be West of North instead of East of North. I believe a simple change in the website would fix this, instead of (180 - orient) it should be (orient - 180) - https://github.com/dstndstn/astrometry.net/blob/master/net/models.py#L656

Although I'm not sure what happens for non-JPGish pictures... is the "core" calculation right or is it inverted as well?

Dustin Lang

unread,
Sep 8, 2020, 9:13:02 AM9/8/20
to Sebastián García Rojas, astrometry
Hi,
You might have noticed - on the results page for solved images, I added a "grid" annotated image, which shows the RA,Dec grid lines.  (You can tell which ones are Dec because they start with "+" or "-".)  Hopefully that helps with this orientation stuff.
cheers,
--dustin

Sebastián García Rojas

unread,
Sep 14, 2020, 10:33:20 AM9/14/20
to astrometry
Thank you for that grid :)

I hadn't noticed that tab, but it seems to confirm my suspicion that the position angle on the website is wrong, because it seems to be West of North instead of East of North...

"The International Astronomical Union defines it as the angle measured relative to the north celestial pole (NCP), turning positive into the direction of the right ascension" - https://en.wikipedia.org/wiki/Position_angle

As you can see in this grid, RA increases from top to bottom and North is right. To get this frame rotating East of North, we need to rotate 270 degrees from North, not ~90 as the website shows.

Also, if you check the main image on that Wikipedia page, you'll see East is actually left of North, the exact opposite to terrestrial cardinal points.

Does that make sense?

As I mentioned in my previous message, I believe a simple change would fix this for all existing pictures, instead of (180 - orient) it should be (orient - 180) - https://github.com/dstndstn/astrometry.net/blob/master/net/models.py#L656, although I'm not sure what would happen for those non-JPG-ish pictures.

Dustin Lang

unread,
Sep 14, 2020, 10:44:26 AM9/14/20
to Sebastián García Rojas, astrometry
Listen, there are FOUR cases you need to consider for any fix.
FITS image, both parities
JPEG images, both parities.

I'm not even going to consider any proposed fix that does not address those four cases.

cheers,
--dustin


Sebastián García Rojas

unread,
Sep 14, 2020, 11:34:05 AM9/14/20
to astrometry
Well, I did consider both parities for JPEG images with the images I uploaded before. I uploaded one image then flipped it vertically and horizontally to check the parities:

Unfortunately I'm not familiar with FITS and I don't have any way to generate them other than from JPEGs - which I believe would beat the purpose? I'm not sure, as I said, I'm not familiar with that format.

I initiated this thread because I was having trouble understanding if I was missing something or if this was a bug. I believe we can now agree this is a bug based on the IAU definition of Position Angle and what we are seeing on the website with both my annotations and the grid tab.

Everything seems to check out, at least for JPG images. Am I correct?

Whether the fix I propose is correct, or if you decide to fix it or not, is a different discussion. I'm fine with this being left as it is. I just wanted to understand what was going on.

Thanks!

Dustin Lang

unread,
Sep 14, 2020, 12:03:22 PM9/14/20
to Sebastián García Rojas, astrometry

Sebastián García Rojas

unread,
Sep 14, 2020, 12:52:35 PM9/14/20
to astrometry
Ahh that's it! Good to know I was not crazy :)

I'll join that conversation then, thanks!

Reply all
Reply to author
Forward
0 new messages