Example #1
0

#here are Prof. Muellers results:
#################################
mueller = source.libreOfficeCalc(
	file= "3d_b.ods", folder="ressources/", sheet="result", dataType="float")
##BASIS (in km)
x = mueller.basisDimension(
	name="x",unit="m", prefix='k',cellRange="a2:a229", resolution=20)

y = mueller.basisDimension(
	name="y", unit="m", prefix="k", cellRange="b2:b229", resolution=20)

##MERGE
type_max = mueller.mergeDimension(
	name="Type", unit="-", cellRange="d2:d229", merge=merge.max())

bestHeight = mueller.mergeDimension(
	name="best height/Mueller", unit="m", prefix="c", cellRange="c2:c229")
# the best height is defined as the height, where the type is maximal
bestHeight.alias().append(type_max)



# and this are Prof. Schroeder results:
#######################################
schroeder = source.libreOfficeCalc(
	folder="ressources/", file= "3d_a.ods", sheet="sheet1", dataType="float")

##BASIS## (in m)
x = schroeder.basisDimension(
Example #2
0
from diaGrabber import source, target, plot
from diaGrabber.source.methods import merge, calc, exclude, transform


# This is our source: a libreOffice-document.
# There are two sheets in the document:
	# in 'functions' are all values written as a function of the mergeDimension
	# in 'values' are only the raw values of it.
	# REMEMBER: source.libreOfficeCalc can only read out values, not functions!
ods = source.libreOfficeCalc(
	file= "5d.ods", folder="ressources/", sheet="values", dataType="float")

# In this dokument one mergeDimension (merge) depends on four different
# basisDimensions (one,two,tree,four)
merge = ods.mergeDimension(
	name="merge", unit="-", cellRange="F3:F600", merge=merge.max())

# the given prefix 'm' stands for milli. If you use this attribute all values
# were transformed in the readout. in this case /1000
one = ods.basisDimension(
	name="one",unit="m/s", cellRange="A3:A600", resolution=40)
two = ods.basisDimension(
	name="two", prefix="m", unit="m/s", cellRange="B3:B600", resolution=40)
three = ods.basisDimension(
	name="three", prefix="m", unit="m/s", cellRange="C3:C600", resolution=40)
four = ods.basisDimension(
	name="four", prefix="m", unit="m/s", cellRange="D3:D600", resolution=40)


# now we put the source 'ods' into the target
t = target.fineMatrix( ods )
Example #3
0
	name="ch0",
	unit="m",
	index=0)
ch1 = f.mergeDimension(
	name="ch1",
	unit="m",
	index=1)

# to explain to you the merge-method 'alias' we add annother mergeDimension
# which only stores  new value if this value is bigger than the last value at
# the same basis-position
ch0max = f.mergeDimension(
	name="ch0max",
	unit="m",
	index=0,
	merge=merge.max())

# with the following command we let the mergeDimension 'ch1' only to take new
# values if the last value of 'ch0max' also was taken
ch1.alias().append(ch0max)


# now we set some arguments for our stream:
f.setArgs(
	# in many cases the stream-source would produce faster new output, than
	# diaGrabber can process and plot
	# therefore we tell diaGrabber only to grab as much values as it can
	# process in the same time:
	readoutEveryNLine="calc",
	# we want to know the number of skipped lines:
	showCalcNLine = True,