# DO NOT REMOVE CODE BETWENN THE TWO HORIZONTAL LINES FROM THIS SCRIPT
#
# NUMPY DOES NOT WORK WITH IRONPYTHON
#
########################################################################
#import numpy as np


spectrum = [0.0] * 700
samplename = ""
modelname = ""
productcode = ""
rangee = [0.0] * 3
datetime = ""
xunit = ""
yunit = ""
spectra = [[0.1] * 700] * 1
nsamples = 0
ndp = 0


# will be overwritten when no constituents and samples are known
constituents = "parameter"
units = "unit"
remarks = ""
predictions = 0.0


def fktSpectrum(spec):
	global spectrum
	spectrum = [0.0] * len(spec)
	global spectra 
	spectra = [[0.1] * len(spec)] * 1
	count = 0
	for x in spec:
		spectrum[count] = x
		spectra[0][count] = x
		count = count + 1

def fktRange(r1,r2,r3):
	global rangee
	rangee[0] = r1
	rangee[1] = r2
	rangee[2] = r3

def fktSamplename(sn):
	global samplename
	samplename = sn

def fktModelname(mn):
	global modelname
	modelname = mn

def fktProductcode(pc):
	global productcode
	productcode = pc

def fktDatetime(dt):
	global datetime
	datetime = dt

def fktXunit(dt):
	global xunit
	xunit = dt

def fktYunit(dt):
	global yunit
	yunit = dt
	
def fktNsamples(n):
	global nsamples
	nsamples = n
	
def fktNdp(n):
	global ndp
	ndp = n
	
def fktSpectra(ns, nw): 
	global spectra 
	spectra = []
	for i in range(ns):
		spectra.append([0.1] * nw)

def fktSpectra2(lspec):
	global spectra
	global ndp
	global nsamples
	count = 0
	count1 = -1
	for x in lspec:
		count1 = count1 + 1
		if count1 == ndp:
			count = count + 1
			count1 = 0
		spectra[count][count1] = x

########################################################################
# YOU MAY ADD, CHANGE OR DELETE CODE BELOW HERE
# but this file will be replaced with the next update
#

