Skip to content

Commit

Permalink
Initial implementation of line matching (#182)
Browse files Browse the repository at this point in the history
* rename and move function to return available line catalogs.

* tweak docstring; add initial sketch for LineMatch classes

* dev notebook work; more line_matching sketch-up

* add ruff config to pyproject for faster linting

* remove check for astropy < 3.x

* add missing function to __all__ in synth_data.py

* make the spatial profile for a traced source a passed argument vs hard-coding Moffat1D. need Gaussian1D for some test cases

* codestyle cleanups

* flesh out type annotations in synth_data and edit docstrings to reflect that types/defaults are now self-documented by the code

* notebook edits

* comment out undefined method for now

* change relative to absolute imports

* remove astropy_helpers vestige; packaging cleanups; set python_requires to >= 3.10

* update tox.ini to reflect new python_requires

* update CI workflows

* flesh out more type annotations

* add support for comma-separated strings to build line catalogs

* update dev notebook to reflect some api changes in linelists

* flesh out match_lines_wcs; save notebook dev

* actually commit dev notebook

* loosen typing on match_lines_wcs, but add sanity checking by casting input as np.array which needs to happen, anyway

* add routine to find arc lines and centroid them

* fix units in match_lines_wcs

* allow fwhm to be a float and assume u.pix if so

* fix line matching tests to ignore warnings and mark use of remote data

* add wavecal_demo notebook

* fix some post-merge issues

* fix column name to match

* demo notebook updates; codestyle fixes

* remove old numpy versions from tox.ini that aren't python 3.10 compatible

* tweak up min tested scipy version

* ignore new datetime warnings in python 3.12

* remove crutches for py312; don't seem to be needed anymore

* fix typo; clarify docstring; simplify check

* codestyle fix

* code now is using features that require python >= 3.10

* add warning to line_matching.py if the matched set is empty

* fix codestyle bug; remove mark from fixture in test_line_matching

* fix name in workflow
  • Loading branch information
tepickering authored May 17, 2024
1 parent c2d1715 commit 5e4439a
Show file tree
Hide file tree
Showing 15 changed files with 1,461 additions and 411 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/tox-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ jobs:
- name: Codestyle
linux: codestyle
- name: Python 3.8 on Linux with oldest supported dependencies
linux: py38-test-alldeps-oldestdeps
- name: Python 3.10 on Linux with oldest supported dependencies
linux: py310-test-oldestdeps
toxargs: -v
- name: Python 3.9 on Windows with minimal dependencies
windows: py39-test
- name: Python 3.10 on Windows with minimal dependencies
windows: py310-test
toxargs: -v
- name: Python 3.10 on OSX with minimal dependencies
Expand Down
595 changes: 517 additions & 78 deletions notebook_sandbox/dev.ipynb

Large diffs are not rendered by default.

386 changes: 386 additions & 0 deletions notebook_sandbox/wavecal_demo.ipynb

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authors = [
license = {file = "licenses/LICENSE.rst"}
description = "Astropy coordinated package for Spectroscopic Reductions"
readme = "README.rst"
requires-python = ">=3.8"
requires-python = ">=3.10"
dependencies = [
"numpy",
"astropy",
Expand All @@ -19,6 +19,7 @@ dependencies = [
test = [
"pytest-astropy",
"photutils",
"tox",
]
docs = [
"sphinx-astropy",
Expand Down
12 changes: 6 additions & 6 deletions specreduce/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst

# Packages may add whatever they like to this file, but
# should keep this content at the top.
# ----------------------------------------------------------------------------
from ._astropy_init import * # noqa
# ----------------------------------------------------------------------------

from specreduce.core import * # noqa
from specreduce.wavelength_calibration import * # noqa


try:
from .version import version as __version__
except ImportError:
__version__ = ''
14 changes: 0 additions & 14 deletions specreduce/_astropy_init.py

This file was deleted.

Loading

0 comments on commit 5e4439a

Please sign in to comment.