Function specsyn::getMicroDefault

Function Documentation

auto specsyn::getMicroDefault(const std::string &spectraName, const std::string &registryName = defaultRegistry) -> double

Get a spectral library’s default microturbulent velocity.

Different libraries commonly warrant different default microturbulent velocities – e.g. hot, massive OB stars are conventionally modeled with substantially more microturbulence than cooler, lower-mass stars – so unlike the other filtering criteria (afe, cfe, r), this default is looked up per library from the registry rather than sharing a single constant across every library. A library with no microturbulence axis at all (e.g. CK04) has no micro_default entry to look up in the first place, rather than this being a mistake on the caller’s part, so that case falls back to defaultMicroTurb instead of throwing – a harmless placeholder, since such a library’s groups also carry no “micro” attribute for findMatchingSpectra to ever actually filter on.

Parameters:
  • spectraName – Name of the spectral model

  • registryName – Name of the spectral library registry file

Throws:

std::runtime_error – if spectraName is not a spectra set in the registry

Returns:

The library’s micro_default value, in km/s, as recorded in its registry entry, or defaultMicroTurb if its entry has no micro_default field at all