Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatfield 4 broken fccd #83

Merged
merged 6 commits into from
Dec 20, 2022
Merged

Conversation

ambarb
Copy link
Contributor

@ambarb ambarb commented Sep 2, 2022

Tested this "fix" for a year or so, and have no problems. Addresses #77 as the quick fix. We are getting more and more new users.

Mark's suggestion is good, but I don't want to break anything without having tested on data for a cycle - and now we are marking metadata so the new value can be evaluated.

I will test some more after changes from code review are made.

csxtools/utils.py Outdated Show resolved Hide resolved
@ambarb
Copy link
Contributor Author

ambarb commented Dec 15, 2022

Ran tests and coverage. Warnings seem like they should be addressed with separate issue (and probably also the python modules also updated). Will make separate issue.

Looking to merge by Friday @danielballan .

========================================================= 10 passed, 3 warnings in 0.91s =========================================================
Singularity> coverage run run_tests.py 
============================================================== test session starts ===============================================================
platform linux -- Python 3.9.13, pytest-7.1.3, pluggy-1.0.0
rootdir: /nsls2/users/abarbour/Repos/csxtools, configfile: setup.cfg
plugins: anyio-3.6.1, asdf-2.13.0, hypothesis-6.56.1, arraydiff-0.3, astropy-0.10.0, astropy-header-0.1.2, cov-4.0.0, doctestplus-0.12.1, filter-subpackage-0.1.1, mock-3.9.0, openfiles-0.5.0, remotedata-0.3.3
collected 10 items                                                                                                                               

tests/test_fastccd.py ..                                                                                                                   [ 20%]
tests/test_image.py ........                                                                                                               [100%]

================================================================ warnings summary ================================================================
../../../../../srv/conda/envs/notebook/lib/python3.9/site-packages/_pytest/config/__init__.py:1253
  /srv/conda/envs/notebook/lib/python3.9/site-packages/_pytest/config/__init__.py:1253: PytestConfigWarning: Unknown config option: pep8ignore
  
    self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")

tests/test_image.py::test_images_mean
  /nsls2/users/abarbour/Repos/csxtools/tests/test_image.py:85: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.
    x = np.array([np.repeat(ii*np.ones(ii*100, dtype=np.float32), 400).reshape(

tests/test_image.py::test_images_sum
  /nsls2/users/abarbour/Repos/csxtools/tests/test_image.py:92: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.
    x = np.array([np.repeat(ii*np.ones(ii*100, dtype=np.float32), 400).reshape(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================= 10 passed, 3 warnings in 1.27s =========================================================
Singularity> coverage report -m
Name                           Stmts   Miss  Cover   Missing
------------------------------------------------------------
csxtools/fastccd/images.py        20      4    80%   43-45, 50
csxtools/fastccd/phocount.py       3      0   100%
csxtools/image/stack.py           28      0   100%
csxtools/image/transform.py        8      1    88%   30
csxtools/image_corr.py            45     45     0%   1-61
csxtools/ipynb/animation.py       48     48     0%   1-120
csxtools/ipynb/nbviewer.py        10     10     0%   1-37
csxtools/plotting.py              16     12    25%   33-49
csxtools/settings.py               3      0   100%
csxtools/utils.py                112     90    20%   60-129, 151-153, 175-176, 180-197, 202-204, 209, 213-216, 237-241, 266-275, 306-320, 331-336
------------------------------------------------------------
TOTAL                            293    210    28%

@ambarb
Copy link
Contributor Author

ambarb commented Dec 15, 2022

added @maffettone since i see maksim did this in his PR

@ambarb ambarb merged commit 3190051 into NSLS-II-CSX:master Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants