Replies: 5 comments 1 reply
-
If you agree with the logic presented above, I will make some work on it. We should just discuss more thoroughly on how we want to tackle it. |
Beta Was this translation helpful? Give feedback.
-
I don't know if I like the idea of the list of available scan types to be changed when you click the actuators. It's quite easy to uncheck/check the wrong actuators when you change between them and I wouldn't like the scan options to be deleted or hidden everytime that happens. I think I like the current behavior, it just checks if the scan you ask for is compatible with your actuators and gives you a message if not. |
Beta Was this translation helpful? Give feedback.
-
I agree that automatic updates can be annoying sometimes so a pushbutton could indeed be added. However for the rest of the scan options, I do not get it. Right now, the scan options are always deleted when you change an actuator in a 2D scan for example. All the start/stop/step are reset. The way to fix that for me is to associate for each actuator a particular position array maker which is linked to it such that if you check/uncheck you still go back to the initial definition. Concerning the checkbox, I had a similar idea and I saw that there is the tristate option which could be used in that regard. However, it requires a bit of work as many interaction choices are available. It may also be a bit annoying to use when you have a large number of actuators. This is why I thought a tuple could be clearer. |
Beta Was this translation helpful? Give feedback.
-
I am a bit of the same opinion as Romain, that is I like the checkbox things as it makes it clearer (see my review on your PR #213 ) I also agree with you concerning the fact that the settings are always deleted when you change the actuators, that's because of the factory pattern that creates a new scanner everytime you change it. This should be fixed. I think one could use a kind of cache memory to keep track of the last settings that have been modified by a user and load them every time a new scanner is instantiated by the factory. Finally about the thing you are proposing about first define the positions then apply some shuffling. I think it is better to keep everything within a factory. For instance, what could be the point of randomising/back and forth... something that has been defined by the parsing scanner where you can easily specify orders, ramps... I would rather add some more scanners and allows the user to specify in the configuration file which scan/subtype and values he wants as default (which was the case in version 3 and is not working anymore at the moment) |
Beta Was this translation helpful? Give feedback.
-
I think that the current setup just does not give sufficient freedom for the user and makes the approach quite redundant as it will likely introduce repetition in the code. The factory pattern perfectly makes sense in the generation of the position array for 1 actuator but it just does not seem suited for the extension to multiple dimensions. With the full scan factory pattern:
The problem comes two-fold:
################################## With a factory associated to the generation of the position array for 1 actuator:
With a factory associated to the ordering/shuffling of the arrays:
The shuffler/ordering factory works on how we go through the index in each position array while the generator factory defines how the arrays are generated. |
Beta Was this translation helpful? Give feedback.
-
Hi all,
After using the daq_scan recently for both 1D and 2D scans, I think the selection logic should be changed.
Currently, we pick the scan type first and then select the actuators. In my opinion, we should pick the actuators and this will define the dimensions of the scan.
I just made a pull request to introduce a new parameter type inspired from the listitem of pymodaq. Instead of just selecting by clicking, I added a checkbox. This makes it clear for the user which actuator is selected for the coming scan.
According to the number N of actuators selected, the program then automatically proposes the different ND scans sub_type.
As I already discussed, I believe it is better to separate the creation of the position array to its ordering.
What I mean, is that the following logic could be applied to start up a scan:
define the position array: How do we create it?
Linear ==) start, step, end
String ==) 0,1,2
Parsed==) 0:0.1:1
Loaded ==) csv file
Some pre-shuffling?
Standard, Random, back and forth, sparsed, ...
So for a 2D scan, (actuator0, actuator1) or (actuator1, actuator0)
Beta Was this translation helpful? Give feedback.
All reactions