================================================================================
Title: The Magellan Evolution of Galaxies Spectroscopic and Ultraviolet 
       Reference Atlas (MegaSaura) II: Stacked Spectra 
Authors: Rigby J.R., Bayliss M.B., Chisholm J., Bordoloi R., Sharon K., 
         Gladders M.D., Johnson T., Paterno-Mahler R., Wuyts E., Dahle H., 
         Acharyya A.
================================================================================
Description of contents:  
    This is the readme file for the spectral data that accompany the following
    paper: "The Magellan Evolution of Galaxies Spectroscopic and Ultraviolet
    Reference Atlas (MegaSaura) II: Stacked Spectra." by Rigby, Bayliss,
    Chisholm, Bordoloi, Sharon, Gladders, Johnson, Paterno-Mahler, Wuyts,
    Dahle, and Acharyya, ApJ, accepted 2017-10-20

    There are 5 files that contain spectral data.  Each file is ASCII, in
    comma-separated-variable format. Each file has a header prefixed with "#",
    which contains metadata about the file, and describes each column. The
    first line of each file gives short names for the columns.  Each file can
    be read into python as follows, where FILENAME is the name of a file.

     import pandas
     df = pandas.read_csv(FILENAME, comment='#')

    STACKS OF MEGASAURA MAGE/MAGELLAN SPECTRA: 
        Three files are stacks of the Megasaura MagE/Magellan spectra of
        z=1.6--3.6 gravitationally--lensed galaxies.  As described in S2.3 of
        the paper, the input spectra of each stack were normalized as follows:

        1) megasaura_stack_byneb_shapenormalized.csv :    Each input spectrum
        was normalized by its hand-fit spline continuum from Paper 1.  This
        stack is referred to in the paper as the "shape-normalized stack".

        2) megasaura_stack_byneb_pivotnormalized.csv :    Each input spectrum
        was normalized by the median flux density in the pivot wavelength range
        of 1267--1276 Angstroms.  This normalization affects only the zeropoint
        of the input spectra, and preserves the spectral shape.  This stack is
        referred to in the paper as the "lambda pivot normalized stack".

        3) megasaura_stack_byneb_S99normalized.csv   :    Each input spectrum
        was normalized by its best-fit linear combination of Starburst99
        models.  This stack is referred to in the paper as the "S99-normalized
        stack".


    STACKS OF COS/HST SPECTRA:
        Two files are stacks of COS/HST spectra of z~0 galaxies.  The stacking
        process is described in S2.5 of the paper.  There are two files, which
        are stacks at different output spectral resolutions, as follows:

        4) COS_stack_R3300.csv  :  Each input spectrum was convolved by a
        Gaussian kernel to lower the spectral resolution to R=3300, and
        normalized by an automatically-fit continuum.

        5) COS_stack_maxR.csv :   Each input spectrum was used at its native
        spectral resolution (which depends on the morphology of the galaxy in
        the COS aperture), and was normalized by an automatically-fit continuum.


System requirements: 
    There are 5 files that contain spectral data.  Each file is ASCII, in
    comma-separated-variable format. Each file has a header prefixed with "#",
    which contains metadata about the file, and describes each column. The
    first line of each file gives short names for the columns.  Each file can
    be read into python as follows, where FILENAME is the name of a file.

     import pandas
     df = pandas.read_csv(FILENAME, comment='#')


Additional comments: 
    The AAS data editors provide alternative versions of these 5 stacked
    spectra in a format following the Journal's machine readable style. These
    files can be read in 

        from astropy.table import Table
        data = Table.read("dbf1.txt", format="ascii.cds")

    and have similar filenames:

        COS_stack_R3300.txt
        COS_stack_maxR.txt
        megasaura_stack_byneb_S99normalized.txt
        megasaura_stack_byneb_pivotnormalized.txt
        megasaura_stack_byneb_shapenormalized.txt


================================================================================
