Python Scripting Feature 

for NICE Software

MAX POOLE
What’s the name of my project?

Integrating a Python Scripting Feature into 

NCNR Data Acquisition Software to allow 

Advanced/Customizable Experiments
What’s the name of my project?

Integrating a Python Scripting Feature 

into NCNR Data Acquisition Software to 

allow Advanced/Customizable 

Experiments

Programming language which 

scientists want to write in
What’s the name of my project?

Integrating a Python Scripting Feature 

into NCNR Data Acquisition Software to 

allow Advanced/Customizable 

Experiments

A small program
What’s the name of my project?

Integrating a Python Scripting Feature into 

NCNR Data Acquisition Software to allow 

Advanced/Customizable Experiments

The NICE Software
What is the NICE Software?

Data acquisition:

◦ Software scientists use to run experiments

Universal:

◦NICE is planned to work on all instruments maintained by RFO

◦ Currently works full time with five instruments (6th in near future)
What was my project?
This is what it is

Add the ability for scientists to write scripts in python 

that can be run through the NICE software. These 

scripts allow the scientists to create 

Advance/Customizable experiments
How was it done?

Python Scripting Process

◦ Singleton that runs the setup code

◦ Setup codes sets up connection with server, namespace, etc.

ScriptApi

◦ List of commands that the scripting feature can take 

advantage of


Benefits From my Project

Scientists can create flexible scripts

◦Dynamically react to conditions to what is measured

◦ Tailor-made solutions

◦Can be made quickly (by one’s self)

Scientists can take advantage of NICE

◦Many already written features

◦ Standardized across instruments
Dynamic Experiments

Scripts can react to data they measure and use this 

information to decide what to measure next
Creating Dynamic Experiments
Example phase change

With python scripting process users can have their 

program read data based on some condition

Phase change: Read information rapidly only when 

the phase is changing
Closer look
Tailor-made scripts

Scripts can be tailor-made for a user’s specific 

problem

Scripts are created by the users themselves
You can do it all without asking the 

programmers

Make scripts quickly

◦Useful for trying out new ideas

◦Creating solutions for problems specific to only what you are 

doing right now
Integrated into the new and exciting 

software

NICE!
Advantages of using NICE

Scientists can take advantage of many features 

already written by the programmers

◦Talking to motors

◦Writing data in known formats

◦And so much more!

What can it do?

Findpeak

Count

Read from 

instruments

Move motors

Start trajectories

Monitor 

temperature

Run sequences

Get findpeak data

Save namespaces

Email members of 

experiment

Start and Stop 

writers
Expandable

Written as a part of NICE

• API can easily have new features added to it as NICE itself expands
A part of a whole

The Python Scripting feature can be used as a 

runscript command inside and alongside other 

commands


Advantages of using NICE

Instrument usage is standardized

◦One piece of software can be used on various instruments



Conclusion

My project allows scientists to create simple 

programs 

◦ Can be whatever they want them to be

◦ Can be flexible, can respond to the instrument and control the 

instruments
End and everything

Mentor: Stephen Pheiffer

Team Member: Natasha Shmunis

Paul Kienzle
Questions?