Exemplo n.º 1
0
def plot(save=False):
    shell.close('all')
    x = fetch()  #.reshape((len(tau),4))
    shell.figure()
    shell.plot(x, "k.")
    shell.xtitle('tau [ns]')
    shell.ytitle('counts [a.u.]')
    if save:
        np.savetxt("BP/Results/deutsch.txt", x)
Exemplo n.º 2
0
def plot():
    shell.close('all')
    x = fetch()  #.reshape((len(tau),4))
    shell.figure()
    shell.plot(tau, x)
    fitPoints = hahnFit(tau, x)
    shell.plot(tau, fitPoints(tau), "r-")
    shell.xtitle('tau [ns]')
    shell.ytitle('counts [a.u.]')
Exemplo n.º 3
0
def plot(save=False):
    shell.close('all')
    x = fetch()  #.reshape((len(tau),4))
    x1 = x[0]
    x2 = x[1]
    shell.figure()
    shell.plot(tau, x1)
    shell.hold(True)
    shell.plot(tau, x2, "b-")
    #fitPoints = hahnFit( tau,x1)
    #shell.plot(tau,fitPoints(tau), "r-")
    shell.xtitle('tau [ns]')
    shell.ytitle('counts [a.u.]')

    shell.figure(title='ratio')
    shell.plot(tau, x[0] / x[1])
    shell.xtitle('tau [ns]')
    shell.ytitle('normalized fluorescence [a.u.]')

    shell.figure(title='difference')
    shell.plot(tau, x[0] - x[1])
    if save:
        np.savetxt("BP/Results/hahn1.txt", x1)
        np.savetxt("BP/Results/hahn2.txt", x2)
        np.savetxt("BP/Results/hahnTau.txt", tau)
Exemplo n.º 4
0
def plot(save=False):
    shell.close('all')
    x = fetch()  #.reshape((len(tau),4))
    shell.figure()
    shell.plot(tau, x)
    shell.hold(True)
    fitPoints = rabiFit(tau, x)
    shell.plot(tau, fitPoints(tau), "r-")
    shell.xtitle('tau [ns]')
    shell.ytitle('counts [a.u.]')
    if save:
        np.savetxt("BP/Results/Rabi.txt", x)
        np.savetxt("BP/Results/RabiTau.txt", tau)
        np.savetxt("BP/Results/RabiFit.txt", fitPoints(tau))
Exemplo n.º 5
0
def plot():
    shell.close('all')
    x=fetch().reshape((len(tau),4))
    shell.plot(tau,x[:,0],'-b')
    shell.hold(True)
    shell.plot(tau,x[:,1],'-r')
    shell.plot(tau,x[:,2],'-g')
    shell.plot(tau,x[:,3],'-c')
    

    
Exemplo n.º 6
0
"""This example shows how to create a scatter plot using the `shell` package.
"""

# Major library imports
from numpy import linspace, random, pi

# Enthought library imports
from chaco.shell import plot, hold, title, show


# Create some data
x = linspace(-2*pi, 2*pi, 100)
y1 = random.random(100)
y2 = random.random(100)

# Create some scatter plots
plot(x, y1, "b.")
hold(True)
plot(x, y2, "g+", marker_size=2)

# Add some titles
title("simple scatter plots")

# This command is only necessary if running from command line
show()
Exemplo n.º 7
0
# Major library imports
from numpy import linspace, pi, sin

# Enthought library imports
from chaco.shell import show, plot, title, curplot
from chaco.scales.api import CalendarScaleSystem

# Create some data
numpoints = 100
x = linspace(-2 * pi, 2 * pi, numpoints)
y1 = sin(x)

# Create the dates
import time
now = time.time()
dt = 24 * 3600  # data points are spaced by 1 day
dates = linspace(now, now + numpoints * dt, numpoints)

# Create some line plots
plot(dates, y1, "b-", bgcolor="white")

# Add some titles
title("Plotting Dates")

# Set the plot's horizontal axis to be a time scale
curplot().x_axis.tick_generator.scale = CalendarScaleSystem()

#This command is only necessary if running from command line
show()
Exemplo n.º 8
0
"""
This example displays some line plots in different colors and styles using
the chaco.shell subpackage.

The functions in the chaco.shell package allow us to quickly generate plots
with some basic interactivity without using the object-oriented core of Chaco.
"""

from numpy import linspace, pi, sin, cos
from chaco.shell import plot, hold, title, show

# Create some data
x = linspace(-2 * pi, 2 * pi, 100)
y1 = sin(x)
y2 = cos(x)

# Create some line plots using the plot() command and using
# Matlab-style format specifiers
plot(x, y1, "b-", bgcolor="white")
hold()
plot(x, y2, "g-.", marker_size=2)

# Set the plot title
title("simple line plots")

# If running this from the command line and outside of a wxPython
# application or process, the show() command is necessary to keep
# the plot from disappearing instantly.  If a wxPython mainloop
# is already running, then this command is not necessary.
show()
Exemplo n.º 9
0
 def test_script(self):
     x = linspace(-2*pi, 2*pi, 100)
     y = sin(x)
     plot(x, y, "r-")
     title("First plot")
     ytitle("sin(x)")
Exemplo n.º 10
0
 def test_script(self):
     x = linspace(-2*pi, 2*pi, 100)
     y = sin(x)
     plot(x, y, "r-")
     title("First plot")
     ytitle("sin(x)")
Exemplo n.º 11
0
Arquivo: dates.py Projeto: 5n1p/chaco
# Major library imports
from numpy import linspace, pi, sin

# Enthought library imports
from chaco.shell import show, plot, title, curplot
from chaco.scales.api import CalendarScaleSystem

# Create some data
numpoints = 100
x = linspace(-2*pi, 2*pi, numpoints)
y1 = sin(x)

# Create the dates
import time
now = time.time()
dt = 24 * 3600    # data points are spaced by 1 day
dates = linspace(now, now + numpoints*dt, numpoints)

# Create some line plots
plot(dates, y1, "b-", bgcolor="white")

# Add some titles
title("Plotting Dates")

# Set the plot's horizontal axis to be a time scale
curplot().x_axis.tick_generator.scale = CalendarScaleSystem()

#This command is only necessary if running from command line
show()

Exemplo n.º 12
0
Arquivo: lines.py Projeto: 5n1p/chaco
"""This example displays some line plots in different colors and styles using
the chaco.shell subpackage.

The functions in the chaco.shell package allow us to quickly generate plots
with some basic interactivity without using the object-oriented core of Chaco.
"""

from numpy import linspace, pi, sin, cos
from chaco.shell import plot, hold, title, show

# Create some data
x = linspace(-2*pi, 2*pi, 100)
y1 = sin(x)
y2 = cos(x)

# Create some line plots using the plot() command and using
# Matlab-style format specifiers
plot(x, y1, "b-", bgcolor="white")
hold()
plot(x, y2, "g-.", marker_size=2)

# Set the plot title
title("simple line plots")

# If running this from the command line and outside of a wxPython
# application or process, the show() command is necessary to keep
# the plot from disappearing instantly.  If a wxPython mainloop
# is already running, then this command is not necessary.
show()