Contributed VACs

API

class marvin.contrib.vacs.base.VACMixIn[source]

MixIn that allows VAC integration in Marvin.

This parent class provides common tools for downloading data using sdss_access or directly from the sandbox. get_vacs returns a container with properties pointing to all the VACs that subclass from VACMixIn. In general, VACs can be added to a class in the following way:

from marvin.contrib.vacs.base import VACMixIn

class Maps(MarvinToolsClass):

    def __init__(self, *args, **kwargs):

        ...

        self.vacs = VACMixIn.get_vacs(self)

and then the VACs can be accessed as properties in my_map.vacs.

download_vac(name=None, path_params={}, verbose=True)[source]

Download the VAC using rsync and returns the local path.

file_exists(name=None, path_params={})[source]

Check whether a file exists.

get_data(parent_object)[source]

Returns VAC data that matches the parent_object target.

This method must be overridden in each subclass of VACMixIn. Details will depend on the exact implementation and the type of VAC, but in general each version of this method must:

  • Check whether the VAC file exists locally.
  • If it does not, download it using download_vac.
  • Open the file using the appropriate library.
  • Retrieve the VAC data matching parent_object. Usually one will use attributes in parent_object such as .mangaid or .plate to perform the match.
  • Return the VAC data in whatever format is appropriate.
get_path(name=None, path_params={})[source]

Returns the local VAC path or False if it does not exist.

static get_vacs(parent_object)[source]

Returns a container with all the VACs subclassing from VACMixIn.

Because this method loops over VACMixIn.__subclasses__(), all the class that inherit from VACMixIn and that must be included in the container need to have been imported before calling get_vacs.

Parameters:parent_object (object) – The object to which the VACs are being attached. It will be passed to get_data when the subclass of VACMixIn is called.
Returns:vac_container (object) – An instance of a class that contains just a list of properties, one for to each on of the VACs that subclass from VACMixIn.

Available VACs

class marvin.contrib.vacs.mangahi.HIVAC[source]

Provides access to the MaNGA-HI VAC.

VAC name: HI

URL: link

Description: Returns HI summary data and spectra

Authors: David Stark and Karen Masters

get_data(parent_object)[source]

Returns VAC data that matches the parent_object target.

This method must be overridden in each subclass of VACMixIn. Details will depend on the exact implementation and the type of VAC, but in general each version of this method must:

  • Check whether the VAC file exists locally.
  • If it does not, download it using download_vac.
  • Open the file using the appropriate library.
  • Retrieve the VAC data matching parent_object. Usually one will use attributes in parent_object such as .mangaid or .plate to perform the match.
  • Return the VAC data in whatever format is appropriate.
class marvin.contrib.vacs.mangahi.HIData(plateifu, allfile=None, specfile=None)[source]

A customized class to handle more complex data

This class handles data from both the HI summary file and the individual HI spectral files. Row data from the summary file is returned via the data property. Spectral data can be plotted via the plot_spectrum method.

plot_massfraction()[source]

Plot the HI mass fraction

plot_spectrum()[source]

Plot the HI spectrum

data

Returns the FITS row data from the mangaHIall summary file