pygaia/photometry/utils.py
def gabsFromSpt(spt):
  """
  Obtain M_G (absolute magnitude in G-band) for the input spectral type.

  Parameters
  ----------
  
  spt - String representing the spectral type of the star.

  Returns
  -------
  
  The value of M_G.
  """
  if spt in _sptToVminiVabsDictionary:
    return vabsFromSpt(spt) + gminvFromVmini(vminiFromSpt(spt))
  else:
    message="Unknown spectral type. Allowed values are: "
    for key in _sptToVminiVabsDictionary.keys():
      message += key+" "
    raise Exception(message)
def gabsFromSpt(spt):
  """
  Obtain M_G (absolute magnitude in G-band) for the input spectral type.

  Parameters
  ----------
  
  spt - String representing the spectral type of the star.

  Returns
  -------
  
  The value of M_G.
  """
  if spt in _sptToVminiVabsDictionary:
    return vabsFromSpt(spt) + gminvFromVmini(vminiFromSpt(spt))
  else:
    message="Unknown spectral type. Allowed values are: "
    for key in _sptToVminiVabsDictionary.keys():
      message += key+" "
    raise Exception(message)
Obtain M_G (absolute magnitude in G-band) for the input spectral type.

  Parameters
  ----------
  
  spt - String representing the spectral type of the star.

  Returns
  -------
  
  The value of M_G.