Closed fanmingyu212 closed 6 years ago
I think a plotter exists.
@aransfor Do you possibly know where is the plotter located? Is it in common?
There's a file called plot sequence not sure how it works
@aransfor Thanks! I believe this file can only be used by a client to plot the sequence the same client added to the pulser. However, it would not work for the situation that one client (or experiment) sets up a pulse sequence, and we want to access the sequence in another client.
I will test whether the file works tomorrow and then I will add a comment about it.
I see, you should check out the get human readable function in the pulser server. I imagine you could parse and plot that assuming it the server gives you the sequence list (I think it does)
I think human readable function can only return the sequence the same client connection added. It cannot return a sequence added by a different client connection.
Please see https://github.com/CampbellGroup/common/blob/master/lib/servers/Pulser2/pulser_ok.py#L214. The output is dependent on connection c.
sequence = c.get('sequence')
I see, not sure why you would need another clients pulse sequence (this is how contexts should work) however you can just pass human readable ttl the context of the client whose pulse sequence you are interested in
I agree that we can pass context when possible. However, I think it is difficult to get the context passed when we try to plot the sequence set in an experiment. Also I did not find public methods in Pulser server that allows us to get a list of contexts.
I understand contexts allow us to save a different pulse sequence for every client/experiment. But there might be cases that we need another client to access the sequenced currently programmed in the pulser, such as debugging the pulse sequence in an experiment.
You can try but I believe once the pulse sequence is sent to the FPGA there is no way to extract that. I suppose you can have the pulser server 'remember' the last uploaded sequence and create a @setting function that returns the last programmed sequence
Okay. That is what I am trying to do here: https://github.com/CampbellGroup/common/commit/26efa2b36c086891bb4b6a3156852a7b147b7858. If you think the code here makes sense, I will make a PR about it.
If we can read the current programmed sequence in pulser, then we can plot the pulse sequence as a chart. Please see https://github.com/CampbellGroup/common/tree/mf/pulser_get_programmed_sequence?files=1 for a possible solution.