Jump to content

Banner.jpg.b83b14cd4142fe10848741bb2a14c66b.jpg

Calculating RA and decl of a star


Recommended Posts

1 hour ago, izubiaurre said:

Have you taken a look at what I posted, furrysocks2?

Despite of the errors, I'm currently trying to calculate rise/set/transit times for this stars but no correct results yet (it tells me that it doesn't rise, nor set, neither transits for 2017 year).

Only briefly, a bit short on time - any reason you adjust for aberration before proper motion? I thought in the book it came after that and mean equinox.

I've played with rise/set for planets not long ago, Perseus should be visible, so seems a bit odd.

Keep me posted if you make progress, I'll let you know when I get a chance to get back to it.

Link to comment
Share on other sites

  • Replies 49
  • Created
  • Last Reply
48 minutes ago, furrysocks2 said:

Only briefly, a bit short on time - any reason you adjust for aberration before proper motion? I thought in the book it came after that and mean equinox.

Don't know really why I did that. Looking at the book the correct order should be:

  1. Apply proper motion
  2. Effect of precession
  3. Nutation
  4. And then, aberration
  5. Effect of annual parallax (which can be neglected)

Even, I found some code that never were used.

57 minutes ago, furrysocks2 said:

I've played with rise/set for planets not long ago, Perseus should be visible, so seems a bit odd.

Yes, in stellarium it looks like it's visible all year, so it's true that never sets nor rises. But, should return transit time at least.

If it nevers sets or rises, can happen because it's no visible from this latitude or is always visible. Checking the elevation sould answer if it's visible or not.

Link to comment
Share on other sites

Another question, for Right-Ascension it is used one coordinate system and for declinations another one. In the example, RA is 2h 44m 11.986s and Declination is 49º 13' 42.48''.  Proper motions are this way also. How I can convert from hms to dms (from dms to decimal degrees, the one that is the most useful to work with, i can convert).

 

Should I do 2h * 15 = 30º, but what I do with 44m and 11.986s????

 

 

Link to comment
Share on other sites

One degree = 60 arcminutes = 3600 arcseconds, and one hour = 60 minutes = 3600 seconds = 15 degrees = 900 arcminutes = 54000 arcseconds.

For 2h44m11.986s, I'd convert to decimal hours first (2.74... or whatever) and then x15.

 

The proper motion for Theta Persei on Wikipedia is quoted in mas/yr, or milliarcseconds per year, for both RA and dec. So for RA, you have to divide by 15 to get seconds per year if that's what you need to work with. You do have to be careful with units, and note that for trig functions, you typically need to convert to radians.

Link to comment
Share on other sites

Probably the error comes from from the units, because the functions parameters are not explained and I have to try and error until I get a correct value. This is why I started this topic.

I made a function to convert from hour-minutes-seconds to hour angle and if needed to decimal degrees.

So:

 RA (2h 44m 11.986s)
	HourAngle: 2.73666277777778 h
    in degrees: 41.0499416666667º

And now mas/year to arc sec/year because this is the unit that works AdjustPositionUsingUniformProperMotio function.

Proper motion (μ)
RA: +334.66[1] mas/yr
Dec.: -89.99[1] mas/yr
(from Wikipedia)

RA is degrees or in hour angles?
Dec. : in arcsec / year = (-89.99 /1000)/year = -0,08999 / year;

Others work in arc sec of a degree, hour angle, ... I have checked all the parameters and types of the code I posted here and all is fine. So, now I'm going to check RA, Dec, and proper motions initial values are correctly converted to asked units.

 

Link to comment
Share on other sites

Theta_Persei

   11/13/2028 3:33:35 AM
   Initial RA: 2.73666278 Decl: 49.228467
   Proper motion RA: 0.33466 Decl: -0.08999
   Variations of the proper motion: RA: 41.0901942365187º [41.5472], 49.2277454067887º [49.3485º]
    Obliquity (deg) 23.4355376734864º [23.436º]
    NutationInLongitude (arcsec) 14.864703294423º [14.861º]
    NutationInEcliptic (arcsec) 2.70662716192016º [2.º705]
    AlphaNutation (arcsec) 15.8503885757164º [15.844º]
    DeltaNutation (arcsec) 6.21849208690923º [6.217º]
    Aberration RA (arcsec) 0.000557415802188735º [0.0083223] Dec (arcsec) 0.00183371649566052º [0.0018749]
   RA:     2.77307974491199 , Dec:    49.3519721232581 
	
     Theta Persei azimuth: 301.114063399155º - elevation 47.6046392097464º
	(Stellarium values) Az: 300.9359º - El: 47.5659º

This is what I got so far. There's almost a minimal difference from the values from the book (I'm using Von Roedrik aproximation). Values in the book are in brackets.

Link to comment
Share on other sites

Error in az seems a bit much, I can tell why you're still looking at it. Alt is "ok" but az, could be out by an entire fov with a small sensor.

A few thoughts?

  • Using Calculator, I can't get your proper-motion-adjusted RA to match your initial RA - can you check that one?
  • For completeness, can you print out a value corrected for mean equinox? (ie after proper-motion, before nutation etc)
  • Ignoring the Alt/Az for a second, how do your final RA/Dec compare with Stellarium's "RA/Dec (on date)" values?
  • Are you sure you've set Stellarium location correctly?
  • Have you got "Include nutation" and "Topocentric coordinates" both checked in Stellarium Configuration>Tools?
  • Note that you can tick "Use decimal degrees" in Stellarium to make it easier to compare if you want.

If you're still having issues, if you can repost your up-to-date code, I'll try compiling it against aaplus in C++.

Link to comment
Share on other sites

59 minutes ago, furrysocks2 said:
  • Using Calculator, I can't get your proper-motion-adjusted RA to match your initial RA - can you check that one?

I don't understand this question. Are you asking how I get my RA and Dec values? If this is the case, I'm using HMSToHourAngle function and DMSToDD functions to get these values, using Wikipedia values for RA in HMS format and Dec values in DMS format.

 

1 hour ago, furrysocks2 said:
  • For completeness, can you print out a value corrected for mean equinox? (ie after proper-motion, before nutation etc)

Star's coordinates for the mean equinox: right-ascension (alpha_0): 2.77222880339544,  declination (delta_0) 49.3484110478494

 

1 hour ago, furrysocks2 said:
  • Ignoring the Alt/Az for a second, how do your final RA/Dec compare with Stellarium's "RA/Dec (on date)" values?

Stellarium gives me:

RA: 41.54042º (4.17641h) <-- I don't know why is this value 4.### (shouldn't be 2.###??? )

Dec: 49.3480º

My values:

RA: 41.59619617º (2.773079h)
Dec: 49.351972123281º (This one is quite close)

1 hour ago, furrysocks2 said:
  • Are you sure you've set Stellarium location correctly?
  • Have you got "Include nutation" and "Topocentric coordinates" both checked in Stellarium Configuration>Tools?
  • Note that you can tick "Use decimal degrees" in Stellarium to make it easier to compare if you want.

Stellarium location is set to Donosti and I'm using same coordinates for the calculations.
Both are checked and I'm using decimal degrees.

1 hour ago, furrysocks2 said:

If you're still having issues, if you can repost your up-to-date code, I'll try compiling it against aaplus in C++.

Despite my code is C#, shouldn't any problem to convert or translate to one language to another.

Thanks a lot!!!

Link to comment
Share on other sites

On 22/03/2017 at 19:49, izubiaurre said:

Thank you for your fast response, Noah.

SkySafari is pretty expensive for only testing purposes (50€), but I will take a look to SkyPortal if it can help me.

When there's an astronomical event there's often a substantial reduction in prices. We bought SkySafari pro for around £15 a couple of years ago. Maybe they'll have a discount when the solar eclipse is on later this year.

Anne

Link to comment
Share on other sites

1 hour ago, furrysocks2 said:
  • Using Calculator, I can't get your proper-motion-adjusted RA to match your initial RA - can you check that one?

 

39 minutes ago, izubiaurre said:

I don't understand this question. Are you asking how I get my RA and Dec values? If this is the case, I'm using HMSToHourAngle function and DMSToDD functions to get these values, using Wikipedia values for RA in HMS format and Dec values in DMS format.

 

12 hours ago, izubiaurre said:

   Initial RA: 2.73666278 Decl: 49.228467
   Proper motion RA: 0.33466 Decl: -0.08999
   Variations of the proper motion: RA: 41.0901942365187º [41.5472], 49.2277454067887º [49.3485º]

 

 

In a spreadsheet, I get:

miscalc.png.ab719db7ea0fc876ae0c95cbc50467da.png

Working backwards from your proper motion value, I think I see that you're using the value 0.33466 in seconds per year, but it is in fact a value in arcseconds per year.

 

I might be wrong, but check your units again just in case.

Link to comment
Share on other sites

I have compiled a C++ program against aaplus and its output is shown below:

Initial - RA: 2.736663 (41.049946), Dec: 49.228448
          2h44m11.987040s, 49º13'42.411100"

Stellarium (0.12.4) - RA: 2.736861 (41.052917), Dec: 49.228028
                      2h44m12.700000s, 49º13'40.900000"
Error (in arcseconds) - RA: -10.694400, Dec: 1.511100

Stellarium (0.15.1) - RA: 2.736864 (41.052958), Dec: 49.228028
                      2h44m12.710000s, 49º13'40.900000"
Error (in arcseconds) - RA: -10.844400, Dec: 1.511100

Proper motion - RA: 2.736842 (41.052630), Dec: 49.227726
                2h44m12.631081s, 49º13'39.813364"
Precession - RA: 2.769718 (41.545775), Dec: 49.348461
             2h46m10.986074s, 49º20'54.460414"

Nutation (in arcseconds) - RA: 15.845633, Dec: 6.219740
Aberration (in arcseconds) - RA: 30.087910, Dec: 6.613637
Total corrections (in arcseconds) - RA: 45.933543, Dec: 12.833377

Final - RA: 2.770569 (41.558535), Dec: 49.352026
        2h46m14.048310s, 49º21'7.293791"

Stellarium (0.12.4) - RA: 2.769722 (41.545833), Dec: 49.348611
                      2h46m11.000000s, 49º20'55.000000"
Error (in arcseconds) - RA: 45.724647, Dec: 12.293791
Error (pre-nutation/aberration, in arcseconds) - RA: -0.208896, Dec: -0.539586

Stellarium (0.15.1) - RA: 2.769739 (41.546083), Dec: 49.348750
                      2h46m11.060000s, 49º20'55.500000"
Error (in arcseconds) - RA: 44.824647, Dec: 11.793791
Error (pre-nutation/aberration, in arcseconds) - RA: -1.108896, Dec: -1.039586

Stellarium (0.15.1 w/ nutation) - RA: 2.769361 (41.540417), Dec: 49.348028
                                  2h46m9.700000s, 49º20'52.900000"
Error (in arcseconds) - RA: 65.224647, Dec: 14.393791
Error (pre-nutation/aberration, in arcseconds) - RA: 19.291104, Dec: 1.560414

 

OK... there's a lot here - note: I'm sticking to equatorial coordinates and not converting to topocentric horizontal coordinates.

  • firstly, I note that the J2000 RA/Dec in Stellarium differs from the SIMBAD J2000 coordinates by ~10.7-8 arcseconds RA and 1.5 arcseconds Dec - they differ between 0.12.4 and 0.15.1 only by 0.01 seconds in RA which will due to rounding so can be ignored, so it would be interesting to know what catalog Stellarium uses, or whether there is an option I'm missing.
  • compared to the book, the total nutation and aberration corrections I have calculated are within 0.0455" in RA and 0.0816" in Dec - very minimal difference
  • the closest match appears to be between my pre-nutation/aberration value and Stellarium 0.12.4's "RA/DE (of Date)" values, which would lead me to assume 0.12.4 does not account for nutation/aberration (google suggests this was introduced in 0.14.0 or just before) - but this confuses me a little given the difference in initial RA/Dec... perhaps it is using different RA/Dec values than are displayed, or different values for proper motion that happen to coincide
  • the next closest match appears to be between my pre-nutation/aberration value and Stellarium 0.15.1's "RA/DE (of Date)" values, without checking the "Include nutation" checkbox... this is again quite good but the same confusion as above therefore arises, given the difference in starting RA/Dec, particularly RA.
  • looking then at Stellarium 0.15.1 with "Include nutation" checked, the error between "RA/DE (of Date)" and my calculated values including nutation/aberration is the largest error of all these data points, which is confusing given that the corrections I calculated match the book very well, leading me to wonder whether or not Stellarium is calculating nutation correctly or not - my pre-nutation/aberration values more closely match Stellarium 0.15.1's calculations with nutation.

 

A very quick prod of Cartes du Ciel appears to give figures that match more closely to those I have calculated, but is very configurable wrt coordinates - warrants a closer look...

Link to comment
Share on other sites

OK, in Cartes du Ciel, I set the time, searched for Theta Persei and double clicked it:

cdc_theta_persei.png.ee259202f6d8b8174477dd226ec8a20f.png

 

My Initial            - RA: 2.736663 (41.049946), Dec: 49.228448
                        2h44m11.987040s, 49º13'42.411100"
CDC Astrometric J2000 - RA: 2.736938 (41.054063), Dec: 49.227725
                        2h44m12.975000s, 49º13'39.810000"

Error (in arcseconds) - RA: -14.819400, Dec: 2.601100


My Mean               - RA: 2.769718 (41.545775), Dec: 49.348461
                        2h46m10.986074s, 49º20'54.460414"
CDC Mean Date         - RA: 2.769812 (41.547183), Dec: 49.348450
                        2h46m11.324000s, 49º20'54.420000"

Error (in arcseconds) - RA: -5.068896, Dec: 0.040414


My Final              - RA: 2.770569 (41.558535), Dec: 49.352026
                        2h46m14.048310s, 49º21'7.293791"
CDC Apparent          - RA: 2.770662 (41.559937), Dec: 49.352025
                        2h46m14.385000s, 49º21'7.290000"

Error (in arcseconds) - RA: -5.050353, Dec: 0.003791

Uncertain what the "Apparent Astrometric J2000" coordinates actually represent, as the error is large, but the other two match up nicely in Dec and both 5 arcseconds out in RA.


Here's the code, with print lines removed for clarity:

    // Initial
    auto initial = mk_coord(HMS(2, 44, 11.98704), DMS(49, 13, 42.4111));
    auto stellarium_0124_initial = mk_coord(HMS(2, 44, 12.7), DMS(49, 13, 40.9));
    auto stellarium_0151_initial = mk_coord(HMS(2, 44, 12.71), DMS(49, 13, 40.9));

    // Proper motion
    double J2000_0 = 2451545;
    double JD = 2462088.64832177;
    double pmAlpha = 0.33466 / 15;
    double pmDelta = -0.08999;
    CAA2DCoordinate proper_motion = CAAPrecession::AdjustPositionUsingUniformProperMotion((JD - J2000_0) / 365.25,
                                                                         initial.X, initial.Y, pmAlpha, pmDelta);

    // Precession
    CAA2DCoordinate precession = CAAPrecession::PrecessEquatorial(proper_motion.X, proper_motion.Y, J2000_0, JD);

    // Obliquity and Nutation
    double obliquity = CAANutation::MeanObliquityOfEcliptic(JD);
    double nutation_longitude = CAANutation::NutationInLongitude(JD);
    double nutation_ecliptic = CAANutation::NutationInObliquity(JD);

    CAA2DCoordinate D = precession;
    double alpha_nutation = CAANutation::NutationInRightAscension(D.X, D.Y, obliquity, nutation_longitude, nutation_ecliptic);
    double delta_nutation = CAANutation::NutationInDeclination(D.X, /*D.Y,*/ obliquity, nutation_longitude, nutation_ecliptic);

    // Aberration
    CAA2DCoordinate aberration = CAAAberration::EquatorialAberration(D.X, D.Y, JD, true);

    //Final
    auto result = mk_coord(precession.X + alpha_nutation/3600.0/15.0 + aberration.X,
                           precession.Y + delta_nutation/3600.0 + aberration.Y);


    // Stellarium for comparison
    auto stellarium_0124 = mk_coord(HMS(2, 46, 11), DMS(49, 20, 55));
    auto stellarium_0151 = mk_coord(HMS(2, 46, 11.06), DMS(49, 20, 55.5));
    auto stellarium_0151_nutation = mk_coord(HMS(2, 46, 9.7), DMS(49, 20, 52.9));

    // Cartes du Ciel for comparison
    auto cdc_astrometric_j2000 = mk_coord(HMS(2, 44, 12.975), DMS(49, 13, 39.81));
    auto cdc_mean_date = mk_coord(HMS(2, 46, 11.324), DMS(49, 20, 54.42));
    auto cdc_apparent = mk_coord(HMS(2, 46, 14.385), DMS(49, 21, 07.29));

Interestingly, applying nutation in Stellarium 0.15.1 changes both RA and Dec in a negative direction, whereas CDC mean->apparent and my own calculations both move in the positive direction.

Perhaps also interestingly, CdC's "Apparent Astrometric J2000" is closer to the "RA/DE (J2000)" values in Stellarium than the values from SIMBAD, but I'm unsure why.

    // Initial
    auto initial = mk_coord(HMS(2, 44, 11.98704), DMS(49, 13, 42.4111));
    auto stellarium_0124_initial = mk_coord(HMS(2, 44, 12.7), DMS(49, 13, 40.9));
    auto stellarium_0151_initial = mk_coord(HMS(2, 44, 12.71), DMS(49, 13, 40.9));

	...

    // Cartes du Ciel for comparison
    auto cdc_astrometric_j2000 = mk_coord(HMS(2, 44, 12.975), DMS(49, 13, 39.81));

 

Link to comment
Share on other sites

Just a quicky...

5 hours ago, izubiaurre said:

RA: 41.54042º (4.17641h) <-- I don't know why is this value 4.### (shouldn't be 2.###??? )

Right ascension and hour angle are not equivalent... hour angle = local sidereal time - right ascension. Local sidereal time should account for this. Of course, you'll use the hour angle when you're converting to horizontal coordinates.

Link to comment
Share on other sites

5 hours ago, furrysocks2 said:

In a spreadsheet, I get:

miscalc.png.ab719db7ea0fc876ae0c95cbc50467da.png

Working backwards from your proper motion value, I think I see that you're using the value 0.33466 in seconds per year, but it is in fact a value in arcseconds per year.

 

I might be wrong, but check your units again just in case.

I use Precession.AdjustPositionUsingUniformProperMotion((JD - J2000_0) / 365.25,   Alpha, Delta, pmAlpha, pmDelta); function to calculate, and proper motion parameter are in arcsec/year units ( I did miliarcsec/year / 1000 to get arcsec values) That I get from Wikipedia values.

Quote

CAAPrecession::AdjustPositionUsingUniformProperMotion

static CAA2DCoordinate AdjustPositionUsingUniformProperMotion(double t, double Alpha, double Delta, double PMAlpha, double PMDelta)

Return Value

Returns the converted equatorial coordinates in a CAA2DCoordinate class. The x value in the class corresponds to the right ascension expressed as an hour angle and the y value corresponds to the declination in degrees.

Parameters

t The number of years from the starting epoch, negative in the past and positive in the future.

Alpha The right ascension expressed as an hour angle.

Delta The declination in degrees.

PMAlpha The proper motion in right ascension in arc seconds per year.

PMDelta The proper motion in declination in arc seconds per year.

This is what tells the function in AA+ reference. I supposed that PMAlpha should be in Arcsec/year of degrees instead of arcsec/year of hour angles...

 

Otherwise, I have to check your c++ code against mine in c# side by side to see if I have done something wrong with units. Doing a quick search, I found that you do

double pmAlpha = 0.33466 / 15;

And I do

double pmAlpha = 0.33466 / 1000;

 

 

Interesting the way it has taken the original question I did a week ago and where are now asking why so different initial RA/Dec and proper motion RA/Dec.

Link to comment
Share on other sites

3 minutes ago, izubiaurre said:

This is what tells the function in AA+ reference. I supposed that PMAlpha should be in Arcsec/year of degrees instead of arcsec/year of hour angles...

Terminology for units... "hours, minutes and seconds" vs "degrees, arcminutes and arcseconds".

 

But you're right...

Quote

PMAlpha The proper motion in right ascension in arc seconds per year.

PMDelta The proper motion in declination in arc seconds per year.

That throws my RA way out... I wonder if it's an error in the documentation.

Link to comment
Share on other sites

3 minutes ago, furrysocks2 said:

0.33466 is in as/yr - quoted on wikipedia as 334.66 mas/yr, so you shouldn't need to convert from milli...?

Sorry, my mistake. I did 334.66/1000 to ge as/year unit. But still... 0.33466/15 ?

Link to comment
Share on other sites

3 minutes ago, izubiaurre said:

Sorry, my mistake. I did 334.66/1000 to ge as/year unit. But still... 0.33466/15 ?

From the source:

Quote

value.X = CAACoordinateTransformation::MapTo0To24Range(Alpha + (PMAlpha * t / 3600));
 value.Y = CAACoordinateTransformation::MapToMinus90To90Range(Delta + (PMDelta * t / 3600));

If Alpha is in hours and Delta is in degrees, then PMAlpha should be in seconds and PMDelta in arcseconds. I'll query a documentation bug with the author.

Link to comment
Share on other sites

Quote
Theta_Persei
   11/13/2028 3:33:35 AM
   Initial RA: 2.73666278 Decl: 49.228467
   Proper motion RA: 0.0223106666666667 Decl: -0.08999
   Variations of the proper motion: 41.0526252024346 right-ascension, 49.2277454067887 declination
   Star's coordinates for the mean equinox: 2.76971807210008 right-ascension (alpha_0), 49.3484807063209 declination (declination_0)
    Obliquity (deg) 23.4355376734864º
    NutationInLongitude (arcsec) 14.864703294423º
    NutationInEcliptic (arcsec) 2.70662716192016º
    AlphaNutation (arcsec) 15.8456332822823º
    DeltaNutation (arcsec) 6.21973915995203º
    Aberration RA (arcsec) 0.000557336014198368º  Dec (arcsec) 0.00183643236485624º
    RA (arcsec) 2.77056884576765h  Dec (arcsec) 49.3520448440079º
  
Topocentric emaitzak:
     Theta Persei azimuth: 301.485511604035º - elevation 46.367215358146º

These are the new values. Both RA and Dec are a little bit smaller that before (it was expected due to the pmRA reduction). I have to look deeper and compare to your code side by side, if I can figure where happens the thing. Meanwhile, I'm coding when are visible the stars and a new page in the App.

Link to comment
Share on other sites

It looks to me as if we now get the same result for corrected RA/Dec to within a fraction of an arcsecond so I think we're now doing the same calculation, and CdC agreed to within not very many arcseconds, so that's a good thing.

Note: where you print out aberration, you state arcsecs but RA is still in decimal hours and Dec in decimal degrees. However, our results agree so closely I think you're using the values correctly - it's probably just a misprint in your debug output.

Link to comment
Share on other sites

10 minutes ago, izubiaurre said:

A misprint. 

 

A pleasure to have worked in this with you, furrysocks2, if you agree I will like to write your name in the credits of my App. 

Glad to have been able to help - perhaps I was also a distraction, but enjoyed the tinkering. No need to credit me at all... I put in some time freely but gave you nothing you didn't have already - Meeus and aaplus did the hard work, I just confirmed units and what-not.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.