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

Test measurements for tiny objects #101

Open
jluethi opened this issue Jan 8, 2024 · 1 comment
Open

Test measurements for tiny objects #101

jluethi opened this issue Jan 8, 2024 · 1 comment

Comments

@jluethi
Copy link
Contributor

jluethi commented Jan 8, 2024

@al-mcintyre reported an issue with the 0.5.0 version of the measurement task:

When there are tiny objects, the following error can occur:

File "/data/homes/fractal/20230627_joel_fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/scmultiplex0.5.0/venv/lib/python3.10/site-packages/scmultiplex/features/feature_wrapper.py", line 198, in get_morphology_measurements
    morphology_measurements["minmajAxisRatio"] = minor_major_axis_ratio(
  File "/data/homes/fractal/20230627_joel_fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/scmultiplex0.5.0/venv/lib/python3.10/site-packages/scmultiplex/features/FeatureFunctions.py", line 123, in minor_major_axis_ratio
    return np.float('NaN')
  File "/data/homes/fractal/20230627_joel_fractal/fractal-demos/examples/server/FRACTAL_TASKS_DIR/.fractal/scmultiplex0.5.0/venv/lib/python3.10/site-packages/numpy/__init__.py", line 324, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'cfloat'?

We should:

  1. Test the measurements for tiny objects => can we reproduce the issue?
  2. Update the numpy casting to a non-deprecated version
  3. Check if there are other issues with tiny objects and whether we are getting correct measurements for them
@jluethi
Copy link
Contributor Author

jluethi commented May 28, 2024

Likely a duplicate of #104 for the float deprecation. Testing tiny objects in test would still be useful though

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

No branches or pull requests

1 participant