Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/sdss/marvin into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
bretthandrews committed Apr 5, 2018
2 parents 92bf6af + 56c182b commit 6e5c291
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 2.2.4dev
current_version = 2.2.5dev
commit = True
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(?P<release>[a-z]+)?
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.rst
@@ -1,6 +1,15 @@
Marvin's Change Log
===================


[2.2.4] - 2018/04/04
--------------------

Fixed
^^^^^
- Issue `#400 <https://github.com/sdss/marvin/issues/400>`: SII in BPT diagram should use sum of 6717 and 6732.


[2.2.3] - 2018/03/20
--------------------

Expand Down
2 changes: 1 addition & 1 deletion python/marvin/__init__.py
Expand Up @@ -14,7 +14,7 @@
from collections import OrderedDict

# Set the Marvin version
__version__ = '2.2.4dev'
__version__ = '2.2.5dev'
# try:
# from marvin.version import get_version
# except ImportError as e:
Expand Down
26 changes: 18 additions & 8 deletions python/marvin/data/sdssMaskbits.par
Expand Up @@ -621,6 +621,9 @@ maskbits EBOSS_TARGET2 2 SPIDERS_ERASS_AGN "ERASS AGN sources"
maskbits EBOSS_TARGET2 3 SPIDERS_ERASS_CLUS "ERASS Cluster sources"
maskbits EBOSS_TARGET2 4 SPIDERS_XMMSL_AGN "XMM Slew survey"
maskbits EBOSS_TARGET2 5 SPIDERS_XCLASS_CLUS "XMM serendipitous clusters"
maskbits EBOSS_TARGET2 6 SPIDERS_CODEX_CLUS_CFHT "CODEX clusters, CFHT photometry"
maskbits EBOSS_TARGET2 7 SPIDERS_CODEX_CLUS_PS1 "CODEX clusters, PS1 photometry"
maskbits EBOSS_TARGET2 8 SPIDERS_CODEX_CLUS_DECALS "CODEX clusters, DECALS photometry"
maskbits EBOSS_TARGET2 20 TDSS_A "Main PanSTARRS selection for TDSS"
maskbits EBOSS_TARGET2 21 TDSS_FES_DE "QSOs with disk emitter broad line profiles"
maskbits EBOSS_TARGET2 22 TDSS_FES_DWARFC "dwarf carbon stars"
Expand Down Expand Up @@ -1002,9 +1005,23 @@ maskbits MANGA_DRP3QUAL 7 BADSET " One or more sets are bad"
maskbits MANGA_DRP3QUAL 8 BADFLUX " Bad flux calibration"
maskbits MANGA_DRP3QUAL 9 BADPSF " PSF estimate may be bad"
maskbits MANGA_DRP3QUAL 10 MANYDEAD " Many dead fibers"
maskbits MANGA_DRP3QUAL 11 BADHELIORV " MASTAR: High variance between stellar RVs"
maskbits MANGA_DRP3QUAL 11 RETIRED2 " Bit retired, moved into MASTAR_QUAL instead"
maskbits MANGA_DRP3QUAL 30 CRITICAL " Critical failure in one or more frames"

# MaStar quality flag bitmask
masktype MASTAR_QUAL 64 "Mask bits for MaStar spectra quality flags"
maskbits MASTAR_QUAL 0 NODATA " No Data"
maskbits MASTAR_QUAL 1 SKYSUBBAD " Bad sky subtraction in one or more frames"
maskbits MASTAR_QUAL 2 HIGHSCAT " High scattered light in one or more frames"
maskbits MASTAR_QUAL 3 BADFLUX " Bad flux calibration"
maskbits MASTAR_QUAL 4 LOWCOV " PSF-covering fraction by fiber is too small (<10%)"
maskbits MASTAR_QUAL 5 POORCAL " Poor throughput"
maskbits MASTAR_QUAL 6 BADHELIORV " High variance between stellar RVs"
maskbits MASTAR_QUAL 7 MANUAL " Flagged as problematic by visual inspection"
maskbits MASTAR_QUAL 8 EMLINE " Spectrum contain emission lines"
maskbits MASTAR_QUAL 9 LOWSN " Per-MJD Spectrum has median S/N <= 15"
maskbits MASTAR_QUAL 30 CRITICAL " Critical failure in one or more frames"

# The following mask bits are for the 2D MANGA pipeline
# 0-13 refer to each fiber, 15-30 refer to each pixel in a spectrum."
# The following mask bits are for fibers
Expand Down Expand Up @@ -1089,13 +1106,6 @@ maskbits MANGA_DAPPIXMASK 9 NOCORRECTION "Appropriate correction not available"
maskbits MANGA_DAPPIXMASK 10 MULTICOMP "Multi-component velocity features present"
maskbits MANGA_DAPPIXMASK 30 DONOTUSE "Do not use this spaxel for science"

# MaStar quality flag bitmask
masktype MASTAR_QUAL 64 "Mask bits for MaStar spectra"
maskbits MASTAR_QUAL 0 NODATA "No Data"
maskbits MASTAR_QUAL 1 POORCAL "Poor flux calibration"
maskbits MASTAR_QUAL 2 LOWCOV "PSF-covering fraction by fiber is too small (<10%)"
maskbits MASTAR_QUAL 3 MANUAL "flagged as problematic by visual inspection"

# MaNGA targeting bitmask for galaxy targets
masktype MANGA_TARGET1 64 "Mask bits identifying galaxy samples."
maskbits MANGA_TARGET1 0 NONE " "
Expand Down
8 changes: 6 additions & 2 deletions python/marvin/utils/dap/bpt.py
Expand Up @@ -212,7 +212,8 @@ def bpt_kewley06(maps, snr_min=3, return_figure=True, use_oi=True, **kwargs):
the lines. Alternatively, a dictionary of signal-to-noise values, with the
emission line channels as keys, can be used.
E.g., ``snr_min={'ha': 5, 'nii': 3, 'oi': 1}``. If some values are not provided,
they will default to ``SNR>=3``.
they will default to ``SNR>=3``. Note that the value ``sii`` will be applied to both
``[SII 6718]`` and ``[SII 6732]``.
return_figure (bool):
If ``True``, it also returns the matplotlib figure_ of the BPT diagram plot,
which can be used to modify the style of the plot.
Expand Down Expand Up @@ -268,9 +269,12 @@ def bpt_kewley06(maps, snr_min=3, return_figure=True, use_oi=True, **kwargs):
nii = get_masked(maps, 'nii_6585', snr=get_snr(snr_min, 'nii'))
ha = get_masked(maps, 'ha_6564', snr=get_snr(snr_min, 'ha'))
hb = get_masked(maps, 'hb_4862', snr=get_snr(snr_min, 'hb'))
sii = get_masked(maps, 'sii_6718', snr=get_snr(snr_min, 'sii'))
oi = get_masked(maps, 'oi_6302', snr=get_snr(snr_min, 'oi'))

sii_6718 = get_masked(maps, 'sii_6718', snr=get_snr(snr_min, 'sii'))
sii_6732 = get_masked(maps, 'sii_6732', snr=get_snr(snr_min, 'sii'))
sii = sii_6718 + sii_6732

# Calculate masked logarithms
log_oiii_hb = np.ma.log10(oiii / hb)
log_nii_ha = np.ma.log10(nii / ha)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -75,7 +75,7 @@ def remove_args(parser):

NAME = 'sdss-marvin'
# do not use x.x.x-dev. things complain. instead use x.x.xdev
VERSION = '2.2.4dev'
VERSION = '2.2.5dev'
RELEASE = 'dev' not in VERSION


Expand Down

0 comments on commit 6e5c291

Please sign in to comment.