SlideShare a Scribd company logo
1 of 17
Python forScientists Dewes Quantronics Group Seminar
Python: Qu'est-ce que c'est? Multi-paradigm (objectoriented, functional…) print“Easy as…“ fori in [1,2,3]: printi ctypes,sockets,files,regex,… Matplotlib,SciPy,NumPy,PyQT,…
Whytouseit: A Scientific Workflow
Software makeslifeeasier…
Using Python…
Data Acquisition   http://pyvisa.sourceforge.net                                  http://docs.python.org/library/ctypes.html
PyVisaExample: MWG & VNA fromvisaimport* #Open a connectionto an Anritsu MWG anritsu = instrument(“GPIB0::12“) #Askfortheoutputfrequency print anritsu.ask(“OF1“) #Set theoutput power anritsu.write(“L15DM“) #Turn on themicrowave anritsu.write(“RF0“) vna = instrument(„GPIB0::15“) x = vna.ask_for_values(“fma;ofv;“) y = vna.ask_for_values(“fma;ofd;“) VNA Frontpanel Keypoints ,[object Object]
Directly process & analyze measured data
Fast, flexible programming
Not toomuchworryingabouttechnicaldetails…
VNA exampleusesPyQtfortheuserinterface,[object Object]
Data Analysis   http://www.scipy.org                                                 http://numpy.scipy.org
SciPy & NumPyExample importscipy.optimize #Define the model to befitted fitfunc= lambda p, x: p[0]+p[1]* exp(-x*abs(p[2]))*cos(p[3]+p[4]*x) #Define the errorfunction errfunc = lambda p, x, y: fitfunc(p, x)– y #Make a fit by minimizing the errorfunction p1 = scipy.optimize.fmin(lambdap,x,y:  norm(errfunc(p,x,y)), p0, args=(data [:,0], data[:,1])) #Print the returnedparameters print p1 #Plot the data and the fit… plot(data[:,0], data[:,1], "ro", data[:,0],  fitfunc(p1, data[:,0]), "b-") #Add a legend legend(("data","fit")) #Add a title title("Ramsey - $V_{fluxline}= %d mV$,  	$T_2 = %d$ ns, $A = %f$ " % (int(voltage) 	, abs(int(1.0/p1[2])),p1[1]))
Presentation & Visualization http://matplotlib.sourceforge.net/                            http://qt.nokia.com/
MatplotlibExamples grid()#Add gridlinestotheplot #Plot 4 datasets plot(x1,y1,x2,y2,x3,y3,x4,y4) #Add a legend legend((“Amplification…“,“…“)) #Set theaxislabels xlabel(“frequency[GHz]“) ylabel(“attenuation[dB]“) #Save thefigureas a PDF savefig(“attenuation.pdf“) jet() #Select a colorsheme #Plot the matrix imshow(dataMatrix,aspect = 'auto',origin = 'lower',extent = (xmin,xmax,ymin,ymax)) xlabel("$A$ [V]") ylabel("$f$ [GHz]") #Use Latex for text… title("Qubit 1 – Modulated by $V_{flux2} = A dot in{(20 MHz dot 2i t)}$")
Somemoreexamples…
PyQTExample: Instrument frontpanels title = QLabel(„Qubit 1") splitter = QSplitter(Qt.Horizontal) SetButton= QPushButton("Set") splitter.addWidget(SetButton) #... grid = QGridLayout(self) grid.addWidget(title,0,0) grid.addWidget(QLabel("Voltage"),1,0) #... self.connect(SetButton,SIGNAL("clicked()"),self.changeVoltage)self.setLayout(grid) Or use Qt Designer:

More Related Content

What's hot

3. basic data structures(2)
3. basic data structures(2)3. basic data structures(2)
3. basic data structures(2)Hongjun Jang
 
Queue in swift
Queue in swiftQueue in swift
Queue in swiftjoonjhokil
 
Use the Matplotlib, Luke @ PyCon Taiwan 2012
Use the Matplotlib, Luke @ PyCon Taiwan 2012Use the Matplotlib, Luke @ PyCon Taiwan 2012
Use the Matplotlib, Luke @ PyCon Taiwan 2012Wen-Wei Liao
 
TF.data & Eager Execution
TF.data & Eager ExecutionTF.data & Eager Execution
TF.data & Eager ExecutionModulabs
 
OCamlOScope: a New OCaml API Search
OCamlOScope: a New OCaml API SearchOCamlOScope: a New OCaml API Search
OCamlOScope: a New OCaml API SearchJun Furuse
 
tf.data: TensorFlow Input Pipeline
tf.data: TensorFlow Input Pipelinetf.data: TensorFlow Input Pipeline
tf.data: TensorFlow Input PipelineAlluxio, Inc.
 
Macro and Preprocessor in c programming
 Macro and  Preprocessor in c programming Macro and  Preprocessor in c programming
Macro and Preprocessor in c programmingProfSonaliGholveDoif
 
Python seaborn cheat_sheet
Python seaborn cheat_sheetPython seaborn cheat_sheet
Python seaborn cheat_sheetNishant Upadhyay
 
Pythonで機械学習入門以前
Pythonで機械学習入門以前Pythonで機械学習入門以前
Pythonで機械学習入門以前Kimikazu Kato
 
Goptuna Distributed Bayesian Optimization Framework at Go Conference 2019 Autumn
Goptuna Distributed Bayesian Optimization Framework at Go Conference 2019 AutumnGoptuna Distributed Bayesian Optimization Framework at Go Conference 2019 Autumn
Goptuna Distributed Bayesian Optimization Framework at Go Conference 2019 AutumnMasashi Shibata
 
Intoduction to dynamic memory allocation
Intoduction to dynamic memory allocationIntoduction to dynamic memory allocation
Intoduction to dynamic memory allocationUtsav276
 

What's hot (20)

A tour of Python
A tour of PythonA tour of Python
A tour of Python
 
3. basic data structures(2)
3. basic data structures(2)3. basic data structures(2)
3. basic data structures(2)
 
Queue in swift
Queue in swiftQueue in swift
Queue in swift
 
Use the Matplotlib, Luke @ PyCon Taiwan 2012
Use the Matplotlib, Luke @ PyCon Taiwan 2012Use the Matplotlib, Luke @ PyCon Taiwan 2012
Use the Matplotlib, Luke @ PyCon Taiwan 2012
 
TF.data & Eager Execution
TF.data & Eager ExecutionTF.data & Eager Execution
TF.data & Eager Execution
 
OCamlOScope: a New OCaml API Search
OCamlOScope: a New OCaml API SearchOCamlOScope: a New OCaml API Search
OCamlOScope: a New OCaml API Search
 
Py lecture5 python plots
Py lecture5 python plotsPy lecture5 python plots
Py lecture5 python plots
 
Docopt
DocoptDocopt
Docopt
 
Sorter
SorterSorter
Sorter
 
Problemas de Arreglos en c++
Problemas de Arreglos en c++Problemas de Arreglos en c++
Problemas de Arreglos en c++
 
tf.data: TensorFlow Input Pipeline
tf.data: TensorFlow Input Pipelinetf.data: TensorFlow Input Pipeline
tf.data: TensorFlow Input Pipeline
 
Pointers
PointersPointers
Pointers
 
Introduction to cython
Introduction to cythonIntroduction to cython
Introduction to cython
 
Macro and Preprocessor in c programming
 Macro and  Preprocessor in c programming Macro and  Preprocessor in c programming
Macro and Preprocessor in c programming
 
Python seaborn cheat_sheet
Python seaborn cheat_sheetPython seaborn cheat_sheet
Python seaborn cheat_sheet
 
Pythonで機械学習入門以前
Pythonで機械学習入門以前Pythonで機械学習入門以前
Pythonで機械学習入門以前
 
Goptuna Distributed Bayesian Optimization Framework at Go Conference 2019 Autumn
Goptuna Distributed Bayesian Optimization Framework at Go Conference 2019 AutumnGoptuna Distributed Bayesian Optimization Framework at Go Conference 2019 Autumn
Goptuna Distributed Bayesian Optimization Framework at Go Conference 2019 Autumn
 
STL
STLSTL
STL
 
Intoduction to dynamic memory allocation
Intoduction to dynamic memory allocationIntoduction to dynamic memory allocation
Intoduction to dynamic memory allocation
 
Brief Introduction to Cython
Brief Introduction to CythonBrief Introduction to Cython
Brief Introduction to Cython
 

Viewers also liked

ovarian hyperstimulation syndrome
ovarian hyperstimulation syndromeovarian hyperstimulation syndrome
ovarian hyperstimulation syndromeHemin Jamal
 
The study of language
The study of language The study of language
The study of language Cristian Zarza
 
Python For Scientists
Python For ScientistsPython For Scientists
Python For Scientistsaeberspaecher
 
The study of language
The study of languageThe study of language
The study of languageAhmad Suhaimi
 
Ovarian hyperstimulation syndrome
Ovarian hyperstimulation syndromeOvarian hyperstimulation syndrome
Ovarian hyperstimulation syndromeHesham Gaber
 
Ovarian Hyperstimulation Syndrome
Ovarian Hyperstimulation SyndromeOvarian Hyperstimulation Syndrome
Ovarian Hyperstimulation Syndromeguest9dc181
 

Viewers also liked (9)

"The study of language" - Chapter 18
"The study of language" - Chapter 18"The study of language" - Chapter 18
"The study of language" - Chapter 18
 
ovarian hyperstimulation syndrome
ovarian hyperstimulation syndromeovarian hyperstimulation syndrome
ovarian hyperstimulation syndrome
 
The study of language. Chapter 19pptx
The study of language. Chapter 19pptxThe study of language. Chapter 19pptx
The study of language. Chapter 19pptx
 
"The study of language" - Chapter 20
"The study of language" - Chapter 20"The study of language" - Chapter 20
"The study of language" - Chapter 20
 
The study of language
The study of language The study of language
The study of language
 
Python For Scientists
Python For ScientistsPython For Scientists
Python For Scientists
 
The study of language
The study of languageThe study of language
The study of language
 
Ovarian hyperstimulation syndrome
Ovarian hyperstimulation syndromeOvarian hyperstimulation syndrome
Ovarian hyperstimulation syndrome
 
Ovarian Hyperstimulation Syndrome
Ovarian Hyperstimulation SyndromeOvarian Hyperstimulation Syndrome
Ovarian Hyperstimulation Syndrome
 

Similar to Python for Scientists: Data Acquisition and Analysis

Machine learning with py torch
Machine learning with py torchMachine learning with py torch
Machine learning with py torchRiza Fahmi
 
III MCS python lab (1).pdf
III MCS python lab (1).pdfIII MCS python lab (1).pdf
III MCS python lab (1).pdfsrxerox
 
Cluj.py Meetup: Extending Python in C
Cluj.py Meetup: Extending Python in CCluj.py Meetup: Extending Python in C
Cluj.py Meetup: Extending Python in CSteffen Wenz
 
A Map of the PyData Stack
A Map of the PyData StackA Map of the PyData Stack
A Map of the PyData StackPeadar Coyle
 
Time Series Analysis for Network Secruity
Time Series Analysis for Network SecruityTime Series Analysis for Network Secruity
Time Series Analysis for Network Secruitymrphilroth
 
app4.pptx
app4.pptxapp4.pptx
app4.pptxsg4795
 
Python-GTK
Python-GTKPython-GTK
Python-GTKYuren Ju
 
TensorFrames: Google Tensorflow on Apache Spark
TensorFrames: Google Tensorflow on Apache SparkTensorFrames: Google Tensorflow on Apache Spark
TensorFrames: Google Tensorflow on Apache SparkDatabricks
 
Wprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
Wprowadzenie do technologii Big Data / Intro to Big Data EcosystemWprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
Wprowadzenie do technologii Big Data / Intro to Big Data EcosystemSages
 
Python과 node.js기반 데이터 분석 및 가시화
Python과 node.js기반 데이터 분석 및 가시화Python과 node.js기반 데이터 분석 및 가시화
Python과 node.js기반 데이터 분석 및 가시화Tae wook kang
 
Spark Summit EU talk by Tim Hunter
Spark Summit EU talk by Tim HunterSpark Summit EU talk by Tim Hunter
Spark Summit EU talk by Tim HunterSpark Summit
 
Numerical tour in the Python eco-system: Python, NumPy, scikit-learn
Numerical tour in the Python eco-system: Python, NumPy, scikit-learnNumerical tour in the Python eco-system: Python, NumPy, scikit-learn
Numerical tour in the Python eco-system: Python, NumPy, scikit-learnArnaud Joly
 
Profiling and optimization
Profiling and optimizationProfiling and optimization
Profiling and optimizationg3_nittala
 
Pres_python_talakhoury_26_09_2023.pdf
Pres_python_talakhoury_26_09_2023.pdfPres_python_talakhoury_26_09_2023.pdf
Pres_python_talakhoury_26_09_2023.pdfRamziFeghali
 
Imugi: Compiler made with Python
Imugi: Compiler made with PythonImugi: Compiler made with Python
Imugi: Compiler made with PythonHan Lee
 
Implementing Software Machines in Go and C
Implementing Software Machines in Go and CImplementing Software Machines in Go and C
Implementing Software Machines in Go and CEleanor McHugh
 
Introduction to Python and Matplotlib
Introduction to Python and MatplotlibIntroduction to Python and Matplotlib
Introduction to Python and MatplotlibFrançois Bianco
 
Pemrograman Python untuk Pemula
Pemrograman Python untuk PemulaPemrograman Python untuk Pemula
Pemrograman Python untuk PemulaOon Arfiandwi
 

Similar to Python for Scientists: Data Acquisition and Analysis (20)

Machine learning with py torch
Machine learning with py torchMachine learning with py torch
Machine learning with py torch
 
III MCS python lab (1).pdf
III MCS python lab (1).pdfIII MCS python lab (1).pdf
III MCS python lab (1).pdf
 
Cluj.py Meetup: Extending Python in C
Cluj.py Meetup: Extending Python in CCluj.py Meetup: Extending Python in C
Cluj.py Meetup: Extending Python in C
 
A Map of the PyData Stack
A Map of the PyData StackA Map of the PyData Stack
A Map of the PyData Stack
 
Time Series Analysis for Network Secruity
Time Series Analysis for Network SecruityTime Series Analysis for Network Secruity
Time Series Analysis for Network Secruity
 
app4.pptx
app4.pptxapp4.pptx
app4.pptx
 
Python-GTK
Python-GTKPython-GTK
Python-GTK
 
Writing Faster Python 3
Writing Faster Python 3Writing Faster Python 3
Writing Faster Python 3
 
TensorFrames: Google Tensorflow on Apache Spark
TensorFrames: Google Tensorflow on Apache SparkTensorFrames: Google Tensorflow on Apache Spark
TensorFrames: Google Tensorflow on Apache Spark
 
Python basic
Python basicPython basic
Python basic
 
Wprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
Wprowadzenie do technologii Big Data / Intro to Big Data EcosystemWprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
Wprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
 
Python과 node.js기반 데이터 분석 및 가시화
Python과 node.js기반 데이터 분석 및 가시화Python과 node.js기반 데이터 분석 및 가시화
Python과 node.js기반 데이터 분석 및 가시화
 
Spark Summit EU talk by Tim Hunter
Spark Summit EU talk by Tim HunterSpark Summit EU talk by Tim Hunter
Spark Summit EU talk by Tim Hunter
 
Numerical tour in the Python eco-system: Python, NumPy, scikit-learn
Numerical tour in the Python eco-system: Python, NumPy, scikit-learnNumerical tour in the Python eco-system: Python, NumPy, scikit-learn
Numerical tour in the Python eco-system: Python, NumPy, scikit-learn
 
Profiling and optimization
Profiling and optimizationProfiling and optimization
Profiling and optimization
 
Pres_python_talakhoury_26_09_2023.pdf
Pres_python_talakhoury_26_09_2023.pdfPres_python_talakhoury_26_09_2023.pdf
Pres_python_talakhoury_26_09_2023.pdf
 
Imugi: Compiler made with Python
Imugi: Compiler made with PythonImugi: Compiler made with Python
Imugi: Compiler made with Python
 
Implementing Software Machines in Go and C
Implementing Software Machines in Go and CImplementing Software Machines in Go and C
Implementing Software Machines in Go and C
 
Introduction to Python and Matplotlib
Introduction to Python and MatplotlibIntroduction to Python and Matplotlib
Introduction to Python and Matplotlib
 
Pemrograman Python untuk Pemula
Pemrograman Python untuk PemulaPemrograman Python untuk Pemula
Pemrograman Python untuk Pemula
 

More from Andreas Dewes

Fairness and Transparency in Machine Learning
Fairness and Transparency in Machine LearningFairness and Transparency in Machine Learning
Fairness and Transparency in Machine LearningAndreas Dewes
 
Type Annotations in Python: Whats, Whys and Wows!
Type Annotations in Python: Whats, Whys and Wows!Type Annotations in Python: Whats, Whys and Wows!
Type Annotations in Python: Whats, Whys and Wows!Andreas Dewes
 
Analyzing data with docker v4
Analyzing data with docker   v4Analyzing data with docker   v4
Analyzing data with docker v4Andreas Dewes
 
Say "Hi!" to Your New Boss
Say "Hi!" to Your New BossSay "Hi!" to Your New Boss
Say "Hi!" to Your New BossAndreas Dewes
 
Code is not text! How graph technologies can help us to understand our code b...
Code is not text! How graph technologies can help us to understand our code b...Code is not text! How graph technologies can help us to understand our code b...
Code is not text! How graph technologies can help us to understand our code b...Andreas Dewes
 
Learning from other's mistakes: Data-driven code analysis
Learning from other's mistakes: Data-driven code analysisLearning from other's mistakes: Data-driven code analysis
Learning from other's mistakes: Data-driven code analysisAndreas Dewes
 
Let's build a quantum computer!
Let's build a quantum computer!Let's build a quantum computer!
Let's build a quantum computer!Andreas Dewes
 
Demonstrating Quantum Speed-Up with a Two-Transmon Quantum Processor Ph.D. d...
Demonstrating Quantum Speed-Up  with a Two-Transmon Quantum Processor Ph.D. d...Demonstrating Quantum Speed-Up  with a Two-Transmon Quantum Processor Ph.D. d...
Demonstrating Quantum Speed-Up with a Two-Transmon Quantum Processor Ph.D. d...Andreas Dewes
 

More from Andreas Dewes (8)

Fairness and Transparency in Machine Learning
Fairness and Transparency in Machine LearningFairness and Transparency in Machine Learning
Fairness and Transparency in Machine Learning
 
Type Annotations in Python: Whats, Whys and Wows!
Type Annotations in Python: Whats, Whys and Wows!Type Annotations in Python: Whats, Whys and Wows!
Type Annotations in Python: Whats, Whys and Wows!
 
Analyzing data with docker v4
Analyzing data with docker   v4Analyzing data with docker   v4
Analyzing data with docker v4
 
Say "Hi!" to Your New Boss
Say "Hi!" to Your New BossSay "Hi!" to Your New Boss
Say "Hi!" to Your New Boss
 
Code is not text! How graph technologies can help us to understand our code b...
Code is not text! How graph technologies can help us to understand our code b...Code is not text! How graph technologies can help us to understand our code b...
Code is not text! How graph technologies can help us to understand our code b...
 
Learning from other's mistakes: Data-driven code analysis
Learning from other's mistakes: Data-driven code analysisLearning from other's mistakes: Data-driven code analysis
Learning from other's mistakes: Data-driven code analysis
 
Let's build a quantum computer!
Let's build a quantum computer!Let's build a quantum computer!
Let's build a quantum computer!
 
Demonstrating Quantum Speed-Up with a Two-Transmon Quantum Processor Ph.D. d...
Demonstrating Quantum Speed-Up  with a Two-Transmon Quantum Processor Ph.D. d...Demonstrating Quantum Speed-Up  with a Two-Transmon Quantum Processor Ph.D. d...
Demonstrating Quantum Speed-Up with a Two-Transmon Quantum Processor Ph.D. d...
 

Recently uploaded

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 

Recently uploaded (20)

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 

Python for Scientists: Data Acquisition and Analysis

  • 1. Python forScientists Dewes Quantronics Group Seminar
  • 2. Python: Qu'est-ce que c'est? Multi-paradigm (objectoriented, functional…) print“Easy as…“ fori in [1,2,3]: printi ctypes,sockets,files,regex,… Matplotlib,SciPy,NumPy,PyQT,…
  • 6. Data Acquisition http://pyvisa.sourceforge.net http://docs.python.org/library/ctypes.html
  • 7.
  • 8. Directly process & analyze measured data
  • 11.
  • 12. Data Analysis http://www.scipy.org http://numpy.scipy.org
  • 13. SciPy & NumPyExample importscipy.optimize #Define the model to befitted fitfunc= lambda p, x: p[0]+p[1]* exp(-x*abs(p[2]))*cos(p[3]+p[4]*x) #Define the errorfunction errfunc = lambda p, x, y: fitfunc(p, x)– y #Make a fit by minimizing the errorfunction p1 = scipy.optimize.fmin(lambdap,x,y: norm(errfunc(p,x,y)), p0, args=(data [:,0], data[:,1])) #Print the returnedparameters print p1 #Plot the data and the fit… plot(data[:,0], data[:,1], "ro", data[:,0], fitfunc(p1, data[:,0]), "b-") #Add a legend legend(("data","fit")) #Add a title title("Ramsey - $V_{fluxline}= %d mV$, $T_2 = %d$ ns, $A = %f$ " % (int(voltage) , abs(int(1.0/p1[2])),p1[1]))
  • 14. Presentation & Visualization http://matplotlib.sourceforge.net/ http://qt.nokia.com/
  • 15. MatplotlibExamples grid()#Add gridlinestotheplot #Plot 4 datasets plot(x1,y1,x2,y2,x3,y3,x4,y4) #Add a legend legend((“Amplification…“,“…“)) #Set theaxislabels xlabel(“frequency[GHz]“) ylabel(“attenuation[dB]“) #Save thefigureas a PDF savefig(“attenuation.pdf“) jet() #Select a colorsheme #Plot the matrix imshow(dataMatrix,aspect = 'auto',origin = 'lower',extent = (xmin,xmax,ymin,ymax)) xlabel("$A$ [V]") ylabel("$f$ [GHz]") #Use Latex for text… title("Qubit 1 – Modulated by $V_{flux2} = A dot in{(20 MHz dot 2i t)}$")
  • 17. PyQTExample: Instrument frontpanels title = QLabel(„Qubit 1") splitter = QSplitter(Qt.Horizontal) SetButton= QPushButton("Set") splitter.addWidget(SetButton) #... grid = QGridLayout(self) grid.addWidget(title,0,0) grid.addWidget(QLabel("Voltage"),1,0) #... self.connect(SetButton,SIGNAL("clicked()"),self.changeVoltage)self.setLayout(grid) Or use Qt Designer:
  • 18. HowToGetStarted 1. Download it… 2. Check out thedocumentation & tutorial (online) 3. Go &contributetotheWiki 4. Askyourcolleagues… http://www.python.org http://docs.python.org/tutorial/ http://wiki-quantro.extra.cea.fr
  • 20. Object HirarchyExample Dispatcher Subject Reloadable ThreadedDispatcher Instrument RemoteInstrument VisaInstrument VNA AgilentMWG Yokogawa Acqiris