Difference between revisions of "Template:Infobox lunar eclipse/doc"

From blackwiki
Jump to navigation Jump to search
imported>PhilipTerryGraham
(→‎Syntax: Added additional space in syntax after "saros_no")
imported>PhilipTerryGraham
(Updated documentation to new version of the infobox)
Line 2: Line 2:
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
  
'''{{tl|Infobox lunar eclipse}}''' is an {{tl|Infobox}}-based template that acts as a summary of information for an article on a specific [[lunar eclipse]]. It is largely designed to present the most relevant information on an eclipse to a casual astronomer, and intentionally omits highly specific details such as [[geocentric coordinates]] and [[ΔT|delta ''T'']] to avoid information bloating and keeping the infobox as short as reasonably possible. This infobox is designed with a subheading parameter, two image parameters, one caption parameter, sixteen cell parameters and two succession link parameters. Its syntax makes use of a collapsible list, four [[mw:Help:Extension:ParserFunctions##if|<code><nowiki>{{#if:}}</nowiki></code>]], two [[mw:Help:Extension:ParserFunctions##ifexist|<code><nowiki>{{#ifexist:}}</nowiki></code>]], and one [[mw:Help:Extension:ParserFunctions##ifeq|<code><nowiki>{{#ifeq:}}</nowiki></code> parser function]], along with a [[hCalendar]] microformat.
+
'''{{tl|Infobox lunar eclipse}}''' is an {{tl|Infobox}}-based template that acts as a summary of information for an article on a specific [[lunar eclipse]]. It is largely designed to present the most relevant information on an eclipse to a casual astronomer, and intentionally omits highly specific details such as [[geocentric coordinates]] and [[ΔT|delta ''T'']] to avoid information bloating and keeping the infobox as short as reasonably possible. This infobox is designed with a subheading parameter, two image parameters, one caption parameter, sixteen cell parameters and two succession link parameters. Its syntax makes use of a collapsible list, two [[mw:Help:Extension:ParserFunctions##if|<code><nowiki>{{#if:}}</nowiki></code>]], and two [[mw:Help:Extension:ParserFunctions##ifexist|<code><nowiki>{{#ifexist:}}</nowiki></code> parser functions]], along with a [[hCalendar]] microformat.
  
 
== Syntax ==
 
== Syntax ==
Line 10: Line 10:
 
| type      =  
 
| type      =  
 
| image      =  
 
| image      =  
| caption    =  
+
| caption    =
| image2    =
 
 
| date      =  
 
| date      =  
 
| gamma      =  
 
| gamma      =  
Line 17: Line 16:
 
| saros_ser  =  
 
| saros_ser  =  
 
| saros_no  =  
 
| saros_no  =  
| cat_year  =
 
| cat_no    =
 
 
| totality  =  
 
| totality  =  
 
| partiality =  
 
| partiality =  
Line 47: Line 44:
 
| <code>caption</code>
 
| <code>caption</code>
 
| This image caption parameter is intended to describe the photograph used in the <code>image</code> parameter above it, formatted as follows: the point during the eclipse it was taken, the location on Earth it was taken from, and the time it was taken in UTC. For example, "{{xtd|Totality from [[Wollongong|Wollongong, New South Wales]], 09:48 UTC}}"
 
| This image caption parameter is intended to describe the photograph used in the <code>image</code> parameter above it, formatted as follows: the point during the eclipse it was taken, the location on Earth it was taken from, and the time it was taken in UTC. For example, "{{xtd|Totality from [[Wollongong|Wollongong, New South Wales]], 09:48 UTC}}"
|-
 
| <code>image2</code>
 
| This second image parameter also displays a thumbnail image at the size of the user's preference. This parameter is intended to be used to display an infographic of the eclipse. [[:File:Lunar eclipse chart close-2018Jul27.png|This image]] would be an example of the kind intended to be displayed in this parameter. Omit the <code>File:</code> prefix when in use. When <code>image2</code> is active, a caption will also be active, using the [[mw:Help:Extension:ParserFunctions##if|<code><nowiki>{{#if:}}</nowiki></code> parser function]]. It reads "{{xtd|Chart of the eclipse; ecliptic north is up, hourly motion shown right to left}}".
 
 
|-
 
|-
 
| <code>date</code>
 
| <code>date</code>
Line 63: Line 57:
 
| These parameters are used to display both the [[Saros (astronomy)|saros series]] that a lunar eclipse belongs to, and which entry in the series it represents in parentheses. The first use is achieved using the <code>saros_ser</code> parameter, which uses the [[mw:Help:Extension:ParserFunctions##ifexist|<code><nowiki>{{#ifexist:}}</nowiki></code> parser function]] to check if a wikipedia article about a particular series exists. If it does, it automatically creates a [[wikilink]] to that article, and if not it simply displays the input as normal text. The second use is achieved using the <code>saros_no</code> parameter, where both the entry number the eclipse represents is displayed along the total amount of eclipses in the series, preferably conjoined with the preposition "{{xtd|of}}". For example, the [[June 2010 lunar eclipse]] is described in this parameter as "{{xtd|58 of 84}}" in [[Lunar Saros 120]].
 
| These parameters are used to display both the [[Saros (astronomy)|saros series]] that a lunar eclipse belongs to, and which entry in the series it represents in parentheses. The first use is achieved using the <code>saros_ser</code> parameter, which uses the [[mw:Help:Extension:ParserFunctions##ifexist|<code><nowiki>{{#ifexist:}}</nowiki></code> parser function]] to check if a wikipedia article about a particular series exists. If it does, it automatically creates a [[wikilink]] to that article, and if not it simply displays the input as normal text. The second use is achieved using the <code>saros_no</code> parameter, where both the entry number the eclipse represents is displayed along the total amount of eclipses in the series, preferably conjoined with the preposition "{{xtd|of}}". For example, the [[June 2010 lunar eclipse]] is described in this parameter as "{{xtd|58 of 84}}" in [[Lunar Saros 120]].
 
|-
 
|-
| <code>cat_year</code>, <code>cat_no</code>
 
| These two parameters are used to complete parts of a [[Wikipedia:External links|external link]] to an official chart by the [[Goddard Space Flight Center]] (GSFC, with detailed information and background, for a particular eclipse. The entire string is as follows: <code><nowiki>https://eclipse.gsfc.nasa.gov/LEplot/LEplot{{{cat_year}}}/{{{cat_no}}}}.pdf</nowiki></code>. The parameter <code>cat_year</code> accepts inputs such as <code>1951</code>, for eclipses between 1951 and 2000, and <code>2001</code> for eclipses between 2001 and 2050, with 50-year intervals. It can also accept an input of <code>history</code>, using the [[mw:Help:Extension:ParserFunctions##ifeq|<code><nowiki>{{#ifeq:}}</nowiki></code> parser function]], for eclipses designated as historically important eclipses by the GSFC, such as the [[March 1504 lunar eclipse]]. The parameter <code>cat_no</code> accepts an input of a catalog code that follows this format: <code>LEyyyymmddn</code>. The <code>LE</code> prefix is constant, and should not be changed. <code>yyyymmdd</code> is a date in year-month-day formatting, where the full year is written out, along with the first three letters of a month's name, and the day in two decimals. The last <code>N</code> variable denotes the type of eclipse. <code>T</code> is for a total lunar eclipse, <code>P</code> for a partial eclipse, and <code>N</code> for a penumbral eclipse. For example, the code for the [[July 2018 lunar eclipse]] would be <code>LE2018Jul27T</code>, linking to [https://eclipse.gsfc.nasa.gov/LEplot/LEplot2001/LE2018Jul27T.pdf this page].
 
|-
 
 
| <code>totality</code>, <code>partiality</code>, <code>penumbral</code>
 
| <code>totality</code>, <code>partiality</code>, <code>penumbral</code>
 
| These parameters are used to display the amount of time each phase of the eclipse lasted, intended to be formatted in worded minutes and seconds. For example, {{xtd|102 minutes, 50 seconds}}. <code>totality</code> is used to display how long the totality phase of the eclipse lasted, <code>partiality</code> for the partiality phase, and <code>penumbral</code> for the penumbral phase. Omit the <code>totality</code> parameter completely if it is only a partial eclipse, and omit both <code>totality</code> and <code>partiality</code> if it is a penumbral eclipse.
 
| These parameters are used to display the amount of time each phase of the eclipse lasted, intended to be formatted in worded minutes and seconds. For example, {{xtd|102 minutes, 50 seconds}}. <code>totality</code> is used to display how long the totality phase of the eclipse lasted, <code>partiality</code> for the partiality phase, and <code>penumbral</code> for the penumbral phase. Omit the <code>totality</code> parameter completely if it is only a partial eclipse, and omit both <code>totality</code> and <code>partiality</code> if it is a penumbral eclipse.

Revision as of 00:54, 24 January 2019

{{Infobox lunar eclipse}} is an {{Infobox}}-based template that acts as a summary of information for an article on a specific lunar eclipse. It is largely designed to present the most relevant information on an eclipse to a casual astronomer, and intentionally omits highly specific details such as geocentric coordinates and delta T to avoid information bloating and keeping the infobox as short as reasonably possible. This infobox is designed with a subheading parameter, two image parameters, one caption parameter, sixteen cell parameters and two succession link parameters. Its syntax makes use of a collapsible list, two {{#if:}}, and two {{#ifexist:}} parser functions, along with a hCalendar microformat.

Syntax

Template:Parameter names example

{{Infobox lunar eclipse
| type       = 
| image      = 
| caption    =  
| date       = 
| gamma      = 
| magnitude  = 
| saros_ser  = 
| saros_no   = 
| totality   = 
| partiality = 
| penumbral  = 
| p1         = 
| u1         = 
| u2         = 
| greatest   = 
| u3         = 
| u4         = 
| p4         = 
| previous   = 
| next       = 
}}

Parameters

Parameter(s) Description
type Specifies in the infobox headline what type of eclipse the event was. This parameter has three defined inputs, all of which correspond to a subheader style. The input total can be used for a total eclipse, partial for a partial eclipse, and penumbral for penumbral eclipses.
image This first image parameter displays an image thumbnail at the size of the user's preferences as specified in their settings. This parameter is intended to be used to display a photograph of the lunar eclipse, preferably in a tight square crop filled with a full disc view of the moon. This image would be an example of the kind intended to be displayed in this parameter. Omit the File: prefix in the filename when pasting it as an input to this parameter.
caption This image caption parameter is intended to describe the photograph used in the image parameter above it, formatted as follows: the point during the eclipse it was taken, the location on Earth it was taken from, and the time it was taken in UTC. For example, "Totality from Wollongong, New South Wales, 09:48 UTC"
date This parameter is used to display the date of the eclipse in Coordinated Universal Time (UTC), formatted in day-month-year. If the eclipse's penumbral stages occur across two dates in UTC, input only the date in which greatest eclipse occurs. For example, the July 2019 lunar eclipse occurs over 16–17 July 2019, though greatest eclipse occurs on 21:30:45 UTC on 16 July. Therefore, "16 July 2019" should be the input for the date.
gamma This parameter is used to display the gamma value of an eclipse, with positive values written as a decimal number and negative values written with a minus sign (−) as a prefix. For example, the gamma of the May 2022 lunar eclipse is written as "-0.2532", and the gamma value for the May 2021 lunar eclipse is written as "0.4774".
magnitude This parameter is used to display either the penumbral or umbral magnitude of the eclipse. If an eclipse is partial or total, the umbral magnitude is written in this parameter, while the penumbral magnitude is written in this parameter for penumbral eclipses.
saros_ser, saros_no These parameters are used to display both the saros series that a lunar eclipse belongs to, and which entry in the series it represents in parentheses. The first use is achieved using the saros_ser parameter, which uses the {{#ifexist:}} parser function to check if a wikipedia article about a particular series exists. If it does, it automatically creates a wikilink to that article, and if not it simply displays the input as normal text. The second use is achieved using the saros_no parameter, where both the entry number the eclipse represents is displayed along the total amount of eclipses in the series, preferably conjoined with the preposition "of". For example, the June 2010 lunar eclipse is described in this parameter as "58 of 84" in Lunar Saros 120.
totality, partiality, penumbral These parameters are used to display the amount of time each phase of the eclipse lasted, intended to be formatted in worded minutes and seconds. For example, 102 minutes, 50 seconds. totality is used to display how long the totality phase of the eclipse lasted, partiality for the partiality phase, and penumbral for the penumbral phase. Omit the totality parameter completely if it is only a partial eclipse, and omit both totality and partiality if it is a penumbral eclipse.
p1, u1, u2, greatest, u3, u4, p4 These parameters that form part of the collapsed "Contacts" section of the infobox are used to detail the exact times, in Coordinated Universal Time (UTC), the various contact points of the eclipse. For example, u1 and u2 correspond to the points where the moon first enters the umbra (U1 contact) and is completely enveloped by it (U2). The greatest parameter corresponds to the point at which the moon is at its greatest eclipse. If an eclipse occurs over two dates, be sure to note the date that is not represented in the date parameter. For example, u4 for the July 2019 lunar eclipse should be set to "00:17:36 (17 July)"
previous, next These succession parameters at the bottom of the infobox are used to display the previous and next eclipse in chronological order and regardless of eclipse type, relative to the current one being detailed. The {{#ifexist:}} parser function is used in this parameter to automatically create a wikilink if a wikipedia article on the previous and/or next eclipse exists. For example, setting either parameter to January 2018 will set the wikilink to January 2018 lunar eclipse.

Microformat

Template:UF-hcal-geo