SlideShare une entreprise Scribd logo
1  sur  18
Télécharger pour lire hors ligne
Lab overview
Experiment X
Verdict
Python in a physics lab
Gergely Imreh
PyCon Taiwan
May 25, 2013
Gergely Imreh Python in a physics lab
Lab overview
Experiment X
Verdict
Lab overview
Gergely Imreh Python in a physics lab
Lab overview
Experiment X
Verdict
Preparation
Talking to instruments
Interface
Analysis
Experiment X
Laundry list of an experiment
Planning and theory
Instrument control
Interface
Analysis and archiving
Gergely Imreh Python in a physics lab
Lab overview
Experiment X
Verdict
Preparation
Talking to instruments
Interface
Analysis
Theory
Tools of theory:
Gergely Imreh Python in a physics lab
Lab overview
Experiment X
Verdict
Preparation
Talking to instruments
Interface
Analysis
RS-232 Serial
import serial
instrument = serial.Serial("/dev/ttyUSB0",
baudrate=19200,
timeout=1)
instrument.write(cmd)
Gergely Imreh Python in a physics lab
Lab overview
Experiment X
Verdict
Preparation
Talking to instruments
Interface
Analysis
Gergely Imreh Python in a physics lab
Lab overview
Experiment X
Verdict
Preparation
Talking to instruments
Interface
Analysis
GPIB: General Purpose Interface Bus
import visa
oscilloscope = visa.instrument("GPIB::12")
oscilloscope.write("*IDN?")
print oscilloscope.read()
Gergely Imreh Python in a physics lab
Lab overview
Experiment X
Verdict
Preparation
Talking to instruments
Interface
Analysis
Gergely Imreh Python in a physics lab
Lab overview
Experiment X
Verdict
Preparation
Talking to instruments
Interface
Analysis
FireWire IEEE-1394
import pydc1394
lib = pydc1394.DC1394Library()
cams = l.enumerate_cameras()
cam0 = fw.Camera(l, cams[0][’guid’], isospeed=800)
image = numpy.array(cam0.current_image, dtype=’f’)
Gergely Imreh Python in a physics lab
Lab overview
Experiment X
Verdict
Preparation
Talking to instruments
Interface
Analysis
ctypes
import ctypes
my_dll = ctypes.windll.dll_name
receive_data = my_dll.ReceiveData
receive_data.restype = ctypes.c_long
print receive_data()
Gergely Imreh Python in a physics lab
Lab overview
Experiment X
Verdict
Preparation
Talking to instruments
Interface
Analysis
USB Test and Measurement Class
import os
file = os.open(device, os.O_RDWR)
os.write(file, command)
Gergely Imreh Python in a physics lab
Lab overview
Experiment X
Verdict
Preparation
Talking to instruments
Interface
Analysis
PyMCU - Python controller microcontroller unit
import pymcu
board = pymcu.mcuModule()
board.pinHigh(1)
board.pausems(500)
board.pinLow(1)
board.pausems(500)
Gergely Imreh Python in a physics lab
Lab overview
Experiment X
Verdict
Preparation
Talking to instruments
Interface
Analysis
Interface
Tools of control
Gergely Imreh Python in a physics lab
Lab overview
Experiment X
Verdict
Preparation
Talking to instruments
Interface
Analysis
Analysis
Tools of analysis:
Gergely Imreh Python in a physics lab
Lab overview
Experiment X
Verdict
Preparation
Talking to instruments
Interface
Analysis
Matplotlib aka. pylab
import pylab
import numpy
data = numpy.loadtxt(’data.csv’)
pylab.plot(data[:, 0], data[:, 1])
pylab.show()
Gergely Imreh Python in a physics lab
Lab overview
Experiment X
Verdict
Competitors
Gergely Imreh Python in a physics lab
Lab overview
Experiment X
Verdict
Balance
Gergely Imreh Python in a physics lab
Lab overview
Experiment X
Verdict
imrehg@gmail.com
https://gergely.imreh.net
Gergely Imreh Python in a physics lab

Contenu connexe

Similaire à Python in a physics lab

STAMP Descartes Presentation
STAMP Descartes PresentationSTAMP Descartes Presentation
STAMP Descartes PresentationSTAMP Project
 
data-microscopes
data-microscopesdata-microscopes
data-microscopesStephen Tu
 
Automated hardware testing using python
Automated hardware testing using pythonAutomated hardware testing using python
Automated hardware testing using pythonYuvaraja Ravi
 
FAST Approaches to Scalable Similarity-based Test Case Prioritization
FAST Approaches to Scalable Similarity-based Test Case PrioritizationFAST Approaches to Scalable Similarity-based Test Case Prioritization
FAST Approaches to Scalable Similarity-based Test Case Prioritizationbrenoafmiranda
 
SBFT Tool Competition 2024 -- Python Test Case Generation Track
SBFT Tool Competition 2024 -- Python Test Case Generation TrackSBFT Tool Competition 2024 -- Python Test Case Generation Track
SBFT Tool Competition 2024 -- Python Test Case Generation TrackSebastiano Panichella
 
Test Driven Development With Python
Test Driven Development With PythonTest Driven Development With Python
Test Driven Development With PythonSiddhi
 
Recurrent Neuronal Network tailored for Weather Radar Nowcasting
Recurrent Neuronal Network tailored for Weather Radar NowcastingRecurrent Neuronal Network tailored for Weather Radar Nowcasting
Recurrent Neuronal Network tailored for Weather Radar NowcastingAndreas Scheidegger
 
Python-nose: A unittest-based testing framework for Python that makes writing...
Python-nose: A unittest-based testing framework for Python that makes writing...Python-nose: A unittest-based testing framework for Python that makes writing...
Python-nose: A unittest-based testing framework for Python that makes writing...Timo Stollenwerk
 
Functional Reactive Programming on Android
Functional Reactive Programming on AndroidFunctional Reactive Programming on Android
Functional Reactive Programming on AndroidSam Lee
 
Boetticher Presentation Promise 2008v2
Boetticher Presentation Promise 2008v2Boetticher Presentation Promise 2008v2
Boetticher Presentation Promise 2008v2gregoryg
 
Automated Program Repair Keynote talk
Automated Program Repair Keynote talkAutomated Program Repair Keynote talk
Automated Program Repair Keynote talkAbhik Roychoudhury
 
Lambda Chops - Recipes for Simpler, More Expressive Code
Lambda Chops - Recipes for Simpler, More Expressive CodeLambda Chops - Recipes for Simpler, More Expressive Code
Lambda Chops - Recipes for Simpler, More Expressive CodeIan Robertson
 

Similaire à Python in a physics lab (13)

STAMP Descartes Presentation
STAMP Descartes PresentationSTAMP Descartes Presentation
STAMP Descartes Presentation
 
data-microscopes
data-microscopesdata-microscopes
data-microscopes
 
Automated hardware testing using python
Automated hardware testing using pythonAutomated hardware testing using python
Automated hardware testing using python
 
FAST Approaches to Scalable Similarity-based Test Case Prioritization
FAST Approaches to Scalable Similarity-based Test Case PrioritizationFAST Approaches to Scalable Similarity-based Test Case Prioritization
FAST Approaches to Scalable Similarity-based Test Case Prioritization
 
SBFT Tool Competition 2024 -- Python Test Case Generation Track
SBFT Tool Competition 2024 -- Python Test Case Generation TrackSBFT Tool Competition 2024 -- Python Test Case Generation Track
SBFT Tool Competition 2024 -- Python Test Case Generation Track
 
Labview final
Labview finalLabview final
Labview final
 
Test Driven Development With Python
Test Driven Development With PythonTest Driven Development With Python
Test Driven Development With Python
 
Recurrent Neuronal Network tailored for Weather Radar Nowcasting
Recurrent Neuronal Network tailored for Weather Radar NowcastingRecurrent Neuronal Network tailored for Weather Radar Nowcasting
Recurrent Neuronal Network tailored for Weather Radar Nowcasting
 
Python-nose: A unittest-based testing framework for Python that makes writing...
Python-nose: A unittest-based testing framework for Python that makes writing...Python-nose: A unittest-based testing framework for Python that makes writing...
Python-nose: A unittest-based testing framework for Python that makes writing...
 
Functional Reactive Programming on Android
Functional Reactive Programming on AndroidFunctional Reactive Programming on Android
Functional Reactive Programming on Android
 
Boetticher Presentation Promise 2008v2
Boetticher Presentation Promise 2008v2Boetticher Presentation Promise 2008v2
Boetticher Presentation Promise 2008v2
 
Automated Program Repair Keynote talk
Automated Program Repair Keynote talkAutomated Program Repair Keynote talk
Automated Program Repair Keynote talk
 
Lambda Chops - Recipes for Simpler, More Expressive Code
Lambda Chops - Recipes for Simpler, More Expressive CodeLambda Chops - Recipes for Simpler, More Expressive Code
Lambda Chops - Recipes for Simpler, More Expressive Code
 

Plus de Gergely Imreh

Do you really want to be this cheap?
Do you really want to be this cheap?Do you really want to be this cheap?
Do you really want to be this cheap?Gergely Imreh
 
Introduction to Open Source Hardware
Introduction to Open Source HardwareIntroduction to Open Source Hardware
Introduction to Open Source HardwareGergely Imreh
 
Taiwan's Habeas Corpus Act, English translation
Taiwan's Habeas Corpus Act, English translationTaiwan's Habeas Corpus Act, English translation
Taiwan's Habeas Corpus Act, English translationGergely Imreh
 
Innovation through an open social platform: The case of the Taipei Hackerspace
Innovation through an open social platform: The case of the Taipei HackerspaceInnovation through an open social platform: The case of the Taipei Hackerspace
Innovation through an open social platform: The case of the Taipei HackerspaceGergely Imreh
 
PCIeDuino328 Schematic v1
PCIeDuino328 Schematic v1PCIeDuino328 Schematic v1
PCIeDuino328 Schematic v1Gergely Imreh
 
VIA VAB-600 Springboard Linux BSP Development Guide
VIA VAB-600 Springboard Linux BSP Development GuideVIA VAB-600 Springboard Linux BSP Development Guide
VIA VAB-600 Springboard Linux BSP Development GuideGergely Imreh
 
ICT-104 bill acceptor protocol
ICT-104 bill acceptor protocolICT-104 bill acceptor protocol
ICT-104 bill acceptor protocolGergely Imreh
 
Hackerspaces from around the world to Taiwan
Hackerspaces from around the world to TaiwanHackerspaces from around the world to Taiwan
Hackerspaces from around the world to TaiwanGergely Imreh
 
Gergely Imreh: Enlighten Us But Make It Quick
Gergely Imreh: Enlighten Us But Make It QuickGergely Imreh: Enlighten Us But Make It Quick
Gergely Imreh: Enlighten Us But Make It QuickGergely Imreh
 
Future Shorts Taipei intro
Future Shorts Taipei introFuture Shorts Taipei intro
Future Shorts Taipei introGergely Imreh
 

Plus de Gergely Imreh (10)

Do you really want to be this cheap?
Do you really want to be this cheap?Do you really want to be this cheap?
Do you really want to be this cheap?
 
Introduction to Open Source Hardware
Introduction to Open Source HardwareIntroduction to Open Source Hardware
Introduction to Open Source Hardware
 
Taiwan's Habeas Corpus Act, English translation
Taiwan's Habeas Corpus Act, English translationTaiwan's Habeas Corpus Act, English translation
Taiwan's Habeas Corpus Act, English translation
 
Innovation through an open social platform: The case of the Taipei Hackerspace
Innovation through an open social platform: The case of the Taipei HackerspaceInnovation through an open social platform: The case of the Taipei Hackerspace
Innovation through an open social platform: The case of the Taipei Hackerspace
 
PCIeDuino328 Schematic v1
PCIeDuino328 Schematic v1PCIeDuino328 Schematic v1
PCIeDuino328 Schematic v1
 
VIA VAB-600 Springboard Linux BSP Development Guide
VIA VAB-600 Springboard Linux BSP Development GuideVIA VAB-600 Springboard Linux BSP Development Guide
VIA VAB-600 Springboard Linux BSP Development Guide
 
ICT-104 bill acceptor protocol
ICT-104 bill acceptor protocolICT-104 bill acceptor protocol
ICT-104 bill acceptor protocol
 
Hackerspaces from around the world to Taiwan
Hackerspaces from around the world to TaiwanHackerspaces from around the world to Taiwan
Hackerspaces from around the world to Taiwan
 
Gergely Imreh: Enlighten Us But Make It Quick
Gergely Imreh: Enlighten Us But Make It QuickGergely Imreh: Enlighten Us But Make It Quick
Gergely Imreh: Enlighten Us But Make It Quick
 
Future Shorts Taipei intro
Future Shorts Taipei introFuture Shorts Taipei intro
Future Shorts Taipei intro
 

Dernier

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 

Dernier (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 

Python in a physics lab