astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v1.1.1 »
- Cosmological Calculations (`astropy.cosmology`) »
- default_cosmology

# default_cosmology

class `astropy.cosmology.``default_cosmology`

  Bases: `astropy.utils.state.ScienceState`

  The default cosmology to use. To change it:

      >>> from astropy.cosmology import default_cosmology, WMAP7
      >>> with default_cosmology.set(WMAP7):
      ...     # WMAP7 cosmology in effect

  Or, you may use a string:

      >>> with default_cosmology.set('WMAP7'):
      ...     # WMAP7 cosmology in effect

  Methods Summary

  `get_cosmology_from_string`(arg) | Return a cosmology instance from a string.
  `validate`(value) |

  Methods Documentation

  static `get_cosmology_from_string`(arg)

    Return a cosmology instance from a string.

  classmethod `validate`(value)