Skip to content

Commit

Permalink
Use astropy>=5.3 for doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
pllim committed Nov 22, 2023
1 parent ea65b1b commit 08bb32f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/analysis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ of a spectrum. Both are demonstrated below:
>>> line_flux(noisy_gaussian, SpectralRegion(7*u.GHz, 3*u.GHz)) # doctest:+FLOAT_CMP
<Quantity 4.93784874 GHz Jy>
>>> line_flux(noisy_gaussian).to(u.erg * u.cm**-2 * u.s**-1) # doctest:+FLOAT_CMP
<Quantity 4.97826284e-14 erg / (cm2 s)>
<Quantity 4.97951087e-14 erg / (s cm2)>
These line_flux measurements also include uncertainties if the spectrum itself
has uncertainties:
Expand All @@ -102,7 +102,7 @@ has uncertainties:
>>> flux = line_flux(noisy_gaussian)
>>> flux.uncertainty.to(u.erg * u.cm**-2 * u.s**-1) # doctest:+FLOAT_CMP
<Quantity 1.42132016e-15 erg / (cm2 s)>
<Quantity 1.42132016e-15 erg / (s cm2)>
>>> line_flux(noisy_gaussian, SpectralRegion(7*u.GHz, 3*u.GHz)) # doctest:+FLOAT_CMP
<Quantity 4.93784874 GHz Jy>
Expand Down
4 changes: 2 additions & 2 deletions docs/spectral_cube.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Print the contents of 3 spectral axis points in a 3x3 spaxel array:
<BLANKLINE>
[[0.5599331 , 0.554316 , 0.5618426 ],
[0.5763055 , 0.5668046 , 0.5774939 ],
[0.59571505, 0.60118765, 0.59942234]]] 1e-17 erg / (Angstrom cm2 s spaxel)>, spectral_axis=<SpectralAxis
[0.59571505, 0.60118765, 0.59942234]]] 1e-17 erg / (Angstrom s spaxel cm2)>, spectral_axis=<SpectralAxis
(observer to target:
radial_velocity=0.0 km / s
redshift=0.0)
Expand Down Expand Up @@ -100,7 +100,7 @@ spectral regions from the cube.
<BLANKLINE>
[[0.65954393, 0.9084677 , 0.9965009 ],
[0.6255246 , 0.84401435, 0.9930112 ],
[0.59066033, 0.762025 , 0.9361185 ]]] 1e-17 erg / (Angstrom cm2 s spaxel)>, spectral_axis=<SpectralAxis
[0.59066033, 0.762025 , 0.9361185 ]]] 1e-17 erg / (Angstrom s spaxel cm2)>, spectral_axis=<SpectralAxis
(observer to target:
radial_velocity=0.0 km / s
redshift=0.0)
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ doctest_plus = enabled
doctest_norecursedirs =
*/__init__.py
doctest_subpackage_requires =
docs/analysis.rst = astropy<5.3
docs/spectral_cube.rst = astropy<5.3
docs/analysis.rst = astropy>=5.3
docs/spectral_cube.rst = astropy>=5.3
text_file_format = rst
addopts = --color=yes --doctest-rst
asdf_schema_root = specutils/io/asdf/schemas
Expand Down

0 comments on commit 08bb32f

Please sign in to comment.