Qcodes icon indicating copy to clipboard operation
Qcodes copied to clipboard

Station overwrite removes references to instruments but leaves instruments functioning

Open ThorvaldLarsen opened this issue 6 years ago • 1 comments

If one overwrites the station the snapshot gets reset - that is, it doesnt have any references to instruments previously imported. However, all instruments are still functioning in qcodes so measurements can be performed although all snapshots are completely empty.

I would expect the snapshot to always contain all instruments currently loaded in python.

Error arises if one accidentally reruns the initialization: First init looks fine and snapshot has the instrument. image Rerun init without kernel reset throws an error on instrument import. However, station has already been overwritten. From user point everything looks fine and measurements can continue but all snapshots are empty which is discovered when it is needed in post analysis. image

@jenshnielsen @Dominik-Vogel

ThorvaldLarsen avatar Jan 02 '20 10:01 ThorvaldLarsen

Thank you, @ThorvaldLarsen for posting this issue here! This problem is a difficult one. It is not really a bug, but rather a stumbling stone. I do agree, we should fix this and thereby make our API more compatible with the workflow at our stations. Thinking twice about it, I think we should encourage the use of the find_or_create_instrument or the use of the station configuration files for the init scripts.

On top of that, we have already been talking about doing some changes to how the station works. I would suggest that we make better use of the default station:

  • create default station on import time
  • every instrument gets added to the default station upon instantiation
  • allow for additional stations by providing a name in the init thereby we could keep the existing api intact for cases where only one station is being used and would solve the issue above for the single station case.

Dominik-Vogel avatar Jan 02 '20 15:01 Dominik-Vogel