From c60ddfd3d99064bf5e3125065a79a8b530698cc1 Mon Sep 17 00:00:00 2001 From: Karl Gordon Date: Thu, 16 Feb 2023 13:57:38 -0500 Subject: [PATCH 1/2] adding commas --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 64978ba..d967c63 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,7 @@ indexserver = setenv = MPLBACKEND=agg # Pass through the following environment variables which may be needed for the CI -passenv = HOME WINDIR LC_ALL LC_CTYPE CC CI TRAVIS +passenv = HOME, WINDIR, LC_ALL, LC_CTYPE, CC, CI, TRAVIS # Run the tests in a temporary directory to make sure that we don't import # this package from the source tree From 3659801643e42a4e9212035ae731ccce54a7a01b Mon Sep 17 00:00:00 2001 From: Karl Gordon Date: Thu, 16 Feb 2023 16:01:14 -0500 Subject: [PATCH 2/2] fix negative uncertainties --- .github/workflows/tox-tests.yml | 32 ++++++++++++++++---------------- measure_extinction/extdata.py | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/tox-tests.yml b/.github/workflows/tox-tests.yml index 7b974cb..68ce077 100644 --- a/.github/workflows/tox-tests.yml +++ b/.github/workflows/tox-tests.yml @@ -48,22 +48,22 @@ jobs: tox -e py3${{ matrix.python-ver }}-${{ matrix.tox-env }} # Dev version test - dev_test: - runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, '[ci skip]')" - steps: - - uses: actions/checkout@v1 - - name: Set up python for astropy, numpy dev test - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - name: Install base dependencies - run: | - python -m pip install --upgrade pip - python -m pip install tox - - name: Test with tox - run: | - tox -e py38-devdeps + # dev_test: + # runs-on: ubuntu-latest + # if: "!contains(github.event.head_commit.message, '[ci skip]')" + # steps: + # - uses: actions/checkout@v1 + # - name: Set up python for astropy, numpy dev test + # uses: actions/setup-python@v1 + # with: + # python-version: 3.8 + # - name: Install base dependencies + # run: | + # python -m pip install --upgrade pip + # python -m pip install tox + # - name: Test with tox + # run: | + # tox -e py38-devdeps # LTS version test lts_test: diff --git a/measure_extinction/extdata.py b/measure_extinction/extdata.py index beb30b2..0ce8ae3 100644 --- a/measure_extinction/extdata.py +++ b/measure_extinction/extdata.py @@ -625,7 +625,7 @@ def trans_elv_elvebv(self, ebv=None): # only compute where there is data and exts is not zero gvals = (self.exts[curname] != 0) & (self.npts[curname] > 0) self.uncs[curname][gvals] = ( - self.exts[curname][gvals] / fullebv[0] + np.absolute(self.exts[curname][gvals] / fullebv[0]) ) * np.sqrt( np.square(self.uncs[curname][gvals] / self.exts[curname][gvals]) + np.square(fullebv[1] / fullebv[0])