Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
a40827b
Bump version to 1.6.0.dev1
vsnever Aug 30, 2024
ae9c476
Add e_field attribute to Plasma object for electric field vector.
vsnever Aug 30, 2024
0eb6cf2
Add Integrator2D base class
Mateasek Jan 13, 2025
b03a12c
Change y integration limits to functions of x
Mateasek Jan 17, 2025
9bce0fa
Add Function6D framework
Mateasek Feb 3, 2025
e65fcc3
Corrected arguments in the docstring formula
Mateasek Feb 4, 2025
68fa029
Add function6d documentation
Mateasek Feb 4, 2025
246f8ac
Add CHANGELOG record
Mateasek Feb 4, 2025
2018dd9
Merge pull request #466 from vsnever/feature/e_field
jacklovell Mar 24, 2025
c6fbe5e
Merge branch 'development' into feature/integrate2d
jacklovell Mar 24, 2025
89945ba
Merge pull request #473 from Mateasek/feature/integrate2d
jacklovell Mar 24, 2025
2bc5875
Run CI on ubuntu 22.04 runner
jacklovell Mar 24, 2025
2565997
Merge pull request #480 from cherab/cifix-ub2204
jacklovell Mar 24, 2025
0c938fe
Merge branch 'development' into feature/function6d
Mateasek Mar 25, 2025
c673241
Update docummentation
Mateasek Mar 25, 2025
9f15c4f
Replace nested forloops with itertools
Mateasek Mar 25, 2025
a70f13c
Merge pull request #478 from Mateasek/feature/function6d
jacklovell Mar 25, 2025
677456b
Modify the description about cherab-iter
munechika-koyo Apr 20, 2025
82e3014
Add read access to line and lineshape attributes
Mateasek Jun 5, 2025
7173787
Add documentation to readonly attributes
Mateasek Jun 5, 2025
58e48dd
Modify changelog
Mateasek Jun 5, 2025
7768b30
Merge branch 'patch-1' into development
munechika-koyo Aug 2, 2025
9d56e2f
Merge pull request #484 from munechika-koyo/development
jacklovell Aug 4, 2025
8b9c741
Update dependencies: upgrade Cython to 3.1 and numpy to >=2; adjust r…
munechika-koyo Oct 13, 2025
d059ed8
Update CI configuration: switch to ubuntu-latest, adjust Python and n…
munechika-koyo Oct 13, 2025
3ec32a1
Refactor: Correct spelling of 'Targetted' to 'Targeted' in bolometry …
munechika-koyo Oct 13, 2025
10d690f
Fix remaining typo `targetted` to `targeted`
munechika-koyo Oct 13, 2025
662eb04
Rename filename
munechika-koyo Oct 13, 2025
af3d5c2
Fix numpy v2 error related thing
munechika-koyo Oct 13, 2025
3d53694
Update ci.yml
munechika-koyo Oct 13, 2025
58708e0
Remove Python 3.14 from CI matrix until pyopencl support is available
munechika-koyo Oct 13, 2025
db60923
Merge branch 'development' into feature/raysect-0.9-compat
munechika-koyo Oct 13, 2025
1a63b6d
Update CHANGELOG.md for Release 1.6.0: add API changes and new features
munechika-koyo Oct 14, 2025
fde76c4
Revert "Fix remaining typo `targetted` to `targeted`"
munechika-koyo Oct 16, 2025
97a634c
Revert "Rename filename"
munechika-koyo Oct 16, 2025
60d76bf
Fix typo: change `targetted` to `targeted` in the internal code of Bo…
munechika-koyo Oct 16, 2025
ab0b0fd
Bump version to 1.6.0.dev2
munechika-koyo Oct 16, 2025
3dbad49
Fix typo: change `targetted` to `targeted` in generate_segmented_cyli…
munechika-koyo Oct 16, 2025
7d1e59a
Refactor TargettedPixelGroup to TargetedPixelGroup and add deprecatio…
munechika-koyo Oct 16, 2025
24779d5
Fix formatting issues by removing unnecessary blank lines
munechika-koyo Oct 16, 2025
1a1aaaf
Fix typo in TargetedPixelGroup class docstring
munechika-koyo Oct 16, 2025
866740b
Correct imported class `TargetedPixel` not using `TargettedPixel`
munechika-koyo Oct 16, 2025
1a640cf
Revert previous property to keep it in deprecated class
munechika-koyo Oct 16, 2025
503aa22
Restore `targetted_path_prob` property
munechika-koyo Oct 16, 2025
5182d8b
Restore `targetted_path_prob` in test
munechika-koyo Oct 16, 2025
362a6e3
Remove API changes section
munechika-koyo Oct 16, 2025
fd044a6
Update CHANGELOG.md
munechika-koyo Oct 16, 2025
21d6449
Fix typo
munechika-koyo Oct 16, 2025
7d285d1
1st commit for introducing `pixi`
munechika-koyo Oct 16, 2025
088a369
Update deprecation notice for TargettedPixelGroup to specify removal …
munechika-koyo Oct 17, 2025
f270fd6
Enhance CI workflow to include draft pull request checks
munechika-koyo Oct 17, 2025
2271d14
Update CI workflow to run tests on push events in addition to non-dra…
munechika-koyo Oct 17, 2025
9b20d37
Revert import lines in setup.py
munechika-koyo Oct 17, 2025
780364f
Update numpy version requirement to 2.0 in setup.py
munechika-koyo Oct 17, 2025
cae5114
Update numpy version requirement to 2.0 in requirements.txt
munechika-koyo Oct 17, 2025
8d48d54
Add deprecation warnings for `targetted_path_prob` property in Bolome…
munechika-koyo Oct 27, 2025
63b9a8c
Chage docstrings - reference existing parameters
Mateasek Oct 29, 2025
45cce62
Add Line class tests
Mateasek Oct 29, 2025
8edb747
Add plasma model tests
Mateasek Oct 29, 2025
9d9a160
Add forgotten __init__.py files
Mateasek Oct 29, 2025
a277d02
Add typing to the properties
Mateasek Oct 29, 2025
b24018f
Add hooks to avoid file reading
Mateasek Nov 2, 2025
c3b9360
Improve naming
Mateasek Nov 2, 2025
5810951
Re-enable Python 3.14 in CI workflow matrix
munechika-koyo Nov 3, 2025
36fde32
Merge pull request #483 from Mateasek/feature/model_attr_access
jacklovell Nov 3, 2025
cebc1cf
Merge pull request #486 from munechika-koyo/feature/raysect-0.9-compat
Mateasek Nov 13, 2025
750e02b
Merge branch 'development' into feature/API-change-targetedpixel
munechika-koyo Nov 13, 2025
dbf61a2
Merge branch 'development' into feature/pixi
munechika-koyo Nov 13, 2025
b548957
Update TMC and developer list
Mateasek Nov 13, 2025
cab1c43
Use the full and correct affiliation
Mateasek Nov 13, 2025
3709a83
Merge pull request #493 from cherab/update/tmc_members
jacklovell Nov 14, 2025
bbc1ed7
Merge pull request #490 from munechika-koyo/feature/improve-CI
Mateasek Nov 26, 2025
f0a38db
Add TargetedPixelGroup class to observers documentation
munechika-koyo Nov 27, 2025
0c98d56
Merge pull request #487 from munechika-koyo/feature/API-change-target…
Mateasek Nov 27, 2025
f2ee0d3
Update raysect dependency version to 0.9.1.*
munechika-koyo Nov 28, 2025
6f9dddd
Revert "Update raysect dependency version to 0.9.1.*"
munechika-koyo Nov 28, 2025
01dc361
Fix ADF15 parser and refine regex patterns (#497)
munechika-koyo May 28, 2026
4adb0aa
🗑️ Remove __init__.py to comply with PEP 420 (#500)
munechika-koyo Jun 5, 2026
e7f6415
Update documentation for cherab-iter and cherab-imas packages (#501)
munechika-koyo Jun 15, 2026
cf03ee7
Refactor function signatures and improve docstring clarity across mul…
munechika-koyo Jun 15, 2026
c2cfe4c
Add unit tests for ZeemanStructure initialization and method behavior
munechika-koyo Jul 7, 2026
15ae09b
Fix namespace package detection in setup.py (#504)
jacklovell Jul 7, 2026
ca96be3
Merge pull request #502 from munechika-koyo/fix/dosctrings-comments
jacklovell Jul 14, 2026
c145a4d
Update Python version range in pixi.toml
munechika-koyo Jul 15, 2026
8c8a189
Add HTML file removal to build artifacts cleanup
munechika-koyo Jul 15, 2026
053cf8c
Update Python version features in pixi.toml
munechika-koyo Jul 15, 2026
f90feae
Update channels and remove sphinx-tabs dependency
munechika-koyo Jul 15, 2026
1db12a2
Fix import statement for netcdf_file in calcam.py
munechika-koyo Jul 28, 2026
59d78ee
Merge branch 'development' into fix/calcam
munechika-koyo Jul 28, 2026
6a73f81
Update CHANGELOG.md to include bug fix for netcdf_file import stateme…
munechika-koyo Jul 29, 2026
c7fa05e
Merge pull request #510 from munechika-koyo/fix/calcam
Mateasek Jul 29, 2026
a684e5a
Make constants in cherab.core.utility.constants accessible to Python
jacklovell Jul 29, 2026
2c7a7fe
Merge pull request #511 from cherab/feature/py-constants
Mateasek Jul 30, 2026
76a6d12
Reorder parameters of Function6D to x,y,z,u,v,w (#513)
Mateasek Aug 3, 2026
4516062
Feature/generic dist (#494)
Mateasek Aug 3, 2026
150a8ec
Add GaussianQuadrature2D (#476)
Mateasek Aug 18, 2026
fcdeaf7
Improve regularisation documentation and add ADMT demo (#427)
jacklovell Aug 20, 2026
31aca80
Refactor pixi.toml: reorganize build configuration and clean up commands
munechika-koyo Aug 24, 2026
36763a0
Add doc-serve task to start a local server for documentation
munechika-koyo Aug 24, 2026
e687161
Replace taplo with tombi for TOML formatting in lint tasks
munechika-koyo Aug 24, 2026
b8d5f28
Add Pixi developer guide with environment and task documentation
munechika-koyo Aug 24, 2026
536705b
Merge branch 'development' into feature/pixi
munechika-koyo Aug 24, 2026
e69f53c
Fix links in Pixi developer guide and remove top header's emoji
munechika-koyo Aug 24, 2026
3890c0e
Add myst-parser dependency for documentation generation
munechika-koyo Aug 24, 2026
c596630
Add myst_parser extension and update documentation structure for deve…
munechika-koyo Aug 24, 2026
05ca189
Update link to Python version features in Pixi developer guide
munechika-koyo Aug 24, 2026
5f63cec
Add pixi feature into changelog
munechika-koyo Aug 24, 2026
bff0e59
Fix import order and improve code consistency in utility.py (#514)
munechika-koyo Aug 24, 2026
0c5fbed
Add TODO comment about sphinx_rtd_theme version constraint
munechika-koyo Aug 25, 2026
9aee81b
Format python version constraints in pixi.toml for better readability
munechika-koyo Aug 25, 2026
f7a7b26
Merge pull request #489 from munechika-koyo/feature/pixi
Mateasek Aug 29, 2026
6694e48
Add an action to build distributions on tagged releases (#518)
jacklovell Sep 8, 2026
5e2c111
Bump version to 1.6.0rc1
jacklovell Sep 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SCM syntax highlighting & preventing 3-way merges
pixi.lock merge=binary linguist-language=YAML linguist-generated=true
115 changes: 115 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: Build wheels

# We don't want to spend CI compute cycles on every commit, so restrict building
# of wheels to published releases. This includes stable and beta/RC releases.
on:
release:
types:
- published

jobs:
# Build a wheel for each Python version in a separate parallel job.
build_wheels:
name: Build wheels for ${{ matrix.python }} on ${{ matrix.target.name }}
runs-on: ${{ matrix.target.runner }}
strategy:
matrix:
python: [cp39, cp310, cp311, cp312, cp313, cp314]
target:
- name: Linux (x86-64)
runner: ubuntu-latest
platform: manylinux_x86_64
arch: x86_64

# TODO: add other platforms once Raysect provides wheels on them.
# - name: Linux (ARM)
# runner: ubuntu-24.04-arm
# platform: manylinux_aarch64
# arch: aarch64

# - name: macOS (Apple Silicon)
# runner: macos-latest
# platform: macosx_arm64
# arch: arm64

# - name: macOS (Intel)
# runner: macos-15-intel
# platform: macosx_x86_64
# arch: x86_64

# - name: Windows
# runner: windows-2022
# platform: win_amd64
# arch: AMD64

steps:
- uses: actions/checkout@v7
with:
persist-credentials: false

- name: Determine manylinux image
if: ${{ contains(matrix.target.name, 'Linux') }}
# Build on manylinux2014 where possible for greatest compatibility,
# but need newer manylinux_2_28 for Python >=3.14.
# TODO: use cp314|cp315 if we provide Python 3.15 wheels before dropping
# manylinux2014 (RHEL7) support.
# TODO: remove this step entirely once we drop manylinux2014 support.
run: |
case ${{ matrix.python }} in
cp314)
echo "CIBW_MANYLINUX_X86_64_IMAGE=manylinux_2_28" >> "$GITHUB_ENV"
;;
*)
echo "CIBW_MANYLINUX_X86_64_IMAGE=manylinux2014" >> "$GITHUB_ENV"
;;
esac

- name: Build wheels
uses: pypa/cibuildwheel@v4.2.0
env:
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.target.platform }}
CIBW_ARCH: ${{ matrix.target.arch }}
# Avoid trying to compile e.g. Pillow (raysect->matplotlib dependency) from
# source on older manylinux with newer Python. An old version is fine.
CIBW_ENVIRONMENT: 'PIP_PREFER_BINARY=1'

- uses: actions/upload-artifact@v4
with:
name: dist-wheel-${{ matrix.target.platform }}-${{ matrix.python }}
path: ./wheelhouse/*.whl

make_sdist:
name: Make SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false

- name: Build sdist
run: pipx run build --sdist

- uses: actions/upload-artifact@v4
with:
name: dist-sdist
path: dist/*.tar.gz

# Wheels are built in parallel jobs: gather the outputs into a single artifact
# for more convenient retrieval. At some stage we may consider automatic
# upload to PyPI from this job (since its `needs` entry ensures the SDist and
# wheels all built successfully).
gather_artifacts:
name: Gather SDist and wheel outputs into a single artifact
runs-on: ubuntu-latest
needs: [build_wheels, make_sdist]
steps:
- uses: actions/download-artifact@v5
with:
pattern: dist-*
path: dist
merge-multiple: true

- uses: actions/upload-artifact@v4
with:
name: artifacts
path: dist/*
13 changes: 9 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@ name: CI
on:
push:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review

jobs:
tests:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
name: Run tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
numpy-version: ["oldest-supported-numpy", "'numpy<2'"]
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -23,9 +28,9 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: python -m pip install --prefer-binary cython~=3.0 ${{ matrix.numpy-version }} scipy matplotlib "pyopencl[pocl]>=2022.2.4"
run: python -m pip install --prefer-binary setuptools cython~=3.1 numpy>=2 scipy matplotlib "pyopencl[pocl]>=2022.2.4"
- name: Install Raysect from pypi
run: pip install raysect==0.8.1.*
run: pip install raysect==0.9.*
- name: Build cherab
run: dev/build.sh
- name: Run tests
Expand Down
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,11 @@ build/
.nfs*
.coverage
htmlcov*
cherab.egg-info/
cherab.egg-info/

# pixi environments
.pixi/*
!.pixi/config.toml

# Ignore lock files until we start using them
pixi.lock
34 changes: 32 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@
Project Changelog
=================

Release 1.6.0 (Sep 2026)
-------------------

API changes:
* Rename `GaussianQuadrature` to `GaussianQuadrature1D` to conform to Cherab's naming convention. Original name kept as an alias for backwards compatibility until the next minor release. (#475)
* Rename `TargettedPixelGroup` to `TargetedPixelGroup` for correct spelling. Still keep `TargettedPixelGroup` as an alias for backwards compatibility until the next major release. (#487)
* Add emission model attribute access to line and lineshape . (#294)
* The `generate_derivative_operators` function in `admt_utils` can now return sparse matrices rather than dense if requested. (#427)
* Only 1 of the 1D-to-2D or 2D-to-1D voxel mappings is now required for `admt_utils.generate_derivative_operators`: if the other is missing it is computed automatically. (#427)
* The `calculate_admt` function in `admt_utils` will return a sparse matrix if the input derivative operators are themselves sparse. (#427)

Bug fixes:
* Fix the import statement for `netcdf_file` in `calcam.py` for compatibility with the upcoming `scipy` v2.0.0. (#510)

New:
* Add an optional Pixi workspace for package builds and isolated development environments, with tasks for testing, documentation, formatting, and static analysis, and include the corresponding developer guide in the Sphinx documentation. (#489)
* Add GaussianQuadrature2D integrator. (#475)
* Support Raysect 0.9. (#486)
* Test against Python 3.9, 3.10, 3.11, 3.12, 3.13 and latest released Numpy. Drop Python 3.7, 3.8 and older Numpy from tests. (#486)
* Add generic distribution function. (#481)
* Add Function6D framework. (#478)
* Add e_field attribute to Plasma object for electric field vector. (#465)
* Add Integrator2D base class for integration of two-dimensional functions. (#472)
* Support Raysect 0.9. (#486)
* Make values in `cherab.core.utility.constants` accessible to Python. (#509)
* Generomak now contains an example bolometer diagnostic. (#427)
* The regularisation utilities in `admt_utils` are now in the HTML documention. (#427)
* A new non-negative least squares inversion using sparse matrices, to complement the existing dense version. (#427)
* A demo performing bolometry inversions using both isotropic and anisotropic regularisation. (#427)

Release 1.5.0 (27 Aug 2024)
-------------------

Expand Down Expand Up @@ -126,7 +156,7 @@ API changes:

New:
* Merged cherab-openadas package into the core cherab package to simplify installation.
* Beam object uses a cone primitive instead of a cylinder for the bounding volume of divergent beams.
* Beam object uses a cone primitive instead of a cylinder for the bounding volume of divergent beams.
* Added Clamp functions.
* Added ThermalCXRate.
* Added optimised ray transfer grid calculation tools.
Expand Down Expand Up @@ -154,7 +184,7 @@ New:

Bug fixes:
* Improved handling on non c-order arrays in various methods.
* Numerous minor bug fixes (see commit history)
* Numerous minor bug fixes (see commit history)


Release 1.0.1 (1 Oct 2018)
Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,19 @@ of code / physics algorithm quality standards.
TMC Members
-----------

- Jack Lovell (Oak Ridge National Laboratory, USA)
- Matej Tomes (Institute of Plasma Physics of the Czech Academy of Sciences, Czechia)
- Koyo Munechika (ITER Organisation)
- Jakub Svoboda (Institute of Plasma Physics of the Czech Academy of Sciences, Czechia)


Former TMC Members
-----------

- Alys Brett (chairwoman, master account holder, responsible for delegation, UKAEA, UK)
- Matt Carr (External consultant, diagnostic physics models)
- Jack Lovell (Oak Ridge, USA)
- Alex Meakins (External consultant, Architecture, software integrity)
- Vlad Neverov (NRC Kurchatov Institute, Moscow)
- Matej Tomes (Compass, IPP, Prague)


Citing The Code
Expand Down
2 changes: 1 addition & 1 deletion cherab/core/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.0
1.6.0rc1
2 changes: 1 addition & 1 deletion cherab/core/atomic/gaunt.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ from cherab.core.math cimport Function2D

cdef class FreeFreeGauntFactor():

cpdef double evaluate(self, double z, double temperature, double wavelength) except? -1e999
cdef double evaluate(self, double z, double temperature, double wavelength) except? -1e999


cdef class InterpolatedFreeFreeGauntFactor(FreeFreeGauntFactor):
Expand Down
10 changes: 5 additions & 5 deletions cherab/core/atomic/gaunt.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ cdef class FreeFreeGauntFactor():
The base class for temperature-averaged free-free Gaunt factors.
"""

cpdef double evaluate(self, double z, double temperature, double wavelength) except? -1e999:
cdef double evaluate(self, double z, double temperature, double wavelength) except? -1e999:
"""
Returns the temperature-averaged free-free Gaunt factor for the supplied parameters.
Return the temperature-averaged free-free Gaunt factor for the supplied parameters.

:param double z: Species charge or effective plasma charge.
:param double temperature: Electron temperature in eV.
Expand All @@ -51,7 +51,7 @@ cdef class FreeFreeGauntFactor():

def __call__(self, double z, double temperature, double wavelength):
"""
Returns the temperature-averaged free-free Gaunt factor for the supplied parameters.
Return the temperature-averaged free-free Gaunt factor for the supplied parameters.

:param double z: Species charge or effective plasma charge.
:param double temperature: Electron temperature in eV.
Expand Down Expand Up @@ -106,9 +106,9 @@ cdef class InterpolatedFreeFreeGauntFactor(FreeFreeGauntFactor):
self._gaunt_factor = Interpolator2DArray(np.log10(u), np.log10(gamma2), gaunt_factor, 'cubic', 'none', 0, 0)

@cython.cdivision(True)
cpdef double evaluate(self, double z, double temperature, double wavelength) except? -1e999:
cdef double evaluate(self, double z, double temperature, double wavelength) except? -1e999:
"""
Returns the temperature-averaged free-free Gaunt factor for the supplied parameters.
Return the temperature-averaged free-free Gaunt factor for the supplied parameters.

:param double z: Species charge or effective plasma charge.
:param double temperature: Electron temperature in eV.
Expand Down
4 changes: 4 additions & 0 deletions cherab/core/atomic/line.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ cdef class Line:
specify the n-levels with integers (e.g. (3,2)). For all other ions the full spectroscopic
configuration string should be specified for both states. It is up to the atomic data
provider package to define the exact notation.

:ivar Element element: See parameter 'element'.
:ivar int charge: See parameter 'charge'.
:ivar tuple transition: See parameter 'transition'.

.. code-block:: pycon

Expand Down
Empty file.
27 changes: 27 additions & 0 deletions cherab/core/atomic/tests/test_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import unittest

from cherab.core.atomic import Line, deuterium


class TestLine(unittest.TestCase):

def test_initialisation(self):
line = Line(deuterium, 0, (3, 2))
self.assertEqual(line.element, deuterium)
self.assertEqual(line.charge, 0)
self.assertEqual(line.transition, (3, 2))

# test invalid charge
with self.assertRaises(ValueError):
Line(deuterium, 2, (3, 2))
with self.assertRaises(ValueError):
Line(deuterium, -1, (3, 2))

def test_properties(self):
element = deuterium
charge = 0
transition = (3, 2)
line = Line(element, charge, transition)
self.assertEqual(line.element, element)
self.assertEqual(line.charge, charge)
self.assertEqual(line.transition, transition)
Loading
Loading