Code Monkey home page Code Monkey logo

prtools's People

Contributors

andykee avatar

Watchers

 avatar  avatar

prtools's Issues

BUG: medfix nanwarn doesn't do anything

Describe the issue:

Doctoring says:

nanwarn : bool, optional
        If True, a RuntimeWarning will be raised if NaNs are present
        in the output. Default is False.

The nanwarn argument is never used in the function though.

Reproduce the code example:

n/a

Error message:

No response

Runtime information:

1.0.0
1.24.4
1.10.1
3.10.12 | packaged by conda-forge | (main, Jun 23 2023, 22:41:52) [Clang 15.0.7 ]

BUG: centroid doesn't work with NaNs

Describe the issue:

centroid returns (nan, nan) when provided an input containing NaNs

Reproduce the code example:

import numpy as np
import prtools

c = np.zeros((5,5))
c[2,2] = 1
c[1,1] = np.nan
prtools.centroid(c)

Error message:

No response

Runtime information:

1.0.0
1.22.2
1.8.0
3.8.11 (default, Jul 29 2021, 14:57:32) 
[Clang 12.0.0 ]

ENH: Suppress medfix2 RuntimeWarning

Proposed new feature or change:

medfix2 throws a RuntimeWarning if there are large masked areas to repair (larger than kernel size).

The exact message is

/miniconda3/lib/python3.8/site-packages/numpy/lib/nanfunctions.py:1218: RuntimeWarning: All-NaN slice encountered
  r, k = function_base._ureduce(a, func=_nanmedian, axis=axis, out=out, 

Since the function is behaving as expected, it is safe to just suppress this message and carry on with life.

The documentation should be updated to be more explicit about the interpolation behavior in this case.

ENH: Add calcpsf function

Proposed new feature or change:

It's often useful to do a quick PSF simulation. If calcpsf is still laying around somewhere, it should be included in this library

ENH: pad should accept a center argument

Proposed new feature or change:

It would be nice to be able to specify the point about which padding is performed. This is particularly useful when trimming images down to size about a centroid.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.