Difference between revisions of "Template:Infobox astronomical object"

From blackwiki
Jump to navigation Jump to search
imported>Yarnalgo
m (not very intricate..)
imported>Jonesey95
(rm small font-size formatting from infobox per MOS:FONTSIZE.)
 
(63 intermediate revisions by 13 users not shown)
Line 1: Line 1:
 +
 
{{Infobox
 
{{Infobox
|name=Infobox astro object
+
| headerstyle = background:#C0C0C0;
|above={{{name|<span style="color:red;"> "name" missing </span>}}}
+
|   title = {{{name|{{#if:{{#invoke:Wikidata|ViewSomething|labels|en|value}}|{{#invoke:Wikidata|ViewSomething|labels|en|value}}|{{PAGENAMEBASE}}}}}}}
|abovestyle=background: #ffcdff;
 
|headerstyle=background: #f0cdf0;
 
|belowstyle=background: #e0cde0;
 
|labelstyle=background:inherit;
 
  
|below= See also: [[Astronomical object]], [[List of astronomical objects]]{{#ifexist: List of {{{{type|}}}|, [[List of {{{type|}}}]]|{{#ifexist: List of {{{type|}}}s|, [[List of {{{type|}}}s]] }} }}
+
|   image = {{#invoke:InfoboxImage|InfoboxImage|image={{#invoke:Wikidata|getValue|P18|{{{image|FETCH_WIKIDATA}}} }}|size={{{image_size|}}}|sizedefault=frameless|alt={{{alt|}}}}} {{#if:{{{credit|}}}|<br/>Credit: {{{credit}}} }}
|image= {{{image|}}}
+
| caption = {{{caption|{{#invoke:Wikidata|getImageLegend|FETCH_WIKIDATA}}}}}
|caption={{{caption|}}}
 
  
|label1= Type
+
|   image2 = {{#invoke:InfoboxImage|InfoboxImage|image={{#invoke:Wikidata|getValue|P242|{{{map|FETCH_WIKIDATA}}} }}|size={{{image_size|}}}|sizedefault=frameless|alt={{{alt2|}}}}}
|data1= &nbsp; {{{type|<span style="color:red;"> "type" missing </span>}}}
+
| caption2 = {{{caption2|Location map}}}
|header2= Observation data <small>([[Epoch (astronomy)|Epoch]] {{{epoch|<span style="color:red;"> "epoch" missing </span>}}})</small>
 
<!-- location -->
 
|label3= [[Constellation]]
 
|data3= {{{constel|{{{constellation|}}}}}}
 
|label4= [[Right ascension]]
 
|data4=<span style="white-space:nowrap;">{{{ra|<span style="color:red;"> "ra" missing </span>}}}</span>
 
|label5= [[Declination]]
 
|data5=<span style="white-space:nowrap;">{{{dec|<span style="color:red;"> "dec" missing </span>}}}</span>
 
|label6= [[Redshift]]
 
|data6= {{{z|}}}
 
|label7= Distance
 
|data7= {{#if: {{{dist_ly|{{{dist_pc|}}}}}} | {{#if: {{{dist_ly|}}} | {{{dist_ly|}}} | {{#expr: {{{dist_pc|0}}}*3.26}} }} [[light year|ly]] ( {{#if: {{{dist_pc|}}} | {{{dist_pc|}}} | {{#expr: {{{dist_ly|0}}}/3.26}} }} [[parsec|pc]] ) }}
 
<!-- visual appearance -->
 
|label8= Apparent size&nbsp;<small title="in visual light">(V)</small>
 
|data8= {{{appsize|}}}
 
|label9= [[Apparent magnitude]]&nbsp;<small title="in visual light">(V)</small>
 
|data9= {{{appmag|}}}
 
|label10= Apparent dimensions&nbsp;<small title="in visual light">(V)</small>
 
|data10= {{{appdim|}}}
 
<!-- physical characteristics -->
 
|label11= [[Absolute magnitude]]&nbsp;<small title="in visual light">(V)</small>
 
|data11= {{{absmag|}}}
 
|label12= Size
 
|data12= {{{size|}}}
 
<!-- motion -->
 
|label13= [[Proper motion]]
 
|data13= {{{propmo|}}}
 
|label14= [[Radial velocity]]
 
|data14= {{{radvel|}}}
 
|label15= [[Peculiar motion]]
 
|data15= {{{pecmo|}}}
 
<!-- end of infobox -->
 
|data78= {{{insert|}}}
 
|label79= Notable features
 
|data79= {{{notes|}}}
 
|header80= {{#if:{{{names|}}}| Designations }}
 
|data80={{{names|}}}
 
}}<noinclude>
 
{{documentation|content=
 
  
This template is for use on [[astronomical objects]] that do not have a specialized infobox template of their own.
+
| labelstyle = background:inherit;
  
===Required parameters===
+
|  label1 = Object type
* "name" &mdash; the designation of the object
+
|    data1 = {{{type|{{#invoke:String2|sentence|{{#invoke:WikidataIB|getValue|P31|name=event_type|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}}}}}}}}
* coordinates
+
|  label2 = Other designations
** "ra" &mdash; the parameter for [[right ascension]]
+
|    data2 = {{#invoke:Wikidata|getRawValue|P528|{{{names|FETCH_WIKIDATA}}}}}
**: please use the {{tl|RA}} template to specify this
 
** "dec" &mdash; the parameter for [[declination]]
 
**: please use the {{tl|DEC}} template to specify this
 
** "epoch" &mdash; the parameter for [[astronomical epoch]]
 
**: common values are [[B1875.0]] , [[B1900.0]] , [[B1950.0]] , [[J2000.0]] ; please wikify this value, if possible
 
* "type" &mdash; the parameter for object type (put ''unknown'' or ''undefined'' if there is no type)
 
*: this value should be wikified, if possible
 
  
===Optional parameters===
+
| header5 = {{longitem|Observation data<br/>([[Epoch (astronomy)|Epoch]] {{{epoch|{{color|red|''required''}}}}})}}
* "constel" &mdash; the parameter for the [[constellation]]
 
*: use a comma separated list if there is more than one constellation, please wikify the list
 
* distance
 
** "dist_pc" &mdash; the distance to the object, in [[parsec]]s
 
** "dist_ly" &mdash; the distance to the object, in [[light year]]s
 
* apparent characteristics - in visible light
 
** "appsize" &mdash; the [[apparent size]] of the object (such as radius or diameter)
 
**: this should be given in [[angular size|angular unit]]s, such as milliarcseconds (mas)
 
** "appmag" &mdash; the [[apparent magnitude]] of the object (brightness)
 
** "appdim" &mdash; the [[apparent size|apparent dimensions]] of the object (a bivalue term, that gives the ''major diameter'' and ''minor diameter'')
 
**: this should be given in [[angular size|angular unit]]s, such as milliarcseconds (mas)
 
* "absmag" &mdash; the [[absolute magnitude]] of the object (luminosity)
 
* "size" &mdash; the "true size" of the object, a trivalue term, such as ''height x width x depth''
 
*: this should be given in astronomical distance units, such as megaparsecs, or redshiftspace terms (such as ''km-s<sup>-1</sup>'')
 
* motion
 
** "propmo" &mdash; the [[proper motion]] of the object, the movement of the object across the sphere of the sky, as a 2-D projection
 
**: this should be given in angular units per unit time, such as ''arcminutes per decade''
 
** "radvel" &mdash; the [[radial velocity]] of an object, the movement of the object towards or away from us
 
**: in the case of objects at cosmological distances, this value should be that that is not covered by the expansion of space
 
** "pecmo" &mdash; the [[peculiar motion]] of an object, the velocity of an object in space, this is a vector value
 
**: for objects at cosmological distances, this value is that that is not covered by Hubble motion
 
  
* "notes" &mdash; place any notes about the object here, which deserve special notice in the infobox
+
<!-------------------------------- Location ----------------------------------->
* "names" &mdash; place all the popular designations for the object here
+
| label6  = [[Constellation]]
 +
|  data6 = {{#invoke:WikidataIB|getValue|P59|name=constellation|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|{{{constellation|{{{constel|}}}}}}}}
 +
| label7  = {{longitem|[[Right ascension]]}}
 +
|  data7  = {{nowrap|{{{ra|{{color|red|''required''}} }}} }}
 +
| label8  = [[Declination]]
 +
|  data8  = {{nowrap|{{{dec|{{color|red|''required''}} }}} }}
 +
|  label9 = [[Redshift]]
 +
|  data9 = {{#invoke:WikidataIB|getValue|P1090|name=redshift|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|{{{redshift|{{{z|}}}}}}}}
 +
| label10 = Distance
 +
|  data10 = {{#if:{{{dist_ly|{{{dist_pc|}}} }}} | {{#if:{{{dist_ly|}}} | {{{dist_ly}}} {{#if:{{{dist_pc|}}} | / }} }} {{#if:{{{dist_pc|}}} | {{{dist_pc}}} }} | {{{distance|{{#if:{{#property:P2583}}|{{#ifeq:{{#invoke:Wikidata|getUnits|P2583|FETCH_WIKIDATA}}|light-year|{{convert|input=P2583|pc|abbr=on}}|{{convert|input=P2583|ly|abbr=on}} }} }} }}} }}
 +
 
 +
<!--------------- Visual appearance / Physical characteristics ---------------->
 +
|  data20 = {{#if:{{{appsize_v|}}}{{{appmag_v|}}}{{{appdim_v|}}}{{{size_v|}}} |<hr/> ''In visual light'' (V)}}
 +
| label21 = {{longitem|<span title{{=}}"in visual light"> Apparent size </span>}}
 +
|  data21 = {{{appsize_v|}}}
 +
| label22 = {{longitem|<span title{{=}}"in visual light"> Apparent dimensions </span>}}
 +
|  data22 = {{{appdim_v|}}}
 +
| label23 = {{longitem|<span title{{=}}"in visual light"> [[Apparent magnitude]] </span>}}
 +
|  data23 = {{#invoke:WikidataIB|getValue|P1215|name=appmag_v|suppressfields={{{suppressfields|}}}|fetchwikidata={{{fetchwikidata|ALL}}}|onlysourced={{{onlysourced|no}}}|{{{appmag_v|}}}}}
 +
| label24 = {{longitem|<span title{{=}}"in visual light"> [[Absolute magnitude]] </span>}}
 +
|  data24 = {{{absmag_v|}}}
 +
| label25 = {{longitem|<span title{{=}}"in visual light"> Size </span>}}
 +
|  data25 = {{{size_v|}}}
 +
|  data29 = {{#if:{{{appsize_v|}}}{{{appmag_v|}}}{{{appdim_v|}}}{{{size_v|}}} | {{#if:{{{appsize_specify|}}}{{{luminosity_specify|}}}{{{flux_specify|}}}{{{size_specify|}}} ||<hr/>}}|}}
 +
 
 +
<!------------- Non-visual appearance / Physical characteristics -------------->
 +
|  data30 = {{#if:{{{appsize_specify|}}}{{{flux_specify|}}}{{{luminosity_specify|}}}{{{size_specify|}}} |<hr/> ''In non-visible light'' ([[Radio astronomy|Radio]], [[X-ray]], etc.)}}
 +
| label31 = Apparent size (specify)
 +
|  data31 = {{{appsize_specify|}}}
 +
| label32 = Apparent dimensions (specify)
 +
|  data32 = {{{appdim_specify|}}}
 +
| label33 = [[flux|Flux (specify)]]
 +
|  data33 = {{{flux_specify|}}}
 +
| label34 = [[Luminosity#In_astronomy|Luminosity (specify)]]
 +
|  data34 = {{{luminosity_specify|}}}
 +
| label35 = Size (specify)
 +
|  data35 = {{{size_specify|}}}
 +
|  data39 = {{#if:{{{appsize_specify|}}}{{{luminosity_specify|}}}{{{flux_specify|}}}{{{size_specify|}}} |<hr/>}}
 +
 
 +
<!--------------------------------- Motion ------------------------------------>
 +
| label40 = {{longitem|[[Proper motion]]}}
 +
|  data40 = {{{propmo|}}}
 +
| label41 = {{longitem|[[Radial velocity]]}}
 +
|  data41 = {{{radvel|}}}
 +
| label42 = {{longitem|[[Peculiar motion]]}}
 +
|  data42 = {{{pecmo|}}}
 +
 
 +
<!----------------------- other physical characteristics ---------------------->
 +
| label50 = Mass
 +
|  data50 = {{#if: {{{mass_msol|}}}|{{{mass_msol}}}&nbsp;{{solar mass|link=yes}} | {{{mass|}}} }}
 +
| label51 = [[Velocity dispersion]]
 +
|  data51 = {{{velocity_dispersion|}}}
 +
| label52 = [[Temperature]]
 +
|  data52 = {{{temperature|}}}
 +
| label53 = [[Metallicity]]
 +
|  data53 = {{#if: {{{metal_feh|}}}|{{{metal_feh}}} [[log 10|dex]]}}
 +
| label54 = Radius
 +
|  data54 = {{{radius_ly|}}}
 +
| label55 = Estimated age
 +
|  data55 = {{{age|}}}
 +
 
 +
 
 +
<!----------------------- insert / notes / Designations ----------------------->
 +
|  data78 = {{{insert|}}}
 +
| label79 = {{longitem|Notable features}}
 +
|  data79 = {{{notes|}}}
 +
 
 +
<!--------------------------------- below ------------------------------------->
 +
|    data80 = {{#if:{{#invoke:Wikidata|getValue|P373|{{{commons|FETCH_WIKIDATA}}} }} | {{icon|Commons}} [[Commons:{{#if:{{{commons|}}} | {{{commons}}} | Category:{{#invoke:Wikidata|getValue|P373|FETCH_WIKIDATA}} }} |Related media on Wikimedia Commons]]
 
}}
 
}}
 
+
| below    = {{EditOnWikidata}}
[[Category:Astronomy infobox templates|{{PAGENAME}}]]
+
}}<includeonly>{{main other|{{#if:{{safesubst:#invoke:Check for unknown parameters|check|unknown=1|preview=1}}|[[Category:Articles using Infobox astronomical object using locally defined parameters]]|[[Category:Articles with infoboxes completely from Wikidata]]}}}}</includeonly><noinclude>
 +
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 21:17, 4 September 2019

Script error: No such module "Wikidata".
Script error: No such module "Wikidata".
Script error: No such module "Wikidata".
Script error: No such module "Wikidata".
Location map
Other designationsScript error: No such module "Wikidata".
Observation data
(Epoch required)
required
Declinationrequired
Commons page [[Commons:Category:Script error: No such module "Wikidata". |Related media on Wikimedia Commons]]

[[Category:Infobox templates|Template:Remove first word]]

Template documentation[view] [edit] [history] [purge]

Template:Uses Wikidata

  1. redirect Template:Parameter names example

Description

This template is for use at the start of articles on astronomical objects that do not have a specialized infobox template of their own.

Usage

Just add:

{{infobox astronomical object}}

to the top of an article, and data will be automatically included from Wikidata where they are available. These values can be overridden by passing values to the relevant parameters in the article. The full list of parameters is:

Parameter Default Description
name Wikidata label (en)
(Or Page name)
The designation of the object
image Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P18) Illustration
caption Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P2096) Picture caption (if necessary).
credit Picture credit (if necessary).
image2 Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P242) Location map
caption2 Location map caption (if necessary).
type Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P31) The parameter for object type (put unknown or undefined if there is no type). This value should be wikified, if possible
ra The parameter for right ascension. Please use {{RA|00|00|00}} or {{Deg2HMS|000.0000|sup=yes}} templates to specify this
dec The parameter for declination. Please use the {{DEC|00|00|00}} template to specify this
epoch The parameter for astronomical epoch. Common values are B1875.0 , B1900.0 , B1950.0 , J2000.0 ; please wikify this value, if possible
constellation / constel Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P59) The parameter for the constellation. Use a comma separated list if there is more than one constellation, please wikify the list
names Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P528) Place all the popular designations for the object here
notes Place any notes about the object here, which deserve special notice in the infobox
distance / dist_pc / dist_ly Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P2583) The distance to the object, in parsecs or light years
z Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P1090) The cosmological redshift of the object, in unitless 'z'
appsize_v The apparent size of the object (such as radius or diameter). This should be given in angular units, such as milliarcseconds (mas)
appdim_v The apparent dimensions of the object (a bivalue term, that gives the major diameter and minor diameter). This should be given in angular units, such as milliarcseconds (mas)
appmag_v Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P1215) The apparent magnitude of the object (brightness)
absmag_v The absolute magnitude of the object (visual luminosity)
size_v The physical size of the object in visible light, a trivalue term, such as height x width x depth. This should be given in astronomical distance units, such as parsecs, megaparsecs, or redshiftspace terms (such as km-s−1)
appsize_specify The apparent size of the object (such as radius or diameter) in non-visible light (specify microwave, radio, infrared, UV, X-ray, gamma ray, keV or GeV range, etc.). This should be given in angular units, such as milliarcseconds (mas)
appdim_specify The apparent dimensions of the object (a bivalue term, that gives the major diameter and minor diameter). This should be given in angular units, such as milliarcseconds (mas)
flux_specify Flux is measured differently at different wavelengths. For example, X-ray flux is usually given in erg s−1 cm−2 for some keV range.
luminosity_specify Can be bolometric, or wavelength-specific. For example, X-ray luminosity is usually given in erg s−1 for some keV range. In either case, flux is preferred if the distance to the object is uncertain. In non-visible light (specify microwave, radio, infrared, UV, X-ray, gamma ray, keV or GeV range, etc.)
size_specify The physical size of the object outside the visible spectrum, a trivalue term, such as height x width x depth. This should be given in astronomical distance units, such as parsecs, megaparsecs, or redshiftspace terms (such as km-s−1)
propmo The proper motion of the object, the movement of the object across the sphere of the sky, as a 2-D projection. This should be given in angular units per unit time, such as arcminutes per decade
radvel The radial velocity of an object, the movement of the object towards or away from us. In the case of objects at cosmological distances, this value should be that that is not covered by the expansion of space.
pecmo The peculiar motion of an object, the velocity of an object in space, this is a vector value. For objects at cosmological distances, this value is that that is not covered by Hubble motion
mass / mass_msol Depending on the mass of the object, use kg, ML, M, MJ, or Template:Solar mass (via {{Lunar mass|link=y}}, {{Earth mass|link=y}}, {{Jupiter mass|link=y}}, or {{Solar mass|link=y}}).
velocity_dispersion The velocity dispersion of the parent object, if it is composed of many smaller objects, measured in units of velocity, typically km/s.
"temperature" The units with which temperature is measured vary with the temperature of the object. For example, below several thousand kelvins, (K) are used, and X-ray temperature is usually given in keV.
"metal_feh" The metallicity as a logarithmic abundance of iron relative to hydrogen, as compared to the Sun. For example, <math chem>\begin{smallmatrix}\left[\ce{Fe}/\ce{H}\right]\end{smallmatrix}</math> = 0 = solar metallicity.
radius_ly Radius in lightyears
age Estimated age
commons Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P373) Commons category

Tracking categories

See also