From cfea1873c7117576f7c93e35f2c8b98fc35f358d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20S=C3=A1nchez-Gallego?= Date: Mon, 2 Apr 2018 15:09:54 -0700 Subject: [PATCH 1/6] Uses sum of both SII lines for BPT --- CHANGELOG.rst | 9 +++++++++ python/marvin/utils/dap/bpt.py | 8 ++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 320b32287..6f81aaa2c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,15 @@ Marvin's Change Log =================== + +[2.2.4] - unreleased +-------------------- + +Fixed +^^^^^ +- Issue `#400 `: SII in BPT diagram should use sum of 6717 and 6732. + + [2.2.3] - 2018/03/20 -------------------- diff --git a/python/marvin/utils/dap/bpt.py b/python/marvin/utils/dap/bpt.py index 1feea2b42..5e67f3a57 100644 --- a/python/marvin/utils/dap/bpt.py +++ b/python/marvin/utils/dap/bpt.py @@ -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. @@ -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) From a5c5538e3743863adab0b71a2f74d8fe6d445e66 Mon Sep 17 00:00:00 2001 From: Brett Andrews Date: Tue, 3 Apr 2018 10:52:45 -0400 Subject: [PATCH 2/6] fixes mapplot._set_extent test --- python/marvin/tests/utils/plot/test_map.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/marvin/tests/utils/plot/test_map.py b/python/marvin/tests/utils/plot/test_map.py index 8b7abf784..2f43bbd9b 100644 --- a/python/marvin/tests/utils/plot/test_map.py +++ b/python/marvin/tests/utils/plot/test_map.py @@ -6,7 +6,7 @@ # @Author: Brett Andrews # @Date: 2017-05-01 09:07:00 # @Last modified by: andrews -# @Last modified time: 2018-03-20 20:03:12 +# @Last modified time: 2018-04-03 10:04:19 import numpy as np import matplotlib @@ -192,7 +192,7 @@ class TestMapPlot(object): ([35, 35], True, np.array([-17.5, 17.5, -17.5, 17.5])), ([36, 36], False, np.array([0, 35, 0, 35]))]) def test_set_extent(self, cube_size, sky_coords, expected): - extent = mapplot.set_extent(cube_size, sky_coords) + extent = mapplot._set_extent(cube_size, sky_coords) assert np.all(extent == expected) @matplotlib_2 From 3a02b8661274e318997b6df27eaa283bc23c560e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20S=C3=A1nchez-Gallego?= Date: Wed, 4 Apr 2018 13:34:06 -0700 Subject: [PATCH 3/6] :up: changelog --- CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6f81aaa2c..c6c738936 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,7 +2,7 @@ Marvin's Change Log =================== -[2.2.4] - unreleased +[2.2.4] - 2018/04/04 -------------------- Fixed From 2b9bd577aebbbafc08d98ad3cacd0a5270fb2cad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20S=C3=A1nchez-Gallego?= Date: Wed, 4 Apr 2018 13:34:17 -0700 Subject: [PATCH 4/6] =?UTF-8?q?Bump=20version:=202.2.4dev=20=E2=86=92=202.?= =?UTF-8?q?2.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- python/marvin/__init__.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index c69b5ea1c..f61c8c585 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 2.2.4dev +current_version = 2.2.4 commit = True tag = False parse = (?P\d+)\.(?P\d+)\.(?P\d+)(?P[a-z]+)? diff --git a/python/marvin/__init__.py b/python/marvin/__init__.py index eb98a36d2..396c7e0a7 100644 --- a/python/marvin/__init__.py +++ b/python/marvin/__init__.py @@ -14,7 +14,7 @@ from collections import OrderedDict # Set the Marvin version -__version__ = '2.2.4dev' +__version__ = '2.2.4' # try: # from marvin.version import get_version # except ImportError as e: diff --git a/setup.py b/setup.py index 000bdcd51..b308af98a 100644 --- a/setup.py +++ b/setup.py @@ -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.4' RELEASE = 'dev' not in VERSION From e6d6dc5cea9cd9741fe7855b1b93ca468c9c1994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20S=C3=A1nchez-Gallego?= Date: Wed, 4 Apr 2018 13:35:43 -0700 Subject: [PATCH 5/6] :up: sdssMaskBits.par --- python/marvin/data/sdssMaskbits.par | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/python/marvin/data/sdssMaskbits.par b/python/marvin/data/sdssMaskbits.par index 7ca545720..31f24e9c8 100644 --- a/python/marvin/data/sdssMaskbits.par +++ b/python/marvin/data/sdssMaskbits.par @@ -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" @@ -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 @@ -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 " " From 56c182ba8b9a31ac0a24e94638db21ef4ac56348 Mon Sep 17 00:00:00 2001 From: Brian Cherinka Date: Thu, 5 Apr 2018 11:13:47 -0400 Subject: [PATCH 6/6] =?UTF-8?q?Bump=20version:=202.2.4=20=E2=86=92=202.2.5?= =?UTF-8?q?dev?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- python/marvin/__init__.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index f61c8c585..a865b18d0 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 2.2.4 +current_version = 2.2.5dev commit = True tag = False parse = (?P\d+)\.(?P\d+)\.(?P\d+)(?P[a-z]+)? diff --git a/python/marvin/__init__.py b/python/marvin/__init__.py index 396c7e0a7..2ea1bffd4 100644 --- a/python/marvin/__init__.py +++ b/python/marvin/__init__.py @@ -14,7 +14,7 @@ from collections import OrderedDict # Set the Marvin version -__version__ = '2.2.4' +__version__ = '2.2.5dev' # try: # from marvin.version import get_version # except ImportError as e: diff --git a/setup.py b/setup.py index b308af98a..323bc61f7 100644 --- a/setup.py +++ b/setup.py @@ -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.4' +VERSION = '2.2.5dev' RELEASE = 'dev' not in VERSION