Closed rodolakis closed 9 months ago
This error occurs over and over since get_file_pos
is called by mda_folder_table_model.py
for the table view.
Loading fixed by commit 31dd2cf.
Now when selecting a file with no positioner, it tries to plot the default scan (1st detector vs 1st positionner) and returns:
(mdaviz) [clueless ~/bin/mdaviz] mdaviz
Settings are saved in: /home/beams/29IDUSER/.config/BCDA-APS/mdaviz.ini
Application started ...
Folder path: '/net/s29data/export/data_29idc/2023_1/Kawasaki/mda'
Selected file: ARPES_0004.mda
Could not find a positioner or detector to plot.
Ok, this is fine, but index does not show up as an option in the list:
(mdaviz) iMac:mdaviz fannysimoes$ mdaviz &
[1] 61986
(mdaviz) iMac:mdaviz fannysimoes$ Settings are saved in: /Users/fannysimoes/.config/BCDA-APS/mdaviz.ini
Application started ...
Folder path: '/Users/fannysimoes/src/mdaviz/mdaviz/data'
Folder path: '/Users/fannysimoes/src/mdaviz/mdaviz/data/test_no_positioner'
Selected file: ARPES_0002.mda
Could not find a (positioner,detector) pair to plot.
{'Y': ['D01']}
doPlot called with action: add, args: ('add', {'Y': [0]})
doPlot called with action: replace, args: ('replace', {'Y': [0]})
thought: Could/should the positioner list always start with index
?
... for n-dimensional data, an index for each dimension...
Yes that is my thought. At the moment, not having P01 checked plots with index by default, but I think a P00 line by default sounds better. We can still leave the capabilities to plot vs index when no positioner is selected.
@prjemian I want to make my P00 a scanPositioner object (from https://github.com/EPICS-synApps/utils/blob/master/mdaPythonUtils/mda.py), so it has all the attribute of the other positioner. I feel that this would be cleaner, and that way I just create it in utils.get_det and it is done. But I can't figure out how to import the scanPOsitioner class.
from mda import scanPositioner
If this fails, it may be because the mda library is not installed?
pip install https://raw.githubusercontent.com/EPICS-synApps/support/master/utils/mdaPythonUtils/mdalib-2022.post9-py2.py3-none-any.whl
(tiled) prjemian@arf:~/.../BCDA-APS/tiled-template$ python
Python 3.11.6 | packaged by conda-forge | (main, Oct 3 2023, 10:40:35) [GCC 12.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from mda import scanPositioner
>>> sp = scanPositioner()
>>> print(f"{sp=}")
sp=<mda.scanPositioner object at 0x7f306fa574d0>
>>>
from https://github.com/EPICS-synApps/utils/blob/master/mdaPythonUtils/mda.py
FYI: That repo was archived in 2022 and is now read-only. It has been replaced here: https://github.com/EPICS-synApps/support/blob/master/utils/mdaPythonUtils/mda.py
The pip install command above uses the new location.
OK I will update the env.yml with the new link.
And I was using the wrong import: mdalib
instead of mda
. Confused the name of the package with the name of the module (is a mda
a module?)
Yes
On Thu, Feb 1, 2024, 5:42 PM Fanny Rodolakis @.***> wrote:
OK I will update the env.yml with the new link.
And I was using the wrong import: mdalib instead of mda. Confused the name of the package with the name of the module (is a mda a module?)
— Reply to this email directly, view it on GitHub https://github.com/BCDA-APS/mdaviz/issues/52#issuecomment-1922493691, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARMUMCW7TMENVZPWBFHG7LYRQR67AVCNFSM6AAAAABCRXDABKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRSGQ4TGNRZGE . You are receiving this because you were mentioned.Message ID: @.***>
The line for your env.yml
file should look like this line from our tiled template:
https://github.com/BCDA-APS/tiled-template/blob/main/environment.yml#L35
Looks like it may be there already.
ok
I wasn't working without the quote with the previous link, but I remove them, we can see how that goes.