.. include:: include/links.rst .. |ang| unicode:: U+212B .. _metadatamodel: Metadata Model ============== .. warning:: The text below is flagged to identify cases where files/data are specific to MaNGA or a MaNGA data release. Anything that is not directly tied to the MaNGA-specific execution of the DAP (e.g., the naming convention and directory structure) will be relevant to analysis of non-MaNGA data. If you have questions or find problems, please `Submit an issue`_. .. _metadatamodel-maskbits: Maskbits -------- The mask bits for the DAP output files are pulled from last tagged version of ``IDLUTILS`` for SDSS-IV. These are distributed with the DAP and located in ``$MANGADAP_DIR/mangadap/data/sdss``. * If you're unfamiliar with maskbits, see the description of `SDSS Bitmasks`_. * For examples of how to use the mask bits, see :ref:`gettingstarted-bitmasks`. .. note:: Some mask bits are *informational*, not necessarily indicating that the pixel should be ignored. Please read and understand the flags listed below to determine if it's reasonable for your science case to simply ignore pixels with a non-zero mask value. Some mask bits are still *placeholders*. They're notional bits that are actually never set in the current version of the DAP. The three bitmask groups for DAP output files are: * :ref:`metadatamodel-dapqual`: Global quality bit * :ref:`metadatamodel-dappixmask`: Spaxel-by-spaxel bits for the DAP ``MAPS`` quantities * :ref:`metadatamodel-dapspecmask`:Pixel-by-pixel bits for the DAP model ``LOGCUBE`` data These bitmask groups are further described and listed below. For reference, we also list the two DRP bitmask groups that the DAP uses to flag the data it analyzes. .. _metadatamodel-drp3qual: MANGA_DRP3QUAL ~~~~~~~~~~~~~~ The MaNGA DRP uses a single bit to summarize the quality of the data reduction. The DAP class used to handle these bits and the bit values are below. .. include:: tables/drpquality3dbitmask.rst The DAP essentially only uses the ``CRITICAL`` flag and only when constructing the ``MANGA_DAPQUAL`` flag value. .. _metadatamodel-drp3pixmask: MANGA_DRP3PIXMASK ~~~~~~~~~~~~~~~~~ The MaNGA DRP flags the datacube data using a small set of bits that are a consolidation of the bits flagged during the data reduction. The DAP currently uses a single class to handle the bitmasks associated with either the 2D RSS files and the 3D datacubes. Below are the bits for the 3D datacubes: .. include:: tables/drpfitsbitmask.rst .. warning:: Because these flags are issued by the MaNGA data-reduction pipeline, they are specific to analysis of the MaNGA data and are not relevant to non-MaNGA applications. .. _metadatamodel-dapqual: MANGA_DAPQUAL ~~~~~~~~~~~~~ There is a single summary maskbit ``MANGA_DAPQUAL`` included in the headers of both the ``MAPS`` and ``LOGCUBE`` files describing the overall quality of the data. The DAP class used to handle these bits and the bit values are below. .. include:: tables/dapqualitybitmask.rst Anything with the ``CRITICAL`` bit set in ``MANGA_DAPQUAL`` should generally not be used for scientific purposes. .. _metadatamodel-dappixmask: MANGA_DAPPIXMASK ~~~~~~~~~~~~~~~~ ``MANGA_DAPPIXMASK`` is the 2D image bitmask used to describe the quality of individual pixel measurements in the DAP ``MAPS`` file. The DAP class used to handle these bits and the bit values are below. .. include:: tables/dapmapsbitmask.rst The most important flags are incorporated into the ``DONOTUSE`` bit, which indicates that a given pixel should not be used for science. .. _metadatamodel-nearbound: The NEARBOUND flag ++++++++++++++++++ The ``NEARBOUND`` flag is used to signify that a returned parameter is likely biased by an imposed boundary on the allowed parameter space. These are specifically relevant to the pPXF kinematics from :class:`~mangadap.proc.ppxffit.PPXFFit` (stellar) and :class:`~mangdap.proc.sasuke.Sasuke` (gas). We use pPXF with a :math:`\pm 2000` km/s limit relative to the input guess velocity (set by :math:`cz` in ``SCINPVEL`` header keyword in the ``PRIMARY`` extension and most often identical to the NSA redshift) on the returned velocity and :math:`{\rm d}v/100 < \sigma < 1000` limit on the velocity dispersion, where :math:`{\rm d}v` is the size of the MaNGA ``LOGCUBE`` wavelength channel (:math:`\sim 70` km/s; given by the ``VSTEP`` header keyword in the ``PRIMARY`` extension). The returned velocity is determined to be ``NEARBOUND`` if the "best-fit" value is within 1/100 of the width of the allowed range of either boundary; i.e., ``NEARBOUND`` is triggered if the velocity is :math:`-2000