Difference between revisions of "Template:CelestialRef/doc"

From blackwiki
Jump to navigation Jump to search
imported>Robertinventor
Line 5: Line 5:
 
'''Work in Progress'''
 
'''Work in Progress'''
  
This template is a work in progress. Comments should be made at [[Template talk:StarRef]].
+
This template is a work in progress. Comments should be made at [[Template talk: CelestialRef]].
  
 
}}
 
}}
Line 335: Line 335:
 
!Planet!!Mass (MJ)!!Period (d)!!SpT!!B - V!!Te?
 
!Planet!!Mass (MJ)!!Period (d)!!SpT!!B - V!!Te?
 
|-
 
|-
|{{StarRef||WASP-80b|}} ||0.55|| 3.068|| K7-M0 ||0.94|| ~4000  
+
|{{CelestialRef||WASP-80b|}} ||0.55|| 3.068|| K7-M0 ||0.94|| ~4000  
 
|-
 
|-
|{{StarRef|HIP|70849b}}|| > 3 ||> 5 yr|| K7 ||1.42 ||4100c
+
|{{CelestialRef|HIP|70849b}}|| > 3 ||> 5 yr|| K7 ||1.42 ||4100c
 
(2011)
 
(2011)
 
|-
 
|-
|{{StarRef|WASP-43b|}}||2.03||0.813||K7||1.0||4400d
+
|{{CelestialRef|WASP-43b|}}||2.03||0.813||K7||1.0||4400d
 
|-
 
|-
|{{StarRef|HAT-P-20b|}}||7.25||2.88||K3||—||4619
+
|{{CelestialRef|HAT-P-20b|}}||7.25||2.88||K3||—||4619
 
|-
 
|-
|{{StarRef|HIP|57274c}}||0.41e||32.0||K4||1.11||4640
+
|{{CelestialRef|HIP|57274c}}||0.41e||32.0||K4||1.11||4640
 
|-
 
|-
|{{StarRef|HIP|57274d}}||0.53e||431.7||-||-||-
+
|{{CelestialRef|HIP|57274d}}||0.53e||431.7||-||-||-
 
|-
 
|-
||{{StarRef|WASP-59b|}}||0.0.86||7.92||K5||0.92||4650h
+
||{{CelestialRef|WASP-59b|}}||0.0.86||7.92||K5||0.92||4650h
 
|-
 
|-
|{{StarRef|HD|113538b}}||0.27e||263.3||K9f||-||-
+
|{{CelestialRef|HD|113538b}}||0.27e||263.3||K9f||-||-
 
|-
 
|-
|{{StarRef|HD|113585c}}||0.71e||1657||-||-||-
+
|{{CelestialRef|HD|113585c}}||0.71e||1657||-||-||-
 
|-
 
|-
|{{StarRef|BD-17|63b}}||5.12e||655.6||K4||1.14||4714
+
|{{CelestialRef|BD-17|63b}}||5.12e||655.6||K4||1.14||4714
 
|-
 
|-
|{{StarRef|WASP-10b|}}||3.06||3.09||K5||—||-
+
|{{CelestialRef|WASP-10b|}}||3.06||3.09||K5||—||-
 
|-
 
|-
|{{StarRef|BD|-08|2823b}}||0.33||237.6||K3||1.07||4746
+
|{{CelestialRef|BD|-08|2823b}}||0.33||237.6||K3||1.07||4746
 
|-
 
|-
|{{StarRef|HD|20868b}}||1.99||380.85||K3/4||1.04||4795
+
|{{CelestialRef|HD|20868b}}||1.99||380.85||K3/4||1.04||4795
 
|-
 
|-
|{{StarRef|HD|63454b}}||0.38e||2.82||K4||1.06||4840
+
|{{CelestialRef|HD|63454b}}||0.38e||2.82||K4||1.06||4840
 
|-
 
|-
|{{StarRef|Qatar-1b|}}||1.09||1.42||N/A||1.06||4861
+
|{{CelestialRef|Qatar-1b|}}||1.09||1.42||N/A||1.06||4861
 
|-
 
|-
|{{StarRef|HIP|5158bg}}||1.44e||345.6||K5||1.08||4962
+
|{{CelestialRef|HIP|5158bg}}||1.44e||345.6||K5||1.08||4962
 
|}
 
|}
  

Revision as of 01:47, 23 July 2013

Template:Underconstruction

Documentation

CelestialRef creates

  • Name or internal link to the celestial object in Wikipedia
  • Footnote with links to the SIMBAD entry
  • Optionally, extra links to other entries for the object in online databases. These are added to the footnote.

It is especially useful if you have a table of celestial objects and want to add footnotes to each one, and maybe add extra entries in the footnotes such as pre-expanded SIMBAD bibliography, star plot, or link to a photograph of the object, as appropriate.

Alternative to this template: you can use: Template:T if you just want to add the SIMBAD footnote, without these extra options.

Parameter Example Usage
First unnamed parameter M 31 Name to pass to Simbad basic search
Second unnamed parameter Andromeda Galaxy Alternative name for internal link
if absent uses first param
If set blank, name is not shown.
plot 10 Radius of star plot (if omitted, no star plot link added)
units arcsec Measurement unit for radius, arcsec, arcmin or deg acceptable, default arcmin
ids show set to show to add link to ids section of SIMBAD page
bib show set to show to add link to pre-expanded bibliography section
siblings show set to show to add link to siblings search
cds short set to short to display as "CDS" instead of "Centre de données astronomiques de Strasbourg"
image show set to show to add link to aladin preview image, colour
bwimage show set to show to add link to aladin preview image, B&w
all show set to show to show ids, bib, image, and bwimage (and any other options like that that may be added here in the future)

siblings and plot need to be set separately if required, because many objects don't have siblings, and because the plot needs its radius set otherwise may be either too dense, or have nothing in it.

sep , Separator for the extra entries. Default currently is to separate with dashes using  -  This method, using   for the white space prevents it getting stripped by the template. You can also use   for non breaking white space.
inline yes Does everything inline, not as a footnote
radio yes Adds the extra links as an indented radio followed by Links: suitable for use in Extra References section of a page
newline yes Adds the extra links as new line, then indented followed by Links: suitable for footnotes
at yes shows as "at the SIMBAD Astronomical Database" similar to the JPL small bodies external links section, better for external links than the footnote style method of presentation.
extrasep .
:* Links:
Adds any text you like at the start of the extras (e.g. footnote content) The example shown here is what is used for radio=yes

Convention: - attributes in this template are assigned "yes" or "no" if to do with formatting and "show" if to do with display of various elements. That seems to help with readability when you have many params to pass.

Techy note: uses Template:T for the contents of the footnote (shown inline for inline=yes )

Examples

Any identifier recognized by Simbad for its sim-basic will do.

So, these are all possible: {{CelestialRef | M 31}}, {{CelestialRef | Crab Nebula}}, {{CelestialRef | HD 189733b}} etc.

Displayed as: M 31 [1], Crab Nebula [2], HD 189733b [3].

This shows all the features in use: Example: {{CelestialRef| Crab Nebula | cds=short | ids=show | bib=show | plot=10 |units=arcsec | image=show | bwimage=show }}

yields Crab Nebula [4]

Same example with commas instead of dashes : {{CelestialRef| Crab Nebula | sep=, |cds=short | ids=show | bib=show | plot=10 |units=arcsec | image=show | bwimage=show }}

yields Crab Nebula [5]

That might be useful in an article for a single celestial object, for instance, to add all those links in a footnote for the object which is the subject of the article.

See HD 133600 for a try out of that approach

Inline

Showing all the options, as inline instead of ref:
{{CelestialRef| Crab Nebula | cds=short | ids=show | bib=show | plot=10 |units=arcsec | image=show | bwimage=show | inline=yes }}

yields:
Crab NebulaCrab Nebula at SIMBAD - Ids - Bibliography - Star plot - Image - B&W Image.

{{CelestialRef| Crab Nebula | radio=yes | ids=show | bib=show | plot=10 |units=arcsec | image=show | bwimage=show | inline=yes }}

yields:
Crab NebulaCrab Nebula at SIMBAD.

Format for external links section

This follows the example of Template:T

* {{CelestialRef| Crab Nebula | | radio=yes | at=yes | ids=show | bib=show | plot=10 |units=arcsec | image=show | bwimage=show | inline=yes }}

yields:

I've made this into an easier to use external links template which calls this one with suitable defaults Template:T


* {{CelestialRefEx | Crab Nebula | plot=10 | units=arcsec }}

yields:

For details see Template:T

Extras as radio or new line in footnote

You can also use the radio in a footnote like this:

E.g. {{ CelestialRef | Crab Pulsar | ids=show | bib=show | plot= 50 | units=arcsec | image=show | bwimage=show | radio=yes }}

Crab Pulsar [6]

Or just put the links into a new line in the footnote indented as: {{ CelestialRef | Crab Pulsar | ids=show | bib=show | plot= 50 | units=arcsec | image=show | bwimage=show | newline=yes }}

Crab Pulsar [7]

all=show option

This adds ids, bib, image, and bwimage (and anything else added in future relevant for all objects) all in one go. Here it is with new line:

{{ CelestialRef | Crab Pulsar | all=show | newline=yes }}

Crab Pulsar [8]

Using a different name for the internal link

You can use a different name for the internal link and the SIMBAD lookup.

{{ CelestialRef | M 31 |Andromeda Galaxy }}

yields: Andromeda Galaxy [9]

Ref only

If you just want the ref without the name, use the same approach, but make the different name for the internal link blank, as in

{{ CelestialRef | M 42 | }}
Yields:
[10]

You can miix with other named parameters in any order, e.g.:

{{ CelestialRef | M 42 | | bib=show }} (same idea but added an extra named parameter at the end)
Yields:
[11]

Which you could then add to some text as Test {{ CelestialRef | M 42 | | bib=show }}

Test [12]

It doesn't matter where you put this blank field amongst the other parameters, so long as it goes after the object name.

Techy details - the template recognizes your blank field as parameter 2, the second unnamed parameter.

No internal link

If you just want the name without an internal link, add link=no as: {{ CelestialRef | M 31 |Andromeda Galaxy | link=no}}

yields: Andromeda Galaxy [13]

{{ CelestialRef | M 31 | link=no}}

yields: M 31 [14]

Siblings

You can add a link for siblings e.g. {{ CelestialRef | GL 146 |siblings = show}}

This may be useful if the object is part of a larger group and this is relevant to the article citing it, in this case the Hyades super cluster.

Gliese 146 [15]

Star plot

The advantage of the star plot extra link is that it lets the author of the page preset the radius for the plot. For some objects this needs to be large, e.g. 20 arcmins or more. For others, that shows far too many objects and a smaller radius in arcsecs is appropriate.

Example: {{ CelestialRef | HD 189733b | plot = 5 }}

yields HD 189733b [16] to plot stars within 5 arcmins of HD 189733b

Example: {{ CelestialRef | Alpha Centauri | plot = 50 | units = arcsec }}

yields Alpha Centauri [17] to plot stars within 50 arcsecs of Alpha Centauri

Use in tables

The template can be used in tables. This was the original motivation for this template - to have an easy way to add footnotes anad add extra links to the footnotes, for every entry in a table.

Here is an example to test it.

Confirmed Giant Planets around Mid- and Late-K-type Dwarf Stars

All entries are set to add the extra Bibliography link to the refs.

Example: {{ CelestialRef | bib=show | WASP-80b }}

Planet Mass (MJ) Period (d) SpT B - V Te?
WASP-43b [18] 2.03 0.813 K7 1.0 4400d
HAT-P-20b [19] 7.25 2.88 K3 4619
GJ 439 c [20] 0.41e 32.0 K4 1.11 4640
GJ 439 d [21] 0.53e 431.7 - - -
WASP-59b [22] 0.0.86 7.92 K5 0.92 4650h
HD 113538b [23] 0.27e 263.3 K9f - -
HD 113538c [24] 0.71e 1657 - - -
BD-17 63b [25] 5.12e 655.6 K4 1.14 4714
WASP-10b [26] 3.06 3.09 K5 -
BD-08 2823b [27] 0.33 237.6 K3 1.07 4746
HD 20868b [28] 1.99 380.85 K3/4 1.04 4795
HD 63454b [29] 0.38e 2.82 K4 1.06 4840
Qatar 1b [30] 1.09 1.42 N/A 1.06 4861
CD-23 395b [31] 1.44e 345.6 K5 1.08 4962

Data from Giant Planets around Late K Dwarf Stars - Table 1

Same table but with new lines in footnotes and all=show

Planet Mass (MJ) Period (d) SpT B - V Te?
WASP-43b [32] 2.03 0.813 K7 1.0 4400d
HAT-P-20b [33] 7.25 2.88 K3 4619
GJ 439 c [34] 0.41e 32.0 K4 1.11 4640
GJ 439 d [35] 0.53e 431.7 - - -
WASP-59b [36] 0.0.86 7.92 K5 0.92 4650h
HD 113538b [37] 0.27e 263.3 K9f - -
HD 113538c [38] 0.71e 1657 - - -
BD-17 63b [39] 5.12e 655.6 K4 1.14 4714
WASP-10b [40] 3.06 3.09 K5 -
BD-08 2823b [41] 0.33 237.6 K3 1.07 4746
HD 20868b [42] 1.99 380.85 K3/4 1.04 4795
HD 63454b [43] 0.38e 2.82 K4 1.06 4840
Qatar 1b [44] 1.09 1.42 N/A 1.06 4861
CD-23 395b [45] 1.44e 345.6 K5 1.08 4962

Test cases

Included mainly to check all the features are working correctly, check this after editing the code and add more test cases if nec if you add new features.

Example: {{ CelestialRef | Barnard's star }}

yields Barnard's star [46]

Example: {{ CelestialRef | Barnard's star |link=no}}

yields Barnard's star [47]

Example: {{ CelestialRef | Barnard's star | }} for ref only

yields [48]

Example: {{ CelestialRef | M 31 | Andromeda Galaxy }} to display as Andromeda Galaxy but look up as M 31

yields Andromeda Galaxy [49]

Same example, name only, no internal link: {{ CelestialRef | M 31 | Andromeda Galaxy |link=no}}

yields Andromeda Galaxy [50]

Final example shows all the features in one ref

Example: {{CelestialRef| Crab Nebula | cds=short | ids=show | bib=show | plot = 10 |units = arcsec | image=show | bwimage=show }}

yields Crab Nebula [51]

References

  1. M 31 at SIMBAD.
  2. Crab Nebula at SIMBAD.
  3. HD 189733b at SIMBAD.
  4. Crab Nebula at SIMBAD - Ids - Bibliography - Star plot - Image - B&W Image.
  5. Crab Nebula at SIMBAD, Ids, Bibliography, Star plot, Image, B&W Image.
  6. Crab Pulsar at SIMBAD.
  7. Crab Pulsar at SIMBAD.
    Ids - Bibliography - Star plot - Image - B&W Image.
  8. Crab Pulsar at SIMBAD.
    Ids - Bibliography - Image.
  9. M 31 at SIMBAD.
  10. M 42 at SIMBAD.
  11. M 42 at SIMBAD - Bibliography.
  12. M 42 at SIMBAD - Bibliography.
  13. M 31 at SIMBAD.
  14. M 31 at SIMBAD.
  15. Gliese 146 at SIMBAD - Siblings.
  16. HD 189733b at SIMBAD - Star plot.
  17. Alpha Centauri at SIMBAD - Star plot.
  18. WASP-43b at SIMBAD - Bibliography.
  19. HAT-P-20b at SIMBAD - Bibliography.
  20. GJ 439 c at SIMBAD - Bibliography.
  21. GJ 439 d at SIMBAD - Bibliography.
  22. WASP-59b at SIMBAD - Bibliography.
  23. HD 113538b at SIMBAD - Bibliography.
  24. HD 113538c at SIMBAD - Bibliography.
  25. BD-17 63b at SIMBAD - Bibliography.
  26. WASP-10b at SIMBAD - Bibliography.
  27. BD-08 2823b at SIMBAD - Bibliography.
  28. HD 20868b at SIMBAD - Bibliography.
  29. HD 63454b at SIMBAD - Bibliography.
  30. Qatar 1b at SIMBAD - Bibliography.
  31. CD-23 395b at SIMBAD - Bibliography.
  32. WASP-43b at SIMBAD.
    Ids - Bibliography - Image.
  33. HAT-P-20b at SIMBAD.
    Ids - Bibliography - Image.
  34. GJ 439 c at SIMBAD.
    Ids - Bibliography - Image.
  35. GJ 439 d at SIMBAD.
    Ids - Bibliography - Image.
  36. WASP-59b at SIMBAD.
    Ids - Bibliography - Image.
  37. HD 113538b at SIMBAD.
    Ids - Bibliography - Image.
  38. HD 113538c at SIMBAD.
    Ids - Bibliography - Image.
  39. BD-17 63b at SIMBAD.
    Ids - Bibliography - Image.
  40. WASP-10b at SIMBAD.
    Ids - Bibliography - Image.
  41. BD-08 2823b at SIMBAD.
    Ids - Bibliography - Image.
  42. HD 20868b at SIMBAD.
    Ids - Bibliography - Image.
  43. HD 63454b at SIMBAD.
    Ids - Bibliography - Image.
  44. Qatar 1b at SIMBAD.
    Ids - Bibliography - Image.
  45. CD-23 395b at SIMBAD.
    Ids - Bibliography - Image.
  46. Barnard's star at SIMBAD.
  47. Barnard's star at SIMBAD.
  48. Barnard's star at SIMBAD.
  49. M 31 at SIMBAD.
  50. M 31 at SIMBAD.
  51. Crab Nebula at SIMBAD - Ids - Bibliography - Star plot - Image - B&W Image.

See also

Use in tables

The template can be used in tables. Here is an example to test it. Data from Giant Planets around Late K Dwarf Stars - Table 1:

Confirmed Giant Planets around Mid- and Late-K-type Dwarf Stars

Planet Mass (MJ) Period (d) SpT B - V Te?
WASP-80b [1] 0.55 3.068 K7-M0 0.94 ~4000
70849b [2] > 3 > 5 yr K7 1.42 4100c

(2011)

[3] 2.03 0.813 K7 1.0 4400d
[4] 7.25 2.88 K3 4619
57274c [5] 0.41e 32.0 K4 1.11 4640
57274d [6] 0.53e 431.7 - - -
[7] 0.0.86 7.92 K5 0.92 4650h
113538b [8] 0.27e 263.3 K9f - -
113585c [9] 0.71e 1657 - - -
63b [10] 5.12e 655.6 K4 1.14 4714
[11] 3.06 3.09 K5 -
2823b [12] 0.33 237.6 K3 1.07 4746
20868b [13] 1.99 380.85 K3/4 1.04 4795
63454b [14] 0.38e 2.82 K4 1.06 4840
[15] 1.09 1.42 N/A 1.06 4861
5158bg [16] 1.44e 345.6 K5 1.08 4962

SIMBAD urls documentation

See SIMBAD - Query by urls/

References