-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
42 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
venv: | ||
python -m venv venv | ||
|
||
install: | ||
python -m pip install . | ||
|
||
dev: | ||
python -m pip install -e .[dev] | ||
|
||
test: | ||
pytest tests | ||
|
||
coverage: | ||
pytest --cov simulatedmicroscopy --cov-report html | ||
|
||
clean: | ||
rm -rf __pycache__ .pytest_cache htmlcov .coverage | ||
|
||
flake: | ||
flake8 simulatedmicroscopy tests | ||
|
||
black: | ||
black simulatedmicroscopy tests | ||
|
||
check: black flake test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
from simulatedmicroscopy.psf import GaussianPSF | ||
import pytest | ||
|
||
|
||
def test_can_create_gaussian_psf(): | ||
psf = GaussianPSF([250.,250.,600.]) | ||
psf = GaussianPSF([250.0, 250.0, 600.0]) | ||
|
||
assert psf.image.sum() > 0.0 | ||
|
||
assert psf.image.sum() > 0. | ||
|
||
def test_can_gaussian_psf_wrongpixelsize(): | ||
with pytest.raises(ValueError): | ||
GaussianPSF([250.,250.,600.], pixel_sizes=[1e-6, 1e-6, 1e-6]) | ||
GaussianPSF([250.0, 250.0, 600.0], pixel_sizes=[1e-6, 1e-6, 1e-6]) |