Skip to content

Commit

Permalink
use spectres_numba if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
cylammarco committed Dec 14, 2022
1 parent 39382fe commit 1e9369b
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip Cython
python -m pip install flake8 pytest pytest-cov coverage psutil requests setuptools wheel
python -m pip install -r requirements.txt
python -m pip install -r requirements-dev.txt
python -m pip install -e .
- name: Lint with flake8
run: |
Expand Down
20 changes: 20 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
astropy>=4.3
astroscrappy>=1.1
ccdproc>= 2.3
coverage>=0.38.4
flake8>=5.0.4
kaleido>=0.2
numba>=0.48
numpy>=1.18
plotly>=5.6
psutil>=5.9.4
pytest>=5.3
pytest-cov>=2.8
rascal>=0.3.4
requests>=2.27
requests>=2.28.1
scipy>=1.7
setuptools>=47.1
spectres>=2.2.0
statsmodels>=0.13
wheel>=0.38.4
7 changes: 6 additions & 1 deletion src/aspired/flux_calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
from plotly import io as pio
from scipy import signal
from scipy import interpolate as itp
from spectres import spectres

try:
from spectres import spectres_numba as spectres
except ImportError as err:
print(err)
from spectres import spectres

from .spectrum1D import Spectrum1D
from .util import get_continuum
Expand Down
7 changes: 6 additions & 1 deletion src/aspired/onedspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
import numpy as np
from plotly import graph_objects as go
from plotly import io as pio
from spectres import spectres

try:
from spectres import spectres_numba as spectres
except ImportError as err:
print(err)
from spectres import spectres
from scipy import optimize
from scipy.interpolate import interp1d

Expand Down
7 changes: 6 additions & 1 deletion src/aspired/twodspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@
from scipy import ndimage
from scipy import signal
from scipy.optimize import curve_fit
from spectres import spectres

try:
from spectres import spectres_numba as spectres
except ImportError as err:
print(err)
from spectres import spectres
from statsmodels.nonparametric.smoothers_lowess import lowess

from .image_reduction import ImageReduction
Expand Down

0 comments on commit 1e9369b

Please sign in to comment.