From fb8ce36a5b1cf45b4ad720643a15aabfd8a81c82 Mon Sep 17 00:00:00 2001 From: Kohlbrecher Joachim Date: Tue, 11 Jul 2017 16:29:18 +0200 Subject: [PATCH] now the error bar is plotted from I+-DeltaI and q+-Deltaq the error bar should now always be plotted if the error is larger than 0 --- .gitignore | 1 + sasfit.vfs/lib/app-sasfit/tcl/sasfit_addfiles.tcl | 6 +++--- .../lib/app-sasfit/tcl/sasfit_analytical.tcl | 4 +++- sasfit.vfs/lib/app-sasfit/tcl/sasfit_plotData.tcl | 14 +++++++------- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 756d8623..5a041e85 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,4 @@ saskit/src/tcl-8.4.13/lib/Mk4tcl/pkgIndex.tcl saskit/saskit_* /src/plugins/ordered_particle_systems/sasfit_sq_sq_iso_pearson.c +/src/fftw/fftw-3.3.6-pl2.tar.gz diff --git a/sasfit.vfs/lib/app-sasfit/tcl/sasfit_addfiles.tcl b/sasfit.vfs/lib/app-sasfit/tcl/sasfit_addfiles.tcl index 9e8a93e0..17c1cb6c 100644 --- a/sasfit.vfs/lib/app-sasfit/tcl/sasfit_addfiles.tcl +++ b/sasfit.vfs/lib/app-sasfit/tcl/sasfit_addfiles.tcl @@ -106,7 +106,7 @@ proc NewFitDataCmd {l_Q l_IthIres sub l_NR args} { set indx1 -1 # draw and configure the calculated graph - Put_Graph_el IQGraph $Q $Ith + Put_Graph_el IQGraph $Q $Ith incr indx1 if {[llength $args] == 0} { set IQGraph(l,legendtext) [lreplace $IQGraph(l,legendtext) \ @@ -122,11 +122,11 @@ proc NewFitDataCmd {l_Q l_IthIres sub l_NR args} { # draw the data (for fit mode) if {[llength $args] == 0} { if {$sub} { - Put_Graph_el IQGraph $Q $Ih $DI + Put_Graph_el IQGraph $Q $Ih $DI $Ires incr indx1 lset IQGraph(e,fill) $indx1 {}; # show empty symbols } - Put_Graph_el IQGraph $sasfit(Q) $sasfit(I) $sasfit(DI) + Put_Graph_el IQGraph $sasfit(Q) $sasfit(I) $sasfit(DI) $sasfit(res) incr indx1 } diff --git a/sasfit.vfs/lib/app-sasfit/tcl/sasfit_analytical.tcl b/sasfit.vfs/lib/app-sasfit/tcl/sasfit_analytical.tcl index 4adf21d4..1c714198 100644 --- a/sasfit.vfs/lib/app-sasfit/tcl/sasfit_analytical.tcl +++ b/sasfit.vfs/lib/app-sasfit/tcl/sasfit_analytical.tcl @@ -9004,7 +9004,9 @@ proc analytical_menu_bar { simorfit analytPar tmpAnalytPar actualAnalytPar \ create_GlobalAnalytPar tmpap } } else { - if { ![info exist $analytPar]} { create_AnalytPar $analytPar } + if { ![info exist ap(actual_SD)]} { + create_AnalytPar ap + } } cp_arr ap tmpap diff --git a/sasfit.vfs/lib/app-sasfit/tcl/sasfit_plotData.tcl b/sasfit.vfs/lib/app-sasfit/tcl/sasfit_plotData.tcl index a7211b65..e11b3cc6 100644 --- a/sasfit.vfs/lib/app-sasfit/tcl/sasfit_plotData.tcl +++ b/sasfit.vfs/lib/app-sasfit/tcl/sasfit_plotData.tcl @@ -140,7 +140,7 @@ proc clearGraph_el {GraphPar} { #------------------------------------------------------------------------------ # Adds a new curve to GraphPar (GraphPar = e.g. IQGraph SDGraph ...) -# procedure returns 0 if put_Graph_el fails otherwise 1 +# procedure returns 0 if Put_Graph_el fails otherwise 1 # after succesfull call of the procedure GraphPar is updated # proc Put_Graph_el {GraphPar xdata args } { @@ -149,10 +149,10 @@ proc Put_Graph_el {GraphPar xdata args } { if {[llength $args] > 3} {return 0} # $args may consist of up to 3 lists: '{ydata dydata resdata}' # $args is printed over $xdata - set data {ydata dydata resdata} set ydata {} set dydata {} set resdata {} + set data {ydata dydata resdata} set j 0 # cycle through each list in $args and assign it to ydata, dydata and resdata @@ -171,7 +171,7 @@ proc Put_Graph_el {GraphPar xdata args } { # # if ydata not set than xdata becomes ydata, xdata becomes {1 2 3 ...} - # and dydata becomes {} + # and dydata becomes {-1.0 -1.0 ...} and resdata {} if { [llength $ydata] == 0 } { set ydata $xdata set xdata {} @@ -900,8 +900,8 @@ proc RefreshGraph {Graph} { if { [llength $error] > 0 && $thereIsError } { foreach y $ydata e $error { - lappend dylow [expr $y - 0.5*abs($e)] - lappend dyhi [expr $y + 0.5*abs($e)] + lappend dylow [expr $y - 1.0*abs($e)] + lappend dyhi [expr $y + 1.0*abs($e)] } # # real transformation of dylow and dyhi @@ -961,8 +961,8 @@ proc RefreshGraph {Graph} { if { [llength $resdata] > 0 && $thereIsResdata } { foreach x $xdata r $resdata { - lappend dxlow [expr $x - 0.5*abs($r)] - lappend dxhi [expr $x + 0.5*abs($r)] + lappend dxlow [expr $x - 1.0*abs($r)] + lappend dxhi [expr $x + 1.0*abs($r)] } # # real transformation of dxlow and dxhi