Skip to content

Commit

Permalink
remove usage of metrics_logger
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett committed Sep 9, 2024
1 parent 5bd36ee commit 722685e
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 24 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ test = [
"pytest-doctestplus >=0.10.0",
"pytest-cov >=2.9.0",
"flake8 >=3.6.0",
"metrics_logger >= 0.1.0",
]

[project.urls]
Expand Down
3 changes: 0 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,3 @@ scipy>=0.0.dev0
# Roman upstream packages
git+https://github.com/spacetelescope/roman_datamodels
git+https://github.com/spacetelescope/rad

# Testing upstream packages
git+https://github.com/spacetelescope/metrics_logger
2 changes: 0 additions & 2 deletions romanisim/tests/test_bandpass.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import os
import pytest
import asdf
from metrics_logger.decorators import metrics_logger
import numpy as np
from romanisim import bandpass
from astropy import constants
Expand Down Expand Up @@ -81,7 +80,6 @@ def test_get_abflux(filter, value):
assert np.isclose(bandpass.get_abflux(filter), value, rtol=1.0e-1)


@metrics_logger("DMS233")
@pytest.mark.soctests
def test_convert_flux_to_counts():
# Define dirac delta wavelength
Expand Down
2 changes: 0 additions & 2 deletions romanisim/tests/test_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import os
import numpy as np
from metrics_logger.decorators import metrics_logger
import galsim
from romanisim import catalog
from astropy.coordinates import SkyCoord
Expand Down Expand Up @@ -36,7 +35,6 @@ def test_make_dummy_catalog():
assert not cat[0].profile.spectral


@metrics_logger("DMS217")
def test_table_catalog(tmp_path):
"""Test generation of sources with different magnitudes and sizes
Demonstrates DMS217: generate parametric distributions
Expand Down
7 changes: 0 additions & 7 deletions romanisim/tests/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import webbpsf
from astropy.modeling.functional_models import Sersic2D
import pytest
from metrics_logger.decorators import metrics_logger
from romanisim import log
from roman_datamodels.stnode import WfiScienceRaw, WfiImage
from roman_datamodels import datamodels
Expand Down Expand Up @@ -161,7 +160,6 @@ def central_stamp(im, sz):
center - szo2: center + szo2 + 1]


@metrics_logger("DMS214", "DMS215")
@pytest.mark.soctests
def test_image_rendering():
"""Tests for image rendering routines. This is demonstrates:
Expand Down Expand Up @@ -277,7 +275,6 @@ def test_image_rendering():
# Poisson errors and containing 100k counts.


@metrics_logger("DMS218")
def test_add_objects():
"""Test adding objects to images.
Demonstrates profile sensitivity to distortion component of DMS218.
Expand Down Expand Up @@ -322,7 +319,6 @@ def test_add_objects():
# the actual ratio was 42.


@metrics_logger("DMS230")
def test_simulate_counts_generic():
"""Test adding poisson noise to images.
Demonstrates DMS230: poisson noise
Expand Down Expand Up @@ -447,7 +443,6 @@ def test_simulate_counts():
assert np.all(m)


@metrics_logger("DMS216", "DMS218", "DMS221", "DMS224")
@pytest.mark.soctests
def test_simulate():
"""Test convolved image generation and L2 simulation framework.
Expand Down Expand Up @@ -632,7 +627,6 @@ def test_reference_file_crds_match(level):
assert (type(im) is WfiImage)


@metrics_logger("DMS231")
@pytest.mark.soctests
def test_inject_source_into_image():
"""Inject a source into an image.
Expand Down Expand Up @@ -690,7 +684,6 @@ def test_inject_source_into_image():
af.write_to(os.path.join(artifactdir, 'dms231.asdf'))


@metrics_logger("DMS228")
@pytest.mark.soctests
def test_image_input(tmpdir):
# make some simple example images
Expand Down
6 changes: 0 additions & 6 deletions romanisim/tests/test_l1.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"""

import pytest
from metrics_logger.decorators import metrics_logger
import numpy as np
from romanisim import l1, log, parameters, nonlinearity
import galsim
Expand Down Expand Up @@ -58,7 +57,6 @@ def test_tij_to_pij():
pij, np.diff(np.concatenate(tij), prepend=0) / tij[-1][-1])


@metrics_logger("DMS220", "DMS229", "DMS223")
@pytest.mark.soctests
def test_apportion_counts_to_resultants():
"""Test that we can apportion counts to resultants and appropriately add
Expand Down Expand Up @@ -131,7 +129,6 @@ def test_apportion_counts_to_resultants():
af.write_to(os.path.join(artifactdir, 'dms223.asdf'))


@metrics_logger("DMS222")
@pytest.mark.soctests
def test_linearized_counts_to_resultants():
"""Test that we can apportion linearized counts to resultants.
Expand Down Expand Up @@ -183,7 +180,6 @@ def test_linearized_counts_to_resultants():
af.write_to(os.path.join(artifactdir, 'dms222.asdf'))


@metrics_logger("DMS225")
@pytest.mark.soctests
def test_inject_source_into_ramp():
"""Inject a source into a ramp.
Expand Down Expand Up @@ -223,7 +219,6 @@ def test_inject_source_into_ramp():
af.write_to(os.path.join(artifactdir, 'dms225.asdf'))


@metrics_logger("DMS226")
@pytest.mark.soctests
def test_ipc():
"""Convolve an image with an IPC kernel.
Expand All @@ -250,7 +245,6 @@ def test_read_pattern_to_tij():
assert l1.validate_times(tij)


@metrics_logger("DMS227")
@pytest.mark.soctests
def test_make_l1_and_asdf(tmp_path):
"""Make an L1 file and save it appropriately.
Expand Down
3 changes: 0 additions & 3 deletions romanisim/tests/test_l3.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@
from astropy import table
import asdf
import pytest
from metrics_logger.decorators import metrics_logger
import roman_datamodels.maker_utils as maker_utils
import romanisim.bandpass
from galsim import roman
from astropy.coordinates import SkyCoord


@metrics_logger("DMS232")
@pytest.mark.soctests
def test_inject_sources_into_mosaic():
"""Inject sources into a mosaic.
Expand Down Expand Up @@ -145,7 +143,6 @@ def test_inject_sources_into_mosaic():
af.write_to(os.path.join(artifactdir, 'dms232.asdf'))


@metrics_logger("DMS219")
@pytest.mark.soctests
def test_sim_mosaic():
"""Generating mosaic from catalog file.
Expand Down

0 comments on commit 722685e

Please sign in to comment.