Open syim70 opened 3 weeks ago
Can you please paste the full error that you experience with #155 and nicard? The branch name should be "1d_scanner_optimize".
As you noted, I double checked the branch name "1d_scanner_optimize." Here are two cases. First, ni_scanner, with a full list of AOs in config file (as default). Second, ni_scanner, without unavailable AOs (and z axis) in config file. Thanks.
Regarding point 2)
Are you sure that you are running an unmodified scanning_probe_logic.py
file as it is in branch 1d_scanner_optimize?
Because in the ScanningProbeLogic.scanner_constraints
there is no method get_constraints
from the scanner called, only the exisiting constraints
property, as you can see from the code of the link above.
Looking at the repository at an earlier stage the get_constraints
method is called. Try using the latest version of the file.
Dear TobiasSpohn, Thank you for your note, and sorry for the confusing error report. I found I did not correctly pull the branch (I am not familiar with git). Here are the errors I encountered.
Can you poste the relevant parts (the modules mentioned here) of your config file for both cases?
Hi @syim70,
For me the first error seems like you are trying to configure input channels as outputs. Try looking into the config to see if you configure the right channels for inputs and outputs, as I don't know, whether you could use output channels (ao) as input channels (ai).
The second error also seems like you are running an outdated version of the gui or logic files. The error TypeError: 'ConfigOption' object is not iterable
occurs when a ConfigOption fails to correctly initialize as normally it should be converted to another type upon initialization, in this case it should be a Tuple
. We removed the plot_dims
ConfigOption in favor of a StatusVariable
that can be set e.g. in the GUI. So the plot_dims
variable should no longer be a ConfigOption
in the first place. Try updating the files for the entire toolchain.
The KeyError: 'x'
is just a warning that occurs on first loading of the toolchain when defaults are initialized and once you successfully load the toolchain it should no longer be present.
Hi, timoML,
I post my config file for the both cases. Thanks.
Hi @syim70,
For me the first error seems like you are trying to configure input channels as outputs. Try looking into the config to see if you configure the right channels for inputs and outputs, as I don't know, whether you could use output channels (ao) as input channels (ai).
The second error also seems like you are running an outdated version of the gui or logic files. The error
TypeError: 'ConfigOption' object is not iterable
occurs when a ConfigOption fails to correctly initialize as normally it should be converted to another type upon initialization, in this case it should be aTuple
. We removed theplot_dims
ConfigOption in favor of aStatusVariable
that can be set e.g. in the GUI. So theplot_dims
variable should no longer be aConfigOption
in the first place. Try updating the files for the entire toolchain. TheKeyError: 'x'
is just a warning that occurs on first loading of the toolchain when defaults are initialized and once you successfully load the toolchain it should no longer be present.
Hi, TobiasSpohn,
First, I was not trying to configure a something special, but just used the default config file as it is, except the dimensions as [2]. So, I don't agree with your guess that the first error might come from the confusing the input and output channels.
I am not a code developer, so I hope using a stabilized code (the latest one, but not a pre-release). I am using a qudi-core (v.1.5.1) and qudi-iqo-modules (v.0.5.1). Last time, I found my misunderstanding of git, but now I believe I correctly pulled the "1d_scanner_optimze" branch. What you mean the "outdated version" is v.0.5.1? Should I pull some relevant branches altogether?
Thank you so much for your efforts.
Hi,
For 1: In your config I don't spot any obvious errors, it seems fine. I personally use a very similar configuration. However, the error you posted above seems to me that you are trying to configure output channels where it should be input channels. Maybe your card does not support that many input or output channels? Because this error message suggests that you are trying to configure invalid channels.
Invalid analog source channels encountered. Following sources will be ignored: ao2, ao3 Valid analog input channels are: ai0, ai1, ai2, ai3, ai4, ai5, ai6, ai7, ai8, ai9, ai10, ai11, ai12, ai13, ai14, ai15
It even lists the available channels below, you will have to try changing to the correct channels.
For 2.: If you are checking out a development branch, you are no longer working with a release (e.g. v0.5.1), but the development version of qudi. The main branch should still be stable, although some minor bugs might occur, which are mostly hotfixed pretty quickly. We are currently working on merging the 1d_scanner_optimize
into main branch, however this is still a pre-release. A new release with these new features appended to, will still take some time after that.
Just from your error messages you posted above you have some error occuring:
for i_col, n_dim in enumerate(plot_dims): TypeError: 'ConfigOption' object is not iterable
.
This error occurs when a ConfigOption (the options you specify in your config file) fails to initialize.
However, with the current state of 1d_scanner_optimize
there is no ConfigOption
plot_dims
, as we removed it in favor of a graphical and cli way to change the plot_dims during runtime.
Looking at the branch in an earlier state (before we made the fixes) one can see that the ConfigOption
is present in the code. This means you have not updated your (whole) file with the latest changes of 1d_scanner_optimize
. Please make sure, especially when using a graphical program, e.g. the git utility in Pycharm, that you actually update everything from the remote branch and not keep some local changes.
Version
current main
What is affected by the bug?
I tried to use a NI scanner with two AO outputs, but config file's scanner gui option "optimizer_plot_dimensions: [2]" does not work. It seems like Qudi requires "z axis" even if there is no additional AO.
When does the bug occur?
How do we replicate the issue?
If users choose only 2D scanning, ni scanner (or optimizer) should not require more axes.
Expected behavior
Please, let me have an options in config file with 2D scanning only.
Relevant log output
No response
Additional Comments
No response
Contact Details