Template:Infobox star/testcases

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 can be found in the "Syntax" section below.

Syntax


"map x", "map y", and Aldebaran
By default, displays a map of a constellation, set by the   parameter, which swaps out the name of a constellation in the filename –. The placement of the circle which locates a star on a given constellation map is controlled using the parameters  and. These two parameters, along with, are essentially the only parameters needed in order to make the map work, per this case for Aldebaran. This is achieved with two  phrases that appear in the   parameter of.

Syntax 

"image", "caption", and RS Puppis
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,  , and   are removed completely, and replaced with  ,  , and   to display "Heic1323a -1243686232.jpg" with a relevant caption and alt caption. This is achieved with two  parser functions – one replaces the two   phrases used to make the constellation map possible with a simple   parameter if   is active, and the other checks to see if either the   or   parameters are active before activating the   parameter.

Syntax 

"map image" and Kepler-90
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  parameter is being used here to replace the default map of Draco, called by the   parameter, with "Cygnus constellation map.svg" instead. This is achieved with an  parser function that replaces the default   string with   when it finds the   parameter active.

Syntax 

"map circle" and Maia
In various situations where the image used in  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,  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 –  – which is ignored the moment the parameter is used and a different value is placed in it.

Syntax 

"apparent alt" and the Pistol Star
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  and   are used to include information on the star's apparent magnitude in the K band. This is achieved with an  parser function that activates this second apparent magnitude cell only if   is active.

Syntax 

"type" and PSR B1257+12
Through the use of a  parser function on the infobox  's , the colour of the headings can be changed if the input for the   paramater is exactly   or. In the case of PSR B1257+12, which is a pulsar, the  parameter is set to , displaying headings with a background colour of #D9F9FF.

Syntax 

"type" and Sagittarius A*
Likewise, in the case of Sagittarius A*, which is a supermassive black hole, the  parameter is set to , displaying headings with a background colour of #E9E9E9.

Syntax 