mangadap.survey.util module

Provides a set of utility function that should only be used for the survey-level execution of the DAP.

License:
Copyright (c) 2015, SDSS-IV/MaNGA Pipeline Group
Licensed under BSD 3-clause license - see LICENSE.rst
Source location:
$MANGADAP_DIR/python/mangadap/survey/util.py
Imports and python version compliance:
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals

import sys
if sys.version > '3':
    long = int

import subprocess
from os import environ
from ..util.exception_tools import print_frame
Revision history:
?? ??? 2014: Original implementation by K. Westfall (KBW). Functions pulled (unedited) from file provided by J. Brownstein.
27 Aug 2015: (KBW) Sphinx documentation.
mangadap.survey.util.module_version(product='mangadap')[source]

Return the version of the specified product among the currently loaded modules.

Parameters:product (str) – (Optional) The name of the product
Returns:Version identifier
Return type:str
mangadap.survey.util.product_version(product='mangadap', simple=False)[source]

Get currently loaded SDSS product version by parsing the output of the system call to {$product}_version.

Parameters:
  • product (str) – (Optional) The name of the product
  • simple (bool) – (Optional) If True, only the first element of the reported version is returned.
Returns:

Version identifier

Return type:

str