Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AWehrhahn committed Jan 10, 2022
1 parent 8e0dd6a commit 69fe576
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 26 deletions.
11 changes: 0 additions & 11 deletions pyreduce/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,6 @@
__version__ = get_versions()["version"]
del get_versions

import matplotlib as mpl
import matplotlib.pyplot as plt

try:
mpl.use("QT5Agg")
plt.style.use("seaborn-paper")
except:
pass
del mpl
del plt

# add logger to console
import logging

Expand Down
2 changes: 1 addition & 1 deletion pyreduce/make_shear.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def model(coef):
def model_compressed(coef):
return np.ma.compressed(model(coef))

A = np.nanpercentile(img, 95)
A = np.nanpercentile(img_compressed, 95)
sig = (xmax - xmin) / 4 # TODO
if self.curv_degree == 1:
shift = lambda curv: curv[0] * y
Expand Down
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ colorlog==6.6.0
corner==2.2.1
emcee==3.1.1
joblib==1.1.0
jsonschema==4.2.1
matplotlib==3.5.0
numpy==1.21.4
jsonschema==4.3.2
matplotlib==3.5.1
numpy==1.22.0

# optional for tools combine
# git+https://github.com/cylammarco/SpectRes
Expand All @@ -17,8 +17,8 @@ pre-commit==2.16.0
pytest==6.2.5
pytest-cov==3.0.0
python-dateutil==2.8.2
scikit-image==0.18.3
scikit-image==0.19.1
scipy==1.7.3
sphinx==4.3.1
sphinx==4.3.2
tqdm==4.62.3
wget==3.2
14 changes: 5 additions & 9 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,17 @@
from os.path import dirname, join
from shutil import rmtree

# This fixes a problem when using the remote debugger
os.environ["DISPLAY"] = "localhost:10.0"

import numpy as np
# Stop matplotlib from crashing if interactive plotting does not work
import matplotlib as mpl
import pytest
from astropy.io import fits

from pyreduce import configuration, datasets, echelle, instruments, util
mpl.use("agg")

from pyreduce import configuration, datasets, instruments
from pyreduce.reduce import (
BackgroundScatter,
Bias,
ContinuumNormalization,
Finalize,
Flat,
LaserFrequencyCombFinalize,
Mask,
NormalizeFlatField,
OrderTracing,
Expand Down

0 comments on commit 69fe576

Please sign in to comment.