Here's a little procedure to fish out data from the Simbad database.  Some star names may not work if the page Simbad brings up is not completely filled, but it should work for most queries.


 

restart; gc()

Simbad := proc (a::string) local b, c, c1, c2, c3, c4, c5, d1, d2, d3, d4, d5, e1, e2, e3, e4, e5; b := StringTools:-DeleteSpace(StringTools:-Substitute(a, " ", "+")); c := HTTP:-Get(cat("http://simbad.u-strasbg.fr/simbad/sim-id?Ident=", b, "&submit=submit+id")); c1 := StringTools:-Search("Parallaxes", c[2]); c2 := StringTools:-Search("Radial", c[2]); c3 := StringTools:-Search("Spectral type:", c[2]); c4 := StringTools:-Search("Gal", c[2]); c5 := StringTools:-Search("ICRS", c[2]); d1 := c[2][c1+87 .. c1+93]; d2 := c[2][c2+96 .. c2+110]; d3 := c[2][c3+77 .. c3+90]; d4 := c[2][c4+122 .. c4+140]; d5 := c[2][c5+135 .. c5+164]; e1 := d1[() .. StringTools:-Search(" ", d1)]; e2 := d2[() .. StringTools:-SearchAll(" ", d2)[2]]; e3 := d3[() .. StringTools:-Search(" ", d3)]; e4 := convert(evalf(1000/parse(e1)), 'units', 'parsec', 'ly'); e5 := d5[() .. StringTools:-Search("\n", d5)-1]; print(cat(StringTools:-Capitalize(a), "\nDistance", e4, "lightyears", "\nRight Ascension and declination:", e5, "\nGalactic coordinates", d4, "Spectral Type:", e3, "\nRadial velocity:", e2, "\nParallax", e1, "milliarcseconds")) end proc:
 

Simbad("epsilon eridani")

"Epsilon Eridani
Distance" || (10.48936700) || "lightyears" || "
Right Ascension and declination:" || "03 32 55.84496 -09 27 29.7312" || "
Galactic coordinates" || "195.8446 -48.0513
 " || "Spectral Type:" || "K2Vk: " || "
Radial velocity:" || "V(km/s) 16.43 " || "
Parallax" || "310.94 " || "milliarcseconds"

(1)

Simbad("alpha centauri")

"Alpha Centauri
Distance" || (4.395638513) || "lightyears" || "
Right Ascension and declination:" || "14 39 36.204 -60 50 08.23" || "
Galactic coordinates" || "315.7330 -00.6809
 " || "Spectral Type:" || "G2V+K1V " || "
Radial velocity:" || "V(km/s) -22.3 " || "
Parallax" || "742 " || "milliarcseconds"

(2)

Simbad("beta hydri")

"Beta Hydri
Distance" || (24.32731987) || "lightyears" || "
Right Ascension and declination:" || "00 25 45.07036 -77 15 15.2860" || "
Galactic coordinates" || "304.7720 -39.7821
 " || "Spectral Type:" || "G0V " || "
Radial velocity:" || "V(km/s) 23.10 " || "
Parallax" || "134.07 " || "milliarcseconds"

(3)

Simbad("HR6998")

"Hr6998
Distance" || (42.67386858) || "lightyears" || "
Right Ascension and declination:" || "18 38 53.40045 -21 03 06.7368" || "
Galactic coordinates" || "012.7251 -06.7965
 " || "Spectral Type:" || "G6V " || "
Radial velocity:" || "V(km/s) 36.175 " || "
Parallax" || "76.43 " || "milliarcseconds"

(4)

``


 

Download star_database_-_simbad.mw


Please Wait...