yep it is a string...
here the complete code ... hope its not to confusing
[code:1:85ad851d15]
procedure test1 (data, boxsize_mas, peakx, peaky, n, tmp, maxpix)file data
real boxsize_mas
int peakx,peaky,n
string tmp
int maxpix############################Versteckte Variablen#######################struct *halloint n1 = 43
int n2 = 75
int n3 = 200
begin############################Bermerkungen################################ reset clobber = yes # damit die temporäre Datei immer wieder überschrieben werden kann############################Variablen##################################int box = 0
int i, j
struct peak
struct stddev_tmp
file mbox
real peak_r
real distance
real stddev
real xbox_min, xbox_max, ybox_min, ybox_max
string result###########################Hauptteil##################################hallo = tmpswitch (n)
{
case 1 : box = int (boxsize_mas / n1)
case 2 : box = int (boxsize_mas / n2)
case 3 : box = int (boxsize_mas / n3)
}imstat (data, fields="max", lower=INDEF, upper=INDEF, binwidth=0.1, format=no, > "testfile2") #gibt Ergebnis in Datei aus
if (fscan (hallo, peak) != EOF)
print (peak)peak_r = real (peak) for (i=1; i <= maxpix; i+=10){
for (j=1; j <= maxpix; j+=10){ switch (n)
{
case 1 : distance = n1 * (sqrt((peakx - i) * (peakx - i) + (peaky - j) * (peaky - j) )) / 1000
case 2 : distance = n2 * (sqrt((peakx - i) * (peakx - i) + (peaky - j) * (peaky - j) )) / 1000
case 3 : distance = n3 * (sqrt((peakx - i) * (peakx - i) + (peaky - j) * (peaky - j) )) / 1000
} xbox_min = i - box
ybox_min = j - box
xbox_max = i + box
ybox_max = j + box if (xbox_min >= 1 && ybox_min >= 1 && xbox_max <= maxpix && ybox_max <= maxpix)
{
mbox = data // "[" // int(xbox_min) // ":" // int(xbox_max) // "," // int(ybox_min) // ":" // int(ybox_max) \
// "]"
imstat(mbox, fields="stddev", lower=INDEF, upper=INDEF, binwidth=0.1, format=no, >> "testfile2")
if (fscan (hallo, stddev_tmp) != EOF) stddev = real (stddev_tmp)
result = distance // "_____" // stddev
print (distance // "_____" // stddev)
print (result, >> "dynamic_result")
}
# print (distance)
}
}end[/code:1:85ad851d15]sorry for the chaos in the code... this one is for testing some stuff before the beginning of the real work 8) Greetings
christian