Exemplo n.º 1
0
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import sys
import IStudio as vi
import numpy as np
import time

table = vi.IPDataTable("Data-2")
table.SetTableType(vi.TableType.General, True)
table.ModifyOption(
    vi.TableOption.ShowTabNavigator | vi.TableOption.ShowFormularBar, False)
table.ModifyOption(vi.TableOption.VerticalTab, True)
table.ModifyPopupMenu(0xFFFFFFFF, True)
table.SetTopHeaderNum(2)
table.SetLeftHeaderNum(0)

table.SelectSheet(0)
table.SetRowNumber(12)
table.SetColNumber(10)
table.SetSheetName(0, "Setup")

name = table.GetFont(1)
if (name is not None and len(name) > 0):
    p = 1
else:
    p = table.AddFont("", 14, 0, vi.FontStyleWeight.FontWeight_Bold)
table.JointCells(0, 0, 0, 1)
table.JointCells(1, 0, 1, 1)
table.SetCellFillColor(0, 0, 10, 1, 20)
Exemplo n.º 2
0
import numpy as np
import IStudio as iv
import IMath as im

#get graph and data table
graph = iv.IPGraph("Graph3D-1")
xaxis = graph.Axes(0)
xaxis.ModifyOption((iv.AxisOptions.AutoScale), True)
yaxis = graph.Axes(1)
yaxis.ModifyOption((iv.AxisOptions.AutoScale), True)
zaxis = graph.Axes(2)
zaxis.ModifyOption((iv.AxisOptions.AutoScale), True)

table = iv.IPDataTable("Data-2")
fittingmath = im.IPFitting()

#get data from data table, type some data in col1, col2 and clo3
x = np.zeros(7)
n = table.GetColData(1, 1, 7, 1, x)
y = np.zeros(7)
n = table.GetColData(2, 1, 7, 1, y)
z = np.zeros(7)
n = table.GetColData(3, 1, 7, 1, z)

#clear all plots
graph.RemovePlot(-1)
#plot raw data
plot1 = graph.NewPlot("xyz")
plot1.SetLineStyle(iv.LineType.LineType_None)
plot1.SetPointStyle(iv.IconType.Icon_CircleEmpty)
plot1.SetPointColor(iv.MakeColor(255, 0, 0))
Exemplo n.º 3
0
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import sys
import IStudio as vi
import numpy as np
import pandas as pd

table = vi.IPDataTable("Data-1")
table.SetTableType(vi.TableType.General, True)
table.ModifyOption(vi.TableOption.ShowTab | vi.TableOption.ShowFormularBar,
                   False)
table.ModifyPopupMenu(0xFFFFFFFF, True)

table.SetRowNumber(14)
table.SetColNumber(14)
table.SetTopHeaderNum(1)
name = table.GetFont(1)
if (name is not None and len(name) > 0):
    p = 1
else:
    p = table.AddFont("", 14, 0, vi.FontStyleWeight.FontWeight_Bold)
table.SetCellFont(0, 0, 10, 0, p)
table.SetCellText(0, 0, "Channel")
table.SetCellText(1, 0, "Status")
table.SetCellText(2, 0, "Port Number")
table.SetCellText(3, 0, "Channel Number")
table.SetCellText(4, 0, "Status Data")
table.SetReadOnly(2, 1, 2, 3, True)
table.SetCellFillColor(2, 1, 2, 10, 21)
Exemplo n.º 4
0
import numpy as np
import IStudio as iv
import IMath as im

#get graph and data table
graph = iv.IPGraph("Plot-1")
table = iv.IPDataTable("Data-1")
fittingmath = im.IPFitting()

#get data from data table, type some data in col1 and col2
x = np.zeros(5)
n = table.GetColData(1, 1, 5, 1, x)
y = np.zeros(5)
n = table.GetColData(2, 1, 5, 1, y)

#clear all plots
graph.RemovePlot(-1)
#plot raw data
plot1 = graph.NewPlot("xy")
plot1.SetLineStyle(iv.LineType.LineType_None)
plot1.SetPointStyle(iv.IconType.Icon_CircleEmpty)
plot1.SetPointColor(iv.MakeColor(255, 0, 0))
plot1.PlotXY(x, y)

statistics = np.zeros(20)
ox = np.zeros(100)
oy = np.zeros(100)
for i in range(100):
    ox[i] = i * 0.05
output = fittingmath.LeastSquareLinear(x, y, statistics, ox, oy)
print(output)
Exemplo n.º 5
0
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import sys
import IStudio as vi
import numpy as np
import time

table = vi.IPDataTable("Data-3")
table.SetTableType(vi.TableType.Header, True)
table.ModifyOption(vi.TableOption.ShowTabNavigator | vi.TableOption.ShowFormularBar, False)
table.ModifyPopupMenu(0xFFFFFFFF, True)

table.SelectSheet(0)
table.SetRowNumber(1000)
table.SetColNumber(1000)
table.SetSheetName(0, "Page-1")

for col in range(100):
    data = np.random.normal(50, 50, 1000)
    table.SetColData(col, 1, data, False)
    for row in range(100):
        if data[row] > 199.9:
                table.SetCellFillColor(col, row, col, row, 16)

if table.GetSheetNumber() < 2:
    table.AddSheet("Page-2")    	
table.SelectSheet(1);
for col in range(100):
    data = np.random.normal(50, 50, 1000)