Skip to content

Commit

Permalink
Merge sherpa#735 (DougBurke) Remove ChIPS support
Browse files Browse the repository at this point in the history
Remove ChIPS support
  • Loading branch information
wmclaugh committed Feb 25, 2020
2 parents 370241d + d63ea35 commit ca2eae9
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 983 deletions.
4 changes: 2 additions & 2 deletions sherpa/astro/datastack/plot_backend/__init__.py
@@ -1,6 +1,7 @@
from __future__ import absolute_import
#
# Copyright (C) 2015, 2016, 2019 Smithsonian Astrophysical Observatory
# Copyright (C) 2015, 2016, 2019, 2020
# Smithsonian Astrophysical Observatory
#
#
# This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -28,7 +29,6 @@

backend_map = {
'pylab': 'plot_matplotlib',
'chips': 'plot_chips',
'dummy': 'plot_dummy'
}

Expand Down
183 changes: 0 additions & 183 deletions sherpa/astro/datastack/plot_backend/plot_chips.py

This file was deleted.

21 changes: 11 additions & 10 deletions sherpa/astro/ui/tests/test_astro_ui_plot.py
@@ -1,5 +1,5 @@
#
# Copyright (C) 2019 Smithsonian Astrophysical Observatory
# Copyright (C) 2019, 2020 Smithsonian Astrophysical Observatory
#
#
# This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -34,9 +34,8 @@

from sherpa.astro import ui

# the chips plot tests mean that we can't test the plot instances
# (because of the mocking that the chips tests do)
# from sherpa.plot import DataPlot, FitPlot, ModelPlot
from sherpa.astro.plot import ARFPlot, BkgDataPlot, ModelHistogram, \
SourcePlot

from sherpa.utils.err import IdentifierErr
from sherpa.utils.testing import requires_data, requires_fits, \
Expand Down Expand Up @@ -252,12 +251,6 @@ def setup_example_bkg_model(idval):
"""


# The following tests do not check whether returned values are
# of the expected class instance, since the chips plot tests
# use a mock object and so mess-up simple "isinstance(x, ModelPlot)"
# checks.
#

@pytest.mark.usefixtures("clean_astro_ui")
@pytest.mark.parametrize("idval", [None, 1, "one", 23])
def test_get_arf_plot(idval):
Expand All @@ -270,6 +263,8 @@ def test_get_arf_plot(idval):
else:
ap = ui.get_arf_plot(idval)

assert isinstance(ap, ARFPlot)

assert ap.xlo == pytest.approx(_energies[:-1])
assert ap.xhi == pytest.approx(_energies[1:])

Expand All @@ -294,6 +289,8 @@ def test_get_bkg_plot(idval):
else:
bp = ui.get_bkg_plot(idval)

assert isinstance(bp, BkgDataPlot)

assert bp.x == pytest.approx(_data_chan)

# normalise by exposure time and bin width, but bin width here
Expand Down Expand Up @@ -376,6 +373,8 @@ def test_get_model_plot(idval):
else:
mp = ui.get_model_plot(idval)

assert isinstance(mp, ModelHistogram)

assert mp.xlo == pytest.approx(_data_chan)
assert mp.xhi == pytest.approx(_data_chan + 1)

Expand Down Expand Up @@ -462,6 +461,8 @@ def test_get_source_plot_energy(idval):
ui.set_analysis(idval, 'energy')
sp = ui.get_source_plot(idval)

assert isinstance(sp, SourcePlot)

assert sp.xlo == pytest.approx(_energies[:-1])
assert sp.xhi == pytest.approx(_energies[1:])

Expand Down
96 changes: 0 additions & 96 deletions sherpa/astro/ui/tests/test_chips_unit.py

This file was deleted.

0 comments on commit ca2eae9

Please sign in to comment.