Coder Social home page Coder Social logo

servers's Introduction

labrad

Repository for LabRAD tutorials and resources sharing.

Contributing

For instructions on how to contribute to labrad, see contributing.md.

servers's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

servers's Issues

Qubit Server Documentation

Every time I go back to the qubit server I have to re-remember its class structure. In addition to the auto-generated JavaDoc, it needs an intro/readme/whatever.

Many servers have broken units

Branch created units_fix_servers to fix these problems in. Currently I have tested/fixed the following servers:

gpib_bus
gpib_device_manager
lakeshore370 (ruox)
lakeshore218 (diodes)
mks_gauge_server

Datavault undefined local variable

When trying to cd to an as-yet non-existing directory:

exceptions.UnboundLocalError: local variable 'create' referenced before assignment

What is a DacRunner and why do I need one?

I thought we were almost there with the jump table stuff, and then I realized I have no idea how run_sequence actually works. So now I'm wondering how much of the DacRunner stuff is going to need to be changed for the JT. Are there any gotchas here I should be aware of? (For DacRunners or run_sequence as a whole or anything else.)

Time out setup state in GHz FPGA server

Currently, the GHZ FPGA server keeps track of a hardware state, and decides whether to run the setup packets based on whether the current scan is using the same settings as the previous ones. This avoids resending packets to slow devices such as the GPIB bus on every sequence. However, it has no way to tell if I manually change the settings from the front panel of a signal generator.

What it should do is time-out that state after (say) 60 seconds idle. Thus, as long as a scan is running, the hardware configuration is changed only when necessary. We assume that users are not changing the GPIB devices during a scan. However, if the system is idle, we assume someone might have made manual changes and we reprogram the hardware before starting up again. Since this will happen at most 1/minute, it will have negligible impact on performance.

Assigning @DanielSank because he is familiar with the GHZ FPGA server, but this would be a good small project for an FPGA server padawan to get familiar with that rather complicated piece of code.

Qubit sequencer should support receiving DAC'ified data.

Currently the only way to give pre-deconvolved data to the qubit sequencer is if you give it time domain data. If we're going to do deconvolutions in pyle, it should support receiving deconvolved frequency domain data as well.

Qubit Server Refactoring--memory commands and jump table commands

Most commands issued to the qubit sequencer are issued to a particular channel. The memory commands, however, are a bit different because they are handled inside FpgaModelDac, but sometimes issued to a particular channel (which forwards the command to its FpgaModelDac instance), and sometimes issued to the whole experiment (which sends a command to each FpgaModelDac).

The jump table commands, on the other hand, are specific to a channel, with the one exception that for analog boards, the two channels must have identical jump tables. FpgaModelDac has two subclasses, FpgaModelMicrowave and FpgaModelAnalog.

Since we want to support both old and new boards, I'm trying to figure out the best way of refactoring the FpgaModel structure.

Current ideas are:

  1. We have FpgaMicrowaveMemory, FpgaMicrowaveJumpTable, FpgaAnalogMemory, FpgaAnalogJumpTable, which I don't like because however we do the inheritance we'll be duplicating either the memory/JT handling code or the microwave/analog code.
  2. Mixins seem like they might be the solution, but Java doesn't do mixins.
  3. Instead we just use object composition, i.e. give the FpgaModelDac base class a "Controller" object that would be either MemoryController or JumpTableController and put the relevant functions in there.

I think the problem is that (1) memory<->jump table is not a one-for-one mapping because generally the memory sequences are the same for all the boards, but not necessarily for the jump tables (but maybe they should be) and (2) I'm probably overthinking this.

Basically I was hoping @maffoo would state the obvious answer I'm missing.

GHz_fpga_server times out


2015-03-18 16:38:10-0700 [ServerProtocol,client] GHz FPGAs now serving
2015-03-18 16:54:32-0700 [ServerProtocol,client] Traceback (most recent call las
t):
2015-03-18 16:54:32-0700 [ServerProtocol,client] Failure: labrad.types.Error: (0
) Operation timed out [payload=None]
2015-03-18 16:54:32-0700 [ServerProtocol,client] RECOVERING FROM TIMEOUT
2015-03-18 16:54:33-0700 [ServerProtocol,client] 'executionCounter'

Leaves buffered packets in direct ethernet server

HTTP stuff

@joshmutus -- what's the status of the http stuff? It doesn't have to be completed but it would be good to consolidate it down to one branch.

Compressor Server Temperatures - Incorrect Ordering and/or Temperatures

The cp2800_compressor server is outputting temperatures which are either incorrect or in the wrong order for Ivan.

In particular, according to the server documentation (at it appears code), the order should be:
[(Water in CURRENT, Water in MAX, Water in MIN), (Water out CURRENT, Water out MAX, Water out MIN), (Helium CURRENT, Helium MAX, Helium MIN), (Oil CURRENT, Oil MAX, Oil MIN)]. However, the current readings (according to the front of the compressor) seem to be given by the middle of each triplet (i.e., the one that is supposed to be MAX).

Further, there is no permutation of (CURRENT, MIN, MAX) such that MIN<=CURRENT<=MAX for all four temps. For example,

In [12]: cp.temperatures()
Out[12]: [(Value(303.64999999999998, 'K'), Value(290.64999999999998, 'K'), Value
(285.34999999999997, 'K')), (Value(293.44999999999999, 'K'), Value(298.949999999
99999, 'K'), Value(289.04999999999995, 'K')), (Value(302.64999999999998, 'K'), V
alue(342.75, 'K'), Value(291.54999999999995, 'K')), (Value(344.75, 'K'), Value(3
00.64999999999998, 'K'), Value(292.34999999999997, 'K'))]

Note that the temperatures from the front of the compressor are (translated to K) [291K,299K,343K,301K]. Hence, I'm guessing that the MIN and MAX temperatures are garbage.

Note: ADR/compressor_server.py is same as in branch f4bba31. However, the actual (apparently uncommitted) branch of Vince is d8b2c28.

FPGA timeout from dac calibration server

At some point in the qubit stack of code a request is made to the dac calibration server to calculation corrections for the dac waveforms. If this calculation takes too long the ghz_fpga_server seems to go through a catastrophic timeout which lags running code and prevents the dac boards from successfully being brought up until they are power cycled.

Session level pipelining for qubit sequencer

Right now, we allow sequences from multiple scans to be interleved via the same system we use for pipelining requests from a single scan.

This is really flexible, but somewhat inefficient, as the fastbias and anritsus must be programmed every time we switch between scans. So I propose adding a more coarse grained exclusion mechanism in the qubit server. The idea is that each scan would request a 'sequence group ID' token. The qubit sequencer would then run only sequences from that group until it completes, or for up to a set period of time on the order of a couple of minutes. Then the next scan would run for a couple of minutes, and so forth.

The upshot of this would be that short scans (rabihigh) will just run in order with no interleaving. However, a running long scan can be preempted by a short scan, which will run to completion and then resume the long scan. Long scans will be interleved, but on longer intervals to avoid the overhead of switching the hardware configuration.

This could be enhanced by adding priority hints like "low priority / long scan", or "high priority / short scan" or "uninterruptable scan" (for things like the ramsey oscilloscope that need precise timing", but I think the initial implementation can make some reasonable defaults and have it 'just work'

What do people think? Any suggestions?

Sequence time for jump table boards

In the FPGA server, there are calls to the figure out the sequence time from the memory sequence. This no longer applies for the jump table boards. I think the sequence time is needed for figuring out what the timeout should be (?). For the JT boards we can't know the sequence time even in principle (I guess the JT's aren't Turing complete but we've got a halting problem nonetheless).

Thoughts on this?

HTTP Server should pull data from the datavault

Right now it goes looking for individual servers, and if different DRs use different servers (which is probably an issue in and of itself?) then it crashes.

Also it could probably in general use an overhaul.

Cryo notifier should have grace period

Right now, the cryo notifier will send an alert if one of the thermometry servers is restarted or otherwise unavailable, or in the case of the lakeshore ruox, if it hasn't yet received valid data for one of the channels. This leads to lots of false positives. Instead, when it detects an error condition on one of the channels it should start a timer. If the condition remains out of spec for a continuous 60 seconds, only then should it trigger an alert.

Refactor the jeebus out of the qubit sequencer

There's a fair amount of cruft in there as it is, and many of the additions I made over the past couple years probably appear somewhat haphazard to the casual observer. After the jump table stuff is complete the qubit sequencer should be refactored.

Consolidate oscilloscope servers

There are as many oscilloscope servers as there are oscilloscope models, which is ridiculous. There should be a common interface provided by single serve which produces the appropriate command strings for each model of scope.

Serial server not able to talk to MKS gauges on Vince

At some point on Thursday, MKS gauge server lost contact with the hardware. @JulianSKelly might know more about when/how this happened.

In debugging, we tried writing and reading via the NI MAX software, which worked and gave us the correct pressures. We were also successful using pyvisa. However, we couldn't seem to communicate with the gauges using pyserial. Does anyone know how pyserial and pyvisa interact with the gauges differently?

Set up build system for qubit sequencer

Right now, the qubit sequencer source lives here, and we also package up the server as an executable jar and commit the built jar to the repo as well. We should have a real build system that can build this in a reproducible way. I suggest we use sbt for this.

Lakeshore Upgrade?

When filling cryogens it would be nice if we could toggle the lakeshore to read out more rapidly on the mix plate ruox and not on the other channels so we can watch the rise times of things on shorter time scales.

Can't run ghz_fpga_server

When Charles and I tried to run ghz_fpga_server from a command line (master branch), it won't start. In particular, I get the following message:

U:\Jim\Code\servers\GHzDACs>ghz_fpga_server.py
Traceback (most recent call last):
  File "U:\Jim\Code\servers\GHzDACs\ghz_fpga_server.py", line 222, in <module>
    import servers.GHzDACs.Cleanup.dac as dac
ImportError: No module named servers.GHzDACs.Cleanup.dac

I then tried running Cleanup\dac.py (which indeed is present!):

U:\Jim\Code\servers\GHzDACs\Cleanup>dac.py
Traceback (most recent call last):
  File "U:\Jim\Code\servers\GHzDACs\Cleanup\dac.py", line 3, in <module>
    import servers.GHzDACs.Cleanup.fpga as fpga
ImportError: No module named servers.GHzDACs.Cleanup.fpga

Upon trying to run fpga.py:

U:\Jim\Code\servers\GHzDACs\Cleanup>fpga.py
Traceback (most recent call last):
  File "U:\Jim\Code\servers\GHzDACs\Cleanup\fpga.py", line 8, in <module>
    from servers.GHzDACs.util import LoggingPacket
ImportError: No module named servers.GHzDACs.util

However, U:\Jim\Code\servers\GHzDACs>util.py does run successfully.

The only way we (actually, Rami) could figure out how to get past this was to move ghz_fpga_server.py to the folder containing servers (here, U:\Jim\Code\), however, it then complains:

U:\Jim\Code>ghz_fpga_server.py
Traceback (most recent call last):
  File "U:\Jim\Code\ghz_fpga_server.py", line 226, in <module>
    from util import TimedLock, LoggingPacket
ImportError: No module named util

Is there any way to get ghz_fpga_server to actually run??!!??

(PS: Please keep Charles in the loop as well.)

Deal with gpib end-of-line characters

What needs to happen:

  1. Set up a way for device wrappers to set the newline character used in all gpib writes and reads.
  2. Make sure that all of the string literals used as gpib commands in all sever code do NOT have explicit newline characters.
  3. Check that pyvisa isn't adding its own characters. If it is, figure out how to turn this off when the gpib bus server creates the pyvisa resource.

sr780 server seems to drop bits

When querying the device, say it has a 100 Hz span, the method .span() should return 100

sr.span()
Value(100.0,'Hz')
instead, sometimes a digit will be lost and the following will happen:
sr.span()
Value(00.0,'Hz')
Then that missing '1' is left in the queue, so a gpib_read() will return:
1
when it should have failed since the buffer was empty. I can't generate a test case that will cause this bug every time...

The FPGA server and associated tools should support the jump table

The order of things to do here is roughly

  1. Test jump table with fpgaTest (from pyle) to make sure the FPGA works as advertised.
  2. Write DAC subclasses for the jump table build and add necessary settings to the server. This step should be simple as only a few parts of the interface have changed.
  3. Update qubit sequencer. This should probably be its own ticket to be created when work on the FPGA server is done.

When this is complete a new set of tickets should be generated in pyle specifying how fpgaseq and the gatecompiler will be modified.

GPIB chokes on non-ascii response

The sampling scope responds to "*IDN?" with '\xff' (I don't know why). The updated version of pyvisa apparently tries to decode everything into ASCII and chokes on this.

DataVault multihead unbound local error

Sometimes trying to do a datavault cd I get the following error:

File "data_vault_multihead.py", line 1029, in cd
if not Session.exists(temp) and not create:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.