HEXRD / hexrdgui

Qt6 PySide6 based GUI for the HEXRD library.
Other
28 stars 13 forks source link

"buffer shape must match detector" when clicking on "Polar" view #1381

Closed akrygier closed 1 year ago

akrygier commented 1 year ago

I ran with --ignore-settings

Here's the error

Traceback (most recent call last): File "/Users/krygier1/miniconda3/envs/cHEX/lib/python3.10/site-packages/hexrd/ui/main_window.py", line 794, in change_image_mode self.update_all() File "/Users/krygier1/miniconda3/envs/cHEX/lib/python3.10/site-packages/hexrd/ui/main_window.py", line 900, in update_all self.ui.image_tab_widget.load_images() File "/Users/krygier1/miniconda3/envs/cHEX/lib/python3.10/site-packages/hexrd/ui/image_tab_widget.py", line 120, in load_images self.load_images_untabbed() File "/Users/krygier1/miniconda3/envs/cHEX/lib/python3.10/site-packages/hexrd/ui/image_tab_widget.py", line 100, in load_images_untabbed self.image_canvases[0].load_images( File "/Users/krygier1/miniconda3/envs/cHEX/lib/python3.10/site-packages/hexrd/ui/image_canvas.py", line 127, in load_images self.iviewer = raw_iviewer() File "/Users/krygier1/miniconda3/envs/cHEX/lib/python3.10/site-packages/hexrd/ui/calibration/raw_iviewer.py", line 8, in raw_iviewer return InstrumentViewer() File "/Users/krygier1/miniconda3/envs/cHEX/lib/python3.10/site-packages/hexrd/ui/calibration/raw_iviewer.py", line 15, in init self.instr = create_hedm_instrument() File "/Users/krygier1/miniconda3/envs/cHEX/lib/python3.10/site-packages/hexrd/ui/create_hedm_instrument.py", line 12, in create_hedm_instrument return HEDMInstrument(instrument_config=iconfig, File "/Users/krygier1/miniconda3/envs/cHEX/lib/python3.10/site-packages/hexrd/instrument.py", line 696, in init assert det_buffer.shape == shape, \ AssertionError: buffer shape must match detector Traceback (most recent call last): File "/Users/krygier1/miniconda3/envs/cHEX/lib/python3.10/site-packages/hexrd/ui/async_worker.py", line 73, in run result = self.fn(*self.args, **self.kwargs) File "/Users/krygier1/miniconda3/envs/cHEX/lib/python3.10/site-packages/hexrd/ui/calibration/polar_plot.py", line 15, in polar_viewer return InstrumentViewer() File "/Users/krygier1/miniconda3/envs/cHEX/lib/python3.10/site-packages/hexrd/ui/calibration/polar_plot.py", line 22, in init self.instr = create_hedm_instrument() File "/Users/krygier1/miniconda3/envs/cHEX/lib/python3.10/site-packages/hexrd/ui/create_hedm_instrument.py", line 12, in create_hedm_instrument return HEDMInstrument(instrument_config=iconfig, File "/Users/krygier1/miniconda3/envs/cHEX/lib/python3.10/site-packages/hexrd/instrument.py", line 696, in init assert det_buffer.shape == shape, \ AssertionError: buffer shape must match detector

saransh13 commented 1 year ago

Yeah, this error usually shows up when there is mismatch between the detector size and image size. I think a good design would be to catch the error and ignore the buffer array with a message when this happens. But for now you can go to configure panel buffer > clear panel buffer to get rid of this error.

Screen Shot 2023-04-05 at 11 47 30 AM

akrygier commented 1 year ago

Ahhh, thanks!

On Wed, Apr 5, 2023 at 11:49 AM saransh13 @.***> wrote:

Yeah, this error usually shows up when there is mismatch between the detector size and image size. I think a good design would be to catch the error and ignore the buffer array with a message when this happens. But for now you can go to configure panel buffer > clear panel buffer to get rid of this error. [image: Screen Shot 2023-04-05 at 11 47 30 AM] https://user-images.githubusercontent.com/15834451/230176353-dac8de5c-38d5-48e6-a420-8e48554fe383.png

— Reply to this email directly, view it on GitHub https://github.com/HEXRD/hexrdgui/issues/1381#issuecomment-1497963447, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOI42NFZXU6H2ESDPTDHH4DW7W5BZANCNFSM6AAAAAAWMQSU4U . You are receiving this because you authored the thread.Message ID: @.***>

--

  • Andy