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

RGB stack sometimes fails to return the data #44

Open
zemogle opened this issue Dec 16, 2024 · 0 comments · May be fixed by #45
Open

RGB stack sometimes fails to return the data #44

zemogle opened this issue Dec 16, 2024 · 0 comments · May be fixed by #45
Assignees
Labels
bug Something isn't working

Comments

@zemogle
Copy link

zemogle commented Dec 16, 2024

Sometimes an image will not appear in an RGB stack. You won't see a thumbnail and the histogram has a range of 0-6. When I had this recently I inspected the returned data for file cpt0m439-sq39-20241108-0111-e91:

The error is :

ValueError at /api/analysis/raw-data/
`bins` must increase monotonically, when an array

And the stack trace is

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/views/decorators/csrf.py", line 56, in wrapper_view
    return view_func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/django/views/generic/base.py", line 104, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/rest_framework/views.py", line 509, in dispatch
    response = self.handle_exception(exc)
  File "/usr/local/lib/python3.10/site-packages/rest_framework/views.py", line 469, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/usr/local/lib/python3.10/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
    raise exc
  File "/usr/local/lib/python3.10/site-packages/rest_framework/views.py", line 506, in dispatch
    response = handler(request, *args, **kwargs)
  File "/datalab/datalab/datalab_session/views.py", line 52, in post
    output = raw_data(input)
  File "/datalab/datalab/datalab_session/analysis/raw_data.py", line 49, in raw_data
    histogram, bin_edges = np.histogram(samples, bins=bins)
  File "/usr/local/lib/python3.10/site-packages/numpy/lib/histograms.py", line 780, in histogram
    bin_edges, uniform_bins = _get_bin_edges(a, bins, range, weights)
  File "/usr/local/lib/python3.10/site-packages/numpy/lib/histograms.py", line 431, in _get_bin_edges
    raise ValueError(
@jnation3406 jnation3406 added the bug Something isn't working label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants