Template talk:Right ascension

(Redirected from Template talk:RA)


Administrative

edit
edit

Discussion

edit

minutes optional

edit

I am making minutes optional, since looking at Bibcode:1988ApJ...327..544D, I see that some people don't characterize that far, using only hours... 76.66.196.139 (talk) 02:14, 21 September 2009 (UTC)Reply

Template output is non-standard

edit

1h 2m 3.4s is supposed to be rendered 1h 02m 03s.4 in standard astronomical practice, although with the s above the decimal point. Obviously, common fonts won't do that, so this approximation is usually used. Tfr000 (talk) 14:11, 27 June 2012 (UTC)Reply

It's unfortunate that the angle can't be easily copy and pasted. At the time this convention was established astronomical publications were on paper. It would be nice if there was a mechanism that allowed one to click on the angle and choose to copy it as decimal number; that is, see 1h 02m 03s.4 with the "s" over the decimal point, but copy it as 1.03428. Jc3s5h (talk) 14:41, 27 June 2012 (UTC)Reply
A possibility is to use some of the operators on Help:Calculation to modify the seconds field; ex. apply a 'trunc' for the integer part, then use subtraction to get the decimal. Inserting a zero could be done with a branch instruction. I.e. print a leading zero when the parameter is less than 10. You might also take a look at the source for {{Su}} to see if there is anything that can be used. Regards, RJH (talk) 18:53, 27 June 2012 (UTC)Reply
Leading zeroes can be implemented through the use of parser functions. 70.49.127.65 (talk) 04:43, 28 June 2012 (UTC)Reply
Ah yes, it looks like padleft would do it, per WP:PF. Thanks. Regards, RJH (talk) 00:07, 29 June 2012 (UTC)Reply
Though, I have seen in reputable publications where that is exactly the format that is printed, without the leading zeros. Admittedly, when I've seen it, it tends to be older sources. 70.49.127.65 (talk) 04:35, 28 June 2012 (UTC)Reply
It's probably an artifact of the modern digital age. Section 5.14 of the IAU Style Manual appears to recommend leading zeroes. Regards, RJH (talk) 00:12, 29 June 2012 (UTC)Reply
It appears that MW:StringFunctions do not work on en.wiki... 70.49.127.65 (talk) 07:07, 29 June 2012 (UTC)Reply
Too bad MW:Extension:Variables isn't installed either. -- 70.49.127.65 (talk) 05:36, 7 July 2012 (UTC)Reply

This is getting quite complex... I think it'll have a detrimental effect on performance

{{Template talk:RA/workpage}}
{{Template talk:RA/workpage|A=-13.26}}
{{Template talk:RA/workpage|A=+3.26}}
{{Template talk:RA/workpage|A=0.26}}

Template talk:RA/workpage Template talk:RA/workpage Template talk:RA/workpage Template talk:RA/workpage

70.49.127.65 (talk) 08:17, 29 June 2012 (UTC)Reply

Some further discussion is also occurring at Template talk:DEC and WT:WikiProject_Astronomy -- 70.49.127.65 (talk) 01:33, 30 June 2012 (UTC)Reply
At WT:AST it has been mentioned that loading this template with intricate features may make several pages run into the transclusion limit, and that instead leading zeros should be solved by manual editing. -- 70.49.127.65 (talk) 04:04, 30 June 2012 (UTC)Reply
Addressing those concerns brought up at WT:AST, a sample version is now in the sandbox. Template:RA/sandbox ; manually enter leading zeroes,manually enter the decimal point, decimal portion (with decimal point) now entered as the fourth parameter -- 70.49.127.65 (talk) 04:09, 1 July 2012 (UTC)Reply
Please present a working example of a call to your sandbox version. Jc3s5h (talk) 13:45, 1 July 2012 (UTC)Reply
That's always been available, in the test cases page. Template:RA/testcases ; it's also already shown in use at the discussion at WT:AST ; {{Template:RA/sandbox|11|||.36}} 11h -- 70.49.127.65 (talk) 03:37, 2 July 2012 (UTC)Reply
A couple more test cases:
{{Template:RA/sandbox|22|47|42|7684}} –> 22h 47m 42s
{{Template:DEC/sandbox|–14|03|23|142}} –> –14° 03′ 23″.142
I think it would be good if the fourth field automatically inserted the decimal. At a later date we might have the means to display it correctly, so not including the decimal among the data may aid in that effort. Would that require much overhead? Regards, RJH (talk) 23:34, 4 July 2012 (UTC)Reply
It just adds a single if statement, so doesn't greatly increase complexity. I'll update the sandbox momentarily. -- 70.49.127.65 (talk) 02:51, 5 July 2012 (UTC)Reply
Updated -- {{Template:RA/sandbox|11|||36}} 11h -- 70.49.127.65 (talk) 02:53, 5 July 2012 (UTC)Reply
I tried a scaling test with a copy of an existing page – Template:RA/testpage. There doesn't seem to be a problem with using multiple copies of this template. Regards, RJH (talk) 15:19, 5 July 2012 (UTC)Reply

Does Tfr000 have any comments at this point? Shall we go with this revision? Regards, RJH (talk) 19:37, 6 July 2012 (UTC)Reply

The two test cases above look good. What about backward compatibility? I believe the current template accepts inputs like 22|47|42.7684 rather than 22|47|42|7684... will this be a big problem for existing articles? "What links here" shows a lot of links. Tfr000 (talk) 13:52, 11 July 2012 (UTC)Reply
There is no problem with backward compatibility, since the result of the sandboxed template is the same as the current one, for uses using the current format. There's only the need to section off the decimal portion to address your original concern about decimals, and that can be done with a bot request, so that {{Template:RA/sandbox|22|47|42.7684}} 22h 47m 42.7684s will become {{Template:RA/sandbox|22|47|42|7684}} 22h 47m 42s ; similarly, leading zeroes can also be handled with a mass bot correction, and the minus sign issue at Template:DEC -- 76.65.131.160 (talk) 04:58, 12 July 2012 (UTC)Reply
Are we going to adopt this now? Regards, RJH (talk) 16:31, 13 July 2012 (UTC)Reply
When will this be adopted? Seven years have passed – I don't think the performance/memory issues are still relevant. --46.242.12.78 (talk) 22:37, 12 September 2019 (UTC)Reply

hours optional

edit

I made hours optional, for e.g. uncertainties measured in minutes, as in Saturn's rotational period. — kwami (talk) 23:25, 22 January 2019 (UTC)Reply

Template-protected edit request on 12 August 2022

edit

If a value for the third field (seconds) is not provided, the template output ends with a 'space' character. This is visible, for example, with the last sentence of the first paragraph of Virgo III Groups. My request is to move the hard-coded spaces to the '#if' output. I think something like this will work:

Before:

{{nowrap|{{#if:{{{1|}}}|{{{1}}}<sup>h</sup>|}} {{#if:{{{2|}}}|{{{2}}}<sup>m</sup>|}} {{#if:{{{3|}}}|{{{3|}}}<sup>s</sup>|}}}}

After:

{{nowrap|{#if:{{{1|}}}|{{{1}}}<sup>h</sup>|}}{{#if:{{{2|}}}| {{{2}}}<sup>m</sup>|}}{{#if:{{{3|}}}| {{{3|}}}}}<sup>s</sup>|}}

Praemonitus (talk) 02:27, 12 August 2022 (UTC)Reply

  Not done: please make your requested changes to the template's sandbox first; see WP:TESTCASES. A test for the issue you're describing has been added at Template:RA/testcases#With surrounding text. The code in the suggestion above seems to break tests. —⁠andrybak (talk) 21:37, 12 August 2022 (UTC)Reply