Function Repository Resource:

StellarSpectralClassData

Source Notebook

Extract data about a specified spectral class of stars

Contributed by: Jeff Bryant

ResourceFunction["StellarSpectralClassData"][sc]

gives an association of properties of the spectral class sc.

ResourceFunction["StellarSpectralClassData"][sc,"Dataset"]

gives a dataset of properties of the specified spectral class.

ResourceFunction["StellarSpectralClassData"][sc,prop]

gives the value of a specified property.

ResourceFunction["StellarSpectralClassData"][sc,{property1,property2,,propertyn}]

gives a list of property values.

Details

ResourceFunction["StellarSpectralClassData"][sc] is equivalent to ResourceFunction["StellarSpectralClassData"][sc,"PropertyAssociation"].
ResourceFunction["StellarSpectralClassData"]["Properties"] gives a list of the available properties.
Spectral class specification follows a nonstandardized set of patterns, so not all patterns can be detected.
Standard temperature classes typically begin with "O", "B", "A", "F", "G", "K" or "M" followed by a digit, or sometimes two digits separated by a decimal point.
Spectral classes containing "L", "T", "Y" and some late (less luminous) "M" are more typical of brown dwarf stars.
Temperature classes containing "C", "S" or "R" typically indicate carbon abundance peculiarities.
Luminosity classes are typically represented using Roman numerals between "I" and "VII", with "I" representing supergiants and "VII" representing white dwarfs. Supergiant luminosity classes can be subdivided into subclasses "Ia", "Iab" and "Ib", from most luminous to least luminous, respectively.
Various less commonly used notations such as "d", "sd" and "ms" may be used to represent specific luminosity classes.
Wolf–Rayet stars may be indicated using class notations containing "W" followed by "C", "N" or "O" denoting a subclass.
White dwarf stars are often denoted using "D" followed by "A", "B", "C", "O", "Q" or "Z" denoting a subclass.
The special symbol "+" may represent a composite spectrum or a spectral peculiarity, while "/" indicates uncertainty or variability and may make it difficult to derive well-defined parameters.
Many different spectral peculiarities can be denoted by a large and nonstandard set of notations, only some of which are supported.
Derived properties are based on the interpolation of values from known stars or a stellar model. Derived values may deviate from observed values, especially for peculiar stars or stars in transitional or variable states.
Properties that can be derived from the spectral class include:
"AbsoluteMagnitude"absolute magnitude
"Color"color
"EffectiveTemperature"effective temperature
"Examples"list of example stars
"Luminosity"luminosity
"LuminosityClass"luminosity class
"MainSequenceLifetime"lifetime on the main sequence
"Mass"mass
"Peculiarities"spectral peculiarities
"Radius"radius
"StarType"star type
"StellarEndState"stellar end state
"TemperatureClass"temperature class

Examples

Basic Examples (4) 

Get the derived mass of a "G2V" star:

In[1]:=
ResourceFunction["StellarSpectralClassData"]["G2V", "Mass"]
Out[1]=

Get the derived properties for an "M2Ve" star as an association:

In[2]:=
ResourceFunction["StellarSpectralClassData"]["M2Ve"]
Out[2]=

Get the derived properties for a "K1IIICN…" star as a dataset:

In[3]:=
ResourceFunction["StellarSpectralClassData"]["K1IIICN...", "Dataset"]
Out[3]=

Get the derived spectral peculiarities of a "B9IV:HgMn" star:

In[4]:=
ResourceFunction[
 "StellarSpectralClassData"]["B9IV:HgMn", "Peculiarities"]
Out[4]=

Scope (22) 

Properties (1) 

List the available properties:

In[5]:=
ResourceFunction["StellarSpectralClassData"]["Properties"]
Out[5]=

AbsoluteMagnitude (1) 

Derive the absolute magnitude for a specified spectral class:

In[6]:=
ResourceFunction[
 "StellarSpectralClassData"]["M5III", "AbsoluteMagnitude"]
Out[6]=

Color (2) 

Derive the color for a specified spectral class:

In[7]:=
ResourceFunction["StellarSpectralClassData"]["B3Ia", "Color"]
Out[7]=

As you progress the temperature classes through OBAFGKMLT, colors change from blue to red:

In[8]:=
ResourceFunction[
 "StellarSpectralClassData"][{"O9V", "B5Ia", "A7V", "F8V", "G2V", "K6IV", "M4III", "L5V", "T5V"}, "Color"]
Out[8]=

EffectiveTemperature (2) 

Derive the effective temperature for a specified spectral class:

In[9]:=
ResourceFunction[
 "StellarSpectralClassData"]["G2V", "EffectiveTemperature"]
Out[9]=

As you progress the temperature classes through OBAFGKMLTY, temperature generally declines:

In[10]:=
ListPlot[
 ResourceFunction[
  "StellarSpectralClassData"][{"O9V", "B5Ia", "A7V", "F8V", "G2V", "K6IV", "M4III", "L5V", "T5V", "Y5V"}, "EffectiveTemperature"]]
Out[10]=

Examples (1) 

Query for star entity‐type examples for a given spectral class:

In[11]:=
ResourceFunction["StellarSpectralClassData"]["A0p", "Examples"]
Out[11]=

Luminosity (2) 

Derive the luminosity of an "F8V" star in solar luminosities:

In[12]:=
ResourceFunction["StellarSpectralClassData"]["F8V", "Luminosity"]
Out[12]=

Plot the luminosity for different luminosity classes:

In[13]:=
ListLogPlot[
 ResourceFunction[
  "StellarSpectralClassData"][{"A2VII", "A2VI", "A2V", "A2IV", "A2III", "A2II", "A2Ib", "A2Iab", "A2Ia"}, "Luminosity"]]
Out[13]=

LuminosityClass (2) 

Extract the luminosity class specification for a given spectral class:

In[14]:=
ResourceFunction[
 "StellarSpectralClassData"]["M2II", "LuminosityClass"]
Out[14]=

Some spectral class specifications may indicate the presence of multiple stars with different luminosity classes:

In[15]:=
ResourceFunction[
 "StellarSpectralClassData"]["M2II+G3V", "LuminosityClass"]
Out[15]=

MainSequenceLifetime (1) 

Determine how long a star will spend on the main sequence based on spectral class:

In[16]:=
ResourceFunction[
 "StellarSpectralClassData"]["G9V", "MainSequenceLifetime"]
Out[16]=

Mass (1) 

Derive the mass of a star from a specified spectral class:

In[17]:=
ResourceFunction["StellarSpectralClassData"]["B9III", "Mass"]
Out[17]=

Peculiarities (2) 

Extract and decode the spectral peculiarities in a specified spectral class:

In[18]:=
ResourceFunction[
 "StellarSpectralClassData"]["K0IV:compSB", "Peculiarities"]
Out[18]=

In[19]:=
ResourceFunction["StellarSpectralClassData"]["CEMP-no"]
Out[19]=

Radius (1) 

Derive the radius of a star from a specified spectral class:

In[20]:=
ResourceFunction["StellarSpectralClassData"]["G2VI", "Radius"]
Out[20]=

StarType (3) 

Obtain the star type for a single star spectrum:

In[21]:=
ResourceFunction["StellarSpectralClassData"]["M2Ia", "StarType"]
Out[21]=

Obtain the star types in composite spectra:

In[22]:=
ResourceFunction["StellarSpectralClassData"]["M2Ia+DA2", "StarType"]
Out[22]=

Obtain the star types for the different luminosity classes:

In[23]:=
Flatten[ResourceFunction[
  "StellarSpectralClassData"][{"A2VII", "A2VI", "A2V", "A2IV", "A2III", "A2II", "A2Ib", "A2Iab", "A2Ia"}, "StarType"]]
Out[23]=

StellarEndState (1) 

Derive the stellar end state for a star from the specified spectral class:

In[24]:=
ResourceFunction[
 "StellarSpectralClassData"]["B9Ia", "StellarEndState"]
Out[24]=

TemperatureClass (2) 

Extract the temperature class part of a specified spectral class:

In[25]:=
ResourceFunction[
 "StellarSpectralClassData"]["F2V", "TemperatureClass"]
Out[25]=

Some spectral class specifications may indicate the presence of multiple stars with different temperature classes:

In[26]:=
ResourceFunction[
 "StellarSpectralClassData"]["F2V+M2Ve", "TemperatureClass"]
Out[26]=

Properties and Relations (4) 

Stars have a "SpectralClass" property that can be fed into StellarSpectralClassData to derive properties:

In[27]:=
Entity["Star", "Arcturus"]["SpectralClass"]
Out[27]=
In[28]:=
ResourceFunction["StellarSpectralClassData"][
 Entity["Star", "Arcturus"]["SpectralClass"], "Dataset"]
Out[28]=

Plot an example of a given spectral class on the Hertzsprung–Russell diagram:

In[29]:=
ResourceFunction["HertzsprungRussellDiagram"][
 First[ResourceFunction["StellarSpectralClassData"]["K1IIICN...", "Examples"]]]
Out[29]=

Plot examples of main sequence stars on the Hertzsprung–Russell diagram:

In[30]:=
ResourceFunction["HertzsprungRussellDiagram"][
 First[ResourceFunction["StellarSpectralClassData"][#, "Examples"]] & /@ {"T8.5", "M5V", "K5V", "G5V", "F5V", "A5V", "B5V", "O9V"}]
Out[30]=

Plot examples of white dwarf stars on the Hertzsprung–Russell diagram:

In[31]:=
ResourceFunction["HertzsprungRussellDiagram"][
 First[ResourceFunction["StellarSpectralClassData"][#, "Examples"]] & /@ Union[EntityValue[EntityClass["Star", "WhiteDwarfStar"], "SpectralClass"]]]
Out[31]=

Possible Issues (2) 

Some spectral class descriptions contain ambiguities, complications or peculiarities making the derivation of properties unsupported:

In[32]:=
ResourceFunction["StellarSpectralClassData"]["C6-7,3e(Ne)", "Dataset"]
Out[32]=

The "MainSequenceLifetime" property makes no consideration for the luminosity class or star type of the star in question. It is based solely on the derived mass of a star, even if the star in question has evolved beyond the main sequence:

In[33]:=
ResourceFunction[
 "StellarSpectralClassData"]["G3III", {"LuminosityClass", "StarType", "Mass", "MainSequenceLifetime"}]
Out[33]=

Version History

  • 2.2.1 – 27 March 2024
  • 2.2.0 – 05 April 2023
  • 2.1.0 – 08 August 2022
  • 2.0.0 – 04 March 2020
  • 1.0.0 – 08 November 2019

Related Resources

License Information