Template:Infobox star/testcases
This is the template test cases page for the sandbox of Template:Infobox star. to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki; see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins and parsers with these links: |
This is the testcases page for {{Infobox star/sandbox}}, used to test changes to the individual features of {{Infobox star}}, prior to their potential integration into the live infobox code. Various detailed examples of the infobox's parameters and features are documented here to provide the information necessary to aid editors' understanding on why and how particular features are used, and how the code for their use works. The current version of the complete blank syntax for {{Infobox star/sandbox}} can be found in the "Syntax" section below.
Syntax
[edit]{{Infobox star/sandbox | name = | image = | alt = | map image = | map x = | map y = | map circle = | caption = | type = | constellation = | stars = | epoch = | proper name = | galaxy = | ascension = | declination = | apparent = | apparent band = | apparent alt = | absolute = | distance = | motion ra = | motion dec = | velocity = | age = | mass = | radius = | rotation = | temperature = | stellar = | variable = | planets = }}
Examples
[edit]"map x", "map y", and Aldebaran
[edit]Star in Taurus | |
---|---|
Epoch | J2000.0 |
Coordinates |
|
Apparent m (V) | 0.75–0.95 |
Absolute m (V) | −0.641±0.034 |
Distance | 65.3±1.0 light-years |
Proper motion |
|
Radial velocity | 54.26±0.03 km/s |
Characteristics | |
Age | 6.4+1.4 −1.1 billion years |
Mass | 1.16±0.07 solar masses |
Radius | 44.13±0.84 solar radii |
Rotation | 520 days |
Temperature | 3900±50 kelvin |
Stellar class | K5+III |
Variable class | Lb slow irregular |
By default, {{Infobox star}} displays a map of a constellation, set by the constellation
parameter, which swaps out the name of a constellation in the filename – {{{constellation|}}} constellation map.svg
. The placement of the circle which locates a star on a given constellation map is controlled using the parameters map x
and map y
. These two parameters, along with constellation
, are essentially the only parameters needed in order to make the map work, per this case for Aldebaran. This is achieved with two <div>
phrases that appear in the image
parameter of {{#invoke:InfoboxImage}}
.
Syntax
{{Infobox star/sandbox | name = Aldebaran | map x = 47.5 | map y = 50 | constellation = Taurus | ascension = {{RA|04|35|55.23907}} | declination = {{DEC|+16|30|33.4885}} | apparent = 0.75–0.95 | absolute = {{Val|−0.641|0.034}} | distance = {{Val|65.3|1.0}} [[light-year]]s | motion ra = {{Val|63.45|0.84}} [[Minute and second of arc#Symbols and abbreviations|mas]]/yr | motion dec = {{Val|−188.94|0.65}} mas/yr | velocity = {{Val|54.26|0.03}} km/s | age = {{Val|6.4|1.4|1.1}} billion years | mass = {{Val|1.16|0.07}} [[solar mass]]es | radius = {{Val|44.13|0.84}} [[solar radius|solar radii]] | rotation = 520 days | temperature = {{Val|3,900|50}} [[kelvin]] | stellar = [[Red giant|K5+III]] | variable = [[Slow irregular variable|Lb slow irregular]] }}
"image", "caption", and RS Puppis
[edit]Star in Puppis | |
---|---|
Epoch | J2000.0 |
Coordinates |
|
Apparent m (V) | 6.5–7.6 |
Absolute m (V) | -5.70 |
Distance | 5580±260 light-years |
Proper motion |
|
Radial velocity | 24.60 km/s |
Characteristics | |
Age | 28 million years |
Mass | 9.2 solar masses |
Radius | 164–208 solar radii |
Rotation | ~41.5 days |
Temperature | 4,640 – 5,850 kelvin |
Stellar class | G2Ib (F9–G7) |
Variable class | Classical Cepheid |
While constellation maps may be useful in locating a star, sometimes stars can be recognisable in their own right, due to either their proximity to other celestial objects or their prominence in a particular region of the sky. RS Puppis is one such example where the star is surrounded by a large, bright nebula, thus making it a recognisable sight among astronomers and astronomy fanatics. In this case, the default parameters map x
, map y
, and map circle
are removed completely, and replaced with image
, alt
, and caption
to display "Heic1323a -1243686232.jpg" with a relevant caption and alt caption. This is achieved with two {{#if:}}
parser functions – one replaces the two <div>
phrases used to make the constellation map possible with a simple {{{image|}}}
parameter if image
is active, and the other checks to see if either the image
or map image
parameters are active before activating the caption
parameter.
Syntax
{{Infobox star/sandbox | name = RS Puppis | image = Heic1323a -1243686232.jpg | alt = A star surrounded by a bright cloud of gas | caption = True-color view of RS Puppis (center) and its surrounding nebula in 2013 | constellation = Puppis | ascension = {{RA|08|13|04.21601}} | declination = {{DEC|-34|34|42.7023}} | apparent = 6.5–7.6 | absolute = -5.70 | distance = {{Val|5,580|260}} [[light-year]]s | motion ra = -3.19 [[Minute and second of arc#Symbols and abbreviations|mas]]/yr | motion dec = 2.33 mas/yr | velocity = 24.60 km/s | age = 28 million years | mass = 9.2 [[solar mass]]es | radius = 164–208 [[solar radius|solar radii]] | rotation = ~41.5 days | temperature = 4,640 – 5,850 [[kelvin]] | stellar = [[Yellow supergiant star|G2Ib]] (F9–G7) | variable = [[Classical Cepheid variable|Classical Cepheid]] }}
"map image" and Kepler-90
[edit]Star in Draco | |
---|---|
Epoch | J2000.0 |
Coordinates |
|
Apparent m (V) | 14.0 |
Absolute m (V) | ~4.3 |
Distance | 2840±40 light-years |
Proper motion |
|
Characteristics | |
Age | ~2 billion years |
Mass | 1.2±0.1 solar masses |
Radius | 1.2±0.1 solar radii |
Temperature | 6080+260 −170 kelvin |
Stellar class | G0V |
Planets | 8 |
In some cases it may be appropriate to use a different image for the infobox's map. Kepler-90 is a star that is part of the Kepler field of view, an area that is mostly situated in, and mostly associated with, the constellation of Cygnus. However, Kepler-90 is not only in the constellation of Draco, it's far away from any of the major features of Draco. Being closer to one of the 'wings' of Cygnus, it would be better illustrated in relation to Cygnus instead, thus the map image
parameter is being used here to replace the default map of Draco, called by the constellation
parameter, with "Cygnus constellation map.svg" instead. This is achieved with an {{#if:}}
parser function that replaces the default {{{constellation|}}} constellation map.svg
string with {{{map image|}}}
when it finds the map image
parameter active.
Syntax
{{Infobox star/sandbox | name = Kepler-90 | map image = Cygnus constellation map.svg | map x = 68 | map y = 15 | constellation = Draco | ascension = {{RA|18|57|44.0384}} | declination = {{DEC|+49|18|18.4958}} | apparent = 14.0 | absolute = ~4.3 | distance = {{Val|2,840|40}} [[light-year]]s | motion ra = {{Val|−4.379|0.030}} [[Minute and second of arc#Symbols and abbreviations|mas]]/yr | motion dec = {{Val|−3.214|0.028}} mas/yr | age = ~2 billion years | mass = {{Val|1.2|0.1}} [[solar mass]]es | radius = {{Val|1.2|0.1}} [[solar radius|solar radii]] | temperature = {{Val|6080|260|170}} [[kelvin]] | stellar = [[G-type main-sequence star|G0V]] | planets = 8 }}
"map circle" and Maia
[edit]Star in Taurus | |
---|---|
Epoch | J2000.0 |
Coordinates |
|
Apparent m (V) | 3.871 |
Absolute m (V) | −1.69 |
Distance | ~400 light-years |
Proper motion |
|
Radial velocity | 7.5 km/s |
Characteristics | |
Age | 75–150 million years |
Mass | >5 solar masses |
Radius | 6.04 solar radii |
Temperature | 12,600 kelvin |
Stellar class | B8III |
In various situations where the image used in map image
does not work well with the map circle's size, its width can be changed to make it better stand out against the image. With Maia (star), an image of the Pleiades cluster is used to locate the star, though the circle's default width of 12 pixels is not wide enough to properly encircle the star in the image. Thus, map circle
is used to bump up the circle's width to 25 pixels instead. This is achieved by setting a default value on the parameter itself – {{{map circle|12}}}px
– which is ignored the moment the parameter is used and a different value is placed in it.
Syntax
{{Infobox star/sandbox | name = Maia | map image = Pleiades large.jpg | map x = 62 | map y = 21 | map circle = 25 | caption = Maia (circled) in the Pleiades | constellation = Taurus | ascension = {{RA|03|45|49.6067}} | declination = {{DEC|24|22|03.895}} | apparent = 3.871 | absolute = −1.69 | distance = ~400 [[light-year]]s | motion ra = 21.09 [[Minute and second of arc#Symbols and abbreviations|mas]]/yr | motion dec = −45.03 mas/yr | velocity = 7.5 km/s | age = 75–150 million years | mass = >5 [[solar mass]]es | radius = 6.04 [[solar radius|solar radii]] | temperature = 12,600 [[kelvin]] | stellar = [[Blue giant|B8III]] | variable = }}
"apparent alt" and the Pistol Star
[edit]Star in Sagittarius | |
---|---|
Epoch | J2000.0 |
Coordinates |
|
Apparent m (V) | >28 |
Apparent m (K) | 7.291 |
Distance | ~26,000 light-years |
Radial velocity | >130 km/s |
Characteristics | |
Age | 4 million years |
Mass | 27.5 solar masses |
Radius | 306 solar radii |
Temperature | 11,800 kelvin |
Variable class | Luminous blue |
Natural phenomena can make certain stars more notable for their apparent brightness in different regions of the electromagnetic spectrum. For example, the Pistol Star is notable for being practically invisible to the human eye, but shining prominently in infrared light. In this case, the parameters apparent band
and apparent alt
are used to include information on the star's apparent magnitude in the K band. This is achieved with an {{#if:}}
parser function that activates this second apparent magnitude cell only if apparent band
is active.
Syntax
{{Infobox star/sandbox | name = Pistol Star | image = Pistol star and nebula.jpg | alt = Photograph of a bright, red star surrounded by a cloud of gas | caption = Infrared image of the Pistol Star (center) and the surrounding Pistol Nebula | constellation = Sagittarius | ascension = {{RA|17|46|15.3}} | declination = {{DEC|−28|50|04}} | apparent = >28 | apparent band = [[K band (infrared)|K]] | apparent alt = 7.291 | distance = ~26,000 [[light-year]]s | velocity = >130 km/s | age = 4 million years | mass = 27.5 [[solar mass]]es | radius = 306 [[solar radii]] | temperature = 11,800 [[kelvin]] | variable = [[Luminous blue variable|Luminous blue]] }}
"type" and PSR B1257+12
[edit]Compact star in Virgo | |
---|---|
Epoch | J2000.0 |
Proper name | Lich |
Coordinates |
|
Distance | 2300±100 light years |
Proper motion |
|
Characteristics | |
Age | 1-3 billion years |
Mass | 1.100 solar masses |
Radius | 1.2234±0.0053 solar radii |
Rotation | 6.219 milliseconds |
Temperature | ~28,856 kelvin |
Stellar class | Pulsar |
Planets | 3 |
Through the use of a {{#switch:}}
parser function on the infobox headerstyle
's background-color
, the colour of the headings can be changed if the input for the type
paramater is exactly [[Compact star]]
or [[Black hole]]
. In the case of PSR B1257+12, which is a pulsar, the type
parameter is set to [[Compact star]]
, displaying headings with a background colour of #D9F9FF.
Syntax
{{Infobox star/sandbox | name = PSR B1257+12 | map x = 46 | map y = 16 | type = [[Compact star]] | constellation = Virgo | proper name = Lich | ascension = {{RA|13|00|01}} | declination = {{DEC|+12|40|57}} | distance = {{Val|2,300|100}} [[light year]]s | motion ra = {{Val|46.44|0.08}} [[Minute and second of arc#Symbols and abbreviations|mas]]/yr | motion dec = {{Val|−84.87|0.32}} mas/yr | age = 1-3 billion years | mass = 1.100 [[Solar mass|solar masses]] | radius = {{Val|1.2234|0.0053}} [[Solar radius|solar radii]] | rotation = 6.219 milliseconds | temperature = ~28,856 [[kelvin]] | stellar = [[Pulsar]] | planets = 3 }}
"type" and Sagittarius A*
[edit]Black hole in Sagittarius | |
---|---|
Epoch | J2000.0 |
Coordinates |
|
Distance | ~ 26,000 light-years |
Proper motion |
|
Characteristics | |
Mass | 4.31±0.38 million solar masses |
Radius | 6.7 billion kilometres |
Stellar class | Supermassive |
Likewise, in the case of Sagittarius A*, which is a supermassive black hole, the type
parameter is set to [[Black hole]]
, displaying headings with a background colour of #E9E9E9.
Syntax
{{Infobox star/sandbox | name = Sagittarius A* | image = Sagittarius A*.jpg | alt = Blobs of blue-coloured light, with Sagittarius A* pointed out with a white arrow | caption = X-ray image of Sagittarius A* and its surrounding environment | type = [[Black hole]] | constellation = Sagittarius | ascension = {{RA|17|45|40.0409}} | declination = {{DEC|−29|0|28.118}} | distance = ~ 26,000 [[light-year]]s | motion ra = −2.70 [[Minute and second of arc#Symbols and abbreviations|mas]]/yr | motion dec = −5.6 mas/yr | mass = {{Val|4.31|0.38}} million [[solar mass]]es | radius = 6.7 billion kilometres | stellar = [[Supermassive black hole|Supermassive]] }}