Skip to content

Commit

Permalink
now the error bar is plotted from I+-DeltaI and q+-Deltaq
Browse files Browse the repository at this point in the history
the error bar should now always be plotted if the error is larger than 0
  • Loading branch information
Kohlbrecher committed Jul 11, 2017
1 parent 74cc836 commit fb8ce36
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -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
6 changes: 3 additions & 3 deletions sasfit.vfs/lib/app-sasfit/tcl/sasfit_addfiles.tcl
Expand Up @@ -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) \
Expand All @@ -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
}

Expand Down
4 changes: 3 additions & 1 deletion sasfit.vfs/lib/app-sasfit/tcl/sasfit_analytical.tcl
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions sasfit.vfs/lib/app-sasfit/tcl/sasfit_plotData.tcl
Expand Up @@ -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 } {
Expand All @@ -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
Expand All @@ -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 {}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fb8ce36

Please sign in to comment.