22/09/09 14:38 could not read "/mnt/dados1/URLib18/col/sid.inpe.br/mtc-m18@80/2009/09.22.14.34/doc/relatorio.tex": no such file or directory while executing "file mtime $path" (procedure "CreateTclPage" line 201) invoked from within "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $writeUserCodedPassword" 22/09/09 14:39 22/09/09 14:43 22/09/09 14:44 22/09/09 14:44 22/09/09 14:45 22/09/09 14:45 22/09/09 14:45 22/09/09 14:50 22/09/09 14:54 22/09/09 16:49 22/09/09 17:01 22/09/09 17:20 22/09/09 17:25 22/09/09 17:25 22/09/09 17:35 22/09/09 17:40 22/09/09 17:45 22/09/09 17:46 22/09/09 17:46 22/09/09 17:50 22/09/09 19:20 22/09/09 19:21 22/09/09 19:22 22/09/09 19:22 22/09/09 19:26 22/09/09 19:28 22/09/09 19:29 22/09/09 19:42 22/09/09 19:46 22/09/09 19:52 22/09/09 19:54 22/09/09 19:55 22/09/09 19:55 22/09/09 19:55 22/09/09 19:55 22/09/09 19:55 22/09/09 19:56 22/09/09 19:56 22/09/09 19:56 22/09/09 19:58 22/09/09 20:00 22/09/09 20:10 16/05/24 14:03 16/05/24 16:06 16/05/24 16:18 16/05/24 16:40 07/03/25 19:16 07/03/25 19:16 gle not found in the following known paths: /usr/bin/gle while executing "error "gle not found in the following known paths: \n[join [ListPath gle] \n]"" invoked from within "if [string equal {} $glePath] { error "gle not found in the following known paths: \n[join [ListPath gle] \n]" } else { if {$tcl_platform(platfor..." (procedure "Run-gle" line 11) invoked from within "Run-gle $dirName $fileName {-d pdf -d jpg -d png -tr -dpi 300 -vb 0}" 07/03/25 19:32 07/03/25 19:32 gle not found in the following known paths: /usr/bin/gle while executing "error "gle not found in the following known paths: \n[join [ListPath gle] \n]"" invoked from within "if [string equal {} $glePath] { error "gle not found in the following known paths: \n[join [ListPath gle] \n]" } else { if {$tcl_platform(platfor..." (procedure "Run-gle" line 11) invoked from within "Run-gle $dirName $fileName {-d pdf -d jpg -d png -tr -dpi 300 -vb 0}" 07/03/25 19:34 07/03/25 19:34 gle not found in the following known paths: /usr/bin/gle while executing "error "gle not found in the following known paths: \n[join [ListPath gle] \n]"" invoked from within "if [string equal {} $glePath] { error "gle not found in the following known paths: \n[join [ListPath gle] \n]" } else { if {$tcl_platform(platfor..." (procedure "Run-gle" line 11) invoked from within "Run-gle $dirName $fileName {-d pdf -d jpg -d png -tr -dpi 300 -vb 0}" 07/03/25 19:37 07/03/25 19:37 gle not found in the following known paths: /usr/bin/gle while executing "error "gle not found in the following known paths: \n[join [ListPath gle] \n]"" invoked from within "if [string equal {} $glePath] { error "gle not found in the following known paths: \n[join [ListPath gle] \n]" } else { if {$tcl_platform(platfor..." (procedure "Run-gle" line 11) invoked from within "Run-gle $dirName $fileName {-d pdf -d jpg -d png -tr -dpi 300 -vb 0}" 07/03/25 19:38 07/03/25 19:38 gle not found in the following known paths: /usr/bin/gle while executing "error "gle not found in the following known paths: \n[join [ListPath gle] \n]"" invoked from within "if [string equal {} $glePath] { error "gle not found in the following known paths: \n[join [ListPath gle] \n]" } else { if {$tcl_platform(platfor..." (procedure "Run-gle" line 11) invoked from within "Run-gle $dirName $fileName {-d pdf -d jpg -d png -tr -dpi 300 -vb 0}" 07/03/25 19:38 07/03/25 19:38 gle not found in the following known paths: /usr/bin/gle while executing "error "gle not found in the following known paths: \n[join [ListPath gle] \n]"" invoked from within "if [string equal {} $glePath] { error "gle not found in the following known paths: \n[join [ListPath gle] \n]" } else { if {$tcl_platform(platfor..." (procedure "Run-gle" line 11) invoked from within "Run-gle $dirName $fileName {-d pdf -d jpg -d png -tr -dpi 300 -vb 0}" 07/03/25 19:38 07/03/25 19:38 gle not found in the following known paths: /usr/bin/gle while executing "error "gle not found in the following known paths: \n[join [ListPath gle] \n]"" invoked from within "if [string equal {} $glePath] { error "gle not found in the following known paths: \n[join [ListPath gle] \n]" } else { if {$tcl_platform(platfor..." (procedure "Run-gle" line 11) invoked from within "Run-gle $dirName $fileName {-d pdf -d jpg -d png -tr -dpi 300 -vb 0}" 07/03/25 19:39 07/03/25 19:39 gle not found in the following known paths: /usr/bin/gle while executing "error "gle not found in the following known paths: \n[join [ListPath gle] \n]"" invoked from within "if [string equal {} $glePath] { error "gle not found in the following known paths: \n[join [ListPath gle] \n]" } else { if {$tcl_platform(platfor..." (procedure "Run-gle" line 11) invoked from within "Run-gle $dirName $fileName {-d pdf -d jpg -d png -tr -dpi 300 -vb 0}" 07/03/25 19:39 07/03/25 19:39 gle not found in the following known paths: /usr/bin/gle while executing "error "gle not found in the following known paths: \n[join [ListPath gle] \n]"" invoked from within "if [string equal {} $glePath] { error "gle not found in the following known paths: \n[join [ListPath gle] \n]" } else { if {$tcl_platform(platfor..." (procedure "Run-gle" line 11) invoked from within "Run-gle $dirName $fileName {-d pdf -d jpg -d png -tr -dpi 300 -vb 0}" 07/03/25 19:40 07/03/25 19:40 gle not found in the following known paths: /usr/bin/gle while executing "error "gle not found in the following known paths: \n[join [ListPath gle] \n]"" invoked from within "if [string equal {} $glePath] { error "gle not found in the following known paths: \n[join [ListPath gle] \n]" } else { if {$tcl_platform(platfor..." (procedure "Run-gle" line 11) invoked from within "Run-gle $dirName $fileName {-d pdf -d jpg -d png -tr -dpi 300 -vb 0}" 07/03/25 19:40 07/03/25 19:40 gle not found in the following known paths: /usr/bin/gle while executing "error "gle not found in the following known paths: \n[join [ListPath gle] \n]"" invoked from within "if [string equal {} $glePath] { error "gle not found in the following known paths: \n[join [ListPath gle] \n]" } else { if {$tcl_platform(platfor..." (procedure "Run-gle" line 11) invoked from within "Run-gle $dirName $fileName {-d pdf -d jpg -d png -tr -dpi 300 -vb 0}" 07/03/25 19:41 07/03/25 19:41 gle not found in the following known paths: /usr/bin/gle while executing "error "gle not found in the following known paths: \n[join [ListPath gle] \n]"" invoked from within "if [string equal {} $glePath] { error "gle not found in the following known paths: \n[join [ListPath gle] \n]" } else { if {$tcl_platform(platfor..." (procedure "Run-gle" line 11) invoked from within "Run-gle $dirName $fileName {-d pdf -d jpg -d png -tr -dpi 300 -vb 0}" 07/03/25 19:54 07/03/25 19:54 gle not found in the following known paths: /usr/bin/gle while executing "error "gle not found in the following known paths: \n[join [ListPath gle] \n]"" invoked from within "if [string equal {} $glePath] { error "gle not found in the following known paths: \n[join [ListPath gle] \n]" } else { if {$tcl_platform(platfor..." (procedure "Run-gle" line 11) invoked from within "Run-gle $dirName $fileName {-d pdf -d jpg -d png -tr -dpi 300 -vb 0}" 07/03/25 19:54 07/03/25 19:54 gle not found in the following known paths: /usr/bin/gle while executing "error "gle not found in the following known paths: \n[join [ListPath gle] \n]"" invoked from within "if [string equal {} $glePath] { error "gle not found in the following known paths: \n[join [ListPath gle] \n]" } else { if {$tcl_platform(platfor..." (procedure "Run-gle" line 11) invoked from within "Run-gle $dirName $fileName {-d pdf -d jpg -d png -tr -dpi 300 -vb 0}" 07/03/25 19:56 07/03/25 19:56 gle not found in the following known paths: /usr/bin/gle while executing "error "gle not found in the following known paths: \n[join [ListPath gle] \n]"" invoked from within "if [string equal {} $glePath] { error "gle not found in the following known paths: \n[join [ListPath gle] \n]" } else { if {$tcl_platform(platfor..." (procedure "Run-gle" line 11) invoked from within "Run-gle $dirName $fileName {-d pdf -d jpg -d png -tr -dpi 300 -vb 0}" 07/03/25 19:57 07/03/25 19:57 gle not found in the following known paths: /usr/bin/gle while executing "error "gle not found in the following known paths: \n[join [ListPath gle] \n]"" invoked from within "if [string equal {} $glePath] { error "gle not found in the following known paths: \n[join [ListPath gle] \n]" } else { if {$tcl_platform(platfor..." (procedure "Run-gle" line 11) invoked from within "Run-gle $dirName $fileName {-d pdf -d jpg -d png -tr -dpi 300 -vb 0}" 07/03/25 19:58 07/03/25 19:58 gle not found in the following known paths: /usr/bin/gle while executing "error "gle not found in the following known paths: \n[join [ListPath gle] \n]"" invoked from within "if [string equal {} $glePath] { error "gle not found in the following known paths: \n[join [ListPath gle] \n]" } else { if {$tcl_platform(platfor..." (procedure "Run-gle" line 11) invoked from within "Run-gle $dirName $fileName {-d pdf -d jpg -d png -tr -dpi 300 -vb 0}" 07/03/25 20:26 07/03/25 20:26 gle not found in the following known paths: /usr/bin/gle while executing "error "gle not found in the following known paths: \n[join [ListPath gle] \n]"" invoked from within "if [string equal {} $glePath] { error "gle not found in the following known paths: \n[join [ListPath gle] \n]" } else { if {$tcl_platform(platfor..." (procedure "Run-gle" line 11) invoked from within "Run-gle $dirName $fileName {-d pdf -d jpg -d png -tr -dpi 300 -vb 0}" 07/03/25 21:59 07/03/25 21:59 gle not found in the following known paths: /usr/bin/gle while executing "error "gle not found in the following known paths: \n[join [ListPath gle] \n]"" invoked from within "if [string equal {} $glePath] { error "gle not found in the following known paths: \n[join [ListPath gle] \n]" } else { if {$tcl_platform(platfor..." (procedure "Run-gle" line 11) invoked from within "Run-gle $dirName $fileName {-d pdf -d jpg -d png -tr -dpi 300 -vb 0}" 08/03/25 01:39 08/03/25 01:39 >> specificity.gle (23) |end graph| Could not open inittex.ini file while executing "exec /usr/local/gle/bin/gle -d pdf -d jpg -d png -tr -dpi 300 -vb 0 /mnt/dados1/URLib16c/col/sid.inpe.br/mtc-m18@80/2009/09.22.14.34/doc/specificity.g..." ("eval" body line 1) invoked from within "eval exec [list $glePath] $option [list $dirName/$fileName] " invoked from within "if [string equal {} $glePath] { error "gle not found in the following known paths: \n[join [ListPath gle] \n]" } else { if {$tcl_platform(platfor..." (procedure "Run-gle" line 11) invoked from within "Run-gle $dirName $fileName {-d pdf -d jpg -d png -tr -dpi 300 -vb 0}" 08/03/25 01:56 08/03/25 01:56 >> specificity.gle (23) |end graph| Could not open inittex.ini file while executing "exec /usr/local/gle/bin/gle -d pdf -d jpg -d png -tr -dpi 300 -vb 0 /mnt/dados1/URLib16c/col/sid.inpe.br/mtc-m18@80/2009/09.22.14.34/doc/specificity.g..." ("eval" body line 1) invoked from within "eval exec [list $glePath] $option [list $dirName/$fileName] " invoked from within "if [string equal {} $glePath] { error "gle not found in the following known paths: \n[join [ListPath gle] \n]" } else { if {$tcl_platform(platfor..." (procedure "Run-gle" line 11) invoked from within "Run-gle $dirName $fileName {-d pdf -d jpg -d png -tr -dpi 300 -vb 0}" 08/03/25 03:44 08/03/25 03:44 08/03/25 03:44 CreateTclPage (first substitution): domain error: argument not in valid range while executing "expr $Mean / [llength $xList]" (procedure "Mean" line 4) invoked from within "Mean $specificityDataList2" invoked from within "subst set\ fileContentList\ \{\n\t\{\}\n\t\{\n%\ This\ file\ is\ interpreted\ by\ tcl\ so\ each\ LaTeX\ back\ slash\ must\ be\ duplicated\n%\t\t\\\\do..." invoked from within "interp eval slave [list subst $fileContent2]" while making substitution within: set fileContentList { {} { % This file is interpreted by tcl so each LaTeX back slash must be duplicated % \\documentclass#!#Portuges,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\documentclass#!#english,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\repositorio{$thisRepository} %% repositório onde está depositado o documento \\RequirePackage{comment} % In order to distinguish between LaTeX and tcl square brackets, tcl square brackets must be duplicated \\begin{comment} % hiding tcl script from LaTeX [ # TCL LIBRARY proc CreateDataSet {args} { set i 0 set data {} foreach input [lindex $args 0] { set line {} foreach list $args { lappend line [lindex $list $i] } lappend data $line incr i } return [join $data \n] } # erf -- # The error function # Arguments: # x The value for which the function must be evaluated # Result: # erf(x) # Note: # The algoritm used is due to George Marsaglia # See: http://www.velocityreviews.com/forums/t317358-erf-function-in-c.html # I did not want to copy and convert the even more accurate but # rather lengthy algorithm used by lcc-win32/Sun # proc erf {x} { set x [expr {$x*sqrt(2.0)}] if {$x > 10.0} {return 1.0} if {$x < -10.0} {return -1.0} set a 1.2533141373155 set b -1.0 set pwr 1.0 set t 0.0 set z 0.0 set s [expr {$a+$b*$x}] set i 2 while {$s != $t} { set a [expr {($a+$z*$b)/double($i)}] set b [expr {($b+$z*$a)/double($i+1)}] set pwr [expr {$pwr*$x*$x}] set t $s set s [expr {$s+$pwr*($a+$x*$b)}] incr i 2 } return [expr {1.0-2.0*$s*exp(-0.5*$x*$x-0.9189385332046727418)}] } proc Mean {xList} { set Mean 0. foreach x $xList {set Mean [expr $Mean + $x]} return [expr $Mean / [llength $xList]] } proc Variance {xList} { set Mean [Mean $xList] set Variance 0. foreach x $xList {set Variance [expr $Variance + pow(($x - $Mean), 2)]} return [expr $Variance / ([llength $xList] - 1)] } proc StandardDeviation {xList} { return [expr sqrt([Variance $xList])] } # LIST OF FIGURES TO BE UPDATED set figuresToBeUpdatedList {specificity} # set figuresToBeUpdatedList {} ] [ # PREPARE DATA FOR FIGURE 1 if {[lsearch $figuresToBeUpdatedList specificity] != -1} { set firstValue 8.5 set lastValue 11.5 set increment 0.01 set thresholdList {} for {set i $firstValue} {$i <= $lastValue} {set i [expr $i + $increment]} { lappend thresholdList [format %2.2f $i] } # Specificity # LOAD VHSInterobservadorNormais.txt (must be a one line file) set specificityDataList [Execute $serverAddressWithIP [list Load2 $thisRepository VHSInterobservadorNormais.txt $writeUserCodedPassword doc] 0] regsub -all {,} $specificityDataList {.} specificityDataList2 set soundMean [Mean $specificityDataList2] set soundStandardDeviation [StandardDeviation $specificityDataList2] } ] \\end{comment} \\input{./preamble} %% faça as modificações pertinentes no arquivo preamble.tex \\begin{document} \\input{./document} \\end{document} } [ set dynamicList {} # CREATE FIGURE 1 # ===== specificity.pdf ===== # if {[lsearch $figuresToBeUpdatedList specificity] != -1} { lappend dynamicList {specificity.dat} lappend dynamicList \ [ # tcl script set alpha 1 # Specificity set weightedSpecificityList {} foreach value $thresholdList { lappend weightedSpecificityList [expr (0.5 + 0.5 * [erf [expr ($value - $soundMean) / $soundStandardDeviation]]) * 100 * $alpha] } set graphymove 0 set graphxsize 6.2 set graphysize 4.2 set dxticks 0.5 set dyticks 10 CreateDataSet $thresholdList $weightedSpecificityList ] lappend dynamicList {specificity.gle} lappend dynamicList \ " ! gle script - this script is executed in CreateTclPageFile (see col/dpi.inpe.br/banon/1998/08.02.08.56/doc/utilities1.tcl) size $graphxsize [expr $graphysize * 0.92 + $graphymove] set font ss lwidth 0.01 set alabeldist .8 amove 0 $graphymove begin graph size $graphxsize $graphysize center data \"specificity.dat\" xtitle \"Valor observado\" ytitle \"Porcentagem\" xaxis dticks $dxticks dsubticks $dxticks min $firstValue max $lastValue grid yaxis dticks $dyticks dsubticks $dyticks min 0 max 100 grid xticks lwidth .005 yticks lwidth .005 xlabels hei .16 ylabels hei .16 d1 line smooth color blue lwidth 0.02 end graph " # ===== soundData.tex ===== # lappend dynamicList {soundData.tex} lappend dynamicList \ [ join $specificityDataList {; } ]% # ===== soundMean.tex ===== # lappend dynamicList {soundMean.tex} lappend dynamicList [format %2.2f $soundMean]% # ===== soundStandardDeviation.tex ===== # lappend dynamicList {soundStandardDeviation.tex} lappend dynamicList [format %2.2f $soundStandardDeviation]% } set dynamicList ] } while executing "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $targetFileAbsolutePath $filePath $writeUserCodedPassword" 08/03/25 03:44 CreateTclPage (first substitution): domain error: argument not in valid range while executing "expr $Mean / [llength $xList]" (procedure "Mean" line 4) invoked from within "Mean $specificityDataList2" invoked from within "subst set\ fileContentList\ \{\n\t\{\}\n\t\{\n%\ This\ file\ is\ interpreted\ by\ tcl\ so\ each\ LaTeX\ back\ slash\ must\ be\ duplicated\n%\t\t\\\\do..." invoked from within "interp eval slave [list subst $fileContent2]" while making substitution within: set fileContentList { {} { % This file is interpreted by tcl so each LaTeX back slash must be duplicated % \\documentclass#!#Portuges,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\documentclass#!#english,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\repositorio{$thisRepository} %% repositório onde está depositado o documento \\RequirePackage{comment} % In order to distinguish between LaTeX and tcl square brackets, tcl square brackets must be duplicated \\begin{comment} % hiding tcl script from LaTeX [ # TCL LIBRARY proc CreateDataSet {args} { set i 0 set data {} foreach input [lindex $args 0] { set line {} foreach list $args { lappend line [lindex $list $i] } lappend data $line incr i } return [join $data \n] } # erf -- # The error function # Arguments: # x The value for which the function must be evaluated # Result: # erf(x) # Note: # The algoritm used is due to George Marsaglia # See: http://www.velocityreviews.com/forums/t317358-erf-function-in-c.html # I did not want to copy and convert the even more accurate but # rather lengthy algorithm used by lcc-win32/Sun # proc erf {x} { set x [expr {$x*sqrt(2.0)}] if {$x > 10.0} {return 1.0} if {$x < -10.0} {return -1.0} set a 1.2533141373155 set b -1.0 set pwr 1.0 set t 0.0 set z 0.0 set s [expr {$a+$b*$x}] set i 2 while {$s != $t} { set a [expr {($a+$z*$b)/double($i)}] set b [expr {($b+$z*$a)/double($i+1)}] set pwr [expr {$pwr*$x*$x}] set t $s set s [expr {$s+$pwr*($a+$x*$b)}] incr i 2 } return [expr {1.0-2.0*$s*exp(-0.5*$x*$x-0.9189385332046727418)}] } proc Mean {xList} { set Mean 0. foreach x $xList {set Mean [expr $Mean + $x]} return [expr $Mean / [llength $xList]] } proc Variance {xList} { set Mean [Mean $xList] set Variance 0. foreach x $xList {set Variance [expr $Variance + pow(($x - $Mean), 2)]} return [expr $Variance / ([llength $xList] - 1)] } proc StandardDeviation {xList} { return [expr sqrt([Variance $xList])] } # LIST OF FIGURES TO BE UPDATED set figuresToBeUpdatedList {specificity} # set figuresToBeUpdatedList {} ] [ # PREPARE DATA FOR FIGURE 1 if {[lsearch $figuresToBeUpdatedList specificity] != -1} { set firstValue 8.5 set lastValue 11.5 set increment 0.01 set thresholdList {} for {set i $firstValue} {$i <= $lastValue} {set i [expr $i + $increment]} { lappend thresholdList [format %2.2f $i] } # Specificity # LOAD VHSInterobservadorNormais.txt (must be a one line file) set specificityDataList [Execute $serverAddressWithIP [list Load2 $thisRepository VHSInterobservadorNormais.txt $writeUserCodedPassword doc] 0] regsub -all {,} $specificityDataList {.} specificityDataList2 set soundMean [Mean $specificityDataList2] set soundStandardDeviation [StandardDeviation $specificityDataList2] } ] \\end{comment} \\input{./preamble} %% faça as modificações pertinentes no arquivo preamble.tex \\begin{document} \\input{./document} \\end{document} } [ set dynamicList {} # CREATE FIGURE 1 # ===== specificity.pdf ===== # if {[lsearch $figuresToBeUpdatedList specificity] != -1} { lappend dynamicList {specificity.dat} lappend dynamicList \ [ # tcl script set alpha 1 # Specificity set weightedSpecificityList {} foreach value $thresholdList { lappend weightedSpecificityList [expr (0.5 + 0.5 * [erf [expr ($value - $soundMean) / $soundStandardDeviation]]) * 100 * $alpha] } set graphymove 0 set graphxsize 6.2 set graphysize 4.2 set dxticks 0.5 set dyticks 10 CreateDataSet $thresholdList $weightedSpecificityList ] lappend dynamicList {specificity.gle} lappend dynamicList \ " ! gle script - this script is executed in CreateTclPageFile (see col/dpi.inpe.br/banon/1998/08.02.08.56/doc/utilities1.tcl) size $graphxsize [expr $graphysize * 0.92 + $graphymove] set font ss lwidth 0.01 set alabeldist .8 amove 0 $graphymove begin graph size $graphxsize $graphysize center data \"specificity.dat\" xtitle \"Valor observado\" ytitle \"Porcentagem\" xaxis dticks $dxticks dsubticks $dxticks min $firstValue max $lastValue grid yaxis dticks $dyticks dsubticks $dyticks min 0 max 100 grid xticks lwidth .005 yticks lwidth .005 xlabels hei .16 ylabels hei .16 d1 line smooth color blue lwidth 0.02 end graph " # ===== soundData.tex ===== # lappend dynamicList {soundData.tex} lappend dynamicList \ [ join $specificityDataList {; } ]% # ===== soundMean.tex ===== # lappend dynamicList {soundMean.tex} lappend dynamicList [format %2.2f $soundMean]% # ===== soundStandardDeviation.tex ===== # lappend dynamicList {soundStandardDeviation.tex} lappend dynamicList [format %2.2f $soundStandardDeviation]% } set dynamicList ] } while executing "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $targetFileAbsolutePath $filePath $writeUserCodedPassword" 08/03/25 03:44 08/03/25 03:44 CreateTclPage (first substitution): domain error: argument not in valid range while executing "expr $Mean / [llength $xList]" (procedure "Mean" line 4) invoked from within "Mean $specificityDataList2" invoked from within "subst set\ fileContentList\ \{\n\t\{\}\n\t\{\n%\ This\ file\ is\ interpreted\ by\ tcl\ so\ each\ LaTeX\ back\ slash\ must\ be\ duplicated\n%\t\t\\\\do..." invoked from within "interp eval slave [list subst $fileContent2]" while making substitution within: set fileContentList { {} { % This file is interpreted by tcl so each LaTeX back slash must be duplicated % \\documentclass#!#Portuges,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\documentclass#!#english,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\repositorio{$thisRepository} %% repositório onde está depositado o documento \\RequirePackage{comment} % In order to distinguish between LaTeX and tcl square brackets, tcl square brackets must be duplicated \\begin{comment} % hiding tcl script from LaTeX [ # TCL LIBRARY proc CreateDataSet {args} { set i 0 set data {} foreach input [lindex $args 0] { set line {} foreach list $args { lappend line [lindex $list $i] } lappend data $line incr i } return [join $data \n] } # erf -- # The error function # Arguments: # x The value for which the function must be evaluated # Result: # erf(x) # Note: # The algoritm used is due to George Marsaglia # See: http://www.velocityreviews.com/forums/t317358-erf-function-in-c.html # I did not want to copy and convert the even more accurate but # rather lengthy algorithm used by lcc-win32/Sun # proc erf {x} { set x [expr {$x*sqrt(2.0)}] if {$x > 10.0} {return 1.0} if {$x < -10.0} {return -1.0} set a 1.2533141373155 set b -1.0 set pwr 1.0 set t 0.0 set z 0.0 set s [expr {$a+$b*$x}] set i 2 while {$s != $t} { set a [expr {($a+$z*$b)/double($i)}] set b [expr {($b+$z*$a)/double($i+1)}] set pwr [expr {$pwr*$x*$x}] set t $s set s [expr {$s+$pwr*($a+$x*$b)}] incr i 2 } return [expr {1.0-2.0*$s*exp(-0.5*$x*$x-0.9189385332046727418)}] } proc Mean {xList} { set Mean 0. foreach x $xList {set Mean [expr $Mean + $x]} return [expr $Mean / [llength $xList]] } proc Variance {xList} { set Mean [Mean $xList] set Variance 0. foreach x $xList {set Variance [expr $Variance + pow(($x - $Mean), 2)]} return [expr $Variance / ([llength $xList] - 1)] } proc StandardDeviation {xList} { return [expr sqrt([Variance $xList])] } # LIST OF FIGURES TO BE UPDATED set figuresToBeUpdatedList {specificity} # set figuresToBeUpdatedList {} ] [ # PREPARE DATA FOR FIGURE 1 if {[lsearch $figuresToBeUpdatedList specificity] != -1} { set firstValue 8.5 set lastValue 11.5 set increment 0.01 set thresholdList {} for {set i $firstValue} {$i <= $lastValue} {set i [expr $i + $increment]} { lappend thresholdList [format %2.2f $i] } # Specificity # LOAD VHSInterobservadorNormais.txt (must be a one line file) set specificityDataList [Execute $serverAddressWithIP [list Load2 $thisRepository VHSInterobservadorNormais.txt $writeUserCodedPassword doc] 0] regsub -all {,} $specificityDataList {.} specificityDataList2 set soundMean [Mean $specificityDataList2] set soundStandardDeviation [StandardDeviation $specificityDataList2] } ] \\end{comment} \\input{./preamble} %% faça as modificações pertinentes no arquivo preamble.tex \\begin{document} \\input{./document} \\end{document} } [ set dynamicList {} # CREATE FIGURE 1 # ===== specificity.pdf ===== # if {[lsearch $figuresToBeUpdatedList specificity] != -1} { lappend dynamicList {specificity.dat} lappend dynamicList \ [ # tcl script set alpha 1 # Specificity set weightedSpecificityList {} foreach value $thresholdList { lappend weightedSpecificityList [expr (0.5 + 0.5 * [erf [expr ($value - $soundMean) / $soundStandardDeviation]]) * 100 * $alpha] } set graphymove 0 set graphxsize 6.2 set graphysize 4.2 set dxticks 0.5 set dyticks 10 CreateDataSet $thresholdList $weightedSpecificityList ] lappend dynamicList {specificity.gle} lappend dynamicList \ " ! gle script - this script is executed in CreateTclPageFile (see col/dpi.inpe.br/banon/1998/08.02.08.56/doc/utilities1.tcl) size $graphxsize [expr $graphysize * 0.92 + $graphymove] set font ss lwidth 0.01 set alabeldist .8 amove 0 $graphymove begin graph size $graphxsize $graphysize center data \"specificity.dat\" xtitle \"Valor observado\" ytitle \"Porcentagem\" xaxis dticks $dxticks dsubticks $dxticks min $firstValue max $lastValue grid yaxis dticks $dyticks dsubticks $dyticks min 0 max 100 grid xticks lwidth .005 yticks lwidth .005 xlabels hei .16 ylabels hei .16 d1 line smooth color blue lwidth 0.02 end graph " # ===== soundData.tex ===== # lappend dynamicList {soundData.tex} lappend dynamicList \ [ join $specificityDataList {; } ]% # ===== soundMean.tex ===== # lappend dynamicList {soundMean.tex} lappend dynamicList [format %2.2f $soundMean]% # ===== soundStandardDeviation.tex ===== # lappend dynamicList {soundStandardDeviation.tex} lappend dynamicList [format %2.2f $soundStandardDeviation]% } set dynamicList ] } while executing "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $targetFileAbsolutePath $filePath $writeUserCodedPassword" 08/03/25 03:44 08/03/25 03:44 CreateTclPage (first substitution): domain error: argument not in valid range while executing "expr $Mean / [llength $xList]" (procedure "Mean" line 4) invoked from within "Mean $specificityDataList2" invoked from within "subst set\ fileContentList\ \{\n\t\{\}\n\t\{\n%\ This\ file\ is\ interpreted\ by\ tcl\ so\ each\ LaTeX\ back\ slash\ must\ be\ duplicated\n%\t\t\\\\do..." invoked from within "interp eval slave [list subst $fileContent2]" while making substitution within: set fileContentList { {} { % This file is interpreted by tcl so each LaTeX back slash must be duplicated % \\documentclass#!#Portuges,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\documentclass#!#english,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\repositorio{$thisRepository} %% repositório onde está depositado o documento \\RequirePackage{comment} % In order to distinguish between LaTeX and tcl square brackets, tcl square brackets must be duplicated \\begin{comment} % hiding tcl script from LaTeX [ # TCL LIBRARY proc CreateDataSet {args} { set i 0 set data {} foreach input [lindex $args 0] { set line {} foreach list $args { lappend line [lindex $list $i] } lappend data $line incr i } return [join $data \n] } # erf -- # The error function # Arguments: # x The value for which the function must be evaluated # Result: # erf(x) # Note: # The algoritm used is due to George Marsaglia # See: http://www.velocityreviews.com/forums/t317358-erf-function-in-c.html # I did not want to copy and convert the even more accurate but # rather lengthy algorithm used by lcc-win32/Sun # proc erf {x} { set x [expr {$x*sqrt(2.0)}] if {$x > 10.0} {return 1.0} if {$x < -10.0} {return -1.0} set a 1.2533141373155 set b -1.0 set pwr 1.0 set t 0.0 set z 0.0 set s [expr {$a+$b*$x}] set i 2 while {$s != $t} { set a [expr {($a+$z*$b)/double($i)}] set b [expr {($b+$z*$a)/double($i+1)}] set pwr [expr {$pwr*$x*$x}] set t $s set s [expr {$s+$pwr*($a+$x*$b)}] incr i 2 } return [expr {1.0-2.0*$s*exp(-0.5*$x*$x-0.9189385332046727418)}] } proc Mean {xList} { set Mean 0. foreach x $xList {set Mean [expr $Mean + $x]} return [expr $Mean / [llength $xList]] } proc Variance {xList} { set Mean [Mean $xList] set Variance 0. foreach x $xList {set Variance [expr $Variance + pow(($x - $Mean), 2)]} return [expr $Variance / ([llength $xList] - 1)] } proc StandardDeviation {xList} { return [expr sqrt([Variance $xList])] } # LIST OF FIGURES TO BE UPDATED set figuresToBeUpdatedList {specificity} # set figuresToBeUpdatedList {} ] [ # PREPARE DATA FOR FIGURE 1 if {[lsearch $figuresToBeUpdatedList specificity] != -1} { set firstValue 8.5 set lastValue 11.5 set increment 0.01 set thresholdList {} for {set i $firstValue} {$i <= $lastValue} {set i [expr $i + $increment]} { lappend thresholdList [format %2.2f $i] } # Specificity # LOAD VHSInterobservadorNormais.txt (must be a one line file) set specificityDataList [Execute $serverAddressWithIP [list Load2 $thisRepository VHSInterobservadorNormais.txt $writeUserCodedPassword doc] 0] regsub -all {,} $specificityDataList {.} specificityDataList2 set soundMean [Mean $specificityDataList2] set soundStandardDeviation [StandardDeviation $specificityDataList2] } ] \\end{comment} \\input{./preamble} %% faça as modificações pertinentes no arquivo preamble.tex \\begin{document} \\input{./document} \\end{document} } [ set dynamicList {} # CREATE FIGURE 1 # ===== specificity.pdf ===== # if {[lsearch $figuresToBeUpdatedList specificity] != -1} { lappend dynamicList {specificity.dat} lappend dynamicList \ [ # tcl script set alpha 1 # Specificity set weightedSpecificityList {} foreach value $thresholdList { lappend weightedSpecificityList [expr (0.5 + 0.5 * [erf [expr ($value - $soundMean) / $soundStandardDeviation]]) * 100 * $alpha] } set graphymove 0 set graphxsize 6.2 set graphysize 4.2 set dxticks 0.5 set dyticks 10 CreateDataSet $thresholdList $weightedSpecificityList ] lappend dynamicList {specificity.gle} lappend dynamicList \ " ! gle script - this script is executed in CreateTclPageFile (see col/dpi.inpe.br/banon/1998/08.02.08.56/doc/utilities1.tcl) size $graphxsize [expr $graphysize * 0.92 + $graphymove] set font ss lwidth 0.01 set alabeldist .8 amove 0 $graphymove begin graph size $graphxsize $graphysize center data \"specificity.dat\" xtitle \"Valor observado\" ytitle \"Porcentagem\" xaxis dticks $dxticks dsubticks $dxticks min $firstValue max $lastValue grid yaxis dticks $dyticks dsubticks $dyticks min 0 max 100 grid xticks lwidth .005 yticks lwidth .005 xlabels hei .16 ylabels hei .16 d1 line smooth color blue lwidth 0.02 end graph " # ===== soundData.tex ===== # lappend dynamicList {soundData.tex} lappend dynamicList \ [ join $specificityDataList {; } ]% # ===== soundMean.tex ===== # lappend dynamicList {soundMean.tex} lappend dynamicList [format %2.2f $soundMean]% # ===== soundStandardDeviation.tex ===== # lappend dynamicList {soundStandardDeviation.tex} lappend dynamicList [format %2.2f $soundStandardDeviation]% } set dynamicList ] } while executing "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $targetFileAbsolutePath $filePath $writeUserCodedPassword" 09/03/25 01:13 09/03/25 01:13 CreateTclPage (first substitution): domain error: argument not in valid range while executing "expr $Mean / [llength $xList]" (procedure "Mean" line 4) invoked from within "Mean $specificityDataList2" invoked from within "subst set\ fileContentList\ \{\n\t\{\}\n\t\{\n%\ This\ file\ is\ interpreted\ by\ tcl\ so\ each\ LaTeX\ back\ slash\ must\ be\ duplicated\n%\t\t\\\\do..." invoked from within "interp eval slave [list subst $fileContent2]" while making substitution within: set fileContentList { {} { % This file is interpreted by tcl so each LaTeX back slash must be duplicated % \\documentclass#!#Portuges,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\documentclass#!#english,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\repositorio{$thisRepository} %% repositório onde está depositado o documento \\RequirePackage{comment} % In order to distinguish between LaTeX and tcl square brackets, tcl square brackets must be duplicated \\begin{comment} % hiding tcl script from LaTeX [ # TCL LIBRARY proc CreateDataSet {args} { set i 0 set data {} foreach input [lindex $args 0] { set line {} foreach list $args { lappend line [lindex $list $i] } lappend data $line incr i } return [join $data \n] } # erf -- # The error function # Arguments: # x The value for which the function must be evaluated # Result: # erf(x) # Note: # The algoritm used is due to George Marsaglia # See: http://www.velocityreviews.com/forums/t317358-erf-function-in-c.html # I did not want to copy and convert the even more accurate but # rather lengthy algorithm used by lcc-win32/Sun # proc erf {x} { set x [expr {$x*sqrt(2.0)}] if {$x > 10.0} {return 1.0} if {$x < -10.0} {return -1.0} set a 1.2533141373155 set b -1.0 set pwr 1.0 set t 0.0 set z 0.0 set s [expr {$a+$b*$x}] set i 2 while {$s != $t} { set a [expr {($a+$z*$b)/double($i)}] set b [expr {($b+$z*$a)/double($i+1)}] set pwr [expr {$pwr*$x*$x}] set t $s set s [expr {$s+$pwr*($a+$x*$b)}] incr i 2 } return [expr {1.0-2.0*$s*exp(-0.5*$x*$x-0.9189385332046727418)}] } proc Mean {xList} { set Mean 0. foreach x $xList {set Mean [expr $Mean + $x]} return [expr $Mean / [llength $xList]] } proc Variance {xList} { set Mean [Mean $xList] set Variance 0. foreach x $xList {set Variance [expr $Variance + pow(($x - $Mean), 2)]} return [expr $Variance / ([llength $xList] - 1)] } proc StandardDeviation {xList} { return [expr sqrt([Variance $xList])] } # LIST OF FIGURES TO BE UPDATED set figuresToBeUpdatedList {specificity} # set figuresToBeUpdatedList {} ] [ # PREPARE DATA FOR FIGURE 1 if {[lsearch $figuresToBeUpdatedList specificity] != -1} { set firstValue 8.5 set lastValue 11.5 set increment 0.01 set thresholdList {} for {set i $firstValue} {$i <= $lastValue} {set i [expr $i + $increment]} { lappend thresholdList [format %2.2f $i] } # Specificity # LOAD VHSInterobservadorNormais.txt (must be a one line file) set specificityDataList [Execute $serverAddressWithIP [list Load2 $thisRepository VHSInterobservadorNormais.txt $writeUserCodedPassword doc] 0] regsub -all {,} $specificityDataList {.} specificityDataList2 set soundMean [Mean $specificityDataList2] set soundStandardDeviation [StandardDeviation $specificityDataList2] } ] \\end{comment} \\input{./preamble} %% faça as modificações pertinentes no arquivo preamble.tex \\begin{document} \\input{./document} \\end{document} } [ set dynamicList {} # CREATE FIGURE 1 # ===== specificity.pdf ===== # if {[lsearch $figuresToBeUpdatedList specificity] != -1} { lappend dynamicList {specificity.dat} lappend dynamicList \ [ # tcl script set alpha 1 # Specificity set weightedSpecificityList {} foreach value $thresholdList { lappend weightedSpecificityList [expr (0.5 + 0.5 * [erf [expr ($value - $soundMean) / $soundStandardDeviation]]) * 100 * $alpha] } set graphymove 0 set graphxsize 6.2 set graphysize 4.2 set dxticks 0.5 set dyticks 10 CreateDataSet $thresholdList $weightedSpecificityList ] lappend dynamicList {specificity.gle} lappend dynamicList \ " ! gle script - this script is executed in CreateTclPageFile (see col/dpi.inpe.br/banon/1998/08.02.08.56/doc/utilities1.tcl) size $graphxsize [expr $graphysize * 0.92 + $graphymove] set font ss lwidth 0.01 set alabeldist .8 amove 0 $graphymove begin graph size $graphxsize $graphysize center data \"specificity.dat\" xtitle \"Valor observado\" ytitle \"Porcentagem\" xaxis dticks $dxticks dsubticks $dxticks min $firstValue max $lastValue grid yaxis dticks $dyticks dsubticks $dyticks min 0 max 100 grid xticks lwidth .005 yticks lwidth .005 xlabels hei .16 ylabels hei .16 d1 line smooth color blue lwidth 0.02 end graph " # ===== soundData.tex ===== # lappend dynamicList {soundData.tex} lappend dynamicList \ [ join $specificityDataList {; } ]% # ===== soundMean.tex ===== # lappend dynamicList {soundMean.tex} lappend dynamicList [format %2.2f $soundMean]% # ===== soundStandardDeviation.tex ===== # lappend dynamicList {soundStandardDeviation.tex} lappend dynamicList [format %2.2f $soundStandardDeviation]% } set dynamicList ] } while executing "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $targetFileAbsolutePath $filePath $writeUserCodedPassword" 09/03/25 06:25 09/03/25 06:25 CreateTclPage (first substitution): domain error: argument not in valid range while executing "expr $Mean / [llength $xList]" (procedure "Mean" line 4) invoked from within "Mean $specificityDataList2" invoked from within "subst set\ fileContentList\ \{\n\t\{\}\n\t\{\n%\ This\ file\ is\ interpreted\ by\ tcl\ so\ each\ LaTeX\ back\ slash\ must\ be\ duplicated\n%\t\t\\\\do..." invoked from within "interp eval slave [list subst $fileContent2]" while making substitution within: set fileContentList { {} { % This file is interpreted by tcl so each LaTeX back slash must be duplicated % \\documentclass#!#Portuges,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\documentclass#!#english,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\repositorio{$thisRepository} %% repositório onde está depositado o documento \\RequirePackage{comment} % In order to distinguish between LaTeX and tcl square brackets, tcl square brackets must be duplicated \\begin{comment} % hiding tcl script from LaTeX [ # TCL LIBRARY proc CreateDataSet {args} { set i 0 set data {} foreach input [lindex $args 0] { set line {} foreach list $args { lappend line [lindex $list $i] } lappend data $line incr i } return [join $data \n] } # erf -- # The error function # Arguments: # x The value for which the function must be evaluated # Result: # erf(x) # Note: # The algoritm used is due to George Marsaglia # See: http://www.velocityreviews.com/forums/t317358-erf-function-in-c.html # I did not want to copy and convert the even more accurate but # rather lengthy algorithm used by lcc-win32/Sun # proc erf {x} { set x [expr {$x*sqrt(2.0)}] if {$x > 10.0} {return 1.0} if {$x < -10.0} {return -1.0} set a 1.2533141373155 set b -1.0 set pwr 1.0 set t 0.0 set z 0.0 set s [expr {$a+$b*$x}] set i 2 while {$s != $t} { set a [expr {($a+$z*$b)/double($i)}] set b [expr {($b+$z*$a)/double($i+1)}] set pwr [expr {$pwr*$x*$x}] set t $s set s [expr {$s+$pwr*($a+$x*$b)}] incr i 2 } return [expr {1.0-2.0*$s*exp(-0.5*$x*$x-0.9189385332046727418)}] } proc Mean {xList} { set Mean 0. foreach x $xList {set Mean [expr $Mean + $x]} return [expr $Mean / [llength $xList]] } proc Variance {xList} { set Mean [Mean $xList] set Variance 0. foreach x $xList {set Variance [expr $Variance + pow(($x - $Mean), 2)]} return [expr $Variance / ([llength $xList] - 1)] } proc StandardDeviation {xList} { return [expr sqrt([Variance $xList])] } # LIST OF FIGURES TO BE UPDATED set figuresToBeUpdatedList {specificity} # set figuresToBeUpdatedList {} ] [ # PREPARE DATA FOR FIGURE 1 if {[lsearch $figuresToBeUpdatedList specificity] != -1} { set firstValue 8.5 set lastValue 11.5 set increment 0.01 set thresholdList {} for {set i $firstValue} {$i <= $lastValue} {set i [expr $i + $increment]} { lappend thresholdList [format %2.2f $i] } # Specificity # LOAD VHSInterobservadorNormais.txt (must be a one line file) set specificityDataList [Execute $serverAddressWithIP [list Load2 $thisRepository VHSInterobservadorNormais.txt $writeUserCodedPassword doc] 0] regsub -all {,} $specificityDataList {.} specificityDataList2 set soundMean [Mean $specificityDataList2] set soundStandardDeviation [StandardDeviation $specificityDataList2] } ] \\end{comment} \\input{./preamble} %% faça as modificações pertinentes no arquivo preamble.tex \\begin{document} \\input{./document} \\end{document} } [ set dynamicList {} # CREATE FIGURE 1 # ===== specificity.pdf ===== # if {[lsearch $figuresToBeUpdatedList specificity] != -1} { lappend dynamicList {specificity.dat} lappend dynamicList \ [ # tcl script set alpha 1 # Specificity set weightedSpecificityList {} foreach value $thresholdList { lappend weightedSpecificityList [expr (0.5 + 0.5 * [erf [expr ($value - $soundMean) / $soundStandardDeviation]]) * 100 * $alpha] } set graphymove 0 set graphxsize 6.2 set graphysize 4.2 set dxticks 0.5 set dyticks 10 CreateDataSet $thresholdList $weightedSpecificityList ] lappend dynamicList {specificity.gle} lappend dynamicList \ " ! gle script - this script is executed in CreateTclPageFile (see col/dpi.inpe.br/banon/1998/08.02.08.56/doc/utilities1.tcl) size $graphxsize [expr $graphysize * 0.92 + $graphymove] set font ss lwidth 0.01 set alabeldist .8 amove 0 $graphymove begin graph size $graphxsize $graphysize center data \"specificity.dat\" xtitle \"Valor observado\" ytitle \"Porcentagem\" xaxis dticks $dxticks dsubticks $dxticks min $firstValue max $lastValue grid yaxis dticks $dyticks dsubticks $dyticks min 0 max 100 grid xticks lwidth .005 yticks lwidth .005 xlabels hei .16 ylabels hei .16 d1 line smooth color blue lwidth 0.02 end graph " # ===== soundData.tex ===== # lappend dynamicList {soundData.tex} lappend dynamicList \ [ join $specificityDataList {; } ]% # ===== soundMean.tex ===== # lappend dynamicList {soundMean.tex} lappend dynamicList [format %2.2f $soundMean]% # ===== soundStandardDeviation.tex ===== # lappend dynamicList {soundStandardDeviation.tex} lappend dynamicList [format %2.2f $soundStandardDeviation]% } set dynamicList ] } while executing "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $targetFileAbsolutePath $filePath $writeUserCodedPassword" 09/03/25 06:27 09/03/25 06:27 CreateTclPage (first substitution): domain error: argument not in valid range while executing "expr $Mean / [llength $xList]" (procedure "Mean" line 4) invoked from within "Mean $specificityDataList2" invoked from within "subst set\ fileContentList\ \{\n\t\{\}\n\t\{\n%\ This\ file\ is\ interpreted\ by\ tcl\ so\ each\ LaTeX\ back\ slash\ must\ be\ duplicated\n%\t\t\\\\do..." invoked from within "interp eval slave [list subst $fileContent2]" while making substitution within: set fileContentList { {} { % This file is interpreted by tcl so each LaTeX back slash must be duplicated % \\documentclass#!#Portuges,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\documentclass#!#english,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\repositorio{$thisRepository} %% repositório onde está depositado o documento \\RequirePackage{comment} % In order to distinguish between LaTeX and tcl square brackets, tcl square brackets must be duplicated \\begin{comment} % hiding tcl script from LaTeX [ # TCL LIBRARY proc CreateDataSet {args} { set i 0 set data {} foreach input [lindex $args 0] { set line {} foreach list $args { lappend line [lindex $list $i] } lappend data $line incr i } return [join $data \n] } # erf -- # The error function # Arguments: # x The value for which the function must be evaluated # Result: # erf(x) # Note: # The algoritm used is due to George Marsaglia # See: http://www.velocityreviews.com/forums/t317358-erf-function-in-c.html # I did not want to copy and convert the even more accurate but # rather lengthy algorithm used by lcc-win32/Sun # proc erf {x} { set x [expr {$x*sqrt(2.0)}] if {$x > 10.0} {return 1.0} if {$x < -10.0} {return -1.0} set a 1.2533141373155 set b -1.0 set pwr 1.0 set t 0.0 set z 0.0 set s [expr {$a+$b*$x}] set i 2 while {$s != $t} { set a [expr {($a+$z*$b)/double($i)}] set b [expr {($b+$z*$a)/double($i+1)}] set pwr [expr {$pwr*$x*$x}] set t $s set s [expr {$s+$pwr*($a+$x*$b)}] incr i 2 } return [expr {1.0-2.0*$s*exp(-0.5*$x*$x-0.9189385332046727418)}] } proc Mean {xList} { set Mean 0. foreach x $xList {set Mean [expr $Mean + $x]} return [expr $Mean / [llength $xList]] } proc Variance {xList} { set Mean [Mean $xList] set Variance 0. foreach x $xList {set Variance [expr $Variance + pow(($x - $Mean), 2)]} return [expr $Variance / ([llength $xList] - 1)] } proc StandardDeviation {xList} { return [expr sqrt([Variance $xList])] } # LIST OF FIGURES TO BE UPDATED set figuresToBeUpdatedList {specificity} # set figuresToBeUpdatedList {} ] [ # PREPARE DATA FOR FIGURE 1 if {[lsearch $figuresToBeUpdatedList specificity] != -1} { set firstValue 8.5 set lastValue 11.5 set increment 0.01 set thresholdList {} for {set i $firstValue} {$i <= $lastValue} {set i [expr $i + $increment]} { lappend thresholdList [format %2.2f $i] } # Specificity # LOAD VHSInterobservadorNormais.txt (must be a one line file) set specificityDataList [Execute $serverAddressWithIP [list Load2 $thisRepository VHSInterobservadorNormais.txt $writeUserCodedPassword doc] 0] regsub -all {,} $specificityDataList {.} specificityDataList2 set soundMean [Mean $specificityDataList2] set soundStandardDeviation [StandardDeviation $specificityDataList2] } ] \\end{comment} \\input{./preamble} %% faça as modificações pertinentes no arquivo preamble.tex \\begin{document} \\input{./document} \\end{document} } [ set dynamicList {} # CREATE FIGURE 1 # ===== specificity.pdf ===== # if {[lsearch $figuresToBeUpdatedList specificity] != -1} { lappend dynamicList {specificity.dat} lappend dynamicList \ [ # tcl script set alpha 1 # Specificity set weightedSpecificityList {} foreach value $thresholdList { lappend weightedSpecificityList [expr (0.5 + 0.5 * [erf [expr ($value - $soundMean) / $soundStandardDeviation]]) * 100 * $alpha] } set graphymove 0 set graphxsize 6.2 set graphysize 4.2 set dxticks 0.5 set dyticks 10 CreateDataSet $thresholdList $weightedSpecificityList ] lappend dynamicList {specificity.gle} lappend dynamicList \ " ! gle script - this script is executed in CreateTclPageFile (see col/dpi.inpe.br/banon/1998/08.02.08.56/doc/utilities1.tcl) size $graphxsize [expr $graphysize * 0.92 + $graphymove] set font ss lwidth 0.01 set alabeldist .8 amove 0 $graphymove begin graph size $graphxsize $graphysize center data \"specificity.dat\" xtitle \"Valor observado\" ytitle \"Porcentagem\" xaxis dticks $dxticks dsubticks $dxticks min $firstValue max $lastValue grid yaxis dticks $dyticks dsubticks $dyticks min 0 max 100 grid xticks lwidth .005 yticks lwidth .005 xlabels hei .16 ylabels hei .16 d1 line smooth color blue lwidth 0.02 end graph " # ===== soundData.tex ===== # lappend dynamicList {soundData.tex} lappend dynamicList \ [ join $specificityDataList {; } ]% # ===== soundMean.tex ===== # lappend dynamicList {soundMean.tex} lappend dynamicList [format %2.2f $soundMean]% # ===== soundStandardDeviation.tex ===== # lappend dynamicList {soundStandardDeviation.tex} lappend dynamicList [format %2.2f $soundStandardDeviation]% } set dynamicList ] } while executing "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $targetFileAbsolutePath $filePath $writeUserCodedPassword" 09/03/25 06:51 09/03/25 06:51 CreateTclPage (first substitution): domain error: argument not in valid range while executing "expr $Mean / [llength $xList]" (procedure "Mean" line 4) invoked from within "Mean $specificityDataList2" invoked from within "subst set\ fileContentList\ \{\n\t\{\}\n\t\{\n%\ This\ file\ is\ interpreted\ by\ tcl\ so\ each\ LaTeX\ back\ slash\ must\ be\ duplicated\n%\t\t\\\\do..." invoked from within "interp eval slave [list subst $fileContent2]" while making substitution within: set fileContentList { {} { % This file is interpreted by tcl so each LaTeX back slash must be duplicated % \\documentclass#!#Portuges,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\documentclass#!#english,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\repositorio{$thisRepository} %% repositório onde está depositado o documento \\RequirePackage{comment} % In order to distinguish between LaTeX and tcl square brackets, tcl square brackets must be duplicated \\begin{comment} % hiding tcl script from LaTeX [ # TCL LIBRARY proc CreateDataSet {args} { set i 0 set data {} foreach input [lindex $args 0] { set line {} foreach list $args { lappend line [lindex $list $i] } lappend data $line incr i } return [join $data \n] } # erf -- # The error function # Arguments: # x The value for which the function must be evaluated # Result: # erf(x) # Note: # The algoritm used is due to George Marsaglia # See: http://www.velocityreviews.com/forums/t317358-erf-function-in-c.html # I did not want to copy and convert the even more accurate but # rather lengthy algorithm used by lcc-win32/Sun # proc erf {x} { set x [expr {$x*sqrt(2.0)}] if {$x > 10.0} {return 1.0} if {$x < -10.0} {return -1.0} set a 1.2533141373155 set b -1.0 set pwr 1.0 set t 0.0 set z 0.0 set s [expr {$a+$b*$x}] set i 2 while {$s != $t} { set a [expr {($a+$z*$b)/double($i)}] set b [expr {($b+$z*$a)/double($i+1)}] set pwr [expr {$pwr*$x*$x}] set t $s set s [expr {$s+$pwr*($a+$x*$b)}] incr i 2 } return [expr {1.0-2.0*$s*exp(-0.5*$x*$x-0.9189385332046727418)}] } proc Mean {xList} { set Mean 0. foreach x $xList {set Mean [expr $Mean + $x]} return [expr $Mean / [llength $xList]] } proc Variance {xList} { set Mean [Mean $xList] set Variance 0. foreach x $xList {set Variance [expr $Variance + pow(($x - $Mean), 2)]} return [expr $Variance / ([llength $xList] - 1)] } proc StandardDeviation {xList} { return [expr sqrt([Variance $xList])] } # LIST OF FIGURES TO BE UPDATED set figuresToBeUpdatedList {specificity} # set figuresToBeUpdatedList {} ] [ # PREPARE DATA FOR FIGURE 1 if {[lsearch $figuresToBeUpdatedList specificity] != -1} { set firstValue 8.5 set lastValue 11.5 set increment 0.01 set thresholdList {} for {set i $firstValue} {$i <= $lastValue} {set i [expr $i + $increment]} { lappend thresholdList [format %2.2f $i] } # Specificity # LOAD VHSInterobservadorNormais.txt (must be a one line file) set specificityDataList [Execute $serverAddressWithIP [list Load2 $thisRepository VHSInterobservadorNormais.txt $writeUserCodedPassword doc] 0] regsub -all {,} $specificityDataList {.} specificityDataList2 set soundMean [Mean $specificityDataList2] set soundStandardDeviation [StandardDeviation $specificityDataList2] } ] \\end{comment} \\input{./preamble} %% faça as modificações pertinentes no arquivo preamble.tex \\begin{document} \\input{./document} \\end{document} } [ set dynamicList {} # CREATE FIGURE 1 # ===== specificity.pdf ===== # if {[lsearch $figuresToBeUpdatedList specificity] != -1} { lappend dynamicList {specificity.dat} lappend dynamicList \ [ # tcl script set alpha 1 # Specificity set weightedSpecificityList {} foreach value $thresholdList { lappend weightedSpecificityList [expr (0.5 + 0.5 * [erf [expr ($value - $soundMean) / $soundStandardDeviation]]) * 100 * $alpha] } set graphymove 0 set graphxsize 6.2 set graphysize 4.2 set dxticks 0.5 set dyticks 10 CreateDataSet $thresholdList $weightedSpecificityList ] lappend dynamicList {specificity.gle} lappend dynamicList \ " ! gle script - this script is executed in CreateTclPageFile (see col/dpi.inpe.br/banon/1998/08.02.08.56/doc/utilities1.tcl) size $graphxsize [expr $graphysize * 0.92 + $graphymove] set font ss lwidth 0.01 set alabeldist .8 amove 0 $graphymove begin graph size $graphxsize $graphysize center data \"specificity.dat\" xtitle \"Valor observado\" ytitle \"Porcentagem\" xaxis dticks $dxticks dsubticks $dxticks min $firstValue max $lastValue grid yaxis dticks $dyticks dsubticks $dyticks min 0 max 100 grid xticks lwidth .005 yticks lwidth .005 xlabels hei .16 ylabels hei .16 d1 line smooth color blue lwidth 0.02 end graph " # ===== soundData.tex ===== # lappend dynamicList {soundData.tex} lappend dynamicList \ [ join $specificityDataList {; } ]% # ===== soundMean.tex ===== # lappend dynamicList {soundMean.tex} lappend dynamicList [format %2.2f $soundMean]% # ===== soundStandardDeviation.tex ===== # lappend dynamicList {soundStandardDeviation.tex} lappend dynamicList [format %2.2f $soundStandardDeviation]% } set dynamicList ] } while executing "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $targetFileAbsolutePath $filePath $writeUserCodedPassword" 09/03/25 07:17 09/03/25 07:17 CreateTclPage (first substitution): domain error: argument not in valid range while executing "expr $Mean / [llength $xList]" (procedure "Mean" line 4) invoked from within "Mean $specificityDataList2" invoked from within "subst set\ fileContentList\ \{\n\t\{\}\n\t\{\n%\ This\ file\ is\ interpreted\ by\ tcl\ so\ each\ LaTeX\ back\ slash\ must\ be\ duplicated\n%\t\t\\\\do..." invoked from within "interp eval slave [list subst $fileContent2]" while making substitution within: set fileContentList { {} { % This file is interpreted by tcl so each LaTeX back slash must be duplicated % \\documentclass#!#Portuges,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\documentclass#!#english,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\repositorio{$thisRepository} %% repositório onde está depositado o documento \\RequirePackage{comment} % In order to distinguish between LaTeX and tcl square brackets, tcl square brackets must be duplicated \\begin{comment} % hiding tcl script from LaTeX [ # TCL LIBRARY proc CreateDataSet {args} { set i 0 set data {} foreach input [lindex $args 0] { set line {} foreach list $args { lappend line [lindex $list $i] } lappend data $line incr i } return [join $data \n] } # erf -- # The error function # Arguments: # x The value for which the function must be evaluated # Result: # erf(x) # Note: # The algoritm used is due to George Marsaglia # See: http://www.velocityreviews.com/forums/t317358-erf-function-in-c.html # I did not want to copy and convert the even more accurate but # rather lengthy algorithm used by lcc-win32/Sun # proc erf {x} { set x [expr {$x*sqrt(2.0)}] if {$x > 10.0} {return 1.0} if {$x < -10.0} {return -1.0} set a 1.2533141373155 set b -1.0 set pwr 1.0 set t 0.0 set z 0.0 set s [expr {$a+$b*$x}] set i 2 while {$s != $t} { set a [expr {($a+$z*$b)/double($i)}] set b [expr {($b+$z*$a)/double($i+1)}] set pwr [expr {$pwr*$x*$x}] set t $s set s [expr {$s+$pwr*($a+$x*$b)}] incr i 2 } return [expr {1.0-2.0*$s*exp(-0.5*$x*$x-0.9189385332046727418)}] } proc Mean {xList} { set Mean 0. foreach x $xList {set Mean [expr $Mean + $x]} return [expr $Mean / [llength $xList]] } proc Variance {xList} { set Mean [Mean $xList] set Variance 0. foreach x $xList {set Variance [expr $Variance + pow(($x - $Mean), 2)]} return [expr $Variance / ([llength $xList] - 1)] } proc StandardDeviation {xList} { return [expr sqrt([Variance $xList])] } # LIST OF FIGURES TO BE UPDATED set figuresToBeUpdatedList {specificity} # set figuresToBeUpdatedList {} ] [ # PREPARE DATA FOR FIGURE 1 if {[lsearch $figuresToBeUpdatedList specificity] != -1} { set firstValue 8.5 set lastValue 11.5 set increment 0.01 set thresholdList {} for {set i $firstValue} {$i <= $lastValue} {set i [expr $i + $increment]} { lappend thresholdList [format %2.2f $i] } # Specificity # LOAD VHSInterobservadorNormais.txt (must be a one line file) set specificityDataList [Execute $serverAddressWithIP [list Load2 $thisRepository VHSInterobservadorNormais.txt $writeUserCodedPassword doc] 0] regsub -all {,} $specificityDataList {.} specificityDataList2 set soundMean [Mean $specificityDataList2] set soundStandardDeviation [StandardDeviation $specificityDataList2] } ] \\end{comment} \\input{./preamble} %% faça as modificações pertinentes no arquivo preamble.tex \\begin{document} \\input{./document} \\end{document} } [ set dynamicList {} # CREATE FIGURE 1 # ===== specificity.pdf ===== # if {[lsearch $figuresToBeUpdatedList specificity] != -1} { lappend dynamicList {specificity.dat} lappend dynamicList \ [ # tcl script set alpha 1 # Specificity set weightedSpecificityList {} foreach value $thresholdList { lappend weightedSpecificityList [expr (0.5 + 0.5 * [erf [expr ($value - $soundMean) / $soundStandardDeviation]]) * 100 * $alpha] } set graphymove 0 set graphxsize 6.2 set graphysize 4.2 set dxticks 0.5 set dyticks 10 CreateDataSet $thresholdList $weightedSpecificityList ] lappend dynamicList {specificity.gle} lappend dynamicList \ " ! gle script - this script is executed in CreateTclPageFile (see col/dpi.inpe.br/banon/1998/08.02.08.56/doc/utilities1.tcl) size $graphxsize [expr $graphysize * 0.92 + $graphymove] set font ss lwidth 0.01 set alabeldist .8 amove 0 $graphymove begin graph size $graphxsize $graphysize center data \"specificity.dat\" xtitle \"Valor observado\" ytitle \"Porcentagem\" xaxis dticks $dxticks dsubticks $dxticks min $firstValue max $lastValue grid yaxis dticks $dyticks dsubticks $dyticks min 0 max 100 grid xticks lwidth .005 yticks lwidth .005 xlabels hei .16 ylabels hei .16 d1 line smooth color blue lwidth 0.02 end graph " # ===== soundData.tex ===== # lappend dynamicList {soundData.tex} lappend dynamicList \ [ join $specificityDataList {; } ]% # ===== soundMean.tex ===== # lappend dynamicList {soundMean.tex} lappend dynamicList [format %2.2f $soundMean]% # ===== soundStandardDeviation.tex ===== # lappend dynamicList {soundStandardDeviation.tex} lappend dynamicList [format %2.2f $soundStandardDeviation]% } set dynamicList ] } while executing "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $targetFileAbsolutePath $filePath $writeUserCodedPassword" 09/03/25 07:46 09/03/25 07:46 CreateTclPage (first substitution): domain error: argument not in valid range while executing "expr $Mean / [llength $xList]" (procedure "Mean" line 4) invoked from within "Mean $specificityDataList2" invoked from within "subst set\ fileContentList\ \{\n\t\{\}\n\t\{\n%\ This\ file\ is\ interpreted\ by\ tcl\ so\ each\ LaTeX\ back\ slash\ must\ be\ duplicated\n%\t\t\\\\do..." invoked from within "interp eval slave [list subst $fileContent2]" while making substitution within: set fileContentList { {} { % This file is interpreted by tcl so each LaTeX back slash must be duplicated % \\documentclass#!#Portuges,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\documentclass#!#english,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\repositorio{$thisRepository} %% repositório onde está depositado o documento \\RequirePackage{comment} % In order to distinguish between LaTeX and tcl square brackets, tcl square brackets must be duplicated \\begin{comment} % hiding tcl script from LaTeX [ # TCL LIBRARY proc CreateDataSet {args} { set i 0 set data {} foreach input [lindex $args 0] { set line {} foreach list $args { lappend line [lindex $list $i] } lappend data $line incr i } return [join $data \n] } # erf -- # The error function # Arguments: # x The value for which the function must be evaluated # Result: # erf(x) # Note: # The algoritm used is due to George Marsaglia # See: http://www.velocityreviews.com/forums/t317358-erf-function-in-c.html # I did not want to copy and convert the even more accurate but # rather lengthy algorithm used by lcc-win32/Sun # proc erf {x} { set x [expr {$x*sqrt(2.0)}] if {$x > 10.0} {return 1.0} if {$x < -10.0} {return -1.0} set a 1.2533141373155 set b -1.0 set pwr 1.0 set t 0.0 set z 0.0 set s [expr {$a+$b*$x}] set i 2 while {$s != $t} { set a [expr {($a+$z*$b)/double($i)}] set b [expr {($b+$z*$a)/double($i+1)}] set pwr [expr {$pwr*$x*$x}] set t $s set s [expr {$s+$pwr*($a+$x*$b)}] incr i 2 } return [expr {1.0-2.0*$s*exp(-0.5*$x*$x-0.9189385332046727418)}] } proc Mean {xList} { set Mean 0. foreach x $xList {set Mean [expr $Mean + $x]} return [expr $Mean / [llength $xList]] } proc Variance {xList} { set Mean [Mean $xList] set Variance 0. foreach x $xList {set Variance [expr $Variance + pow(($x - $Mean), 2)]} return [expr $Variance / ([llength $xList] - 1)] } proc StandardDeviation {xList} { return [expr sqrt([Variance $xList])] } # LIST OF FIGURES TO BE UPDATED set figuresToBeUpdatedList {specificity} # set figuresToBeUpdatedList {} ] [ # PREPARE DATA FOR FIGURE 1 if {[lsearch $figuresToBeUpdatedList specificity] != -1} { set firstValue 8.5 set lastValue 11.5 set increment 0.01 set thresholdList {} for {set i $firstValue} {$i <= $lastValue} {set i [expr $i + $increment]} { lappend thresholdList [format %2.2f $i] } # Specificity # LOAD VHSInterobservadorNormais.txt (must be a one line file) set specificityDataList [Execute $serverAddressWithIP [list Load2 $thisRepository VHSInterobservadorNormais.txt $writeUserCodedPassword doc] 0] regsub -all {,} $specificityDataList {.} specificityDataList2 set soundMean [Mean $specificityDataList2] set soundStandardDeviation [StandardDeviation $specificityDataList2] } ] \\end{comment} \\input{./preamble} %% faça as modificações pertinentes no arquivo preamble.tex \\begin{document} \\input{./document} \\end{document} } [ set dynamicList {} # CREATE FIGURE 1 # ===== specificity.pdf ===== # if {[lsearch $figuresToBeUpdatedList specificity] != -1} { lappend dynamicList {specificity.dat} lappend dynamicList \ [ # tcl script set alpha 1 # Specificity set weightedSpecificityList {} foreach value $thresholdList { lappend weightedSpecificityList [expr (0.5 + 0.5 * [erf [expr ($value - $soundMean) / $soundStandardDeviation]]) * 100 * $alpha] } set graphymove 0 set graphxsize 6.2 set graphysize 4.2 set dxticks 0.5 set dyticks 10 CreateDataSet $thresholdList $weightedSpecificityList ] lappend dynamicList {specificity.gle} lappend dynamicList \ " ! gle script - this script is executed in CreateTclPageFile (see col/dpi.inpe.br/banon/1998/08.02.08.56/doc/utilities1.tcl) size $graphxsize [expr $graphysize * 0.92 + $graphymove] set font ss lwidth 0.01 set alabeldist .8 amove 0 $graphymove begin graph size $graphxsize $graphysize center data \"specificity.dat\" xtitle \"Valor observado\" ytitle \"Porcentagem\" xaxis dticks $dxticks dsubticks $dxticks min $firstValue max $lastValue grid yaxis dticks $dyticks dsubticks $dyticks min 0 max 100 grid xticks lwidth .005 yticks lwidth .005 xlabels hei .16 ylabels hei .16 d1 line smooth color blue lwidth 0.02 end graph " # ===== soundData.tex ===== # lappend dynamicList {soundData.tex} lappend dynamicList \ [ join $specificityDataList {; } ]% # ===== soundMean.tex ===== # lappend dynamicList {soundMean.tex} lappend dynamicList [format %2.2f $soundMean]% # ===== soundStandardDeviation.tex ===== # lappend dynamicList {soundStandardDeviation.tex} lappend dynamicList [format %2.2f $soundStandardDeviation]% } set dynamicList ] } while executing "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $targetFileAbsolutePath $filePath $writeUserCodedPassword" 09/03/25 09:39 09/03/25 09:39 CreateTclPage (first substitution): domain error: argument not in valid range while executing "expr $Mean / [llength $xList]" (procedure "Mean" line 4) invoked from within "Mean $specificityDataList2" invoked from within "subst set\ fileContentList\ \{\n\t\{\}\n\t\{\n%\ This\ file\ is\ interpreted\ by\ tcl\ so\ each\ LaTeX\ back\ slash\ must\ be\ duplicated\n%\t\t\\\\do..." invoked from within "interp eval slave [list subst $fileContent2]" while making substitution within: set fileContentList { {} { % This file is interpreted by tcl so each LaTeX back slash must be duplicated % \\documentclass#!#Portuges,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\documentclass#!#english,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\repositorio{$thisRepository} %% repositório onde está depositado o documento \\RequirePackage{comment} % In order to distinguish between LaTeX and tcl square brackets, tcl square brackets must be duplicated \\begin{comment} % hiding tcl script from LaTeX [ # TCL LIBRARY proc CreateDataSet {args} { set i 0 set data {} foreach input [lindex $args 0] { set line {} foreach list $args { lappend line [lindex $list $i] } lappend data $line incr i } return [join $data \n] } # erf -- # The error function # Arguments: # x The value for which the function must be evaluated # Result: # erf(x) # Note: # The algoritm used is due to George Marsaglia # See: http://www.velocityreviews.com/forums/t317358-erf-function-in-c.html # I did not want to copy and convert the even more accurate but # rather lengthy algorithm used by lcc-win32/Sun # proc erf {x} { set x [expr {$x*sqrt(2.0)}] if {$x > 10.0} {return 1.0} if {$x < -10.0} {return -1.0} set a 1.2533141373155 set b -1.0 set pwr 1.0 set t 0.0 set z 0.0 set s [expr {$a+$b*$x}] set i 2 while {$s != $t} { set a [expr {($a+$z*$b)/double($i)}] set b [expr {($b+$z*$a)/double($i+1)}] set pwr [expr {$pwr*$x*$x}] set t $s set s [expr {$s+$pwr*($a+$x*$b)}] incr i 2 } return [expr {1.0-2.0*$s*exp(-0.5*$x*$x-0.9189385332046727418)}] } proc Mean {xList} { set Mean 0. foreach x $xList {set Mean [expr $Mean + $x]} return [expr $Mean / [llength $xList]] } proc Variance {xList} { set Mean [Mean $xList] set Variance 0. foreach x $xList {set Variance [expr $Variance + pow(($x - $Mean), 2)]} return [expr $Variance / ([llength $xList] - 1)] } proc StandardDeviation {xList} { return [expr sqrt([Variance $xList])] } # LIST OF FIGURES TO BE UPDATED set figuresToBeUpdatedList {specificity} # set figuresToBeUpdatedList {} ] [ # PREPARE DATA FOR FIGURE 1 if {[lsearch $figuresToBeUpdatedList specificity] != -1} { set firstValue 8.5 set lastValue 11.5 set increment 0.01 set thresholdList {} for {set i $firstValue} {$i <= $lastValue} {set i [expr $i + $increment]} { lappend thresholdList [format %2.2f $i] } # Specificity # LOAD VHSInterobservadorNormais.txt (must be a one line file) set specificityDataList [Execute $serverAddressWithIP [list Load2 $thisRepository VHSInterobservadorNormais.txt $writeUserCodedPassword doc] 0] regsub -all {,} $specificityDataList {.} specificityDataList2 set soundMean [Mean $specificityDataList2] set soundStandardDeviation [StandardDeviation $specificityDataList2] } ] \\end{comment} \\input{./preamble} %% faça as modificações pertinentes no arquivo preamble.tex \\begin{document} \\input{./document} \\end{document} } [ set dynamicList {} # CREATE FIGURE 1 # ===== specificity.pdf ===== # if {[lsearch $figuresToBeUpdatedList specificity] != -1} { lappend dynamicList {specificity.dat} lappend dynamicList \ [ # tcl script set alpha 1 # Specificity set weightedSpecificityList {} foreach value $thresholdList { lappend weightedSpecificityList [expr (0.5 + 0.5 * [erf [expr ($value - $soundMean) / $soundStandardDeviation]]) * 100 * $alpha] } set graphymove 0 set graphxsize 6.2 set graphysize 4.2 set dxticks 0.5 set dyticks 10 CreateDataSet $thresholdList $weightedSpecificityList ] lappend dynamicList {specificity.gle} lappend dynamicList \ " ! gle script - this script is executed in CreateTclPageFile (see col/dpi.inpe.br/banon/1998/08.02.08.56/doc/utilities1.tcl) size $graphxsize [expr $graphysize * 0.92 + $graphymove] set font ss lwidth 0.01 set alabeldist .8 amove 0 $graphymove begin graph size $graphxsize $graphysize center data \"specificity.dat\" xtitle \"Valor observado\" ytitle \"Porcentagem\" xaxis dticks $dxticks dsubticks $dxticks min $firstValue max $lastValue grid yaxis dticks $dyticks dsubticks $dyticks min 0 max 100 grid xticks lwidth .005 yticks lwidth .005 xlabels hei .16 ylabels hei .16 d1 line smooth color blue lwidth 0.02 end graph " # ===== soundData.tex ===== # lappend dynamicList {soundData.tex} lappend dynamicList \ [ join $specificityDataList {; } ]% # ===== soundMean.tex ===== # lappend dynamicList {soundMean.tex} lappend dynamicList [format %2.2f $soundMean]% # ===== soundStandardDeviation.tex ===== # lappend dynamicList {soundStandardDeviation.tex} lappend dynamicList [format %2.2f $soundStandardDeviation]% } set dynamicList ] } while executing "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $targetFileAbsolutePath $filePath $writeUserCodedPassword" 09/03/25 09:39 09/03/25 09:39 CreateTclPage (first substitution): domain error: argument not in valid range while executing "expr $Mean / [llength $xList]" (procedure "Mean" line 4) invoked from within "Mean $specificityDataList2" invoked from within "subst set\ fileContentList\ \{\n\t\{\}\n\t\{\n%\ This\ file\ is\ interpreted\ by\ tcl\ so\ each\ LaTeX\ back\ slash\ must\ be\ duplicated\n%\t\t\\\\do..." invoked from within "interp eval slave [list subst $fileContent2]" while making substitution within: set fileContentList { {} { % This file is interpreted by tcl so each LaTeX back slash must be duplicated % \\documentclass#!#Portuges,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\documentclass#!#english,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\repositorio{$thisRepository} %% repositório onde está depositado o documento \\RequirePackage{comment} % In order to distinguish between LaTeX and tcl square brackets, tcl square brackets must be duplicated \\begin{comment} % hiding tcl script from LaTeX [ # TCL LIBRARY proc CreateDataSet {args} { set i 0 set data {} foreach input [lindex $args 0] { set line {} foreach list $args { lappend line [lindex $list $i] } lappend data $line incr i } return [join $data \n] } # erf -- # The error function # Arguments: # x The value for which the function must be evaluated # Result: # erf(x) # Note: # The algoritm used is due to George Marsaglia # See: http://www.velocityreviews.com/forums/t317358-erf-function-in-c.html # I did not want to copy and convert the even more accurate but # rather lengthy algorithm used by lcc-win32/Sun # proc erf {x} { set x [expr {$x*sqrt(2.0)}] if {$x > 10.0} {return 1.0} if {$x < -10.0} {return -1.0} set a 1.2533141373155 set b -1.0 set pwr 1.0 set t 0.0 set z 0.0 set s [expr {$a+$b*$x}] set i 2 while {$s != $t} { set a [expr {($a+$z*$b)/double($i)}] set b [expr {($b+$z*$a)/double($i+1)}] set pwr [expr {$pwr*$x*$x}] set t $s set s [expr {$s+$pwr*($a+$x*$b)}] incr i 2 } return [expr {1.0-2.0*$s*exp(-0.5*$x*$x-0.9189385332046727418)}] } proc Mean {xList} { set Mean 0. foreach x $xList {set Mean [expr $Mean + $x]} return [expr $Mean / [llength $xList]] } proc Variance {xList} { set Mean [Mean $xList] set Variance 0. foreach x $xList {set Variance [expr $Variance + pow(($x - $Mean), 2)]} return [expr $Variance / ([llength $xList] - 1)] } proc StandardDeviation {xList} { return [expr sqrt([Variance $xList])] } # LIST OF FIGURES TO BE UPDATED set figuresToBeUpdatedList {specificity} # set figuresToBeUpdatedList {} ] [ # PREPARE DATA FOR FIGURE 1 if {[lsearch $figuresToBeUpdatedList specificity] != -1} { set firstValue 8.5 set lastValue 11.5 set increment 0.01 set thresholdList {} for {set i $firstValue} {$i <= $lastValue} {set i [expr $i + $increment]} { lappend thresholdList [format %2.2f $i] } # Specificity # LOAD VHSInterobservadorNormais.txt (must be a one line file) set specificityDataList [Execute $serverAddressWithIP [list Load2 $thisRepository VHSInterobservadorNormais.txt $writeUserCodedPassword doc] 0] regsub -all {,} $specificityDataList {.} specificityDataList2 set soundMean [Mean $specificityDataList2] set soundStandardDeviation [StandardDeviation $specificityDataList2] } ] \\end{comment} \\input{./preamble} %% faça as modificações pertinentes no arquivo preamble.tex \\begin{document} \\input{./document} \\end{document} } [ set dynamicList {} # CREATE FIGURE 1 # ===== specificity.pdf ===== # if {[lsearch $figuresToBeUpdatedList specificity] != -1} { lappend dynamicList {specificity.dat} lappend dynamicList \ [ # tcl script set alpha 1 # Specificity set weightedSpecificityList {} foreach value $thresholdList { lappend weightedSpecificityList [expr (0.5 + 0.5 * [erf [expr ($value - $soundMean) / $soundStandardDeviation]]) * 100 * $alpha] } set graphymove 0 set graphxsize 6.2 set graphysize 4.2 set dxticks 0.5 set dyticks 10 CreateDataSet $thresholdList $weightedSpecificityList ] lappend dynamicList {specificity.gle} lappend dynamicList \ " ! gle script - this script is executed in CreateTclPageFile (see col/dpi.inpe.br/banon/1998/08.02.08.56/doc/utilities1.tcl) size $graphxsize [expr $graphysize * 0.92 + $graphymove] set font ss lwidth 0.01 set alabeldist .8 amove 0 $graphymove begin graph size $graphxsize $graphysize center data \"specificity.dat\" xtitle \"Valor observado\" ytitle \"Porcentagem\" xaxis dticks $dxticks dsubticks $dxticks min $firstValue max $lastValue grid yaxis dticks $dyticks dsubticks $dyticks min 0 max 100 grid xticks lwidth .005 yticks lwidth .005 xlabels hei .16 ylabels hei .16 d1 line smooth color blue lwidth 0.02 end graph " # ===== soundData.tex ===== # lappend dynamicList {soundData.tex} lappend dynamicList \ [ join $specificityDataList {; } ]% # ===== soundMean.tex ===== # lappend dynamicList {soundMean.tex} lappend dynamicList [format %2.2f $soundMean]% # ===== soundStandardDeviation.tex ===== # lappend dynamicList {soundStandardDeviation.tex} lappend dynamicList [format %2.2f $soundStandardDeviation]% } set dynamicList ] } while executing "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $targetFileAbsolutePath $filePath $writeUserCodedPassword" 09/03/25 09:39 09/03/25 09:39 CreateTclPage (first substitution): domain error: argument not in valid range while executing "expr $Mean / [llength $xList]" (procedure "Mean" line 4) invoked from within "Mean $specificityDataList2" invoked from within "subst set\ fileContentList\ \{\n\t\{\}\n\t\{\n%\ This\ file\ is\ interpreted\ by\ tcl\ so\ each\ LaTeX\ back\ slash\ must\ be\ duplicated\n%\t\t\\\\do..." invoked from within "interp eval slave [list subst $fileContent2]" while making substitution within: set fileContentList { {} { % This file is interpreted by tcl so each LaTeX back slash must be duplicated % \\documentclass#!#Portuges,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\documentclass#!#english,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\repositorio{$thisRepository} %% repositório onde está depositado o documento \\RequirePackage{comment} % In order to distinguish between LaTeX and tcl square brackets, tcl square brackets must be duplicated \\begin{comment} % hiding tcl script from LaTeX [ # TCL LIBRARY proc CreateDataSet {args} { set i 0 set data {} foreach input [lindex $args 0] { set line {} foreach list $args { lappend line [lindex $list $i] } lappend data $line incr i } return [join $data \n] } # erf -- # The error function # Arguments: # x The value for which the function must be evaluated # Result: # erf(x) # Note: # The algoritm used is due to George Marsaglia # See: http://www.velocityreviews.com/forums/t317358-erf-function-in-c.html # I did not want to copy and convert the even more accurate but # rather lengthy algorithm used by lcc-win32/Sun # proc erf {x} { set x [expr {$x*sqrt(2.0)}] if {$x > 10.0} {return 1.0} if {$x < -10.0} {return -1.0} set a 1.2533141373155 set b -1.0 set pwr 1.0 set t 0.0 set z 0.0 set s [expr {$a+$b*$x}] set i 2 while {$s != $t} { set a [expr {($a+$z*$b)/double($i)}] set b [expr {($b+$z*$a)/double($i+1)}] set pwr [expr {$pwr*$x*$x}] set t $s set s [expr {$s+$pwr*($a+$x*$b)}] incr i 2 } return [expr {1.0-2.0*$s*exp(-0.5*$x*$x-0.9189385332046727418)}] } proc Mean {xList} { set Mean 0. foreach x $xList {set Mean [expr $Mean + $x]} return [expr $Mean / [llength $xList]] } proc Variance {xList} { set Mean [Mean $xList] set Variance 0. foreach x $xList {set Variance [expr $Variance + pow(($x - $Mean), 2)]} return [expr $Variance / ([llength $xList] - 1)] } proc StandardDeviation {xList} { return [expr sqrt([Variance $xList])] } # LIST OF FIGURES TO BE UPDATED set figuresToBeUpdatedList {specificity} # set figuresToBeUpdatedList {} ] [ # PREPARE DATA FOR FIGURE 1 if {[lsearch $figuresToBeUpdatedList specificity] != -1} { set firstValue 8.5 set lastValue 11.5 set increment 0.01 set thresholdList {} for {set i $firstValue} {$i <= $lastValue} {set i [expr $i + $increment]} { lappend thresholdList [format %2.2f $i] } # Specificity # LOAD VHSInterobservadorNormais.txt (must be a one line file) set specificityDataList [Execute $serverAddressWithIP [list Load2 $thisRepository VHSInterobservadorNormais.txt $writeUserCodedPassword doc] 0] regsub -all {,} $specificityDataList {.} specificityDataList2 set soundMean [Mean $specificityDataList2] set soundStandardDeviation [StandardDeviation $specificityDataList2] } ] \\end{comment} \\input{./preamble} %% faça as modificações pertinentes no arquivo preamble.tex \\begin{document} \\input{./document} \\end{document} } [ set dynamicList {} # CREATE FIGURE 1 # ===== specificity.pdf ===== # if {[lsearch $figuresToBeUpdatedList specificity] != -1} { lappend dynamicList {specificity.dat} lappend dynamicList \ [ # tcl script set alpha 1 # Specificity set weightedSpecificityList {} foreach value $thresholdList { lappend weightedSpecificityList [expr (0.5 + 0.5 * [erf [expr ($value - $soundMean) / $soundStandardDeviation]]) * 100 * $alpha] } set graphymove 0 set graphxsize 6.2 set graphysize 4.2 set dxticks 0.5 set dyticks 10 CreateDataSet $thresholdList $weightedSpecificityList ] lappend dynamicList {specificity.gle} lappend dynamicList \ " ! gle script - this script is executed in CreateTclPageFile (see col/dpi.inpe.br/banon/1998/08.02.08.56/doc/utilities1.tcl) size $graphxsize [expr $graphysize * 0.92 + $graphymove] set font ss lwidth 0.01 set alabeldist .8 amove 0 $graphymove begin graph size $graphxsize $graphysize center data \"specificity.dat\" xtitle \"Valor observado\" ytitle \"Porcentagem\" xaxis dticks $dxticks dsubticks $dxticks min $firstValue max $lastValue grid yaxis dticks $dyticks dsubticks $dyticks min 0 max 100 grid xticks lwidth .005 yticks lwidth .005 xlabels hei .16 ylabels hei .16 d1 line smooth color blue lwidth 0.02 end graph " # ===== soundData.tex ===== # lappend dynamicList {soundData.tex} lappend dynamicList \ [ join $specificityDataList {; } ]% # ===== soundMean.tex ===== # lappend dynamicList {soundMean.tex} lappend dynamicList [format %2.2f $soundMean]% # ===== soundStandardDeviation.tex ===== # lappend dynamicList {soundStandardDeviation.tex} lappend dynamicList [format %2.2f $soundStandardDeviation]% } set dynamicList ] } while executing "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $targetFileAbsolutePath $filePath $writeUserCodedPassword" 09/03/25 09:39 09/03/25 09:39 CreateTclPage (first substitution): domain error: argument not in valid range while executing "expr $Mean / [llength $xList]" (procedure "Mean" line 4) invoked from within "Mean $specificityDataList2" invoked from within "subst set\ fileContentList\ \{\n\t\{\}\n\t\{\n%\ This\ file\ is\ interpreted\ by\ tcl\ so\ each\ LaTeX\ back\ slash\ must\ be\ duplicated\n%\t\t\\\\do..." invoked from within "interp eval slave [list subst $fileContent2]" while making substitution within: set fileContentList { {} { % This file is interpreted by tcl so each LaTeX back slash must be duplicated % \\documentclass#!#Portuges,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\documentclass#!#english,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\repositorio{$thisRepository} %% repositório onde está depositado o documento \\RequirePackage{comment} % In order to distinguish between LaTeX and tcl square brackets, tcl square brackets must be duplicated \\begin{comment} % hiding tcl script from LaTeX [ # TCL LIBRARY proc CreateDataSet {args} { set i 0 set data {} foreach input [lindex $args 0] { set line {} foreach list $args { lappend line [lindex $list $i] } lappend data $line incr i } return [join $data \n] } # erf -- # The error function # Arguments: # x The value for which the function must be evaluated # Result: # erf(x) # Note: # The algoritm used is due to George Marsaglia # See: http://www.velocityreviews.com/forums/t317358-erf-function-in-c.html # I did not want to copy and convert the even more accurate but # rather lengthy algorithm used by lcc-win32/Sun # proc erf {x} { set x [expr {$x*sqrt(2.0)}] if {$x > 10.0} {return 1.0} if {$x < -10.0} {return -1.0} set a 1.2533141373155 set b -1.0 set pwr 1.0 set t 0.0 set z 0.0 set s [expr {$a+$b*$x}] set i 2 while {$s != $t} { set a [expr {($a+$z*$b)/double($i)}] set b [expr {($b+$z*$a)/double($i+1)}] set pwr [expr {$pwr*$x*$x}] set t $s set s [expr {$s+$pwr*($a+$x*$b)}] incr i 2 } return [expr {1.0-2.0*$s*exp(-0.5*$x*$x-0.9189385332046727418)}] } proc Mean {xList} { set Mean 0. foreach x $xList {set Mean [expr $Mean + $x]} return [expr $Mean / [llength $xList]] } proc Variance {xList} { set Mean [Mean $xList] set Variance 0. foreach x $xList {set Variance [expr $Variance + pow(($x - $Mean), 2)]} return [expr $Variance / ([llength $xList] - 1)] } proc StandardDeviation {xList} { return [expr sqrt([Variance $xList])] } # LIST OF FIGURES TO BE UPDATED set figuresToBeUpdatedList {specificity} # set figuresToBeUpdatedList {} ] [ # PREPARE DATA FOR FIGURE 1 if {[lsearch $figuresToBeUpdatedList specificity] != -1} { set firstValue 8.5 set lastValue 11.5 set increment 0.01 set thresholdList {} for {set i $firstValue} {$i <= $lastValue} {set i [expr $i + $increment]} { lappend thresholdList [format %2.2f $i] } # Specificity # LOAD VHSInterobservadorNormais.txt (must be a one line file) set specificityDataList [Execute $serverAddressWithIP [list Load2 $thisRepository VHSInterobservadorNormais.txt $writeUserCodedPassword doc] 0] regsub -all {,} $specificityDataList {.} specificityDataList2 set soundMean [Mean $specificityDataList2] set soundStandardDeviation [StandardDeviation $specificityDataList2] } ] \\end{comment} \\input{./preamble} %% faça as modificações pertinentes no arquivo preamble.tex \\begin{document} \\input{./document} \\end{document} } [ set dynamicList {} # CREATE FIGURE 1 # ===== specificity.pdf ===== # if {[lsearch $figuresToBeUpdatedList specificity] != -1} { lappend dynamicList {specificity.dat} lappend dynamicList \ [ # tcl script set alpha 1 # Specificity set weightedSpecificityList {} foreach value $thresholdList { lappend weightedSpecificityList [expr (0.5 + 0.5 * [erf [expr ($value - $soundMean) / $soundStandardDeviation]]) * 100 * $alpha] } set graphymove 0 set graphxsize 6.2 set graphysize 4.2 set dxticks 0.5 set dyticks 10 CreateDataSet $thresholdList $weightedSpecificityList ] lappend dynamicList {specificity.gle} lappend dynamicList \ " ! gle script - this script is executed in CreateTclPageFile (see col/dpi.inpe.br/banon/1998/08.02.08.56/doc/utilities1.tcl) size $graphxsize [expr $graphysize * 0.92 + $graphymove] set font ss lwidth 0.01 set alabeldist .8 amove 0 $graphymove begin graph size $graphxsize $graphysize center data \"specificity.dat\" xtitle \"Valor observado\" ytitle \"Porcentagem\" xaxis dticks $dxticks dsubticks $dxticks min $firstValue max $lastValue grid yaxis dticks $dyticks dsubticks $dyticks min 0 max 100 grid xticks lwidth .005 yticks lwidth .005 xlabels hei .16 ylabels hei .16 d1 line smooth color blue lwidth 0.02 end graph " # ===== soundData.tex ===== # lappend dynamicList {soundData.tex} lappend dynamicList \ [ join $specificityDataList {; } ]% # ===== soundMean.tex ===== # lappend dynamicList {soundMean.tex} lappend dynamicList [format %2.2f $soundMean]% # ===== soundStandardDeviation.tex ===== # lappend dynamicList {soundStandardDeviation.tex} lappend dynamicList [format %2.2f $soundStandardDeviation]% } set dynamicList ] } while executing "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $targetFileAbsolutePath $filePath $writeUserCodedPassword" 09/03/25 09:40 09/03/25 09:40 CreateTclPage (first substitution): domain error: argument not in valid range while executing "expr $Mean / [llength $xList]" (procedure "Mean" line 4) invoked from within "Mean $specificityDataList2" invoked from within "subst set\ fileContentList\ \{\n\t\{\}\n\t\{\n%\ This\ file\ is\ interpreted\ by\ tcl\ so\ each\ LaTeX\ back\ slash\ must\ be\ duplicated\n%\t\t\\\\do..." invoked from within "interp eval slave [list subst $fileContent2]" while making substitution within: set fileContentList { {} { % This file is interpreted by tcl so each LaTeX back slash must be duplicated % \\documentclass#!#Portuges,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\documentclass#!#english,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\repositorio{$thisRepository} %% repositório onde está depositado o documento \\RequirePackage{comment} % In order to distinguish between LaTeX and tcl square brackets, tcl square brackets must be duplicated \\begin{comment} % hiding tcl script from LaTeX [ # TCL LIBRARY proc CreateDataSet {args} { set i 0 set data {} foreach input [lindex $args 0] { set line {} foreach list $args { lappend line [lindex $list $i] } lappend data $line incr i } return [join $data \n] } # erf -- # The error function # Arguments: # x The value for which the function must be evaluated # Result: # erf(x) # Note: # The algoritm used is due to George Marsaglia # See: http://www.velocityreviews.com/forums/t317358-erf-function-in-c.html # I did not want to copy and convert the even more accurate but # rather lengthy algorithm used by lcc-win32/Sun # proc erf {x} { set x [expr {$x*sqrt(2.0)}] if {$x > 10.0} {return 1.0} if {$x < -10.0} {return -1.0} set a 1.2533141373155 set b -1.0 set pwr 1.0 set t 0.0 set z 0.0 set s [expr {$a+$b*$x}] set i 2 while {$s != $t} { set a [expr {($a+$z*$b)/double($i)}] set b [expr {($b+$z*$a)/double($i+1)}] set pwr [expr {$pwr*$x*$x}] set t $s set s [expr {$s+$pwr*($a+$x*$b)}] incr i 2 } return [expr {1.0-2.0*$s*exp(-0.5*$x*$x-0.9189385332046727418)}] } proc Mean {xList} { set Mean 0. foreach x $xList {set Mean [expr $Mean + $x]} return [expr $Mean / [llength $xList]] } proc Variance {xList} { set Mean [Mean $xList] set Variance 0. foreach x $xList {set Variance [expr $Variance + pow(($x - $Mean), 2)]} return [expr $Variance / ([llength $xList] - 1)] } proc StandardDeviation {xList} { return [expr sqrt([Variance $xList])] } # LIST OF FIGURES TO BE UPDATED set figuresToBeUpdatedList {specificity} # set figuresToBeUpdatedList {} ] [ # PREPARE DATA FOR FIGURE 1 if {[lsearch $figuresToBeUpdatedList specificity] != -1} { set firstValue 8.5 set lastValue 11.5 set increment 0.01 set thresholdList {} for {set i $firstValue} {$i <= $lastValue} {set i [expr $i + $increment]} { lappend thresholdList [format %2.2f $i] } # Specificity # LOAD VHSInterobservadorNormais.txt (must be a one line file) set specificityDataList [Execute $serverAddressWithIP [list Load2 $thisRepository VHSInterobservadorNormais.txt $writeUserCodedPassword doc] 0] regsub -all {,} $specificityDataList {.} specificityDataList2 set soundMean [Mean $specificityDataList2] set soundStandardDeviation [StandardDeviation $specificityDataList2] } ] \\end{comment} \\input{./preamble} %% faça as modificações pertinentes no arquivo preamble.tex \\begin{document} \\input{./document} \\end{document} } [ set dynamicList {} # CREATE FIGURE 1 # ===== specificity.pdf ===== # if {[lsearch $figuresToBeUpdatedList specificity] != -1} { lappend dynamicList {specificity.dat} lappend dynamicList \ [ # tcl script set alpha 1 # Specificity set weightedSpecificityList {} foreach value $thresholdList { lappend weightedSpecificityList [expr (0.5 + 0.5 * [erf [expr ($value - $soundMean) / $soundStandardDeviation]]) * 100 * $alpha] } set graphymove 0 set graphxsize 6.2 set graphysize 4.2 set dxticks 0.5 set dyticks 10 CreateDataSet $thresholdList $weightedSpecificityList ] lappend dynamicList {specificity.gle} lappend dynamicList \ " ! gle script - this script is executed in CreateTclPageFile (see col/dpi.inpe.br/banon/1998/08.02.08.56/doc/utilities1.tcl) size $graphxsize [expr $graphysize * 0.92 + $graphymove] set font ss lwidth 0.01 set alabeldist .8 amove 0 $graphymove begin graph size $graphxsize $graphysize center data \"specificity.dat\" xtitle \"Valor observado\" ytitle \"Porcentagem\" xaxis dticks $dxticks dsubticks $dxticks min $firstValue max $lastValue grid yaxis dticks $dyticks dsubticks $dyticks min 0 max 100 grid xticks lwidth .005 yticks lwidth .005 xlabels hei .16 ylabels hei .16 d1 line smooth color blue lwidth 0.02 end graph " # ===== soundData.tex ===== # lappend dynamicList {soundData.tex} lappend dynamicList \ [ join $specificityDataList {; } ]% # ===== soundMean.tex ===== # lappend dynamicList {soundMean.tex} lappend dynamicList [format %2.2f $soundMean]% # ===== soundStandardDeviation.tex ===== # lappend dynamicList {soundStandardDeviation.tex} lappend dynamicList [format %2.2f $soundStandardDeviation]% } set dynamicList ] } while executing "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $targetFileAbsolutePath $filePath $writeUserCodedPassword" 09/03/25 10:43 09/03/25 10:43 CreateTclPage (first substitution): domain error: argument not in valid range while executing "expr $Mean / [llength $xList]" (procedure "Mean" line 4) invoked from within "Mean $specificityDataList2" invoked from within "subst set\ fileContentList\ \{\n\t\{\}\n\t\{\n%\ This\ file\ is\ interpreted\ by\ tcl\ so\ each\ LaTeX\ back\ slash\ must\ be\ duplicated\n%\t\t\\\\do..." invoked from within "interp eval slave [list subst $fileContent2]" while making substitution within: set fileContentList { {} { % This file is interpreted by tcl so each LaTeX back slash must be duplicated % \\documentclass#!#Portuges,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\documentclass#!#english,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\repositorio{$thisRepository} %% repositório onde está depositado o documento \\RequirePackage{comment} % In order to distinguish between LaTeX and tcl square brackets, tcl square brackets must be duplicated \\begin{comment} % hiding tcl script from LaTeX [ # TCL LIBRARY proc CreateDataSet {args} { set i 0 set data {} foreach input [lindex $args 0] { set line {} foreach list $args { lappend line [lindex $list $i] } lappend data $line incr i } return [join $data \n] } # erf -- # The error function # Arguments: # x The value for which the function must be evaluated # Result: # erf(x) # Note: # The algoritm used is due to George Marsaglia # See: http://www.velocityreviews.com/forums/t317358-erf-function-in-c.html # I did not want to copy and convert the even more accurate but # rather lengthy algorithm used by lcc-win32/Sun # proc erf {x} { set x [expr {$x*sqrt(2.0)}] if {$x > 10.0} {return 1.0} if {$x < -10.0} {return -1.0} set a 1.2533141373155 set b -1.0 set pwr 1.0 set t 0.0 set z 0.0 set s [expr {$a+$b*$x}] set i 2 while {$s != $t} { set a [expr {($a+$z*$b)/double($i)}] set b [expr {($b+$z*$a)/double($i+1)}] set pwr [expr {$pwr*$x*$x}] set t $s set s [expr {$s+$pwr*($a+$x*$b)}] incr i 2 } return [expr {1.0-2.0*$s*exp(-0.5*$x*$x-0.9189385332046727418)}] } proc Mean {xList} { set Mean 0. foreach x $xList {set Mean [expr $Mean + $x]} return [expr $Mean / [llength $xList]] } proc Variance {xList} { set Mean [Mean $xList] set Variance 0. foreach x $xList {set Variance [expr $Variance + pow(($x - $Mean), 2)]} return [expr $Variance / ([llength $xList] - 1)] } proc StandardDeviation {xList} { return [expr sqrt([Variance $xList])] } # LIST OF FIGURES TO BE UPDATED set figuresToBeUpdatedList {specificity} # set figuresToBeUpdatedList {} ] [ # PREPARE DATA FOR FIGURE 1 if {[lsearch $figuresToBeUpdatedList specificity] != -1} { set firstValue 8.5 set lastValue 11.5 set increment 0.01 set thresholdList {} for {set i $firstValue} {$i <= $lastValue} {set i [expr $i + $increment]} { lappend thresholdList [format %2.2f $i] } # Specificity # LOAD VHSInterobservadorNormais.txt (must be a one line file) set specificityDataList [Execute $serverAddressWithIP [list Load2 $thisRepository VHSInterobservadorNormais.txt $writeUserCodedPassword doc] 0] regsub -all {,} $specificityDataList {.} specificityDataList2 set soundMean [Mean $specificityDataList2] set soundStandardDeviation [StandardDeviation $specificityDataList2] } ] \\end{comment} \\input{./preamble} %% faça as modificações pertinentes no arquivo preamble.tex \\begin{document} \\input{./document} \\end{document} } [ set dynamicList {} # CREATE FIGURE 1 # ===== specificity.pdf ===== # if {[lsearch $figuresToBeUpdatedList specificity] != -1} { lappend dynamicList {specificity.dat} lappend dynamicList \ [ # tcl script set alpha 1 # Specificity set weightedSpecificityList {} foreach value $thresholdList { lappend weightedSpecificityList [expr (0.5 + 0.5 * [erf [expr ($value - $soundMean) / $soundStandardDeviation]]) * 100 * $alpha] } set graphymove 0 set graphxsize 6.2 set graphysize 4.2 set dxticks 0.5 set dyticks 10 CreateDataSet $thresholdList $weightedSpecificityList ] lappend dynamicList {specificity.gle} lappend dynamicList \ " ! gle script - this script is executed in CreateTclPageFile (see col/dpi.inpe.br/banon/1998/08.02.08.56/doc/utilities1.tcl) size $graphxsize [expr $graphysize * 0.92 + $graphymove] set font ss lwidth 0.01 set alabeldist .8 amove 0 $graphymove begin graph size $graphxsize $graphysize center data \"specificity.dat\" xtitle \"Valor observado\" ytitle \"Porcentagem\" xaxis dticks $dxticks dsubticks $dxticks min $firstValue max $lastValue grid yaxis dticks $dyticks dsubticks $dyticks min 0 max 100 grid xticks lwidth .005 yticks lwidth .005 xlabels hei .16 ylabels hei .16 d1 line smooth color blue lwidth 0.02 end graph " # ===== soundData.tex ===== # lappend dynamicList {soundData.tex} lappend dynamicList \ [ join $specificityDataList {; } ]% # ===== soundMean.tex ===== # lappend dynamicList {soundMean.tex} lappend dynamicList [format %2.2f $soundMean]% # ===== soundStandardDeviation.tex ===== # lappend dynamicList {soundStandardDeviation.tex} lappend dynamicList [format %2.2f $soundStandardDeviation]% } set dynamicList ] } while executing "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $targetFileAbsolutePath $filePath $writeUserCodedPassword" 09/03/25 21:12 09/03/25 21:12 09/03/25 21:12 CreateTclPage (first substitution): domain error: argument not in valid range while executing "expr $Mean / [llength $xList]" (procedure "Mean" line 4) invoked from within "Mean $specificityDataList2" invoked from within "subst set\ fileContentList\ \{\n\t\{\}\n\t\{\n%\ This\ file\ is\ interpreted\ by\ tcl\ so\ each\ LaTeX\ back\ slash\ must\ be\ duplicated\n%\t\t\\\\do..." invoked from within "interp eval slave [list subst $fileContent2]" while making substitution within: set fileContentList { {} { % This file is interpreted by tcl so each LaTeX back slash must be duplicated % \\documentclass#!#Portuges,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\documentclass#!#english,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\repositorio{$thisRepository} %% repositório onde está depositado o documento \\RequirePackage{comment} % In order to distinguish between LaTeX and tcl square brackets, tcl square brackets must be duplicated \\begin{comment} % hiding tcl script from LaTeX [ # TCL LIBRARY proc CreateDataSet {args} { set i 0 set data {} foreach input [lindex $args 0] { set line {} foreach list $args { lappend line [lindex $list $i] } lappend data $line incr i } return [join $data \n] } # erf -- # The error function # Arguments: # x The value for which the function must be evaluated # Result: # erf(x) # Note: # The algoritm used is due to George Marsaglia # See: http://www.velocityreviews.com/forums/t317358-erf-function-in-c.html # I did not want to copy and convert the even more accurate but # rather lengthy algorithm used by lcc-win32/Sun # proc erf {x} { set x [expr {$x*sqrt(2.0)}] if {$x > 10.0} {return 1.0} if {$x < -10.0} {return -1.0} set a 1.2533141373155 set b -1.0 set pwr 1.0 set t 0.0 set z 0.0 set s [expr {$a+$b*$x}] set i 2 while {$s != $t} { set a [expr {($a+$z*$b)/double($i)}] set b [expr {($b+$z*$a)/double($i+1)}] set pwr [expr {$pwr*$x*$x}] set t $s set s [expr {$s+$pwr*($a+$x*$b)}] incr i 2 } return [expr {1.0-2.0*$s*exp(-0.5*$x*$x-0.9189385332046727418)}] } proc Mean {xList} { set Mean 0. foreach x $xList {set Mean [expr $Mean + $x]} return [expr $Mean / [llength $xList]] } proc Variance {xList} { set Mean [Mean $xList] set Variance 0. foreach x $xList {set Variance [expr $Variance + pow(($x - $Mean), 2)]} return [expr $Variance / ([llength $xList] - 1)] } proc StandardDeviation {xList} { return [expr sqrt([Variance $xList])] } # LIST OF FIGURES TO BE UPDATED set figuresToBeUpdatedList {specificity} # set figuresToBeUpdatedList {} ] [ # PREPARE DATA FOR FIGURE 1 if {[lsearch $figuresToBeUpdatedList specificity] != -1} { set firstValue 8.5 set lastValue 11.5 set increment 0.01 set thresholdList {} for {set i $firstValue} {$i <= $lastValue} {set i [expr $i + $increment]} { lappend thresholdList [format %2.2f $i] } # Specificity # LOAD VHSInterobservadorNormais.txt (must be a one line file) set specificityDataList [Execute $serverAddressWithIP [list Load2 $thisRepository VHSInterobservadorNormais.txt $writeUserCodedPassword doc] 0] regsub -all {,} $specificityDataList {.} specificityDataList2 set soundMean [Mean $specificityDataList2] set soundStandardDeviation [StandardDeviation $specificityDataList2] } ] \\end{comment} \\input{./preamble} %% faça as modificações pertinentes no arquivo preamble.tex \\begin{document} \\input{./document} \\end{document} } [ set dynamicList {} # CREATE FIGURE 1 # ===== specificity.pdf ===== # if {[lsearch $figuresToBeUpdatedList specificity] != -1} { lappend dynamicList {specificity.dat} lappend dynamicList \ [ # tcl script set alpha 1 # Specificity set weightedSpecificityList {} foreach value $thresholdList { lappend weightedSpecificityList [expr (0.5 + 0.5 * [erf [expr ($value - $soundMean) / $soundStandardDeviation]]) * 100 * $alpha] } set graphymove 0 set graphxsize 6.2 set graphysize 4.2 set dxticks 0.5 set dyticks 10 CreateDataSet $thresholdList $weightedSpecificityList ] lappend dynamicList {specificity.gle} lappend dynamicList \ " ! gle script - this script is executed in CreateTclPageFile (see col/dpi.inpe.br/banon/1998/08.02.08.56/doc/utilities1.tcl) size $graphxsize [expr $graphysize * 0.92 + $graphymove] set font ss lwidth 0.01 set alabeldist .8 amove 0 $graphymove begin graph size $graphxsize $graphysize center data \"specificity.dat\" xtitle \"Valor observado\" ytitle \"Porcentagem\" xaxis dticks $dxticks dsubticks $dxticks min $firstValue max $lastValue grid yaxis dticks $dyticks dsubticks $dyticks min 0 max 100 grid xticks lwidth .005 yticks lwidth .005 xlabels hei .16 ylabels hei .16 d1 line smooth color blue lwidth 0.02 end graph " # ===== soundData.tex ===== # lappend dynamicList {soundData.tex} lappend dynamicList \ [ join $specificityDataList {; } ]% # ===== soundMean.tex ===== # lappend dynamicList {soundMean.tex} lappend dynamicList [format %2.2f $soundMean]% # ===== soundStandardDeviation.tex ===== # lappend dynamicList {soundStandardDeviation.tex} lappend dynamicList [format %2.2f $soundStandardDeviation]% } set dynamicList ] } while executing "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $targetFileAbsolutePath $filePath $writeUserCodedPassword" 09/03/25 21:12 CreateTclPage (first substitution): domain error: argument not in valid range while executing "expr $Mean / [llength $xList]" (procedure "Mean" line 4) invoked from within "Mean $specificityDataList2" invoked from within "subst set\ fileContentList\ \{\n\t\{\}\n\t\{\n%\ This\ file\ is\ interpreted\ by\ tcl\ so\ each\ LaTeX\ back\ slash\ must\ be\ duplicated\n%\t\t\\\\do..." invoked from within "interp eval slave [list subst $fileContent2]" while making substitution within: set fileContentList { {} { % This file is interpreted by tcl so each LaTeX back slash must be duplicated % \\documentclass#!#Portuges,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\documentclass#!#english,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\repositorio{$thisRepository} %% repositório onde está depositado o documento \\RequirePackage{comment} % In order to distinguish between LaTeX and tcl square brackets, tcl square brackets must be duplicated \\begin{comment} % hiding tcl script from LaTeX [ # TCL LIBRARY proc CreateDataSet {args} { set i 0 set data {} foreach input [lindex $args 0] { set line {} foreach list $args { lappend line [lindex $list $i] } lappend data $line incr i } return [join $data \n] } # erf -- # The error function # Arguments: # x The value for which the function must be evaluated # Result: # erf(x) # Note: # The algoritm used is due to George Marsaglia # See: http://www.velocityreviews.com/forums/t317358-erf-function-in-c.html # I did not want to copy and convert the even more accurate but # rather lengthy algorithm used by lcc-win32/Sun # proc erf {x} { set x [expr {$x*sqrt(2.0)}] if {$x > 10.0} {return 1.0} if {$x < -10.0} {return -1.0} set a 1.2533141373155 set b -1.0 set pwr 1.0 set t 0.0 set z 0.0 set s [expr {$a+$b*$x}] set i 2 while {$s != $t} { set a [expr {($a+$z*$b)/double($i)}] set b [expr {($b+$z*$a)/double($i+1)}] set pwr [expr {$pwr*$x*$x}] set t $s set s [expr {$s+$pwr*($a+$x*$b)}] incr i 2 } return [expr {1.0-2.0*$s*exp(-0.5*$x*$x-0.9189385332046727418)}] } proc Mean {xList} { set Mean 0. foreach x $xList {set Mean [expr $Mean + $x]} return [expr $Mean / [llength $xList]] } proc Variance {xList} { set Mean [Mean $xList] set Variance 0. foreach x $xList {set Variance [expr $Variance + pow(($x - $Mean), 2)]} return [expr $Variance / ([llength $xList] - 1)] } proc StandardDeviation {xList} { return [expr sqrt([Variance $xList])] } # LIST OF FIGURES TO BE UPDATED set figuresToBeUpdatedList {specificity} # set figuresToBeUpdatedList {} ] [ # PREPARE DATA FOR FIGURE 1 if {[lsearch $figuresToBeUpdatedList specificity] != -1} { set firstValue 8.5 set lastValue 11.5 set increment 0.01 set thresholdList {} for {set i $firstValue} {$i <= $lastValue} {set i [expr $i + $increment]} { lappend thresholdList [format %2.2f $i] } # Specificity # LOAD VHSInterobservadorNormais.txt (must be a one line file) set specificityDataList [Execute $serverAddressWithIP [list Load2 $thisRepository VHSInterobservadorNormais.txt $writeUserCodedPassword doc] 0] regsub -all {,} $specificityDataList {.} specificityDataList2 set soundMean [Mean $specificityDataList2] set soundStandardDeviation [StandardDeviation $specificityDataList2] } ] \\end{comment} \\input{./preamble} %% faça as modificações pertinentes no arquivo preamble.tex \\begin{document} \\input{./document} \\end{document} } [ set dynamicList {} # CREATE FIGURE 1 # ===== specificity.pdf ===== # if {[lsearch $figuresToBeUpdatedList specificity] != -1} { lappend dynamicList {specificity.dat} lappend dynamicList \ [ # tcl script set alpha 1 # Specificity set weightedSpecificityList {} foreach value $thresholdList { lappend weightedSpecificityList [expr (0.5 + 0.5 * [erf [expr ($value - $soundMean) / $soundStandardDeviation]]) * 100 * $alpha] } set graphymove 0 set graphxsize 6.2 set graphysize 4.2 set dxticks 0.5 set dyticks 10 CreateDataSet $thresholdList $weightedSpecificityList ] lappend dynamicList {specificity.gle} lappend dynamicList \ " ! gle script - this script is executed in CreateTclPageFile (see col/dpi.inpe.br/banon/1998/08.02.08.56/doc/utilities1.tcl) size $graphxsize [expr $graphysize * 0.92 + $graphymove] set font ss lwidth 0.01 set alabeldist .8 amove 0 $graphymove begin graph size $graphxsize $graphysize center data \"specificity.dat\" xtitle \"Valor observado\" ytitle \"Porcentagem\" xaxis dticks $dxticks dsubticks $dxticks min $firstValue max $lastValue grid yaxis dticks $dyticks dsubticks $dyticks min 0 max 100 grid xticks lwidth .005 yticks lwidth .005 xlabels hei .16 ylabels hei .16 d1 line smooth color blue lwidth 0.02 end graph " # ===== soundData.tex ===== # lappend dynamicList {soundData.tex} lappend dynamicList \ [ join $specificityDataList {; } ]% # ===== soundMean.tex ===== # lappend dynamicList {soundMean.tex} lappend dynamicList [format %2.2f $soundMean]% # ===== soundStandardDeviation.tex ===== # lappend dynamicList {soundStandardDeviation.tex} lappend dynamicList [format %2.2f $soundStandardDeviation]% } set dynamicList ] } while executing "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $targetFileAbsolutePath $filePath $writeUserCodedPassword" 10/03/25 14:06 10/03/25 14:07 CreateTclPage (first substitution): domain error: argument not in valid range while executing "expr $Mean / [llength $xList]" (procedure "Mean" line 4) invoked from within "Mean $specificityDataList2" invoked from within "subst set\ fileContentList\ \{\n\t\{\}\n\t\{\n%\ This\ file\ is\ interpreted\ by\ tcl\ so\ each\ LaTeX\ back\ slash\ must\ be\ duplicated\n%\t\t\\\\do..." invoked from within "interp eval slave [list subst $fileContent2]" while making substitution within: set fileContentList { {} { % This file is interpreted by tcl so each LaTeX back slash must be duplicated % \\documentclass#!#Portuges,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\documentclass#!#english,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\repositorio{$thisRepository} %% repositório onde está depositado o documento \\RequirePackage{comment} % In order to distinguish between LaTeX and tcl square brackets, tcl square brackets must be duplicated \\begin{comment} % hiding tcl script from LaTeX [ # TCL LIBRARY proc CreateDataSet {args} { set i 0 set data {} foreach input [lindex $args 0] { set line {} foreach list $args { lappend line [lindex $list $i] } lappend data $line incr i } return [join $data \n] } # erf -- # The error function # Arguments: # x The value for which the function must be evaluated # Result: # erf(x) # Note: # The algoritm used is due to George Marsaglia # See: http://www.velocityreviews.com/forums/t317358-erf-function-in-c.html # I did not want to copy and convert the even more accurate but # rather lengthy algorithm used by lcc-win32/Sun # proc erf {x} { set x [expr {$x*sqrt(2.0)}] if {$x > 10.0} {return 1.0} if {$x < -10.0} {return -1.0} set a 1.2533141373155 set b -1.0 set pwr 1.0 set t 0.0 set z 0.0 set s [expr {$a+$b*$x}] set i 2 while {$s != $t} { set a [expr {($a+$z*$b)/double($i)}] set b [expr {($b+$z*$a)/double($i+1)}] set pwr [expr {$pwr*$x*$x}] set t $s set s [expr {$s+$pwr*($a+$x*$b)}] incr i 2 } return [expr {1.0-2.0*$s*exp(-0.5*$x*$x-0.9189385332046727418)}] } proc Mean {xList} { set Mean 0. foreach x $xList {set Mean [expr $Mean + $x]} return [expr $Mean / [llength $xList]] } proc Variance {xList} { set Mean [Mean $xList] set Variance 0. foreach x $xList {set Variance [expr $Variance + pow(($x - $Mean), 2)]} return [expr $Variance / ([llength $xList] - 1)] } proc StandardDeviation {xList} { return [expr sqrt([Variance $xList])] } # LIST OF FIGURES TO BE UPDATED set figuresToBeUpdatedList {specificity} # set figuresToBeUpdatedList {} ] [ # PREPARE DATA FOR FIGURE 1 if {[lsearch $figuresToBeUpdatedList specificity] != -1} { set firstValue 8.5 set lastValue 11.5 set increment 0.01 set thresholdList {} for {set i $firstValue} {$i <= $lastValue} {set i [expr $i + $increment]} { lappend thresholdList [format %2.2f $i] } # Specificity # LOAD VHSInterobservadorNormais.txt (must be a one line file) set specificityDataList [Execute $serverAddressWithIP [list Load2 $thisRepository VHSInterobservadorNormais.txt $writeUserCodedPassword doc] 0] regsub -all {,} $specificityDataList {.} specificityDataList2 set soundMean [Mean $specificityDataList2] set soundStandardDeviation [StandardDeviation $specificityDataList2] } ] \\end{comment} \\input{./preamble} %% faça as modificações pertinentes no arquivo preamble.tex \\begin{document} \\input{./document} \\end{document} } [ set dynamicList {} # CREATE FIGURE 1 # ===== specificity.pdf ===== # if {[lsearch $figuresToBeUpdatedList specificity] != -1} { lappend dynamicList {specificity.dat} lappend dynamicList \ [ # tcl script set alpha 1 # Specificity set weightedSpecificityList {} foreach value $thresholdList { lappend weightedSpecificityList [expr (0.5 + 0.5 * [erf [expr ($value - $soundMean) / $soundStandardDeviation]]) * 100 * $alpha] } set graphymove 0 set graphxsize 6.2 set graphysize 4.2 set dxticks 0.5 set dyticks 10 CreateDataSet $thresholdList $weightedSpecificityList ] lappend dynamicList {specificity.gle} lappend dynamicList \ " ! gle script - this script is executed in CreateTclPageFile (see col/dpi.inpe.br/banon/1998/08.02.08.56/doc/utilities1.tcl) size $graphxsize [expr $graphysize * 0.92 + $graphymove] set font ss lwidth 0.01 set alabeldist .8 amove 0 $graphymove begin graph size $graphxsize $graphysize center data \"specificity.dat\" xtitle \"Valor observado\" ytitle \"Porcentagem\" xaxis dticks $dxticks dsubticks $dxticks min $firstValue max $lastValue grid yaxis dticks $dyticks dsubticks $dyticks min 0 max 100 grid xticks lwidth .005 yticks lwidth .005 xlabels hei .16 ylabels hei .16 d1 line smooth color blue lwidth 0.02 end graph " # ===== soundData.tex ===== # lappend dynamicList {soundData.tex} lappend dynamicList \ [ join $specificityDataList {; } ]% # ===== soundMean.tex ===== # lappend dynamicList {soundMean.tex} lappend dynamicList [format %2.2f $soundMean]% # ===== soundStandardDeviation.tex ===== # lappend dynamicList {soundStandardDeviation.tex} lappend dynamicList [format %2.2f $soundStandardDeviation]% } set dynamicList ] } while executing "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $targetFileAbsolutePath $filePath $writeUserCodedPassword" 10/03/25 16:46 10/03/25 16:46 10/03/25 16:46 CreateTclPage (first substitution): domain error: argument not in valid range while executing "expr $Mean / [llength $xList]" (procedure "Mean" line 4) invoked from within "Mean $specificityDataList2" invoked from within "subst set\ fileContentList\ \{\n\t\{\}\n\t\{\n%\ This\ file\ is\ interpreted\ by\ tcl\ so\ each\ LaTeX\ back\ slash\ must\ be\ duplicated\n%\t\t\\\\do..." invoked from within "interp eval slave [list subst $fileContent2]" while making substitution within: set fileContentList { {} { % This file is interpreted by tcl so each LaTeX back slash must be duplicated % \\documentclass#!#Portuges,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\documentclass#!#english,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\repositorio{$thisRepository} %% repositório onde está depositado o documento \\RequirePackage{comment} % In order to distinguish between LaTeX and tcl square brackets, tcl square brackets must be duplicated \\begin{comment} % hiding tcl script from LaTeX [ # TCL LIBRARY proc CreateDataSet {args} { set i 0 set data {} foreach input [lindex $args 0] { set line {} foreach list $args { lappend line [lindex $list $i] } lappend data $line incr i } return [join $data \n] } # erf -- # The error function # Arguments: # x The value for which the function must be evaluated # Result: # erf(x) # Note: # The algoritm used is due to George Marsaglia # See: http://www.velocityreviews.com/forums/t317358-erf-function-in-c.html # I did not want to copy and convert the even more accurate but # rather lengthy algorithm used by lcc-win32/Sun # proc erf {x} { set x [expr {$x*sqrt(2.0)}] if {$x > 10.0} {return 1.0} if {$x < -10.0} {return -1.0} set a 1.2533141373155 set b -1.0 set pwr 1.0 set t 0.0 set z 0.0 set s [expr {$a+$b*$x}] set i 2 while {$s != $t} { set a [expr {($a+$z*$b)/double($i)}] set b [expr {($b+$z*$a)/double($i+1)}] set pwr [expr {$pwr*$x*$x}] set t $s set s [expr {$s+$pwr*($a+$x*$b)}] incr i 2 } return [expr {1.0-2.0*$s*exp(-0.5*$x*$x-0.9189385332046727418)}] } proc Mean {xList} { set Mean 0. foreach x $xList {set Mean [expr $Mean + $x]} return [expr $Mean / [llength $xList]] } proc Variance {xList} { set Mean [Mean $xList] set Variance 0. foreach x $xList {set Variance [expr $Variance + pow(($x - $Mean), 2)]} return [expr $Variance / ([llength $xList] - 1)] } proc StandardDeviation {xList} { return [expr sqrt([Variance $xList])] } # LIST OF FIGURES TO BE UPDATED set figuresToBeUpdatedList {specificity} # set figuresToBeUpdatedList {} ] [ # PREPARE DATA FOR FIGURE 1 if {[lsearch $figuresToBeUpdatedList specificity] != -1} { set firstValue 8.5 set lastValue 11.5 set increment 0.01 set thresholdList {} for {set i $firstValue} {$i <= $lastValue} {set i [expr $i + $increment]} { lappend thresholdList [format %2.2f $i] } # Specificity # LOAD VHSInterobservadorNormais.txt (must be a one line file) set specificityDataList [Execute $serverAddressWithIP [list Load2 $thisRepository VHSInterobservadorNormais.txt $writeUserCodedPassword doc] 0] regsub -all {,} $specificityDataList {.} specificityDataList2 set soundMean [Mean $specificityDataList2] set soundStandardDeviation [StandardDeviation $specificityDataList2] } ] \\end{comment} \\input{./preamble} %% faça as modificações pertinentes no arquivo preamble.tex \\begin{document} \\input{./document} \\end{document} } [ set dynamicList {} # CREATE FIGURE 1 # ===== specificity.pdf ===== # if {[lsearch $figuresToBeUpdatedList specificity] != -1} { lappend dynamicList {specificity.dat} lappend dynamicList \ [ # tcl script set alpha 1 # Specificity set weightedSpecificityList {} foreach value $thresholdList { lappend weightedSpecificityList [expr (0.5 + 0.5 * [erf [expr ($value - $soundMean) / $soundStandardDeviation]]) * 100 * $alpha] } set graphymove 0 set graphxsize 6.2 set graphysize 4.2 set dxticks 0.5 set dyticks 10 CreateDataSet $thresholdList $weightedSpecificityList ] lappend dynamicList {specificity.gle} lappend dynamicList \ " ! gle script - this script is executed in CreateTclPageFile (see col/dpi.inpe.br/banon/1998/08.02.08.56/doc/utilities1.tcl) size $graphxsize [expr $graphysize * 0.92 + $graphymove] set font ss lwidth 0.01 set alabeldist .8 amove 0 $graphymove begin graph size $graphxsize $graphysize center data \"specificity.dat\" xtitle \"Valor observado\" ytitle \"Porcentagem\" xaxis dticks $dxticks dsubticks $dxticks min $firstValue max $lastValue grid yaxis dticks $dyticks dsubticks $dyticks min 0 max 100 grid xticks lwidth .005 yticks lwidth .005 xlabels hei .16 ylabels hei .16 d1 line smooth color blue lwidth 0.02 end graph " # ===== soundData.tex ===== # lappend dynamicList {soundData.tex} lappend dynamicList \ [ join $specificityDataList {; } ]% # ===== soundMean.tex ===== # lappend dynamicList {soundMean.tex} lappend dynamicList [format %2.2f $soundMean]% # ===== soundStandardDeviation.tex ===== # lappend dynamicList {soundStandardDeviation.tex} lappend dynamicList [format %2.2f $soundStandardDeviation]% } set dynamicList ] } while executing "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $targetFileAbsolutePath $filePath $writeUserCodedPassword" 10/03/25 16:46 CreateTclPage (first substitution): domain error: argument not in valid range while executing "expr $Mean / [llength $xList]" (procedure "Mean" line 4) invoked from within "Mean $specificityDataList2" invoked from within "subst set\ fileContentList\ \{\n\t\{\}\n\t\{\n%\ This\ file\ is\ interpreted\ by\ tcl\ so\ each\ LaTeX\ back\ slash\ must\ be\ duplicated\n%\t\t\\\\do..." invoked from within "interp eval slave [list subst $fileContent2]" while making substitution within: set fileContentList { {} { % This file is interpreted by tcl so each LaTeX back slash must be duplicated % \\documentclass#!#Portuges,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\documentclass#!#english,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\repositorio{$thisRepository} %% repositório onde está depositado o documento \\RequirePackage{comment} % In order to distinguish between LaTeX and tcl square brackets, tcl square brackets must be duplicated \\begin{comment} % hiding tcl script from LaTeX [ # TCL LIBRARY proc CreateDataSet {args} { set i 0 set data {} foreach input [lindex $args 0] { set line {} foreach list $args { lappend line [lindex $list $i] } lappend data $line incr i } return [join $data \n] } # erf -- # The error function # Arguments: # x The value for which the function must be evaluated # Result: # erf(x) # Note: # The algoritm used is due to George Marsaglia # See: http://www.velocityreviews.com/forums/t317358-erf-function-in-c.html # I did not want to copy and convert the even more accurate but # rather lengthy algorithm used by lcc-win32/Sun # proc erf {x} { set x [expr {$x*sqrt(2.0)}] if {$x > 10.0} {return 1.0} if {$x < -10.0} {return -1.0} set a 1.2533141373155 set b -1.0 set pwr 1.0 set t 0.0 set z 0.0 set s [expr {$a+$b*$x}] set i 2 while {$s != $t} { set a [expr {($a+$z*$b)/double($i)}] set b [expr {($b+$z*$a)/double($i+1)}] set pwr [expr {$pwr*$x*$x}] set t $s set s [expr {$s+$pwr*($a+$x*$b)}] incr i 2 } return [expr {1.0-2.0*$s*exp(-0.5*$x*$x-0.9189385332046727418)}] } proc Mean {xList} { set Mean 0. foreach x $xList {set Mean [expr $Mean + $x]} return [expr $Mean / [llength $xList]] } proc Variance {xList} { set Mean [Mean $xList] set Variance 0. foreach x $xList {set Variance [expr $Variance + pow(($x - $Mean), 2)]} return [expr $Variance / ([llength $xList] - 1)] } proc StandardDeviation {xList} { return [expr sqrt([Variance $xList])] } # LIST OF FIGURES TO BE UPDATED set figuresToBeUpdatedList {specificity} # set figuresToBeUpdatedList {} ] [ # PREPARE DATA FOR FIGURE 1 if {[lsearch $figuresToBeUpdatedList specificity] != -1} { set firstValue 8.5 set lastValue 11.5 set increment 0.01 set thresholdList {} for {set i $firstValue} {$i <= $lastValue} {set i [expr $i + $increment]} { lappend thresholdList [format %2.2f $i] } # Specificity # LOAD VHSInterobservadorNormais.txt (must be a one line file) set specificityDataList [Execute $serverAddressWithIP [list Load2 $thisRepository VHSInterobservadorNormais.txt $writeUserCodedPassword doc] 0] regsub -all {,} $specificityDataList {.} specificityDataList2 set soundMean [Mean $specificityDataList2] set soundStandardDeviation [StandardDeviation $specificityDataList2] } ] \\end{comment} \\input{./preamble} %% faça as modificações pertinentes no arquivo preamble.tex \\begin{document} \\input{./document} \\end{document} } [ set dynamicList {} # CREATE FIGURE 1 # ===== specificity.pdf ===== # if {[lsearch $figuresToBeUpdatedList specificity] != -1} { lappend dynamicList {specificity.dat} lappend dynamicList \ [ # tcl script set alpha 1 # Specificity set weightedSpecificityList {} foreach value $thresholdList { lappend weightedSpecificityList [expr (0.5 + 0.5 * [erf [expr ($value - $soundMean) / $soundStandardDeviation]]) * 100 * $alpha] } set graphymove 0 set graphxsize 6.2 set graphysize 4.2 set dxticks 0.5 set dyticks 10 CreateDataSet $thresholdList $weightedSpecificityList ] lappend dynamicList {specificity.gle} lappend dynamicList \ " ! gle script - this script is executed in CreateTclPageFile (see col/dpi.inpe.br/banon/1998/08.02.08.56/doc/utilities1.tcl) size $graphxsize [expr $graphysize * 0.92 + $graphymove] set font ss lwidth 0.01 set alabeldist .8 amove 0 $graphymove begin graph size $graphxsize $graphysize center data \"specificity.dat\" xtitle \"Valor observado\" ytitle \"Porcentagem\" xaxis dticks $dxticks dsubticks $dxticks min $firstValue max $lastValue grid yaxis dticks $dyticks dsubticks $dyticks min 0 max 100 grid xticks lwidth .005 yticks lwidth .005 xlabels hei .16 ylabels hei .16 d1 line smooth color blue lwidth 0.02 end graph " # ===== soundData.tex ===== # lappend dynamicList {soundData.tex} lappend dynamicList \ [ join $specificityDataList {; } ]% # ===== soundMean.tex ===== # lappend dynamicList {soundMean.tex} lappend dynamicList [format %2.2f $soundMean]% # ===== soundStandardDeviation.tex ===== # lappend dynamicList {soundStandardDeviation.tex} lappend dynamicList [format %2.2f $soundStandardDeviation]% } set dynamicList ] } while executing "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $targetFileAbsolutePath $filePath $writeUserCodedPassword" 10/03/25 16:52 10/03/25 16:52 CreateTclPage (first substitution): domain error: argument not in valid range while executing "expr $Mean / [llength $xList]" (procedure "Mean" line 4) invoked from within "Mean $specificityDataList2" invoked from within "subst set\ fileContentList\ \{\n\t\{\}\n\t\{\n%\ This\ file\ is\ interpreted\ by\ tcl\ so\ each\ LaTeX\ back\ slash\ must\ be\ duplicated\n%\t\t\\\\do..." invoked from within "interp eval slave [list subst $fileContent2]" while making substitution within: set fileContentList { {} { % This file is interpreted by tcl so each LaTeX back slash must be duplicated % \\documentclass#!#Portuges,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\documentclass#!#english,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\repositorio{$thisRepository} %% repositório onde está depositado o documento \\RequirePackage{comment} % In order to distinguish between LaTeX and tcl square brackets, tcl square brackets must be duplicated \\begin{comment} % hiding tcl script from LaTeX [ # TCL LIBRARY proc CreateDataSet {args} { set i 0 set data {} foreach input [lindex $args 0] { set line {} foreach list $args { lappend line [lindex $list $i] } lappend data $line incr i } return [join $data \n] } # erf -- # The error function # Arguments: # x The value for which the function must be evaluated # Result: # erf(x) # Note: # The algoritm used is due to George Marsaglia # See: http://www.velocityreviews.com/forums/t317358-erf-function-in-c.html # I did not want to copy and convert the even more accurate but # rather lengthy algorithm used by lcc-win32/Sun # proc erf {x} { set x [expr {$x*sqrt(2.0)}] if {$x > 10.0} {return 1.0} if {$x < -10.0} {return -1.0} set a 1.2533141373155 set b -1.0 set pwr 1.0 set t 0.0 set z 0.0 set s [expr {$a+$b*$x}] set i 2 while {$s != $t} { set a [expr {($a+$z*$b)/double($i)}] set b [expr {($b+$z*$a)/double($i+1)}] set pwr [expr {$pwr*$x*$x}] set t $s set s [expr {$s+$pwr*($a+$x*$b)}] incr i 2 } return [expr {1.0-2.0*$s*exp(-0.5*$x*$x-0.9189385332046727418)}] } proc Mean {xList} { set Mean 0. foreach x $xList {set Mean [expr $Mean + $x]} return [expr $Mean / [llength $xList]] } proc Variance {xList} { set Mean [Mean $xList] set Variance 0. foreach x $xList {set Variance [expr $Variance + pow(($x - $Mean), 2)]} return [expr $Variance / ([llength $xList] - 1)] } proc StandardDeviation {xList} { return [expr sqrt([Variance $xList])] } # LIST OF FIGURES TO BE UPDATED set figuresToBeUpdatedList {specificity} # set figuresToBeUpdatedList {} ] [ # PREPARE DATA FOR FIGURE 1 if {[lsearch $figuresToBeUpdatedList specificity] != -1} { set firstValue 8.5 set lastValue 11.5 set increment 0.01 set thresholdList {} for {set i $firstValue} {$i <= $lastValue} {set i [expr $i + $increment]} { lappend thresholdList [format %2.2f $i] } # Specificity # LOAD VHSInterobservadorNormais.txt (must be a one line file) set specificityDataList [Execute $serverAddressWithIP [list Load2 $thisRepository VHSInterobservadorNormais.txt $writeUserCodedPassword doc] 0] regsub -all {,} $specificityDataList {.} specificityDataList2 set soundMean [Mean $specificityDataList2] set soundStandardDeviation [StandardDeviation $specificityDataList2] } ] \\end{comment} \\input{./preamble} %% faça as modificações pertinentes no arquivo preamble.tex \\begin{document} \\input{./document} \\end{document} } [ set dynamicList {} # CREATE FIGURE 1 # ===== specificity.pdf ===== # if {[lsearch $figuresToBeUpdatedList specificity] != -1} { lappend dynamicList {specificity.dat} lappend dynamicList \ [ # tcl script set alpha 1 # Specificity set weightedSpecificityList {} foreach value $thresholdList { lappend weightedSpecificityList [expr (0.5 + 0.5 * [erf [expr ($value - $soundMean) / $soundStandardDeviation]]) * 100 * $alpha] } set graphymove 0 set graphxsize 6.2 set graphysize 4.2 set dxticks 0.5 set dyticks 10 CreateDataSet $thresholdList $weightedSpecificityList ] lappend dynamicList {specificity.gle} lappend dynamicList \ " ! gle script - this script is executed in CreateTclPageFile (see col/dpi.inpe.br/banon/1998/08.02.08.56/doc/utilities1.tcl) size $graphxsize [expr $graphysize * 0.92 + $graphymove] set font ss lwidth 0.01 set alabeldist .8 amove 0 $graphymove begin graph size $graphxsize $graphysize center data \"specificity.dat\" xtitle \"Valor observado\" ytitle \"Porcentagem\" xaxis dticks $dxticks dsubticks $dxticks min $firstValue max $lastValue grid yaxis dticks $dyticks dsubticks $dyticks min 0 max 100 grid xticks lwidth .005 yticks lwidth .005 xlabels hei .16 ylabels hei .16 d1 line smooth color blue lwidth 0.02 end graph " # ===== soundData.tex ===== # lappend dynamicList {soundData.tex} lappend dynamicList \ [ join $specificityDataList {; } ]% # ===== soundMean.tex ===== # lappend dynamicList {soundMean.tex} lappend dynamicList [format %2.2f $soundMean]% # ===== soundStandardDeviation.tex ===== # lappend dynamicList {soundStandardDeviation.tex} lappend dynamicList [format %2.2f $soundStandardDeviation]% } set dynamicList ] } while executing "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $targetFileAbsolutePath $filePath $writeUserCodedPassword" 10/03/25 16:52 10/03/25 16:52 CreateTclPage (first substitution): domain error: argument not in valid range while executing "expr $Mean / [llength $xList]" (procedure "Mean" line 4) invoked from within "Mean $specificityDataList2" invoked from within "subst set\ fileContentList\ \{\n\t\{\}\n\t\{\n%\ This\ file\ is\ interpreted\ by\ tcl\ so\ each\ LaTeX\ back\ slash\ must\ be\ duplicated\n%\t\t\\\\do..." invoked from within "interp eval slave [list subst $fileContent2]" while making substitution within: set fileContentList { {} { % This file is interpreted by tcl so each LaTeX back slash must be duplicated % \\documentclass#!#Portuges,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\documentclass#!#english,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\repositorio{$thisRepository} %% repositório onde está depositado o documento \\RequirePackage{comment} % In order to distinguish between LaTeX and tcl square brackets, tcl square brackets must be duplicated \\begin{comment} % hiding tcl script from LaTeX [ # TCL LIBRARY proc CreateDataSet {args} { set i 0 set data {} foreach input [lindex $args 0] { set line {} foreach list $args { lappend line [lindex $list $i] } lappend data $line incr i } return [join $data \n] } # erf -- # The error function # Arguments: # x The value for which the function must be evaluated # Result: # erf(x) # Note: # The algoritm used is due to George Marsaglia # See: http://www.velocityreviews.com/forums/t317358-erf-function-in-c.html # I did not want to copy and convert the even more accurate but # rather lengthy algorithm used by lcc-win32/Sun # proc erf {x} { set x [expr {$x*sqrt(2.0)}] if {$x > 10.0} {return 1.0} if {$x < -10.0} {return -1.0} set a 1.2533141373155 set b -1.0 set pwr 1.0 set t 0.0 set z 0.0 set s [expr {$a+$b*$x}] set i 2 while {$s != $t} { set a [expr {($a+$z*$b)/double($i)}] set b [expr {($b+$z*$a)/double($i+1)}] set pwr [expr {$pwr*$x*$x}] set t $s set s [expr {$s+$pwr*($a+$x*$b)}] incr i 2 } return [expr {1.0-2.0*$s*exp(-0.5*$x*$x-0.9189385332046727418)}] } proc Mean {xList} { set Mean 0. foreach x $xList {set Mean [expr $Mean + $x]} return [expr $Mean / [llength $xList]] } proc Variance {xList} { set Mean [Mean $xList] set Variance 0. foreach x $xList {set Variance [expr $Variance + pow(($x - $Mean), 2)]} return [expr $Variance / ([llength $xList] - 1)] } proc StandardDeviation {xList} { return [expr sqrt([Variance $xList])] } # LIST OF FIGURES TO BE UPDATED set figuresToBeUpdatedList {specificity} # set figuresToBeUpdatedList {} ] [ # PREPARE DATA FOR FIGURE 1 if {[lsearch $figuresToBeUpdatedList specificity] != -1} { set firstValue 8.5 set lastValue 11.5 set increment 0.01 set thresholdList {} for {set i $firstValue} {$i <= $lastValue} {set i [expr $i + $increment]} { lappend thresholdList [format %2.2f $i] } # Specificity # LOAD VHSInterobservadorNormais.txt (must be a one line file) set specificityDataList [Execute $serverAddressWithIP [list Load2 $thisRepository VHSInterobservadorNormais.txt $writeUserCodedPassword doc] 0] regsub -all {,} $specificityDataList {.} specificityDataList2 set soundMean [Mean $specificityDataList2] set soundStandardDeviation [StandardDeviation $specificityDataList2] } ] \\end{comment} \\input{./preamble} %% faça as modificações pertinentes no arquivo preamble.tex \\begin{document} \\input{./document} \\end{document} } [ set dynamicList {} # CREATE FIGURE 1 # ===== specificity.pdf ===== # if {[lsearch $figuresToBeUpdatedList specificity] != -1} { lappend dynamicList {specificity.dat} lappend dynamicList \ [ # tcl script set alpha 1 # Specificity set weightedSpecificityList {} foreach value $thresholdList { lappend weightedSpecificityList [expr (0.5 + 0.5 * [erf [expr ($value - $soundMean) / $soundStandardDeviation]]) * 100 * $alpha] } set graphymove 0 set graphxsize 6.2 set graphysize 4.2 set dxticks 0.5 set dyticks 10 CreateDataSet $thresholdList $weightedSpecificityList ] lappend dynamicList {specificity.gle} lappend dynamicList \ " ! gle script - this script is executed in CreateTclPageFile (see col/dpi.inpe.br/banon/1998/08.02.08.56/doc/utilities1.tcl) size $graphxsize [expr $graphysize * 0.92 + $graphymove] set font ss lwidth 0.01 set alabeldist .8 amove 0 $graphymove begin graph size $graphxsize $graphysize center data \"specificity.dat\" xtitle \"Valor observado\" ytitle \"Porcentagem\" xaxis dticks $dxticks dsubticks $dxticks min $firstValue max $lastValue grid yaxis dticks $dyticks dsubticks $dyticks min 0 max 100 grid xticks lwidth .005 yticks lwidth .005 xlabels hei .16 ylabels hei .16 d1 line smooth color blue lwidth 0.02 end graph " # ===== soundData.tex ===== # lappend dynamicList {soundData.tex} lappend dynamicList \ [ join $specificityDataList {; } ]% # ===== soundMean.tex ===== # lappend dynamicList {soundMean.tex} lappend dynamicList [format %2.2f $soundMean]% # ===== soundStandardDeviation.tex ===== # lappend dynamicList {soundStandardDeviation.tex} lappend dynamicList [format %2.2f $soundStandardDeviation]% } set dynamicList ] } while executing "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $targetFileAbsolutePath $filePath $writeUserCodedPassword" 10/03/25 21:15 10/03/25 21:16 CreateTclPage (first substitution): domain error: argument not in valid range while executing "expr $Mean / [llength $xList]" (procedure "Mean" line 4) invoked from within "Mean $specificityDataList2" invoked from within "subst set\ fileContentList\ \{\n\t\{\}\n\t\{\n%\ This\ file\ is\ interpreted\ by\ tcl\ so\ each\ LaTeX\ back\ slash\ must\ be\ duplicated\n%\t\t\\\\do..." invoked from within "interp eval slave [list subst $fileContent2]" while making substitution within: set fileContentList { {} { % This file is interpreted by tcl so each LaTeX back slash must be duplicated % \\documentclass#!#Portuges,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\documentclass#!#english,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\repositorio{$thisRepository} %% repositório onde está depositado o documento \\RequirePackage{comment} % In order to distinguish between LaTeX and tcl square brackets, tcl square brackets must be duplicated \\begin{comment} % hiding tcl script from LaTeX [ # TCL LIBRARY proc CreateDataSet {args} { set i 0 set data {} foreach input [lindex $args 0] { set line {} foreach list $args { lappend line [lindex $list $i] } lappend data $line incr i } return [join $data \n] } # erf -- # The error function # Arguments: # x The value for which the function must be evaluated # Result: # erf(x) # Note: # The algoritm used is due to George Marsaglia # See: http://www.velocityreviews.com/forums/t317358-erf-function-in-c.html # I did not want to copy and convert the even more accurate but # rather lengthy algorithm used by lcc-win32/Sun # proc erf {x} { set x [expr {$x*sqrt(2.0)}] if {$x > 10.0} {return 1.0} if {$x < -10.0} {return -1.0} set a 1.2533141373155 set b -1.0 set pwr 1.0 set t 0.0 set z 0.0 set s [expr {$a+$b*$x}] set i 2 while {$s != $t} { set a [expr {($a+$z*$b)/double($i)}] set b [expr {($b+$z*$a)/double($i+1)}] set pwr [expr {$pwr*$x*$x}] set t $s set s [expr {$s+$pwr*($a+$x*$b)}] incr i 2 } return [expr {1.0-2.0*$s*exp(-0.5*$x*$x-0.9189385332046727418)}] } proc Mean {xList} { set Mean 0. foreach x $xList {set Mean [expr $Mean + $x]} return [expr $Mean / [llength $xList]] } proc Variance {xList} { set Mean [Mean $xList] set Variance 0. foreach x $xList {set Variance [expr $Variance + pow(($x - $Mean), 2)]} return [expr $Variance / ([llength $xList] - 1)] } proc StandardDeviation {xList} { return [expr sqrt([Variance $xList])] } # LIST OF FIGURES TO BE UPDATED set figuresToBeUpdatedList {specificity} # set figuresToBeUpdatedList {} ] [ # PREPARE DATA FOR FIGURE 1 if {[lsearch $figuresToBeUpdatedList specificity] != -1} { set firstValue 8.5 set lastValue 11.5 set increment 0.01 set thresholdList {} for {set i $firstValue} {$i <= $lastValue} {set i [expr $i + $increment]} { lappend thresholdList [format %2.2f $i] } # Specificity # LOAD VHSInterobservadorNormais.txt (must be a one line file) set specificityDataList [Execute $serverAddressWithIP [list Load2 $thisRepository VHSInterobservadorNormais.txt $writeUserCodedPassword doc] 0] regsub -all {,} $specificityDataList {.} specificityDataList2 set soundMean [Mean $specificityDataList2] set soundStandardDeviation [StandardDeviation $specificityDataList2] } ] \\end{comment} \\input{./preamble} %% faça as modificações pertinentes no arquivo preamble.tex \\begin{document} \\input{./document} \\end{document} } [ set dynamicList {} # CREATE FIGURE 1 # ===== specificity.pdf ===== # if {[lsearch $figuresToBeUpdatedList specificity] != -1} { lappend dynamicList {specificity.dat} lappend dynamicList \ [ # tcl script set alpha 1 # Specificity set weightedSpecificityList {} foreach value $thresholdList { lappend weightedSpecificityList [expr (0.5 + 0.5 * [erf [expr ($value - $soundMean) / $soundStandardDeviation]]) * 100 * $alpha] } set graphymove 0 set graphxsize 6.2 set graphysize 4.2 set dxticks 0.5 set dyticks 10 CreateDataSet $thresholdList $weightedSpecificityList ] lappend dynamicList {specificity.gle} lappend dynamicList \ " ! gle script - this script is executed in CreateTclPageFile (see col/dpi.inpe.br/banon/1998/08.02.08.56/doc/utilities1.tcl) size $graphxsize [expr $graphysize * 0.92 + $graphymove] set font ss lwidth 0.01 set alabeldist .8 amove 0 $graphymove begin graph size $graphxsize $graphysize center data \"specificity.dat\" xtitle \"Valor observado\" ytitle \"Porcentagem\" xaxis dticks $dxticks dsubticks $dxticks min $firstValue max $lastValue grid yaxis dticks $dyticks dsubticks $dyticks min 0 max 100 grid xticks lwidth .005 yticks lwidth .005 xlabels hei .16 ylabels hei .16 d1 line smooth color blue lwidth 0.02 end graph " # ===== soundData.tex ===== # lappend dynamicList {soundData.tex} lappend dynamicList \ [ join $specificityDataList {; } ]% # ===== soundMean.tex ===== # lappend dynamicList {soundMean.tex} lappend dynamicList [format %2.2f $soundMean]% # ===== soundStandardDeviation.tex ===== # lappend dynamicList {soundStandardDeviation.tex} lappend dynamicList [format %2.2f $soundStandardDeviation]% } set dynamicList ] } while executing "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $targetFileAbsolutePath $filePath $writeUserCodedPassword" 12/03/25 17:52 12/03/25 17:52 CreateTclPage (first substitution): domain error: argument not in valid range while executing "expr $Mean / [llength $xList]" (procedure "Mean" line 4) invoked from within "Mean $specificityDataList2" invoked from within "subst set\ fileContentList\ \{\n\t\{\}\n\t\{\n%\ This\ file\ is\ interpreted\ by\ tcl\ so\ each\ LaTeX\ back\ slash\ must\ be\ duplicated\n%\t\t\\\\do..." invoked from within "interp eval slave [list subst $fileContent2]" while making substitution within: set fileContentList { {} { % This file is interpreted by tcl so each LaTeX back slash must be duplicated % \\documentclass#!#Portuges,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\documentclass#!#english,PublicacaoLivro,SemFormatacaoCapitulo,SemFolhaAprovacao#@#{./template/tdiinpe} \\repositorio{$thisRepository} %% repositório onde está depositado o documento \\RequirePackage{comment} % In order to distinguish between LaTeX and tcl square brackets, tcl square brackets must be duplicated \\begin{comment} % hiding tcl script from LaTeX [ # TCL LIBRARY proc CreateDataSet {args} { set i 0 set data {} foreach input [lindex $args 0] { set line {} foreach list $args { lappend line [lindex $list $i] } lappend data $line incr i } return [join $data \n] } # erf -- # The error function # Arguments: # x The value for which the function must be evaluated # Result: # erf(x) # Note: # The algoritm used is due to George Marsaglia # See: http://www.velocityreviews.com/forums/t317358-erf-function-in-c.html # I did not want to copy and convert the even more accurate but # rather lengthy algorithm used by lcc-win32/Sun # proc erf {x} { set x [expr {$x*sqrt(2.0)}] if {$x > 10.0} {return 1.0} if {$x < -10.0} {return -1.0} set a 1.2533141373155 set b -1.0 set pwr 1.0 set t 0.0 set z 0.0 set s [expr {$a+$b*$x}] set i 2 while {$s != $t} { set a [expr {($a+$z*$b)/double($i)}] set b [expr {($b+$z*$a)/double($i+1)}] set pwr [expr {$pwr*$x*$x}] set t $s set s [expr {$s+$pwr*($a+$x*$b)}] incr i 2 } return [expr {1.0-2.0*$s*exp(-0.5*$x*$x-0.9189385332046727418)}] } proc Mean {xList} { set Mean 0. foreach x $xList {set Mean [expr $Mean + $x]} return [expr $Mean / [llength $xList]] } proc Variance {xList} { set Mean [Mean $xList] set Variance 0. foreach x $xList {set Variance [expr $Variance + pow(($x - $Mean), 2)]} return [expr $Variance / ([llength $xList] - 1)] } proc StandardDeviation {xList} { return [expr sqrt([Variance $xList])] } # LIST OF FIGURES TO BE UPDATED set figuresToBeUpdatedList {specificity} # set figuresToBeUpdatedList {} ] [ # PREPARE DATA FOR FIGURE 1 if {[lsearch $figuresToBeUpdatedList specificity] != -1} { set firstValue 8.5 set lastValue 11.5 set increment 0.01 set thresholdList {} for {set i $firstValue} {$i <= $lastValue} {set i [expr $i + $increment]} { lappend thresholdList [format %2.2f $i] } # Specificity # LOAD VHSInterobservadorNormais.txt (must be a one line file) set specificityDataList [Execute $serverAddressWithIP [list Load2 $thisRepository VHSInterobservadorNormais.txt $writeUserCodedPassword doc] 0] regsub -all {,} $specificityDataList {.} specificityDataList2 set soundMean [Mean $specificityDataList2] set soundStandardDeviation [StandardDeviation $specificityDataList2] } ] \\end{comment} \\input{./preamble} %% faça as modificações pertinentes no arquivo preamble.tex \\begin{document} \\input{./document} \\end{document} } [ set dynamicList {} # CREATE FIGURE 1 # ===== specificity.pdf ===== # if {[lsearch $figuresToBeUpdatedList specificity] != -1} { lappend dynamicList {specificity.dat} lappend dynamicList \ [ # tcl script set alpha 1 # Specificity set weightedSpecificityList {} foreach value $thresholdList { lappend weightedSpecificityList [expr (0.5 + 0.5 * [erf [expr ($value - $soundMean) / $soundStandardDeviation]]) * 100 * $alpha] } set graphymove 0 set graphxsize 6.2 set graphysize 4.2 set dxticks 0.5 set dyticks 10 CreateDataSet $thresholdList $weightedSpecificityList ] lappend dynamicList {specificity.gle} lappend dynamicList \ " ! gle script - this script is executed in CreateTclPageFile (see col/dpi.inpe.br/banon/1998/08.02.08.56/doc/utilities1.tcl) size $graphxsize [expr $graphysize * 0.92 + $graphymove] set font ss lwidth 0.01 set alabeldist .8 amove 0 $graphymove begin graph size $graphxsize $graphysize center data \"specificity.dat\" xtitle \"Valor observado\" ytitle \"Porcentagem\" xaxis dticks $dxticks dsubticks $dxticks min $firstValue max $lastValue grid yaxis dticks $dyticks dsubticks $dyticks min 0 max 100 grid xticks lwidth .005 yticks lwidth .005 xlabels hei .16 ylabels hei .16 d1 line smooth color blue lwidth 0.02 end graph " # ===== soundData.tex ===== # lappend dynamicList {soundData.tex} lappend dynamicList \ [ join $specificityDataList {; } ]% # ===== soundMean.tex ===== # lappend dynamicList {soundMean.tex} lappend dynamicList [format %2.2f $soundMean]% # ===== soundStandardDeviation.tex ===== # lappend dynamicList {soundStandardDeviation.tex} lappend dynamicList [format %2.2f $soundStandardDeviation]% } set dynamicList ] } while executing "CreateTclPage $thisRepository $fileContent $language $languageRep2 $path $targetFileAbsolutePath $filePath $writeUserCodedPassword" 12/03/25 17:53 12/03/25 17:55