How much programming can you expect to do in the lab?

  • Thread starter Thread starter cryora
  • Start date Start date
  • Tags Tags
    Lab Programming
AI Thread Summary
Programming is increasingly integral to experimental physics, particularly in fields like AMO, where automation of lab instruments is essential. Undergraduate researchers often engage in significant programming tasks, including learning Python and hardware description languages like Verilog, to create integrated systems for experimental controls. The shift from manual measurements to automated processes enhances efficiency and accuracy in research. Collaboration with experimenters highlights the necessity of custom programming for home-made electronics, emphasizing the importance of understanding the underlying physics. Overall, programming skills are becoming vital across various scientific disciplines, including biology and engineering, reflecting a broader trend in research methodologies.
cryora
Messages
49
Reaction score
3
It may be unique to my situation (or it may not, as I was told that AMO is one of the less computational fields of research in Physics), but for my undergraduate research assistant role, my job is to help the research group set up automated experimental controls. That includes learning:
Python
Python modules such as PyQt (for building GUI's) and Twisted (for Asynchronous Networking)
Hardware Description Langauge (namely Verilog) for FPGA's

In other words, this is combining basic Object-Oriented Programming + GUI's + Networking + Digital Logic to design one integrated system where computer programs can receive user input to talk to lab instruments and automate what they do (i.e. control lab instruments like an musical ensemble playing a piece). I do feel this is quite heavy on the programming side for a Physics major, though I suspect this is child's play compared to what professional researchers at, say national labs, have to be able to implement.
 
  • Like
Likes Silicon Waffle
Computer science news on Phys.org
This sounds typical to me. The days of measuring things by hand and writing the results in your lab notebook are long gone. Computers perform these tasks much more efficiently and accurately. They also free you from tedious, repetitive tasks. Is there a problem in any of this?
 
cryora said:
I was told that AMO is one of the less computational fields of research in Physics
As I researcher in computational AMO, I would tend to disagree :smile: There is not much pen-and-paper work going on in the field, and the experiments being done involve quite a lot of computer work, as you are discovering.

cryora said:
In other words, this is combining basic Object-Oriented Programming + GUI's + Networking + Digital Logic to design one integrated system where computer programs can receive user input to talk to lab instruments and automate what they do (i.e. control lab instruments like an musical ensemble playing a piece). I do feel this is quite heavy on the programming side for a Physics major, though I suspect this is child's play compared to what professional researchers at, say national labs, have to be able to implement.
From my collaborations with experimenters, there appears to be quite a lot of home-made electronics, which require home-made computer control and programming to go with it. I also think that custom-made programs give them more control and more knowledge of what is going on in the setup. I would say that the be able to do the integration properly, a good knowledge of the physics going on in the experiment is essential, and therefore it falls back on physicists to the programming, even if it would be at the level of a computer scientist.
 
I would think the amount of programming would be high, but the tools you will work with will be a fairly small set. You can always ask for help in the programming forum, but the most important things you can remember are plan and modularize. Write your entire system out on a whiteboard before you even open your IDE. And make it modular, your logic should be completely disjoint from your GUI and your network.

I'd recommend for you actually writing three separate things.

1) Engine: the thing that handles all of the business logic, the thing that takes commands and turns them into requests to hardware. This should never stop running and have a connection listener.
2) Plugins: Each set of hardware should have it's own plugin, that gets loaded as it's needed. I'd make them a shared library.
3) GUI: This should ask the engine for information to display, and send it commands. I'd make it talk to the engine via a socket.
 
This is true of most fields today. I'm a mechanical engineer but most of my work is programming. You really need both for most jobs. Because pure programming gives you a way to implement processes but not something to implement, pure science or engineering are the opposite. I think you'll find that if you ask questions on forums wherever you get stuck people will tell you about tools and methods to make it easier, and will help you get unstuck.
 
cryora said:
[...]
In other words, this is combining basic Object-Oriented Programming + GUI's + Networking + Digital Logic to design one integrated system where computer programs can receive user input to talk to lab instruments and automate what they do (i.e. control lab instruments like an musical ensemble playing a piece).
This sounds very common to 2nd or 3rd year IT students. They can learn to automate simple robots, instruments to measure and calculate height, width of different objects ect. I used to start first with wired e.g via good old RS232 cable connectors then wireless e.g TCP/IP things.
I do feel this is quite heavy on the programming side for a Physics major, though I suspect this is child's play compared to what professional researchers at, say national labs, have to be able to implement.
True, it's a heavy load of work to most non-IT majors, I work in industrial fields. National labs seem to have different orientation and sets of standards to follow.
 
On a related matter, you might be staggered by how much computer code biologists have to write. That's right, biologists. They do a lot of statistics, are into databases and R, and are almost as technical about computers these days as physicists. Physics and writing code (in all sorts of ways) seems to go hand in hand.
 

Similar threads

Replies
4
Views
3K
Replies
6
Views
2K
Replies
3
Views
3K
Replies
5
Views
2K
Back
Top