Subversion Repositories f9daq

Rev

Rev 268 | Rev 270 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 268 Rev 269
Line 74... Line 74...
74
        var tformula = tf1.fFormula;
74
        var tformula = tf1.fFormula;
75
        var len = tf1.fNpar;
75
        var len = tf1.fNpar;
76
//        addLog('#TF1     ' +JSON.stringify(tf1, null, '\t')+ '$$$<br>');
76
//        addLog('#TF1     ' +JSON.stringify(tf1, null, '\t')+ '$$$<br>');
77
        mtext = '<br/>' + "Fit Function: " + tformula.fFormula+ '<br/>';
77
        mtext = '<br/>' + "Fit Function: " + tformula.fFormula+ '<br/>';
78
        mtext +="Chi2/NDF: " + tf1.fChisquare.toPrecision(2) + " / "+ tf1.fNDF+ '<br/>';
78
        mtext +="Chi2/NDF: " + tf1.fChisquare.toPrecision(2) + " / "+ tf1.fNDF+ '<br/>';
79
        mtext +='<table border="0" >';
79
        mtext +='<table border="0" width="50%" >';
80
        for ( var i = 0;i <len;i++){
80
        for ( var i = 0;i <len;i++){
81
            var name = tformula.fParams[i].first;
81
            var name = tformula.fParams[i].first;
82
            var val  = tformula.fClingParameters[i];
82
            var val  = tformula.fClingParameters[i];
83
            var err  = tf1.fParErrors[i];
83
            var err  = tf1.fParErrors[i];
84
            mtext += "<tr><td>" + name + " <td> " + val.toPrecision(4) + " <td>+-<td>" + err.toPrecision(2) + '<br/>';
84
            mtext += "<tr><td>" + name + " <td> " + val.toPrecision(4) + " <td>+-<td>" + err.toPrecision(2) + '<br/>';
Line 165... Line 165...
165
                  r.insertAdjacentHTML('beforeend', '<div id="fit' + sframe +'" style="display: none"></div><br/>');
165
                  r.insertAdjacentHTML('beforeend', '<div id="fit' + sframe +'" style="display: none"></div><br/>');
166
                  var fit = document.getElementById('fit'+ sframe);
166
                  var fit = document.getElementById('fit'+ sframe);
167
mform ='<form method="post" action="th1fit.php" onsubmit="return fitpanel(this);">';
167
mform ='<form method="post" action="th1fit.php" onsubmit="return fitpanel(this);">';
168
mform += '  <input class="mybutton" type="submit" value="  Fit  "/>';
168
mform += '  <input class="mybutton" type="submit" value="  Fit  "/>';
169
mform += '  Range: min=<input type="text" size="2" value="0"   name="min" />';
169
mform += '  Range: min=<input type="text" size="2" value="0"   name="min" />';
170
mform += '  max:<input type="text" size="2"  value="10"   name="max" />';
170
mform += '  max:<input type="text" size="2"  value="20"   name="max" />';
171
mform += '  Function:<input type="text"  size="5"  value="gaus"    name="fitfun" />';
171
mform += '  Function:<input type="text"  size="5"  value="gaus"    name="fitfun" />';
172
mform += '  Initial parameters<input type="text" size="5" value="1;2;3"    name="prm" />';
172
mform += '  Initial parameters<input type="text" size="5" value=""    name="prm" />';
173
mform += '  <input id="data'+ sframe +'" type="hidden" value="'+ result.message +'" name="data" />';
173
mform += '  <input id="data'+ sframe +'" type="hidden" value="'+ result.message +'" name="data" />';
174
mform += '  <input type="hidden" value="'+ sframe +'"    name="name" />';
174
mform += '  <input type="hidden" value="'+ sframe +'"    name="name" />';
175
mform += '</form>';
175
mform += '</form>';
176
 
-
 
-
 
176
                  fit.insertAdjacentHTML('beforeend', '<div id="param' + sframe +'"></div><br/>');
177
                  fit.insertAdjacentHTML('beforeend', mform);
177
                  fit.insertAdjacentHTML('beforeend', mform);
178
                  fit.insertAdjacentHTML('beforeend', '<div id="param' + sframe +'"></div><br/>');
-
 
179
                  r.insertAdjacentHTML('beforeend','<input type="button" onclick="togglevisibility(\'fit'+sframe+'\');"  class="mybutton" value="Show/Hide Fit Panel" /><hr/>' );
178
                  r.insertAdjacentHTML('beforeend','<input type="button" onclick="togglevisibility(\'fit'+sframe+'\');"  class="mybutton" value="Show/Hide Fit Panel" /><hr/>' );
180
                  document.getElementById('data'+ sframe).value=result.message;
179
                  document.getElementById('data'+ sframe).value=result.message;
181
                  //r.insertAdjacentHTML('beforeend', JSON.stringify(result.message));
180
                  //r.insertAdjacentHTML('beforeend', JSON.stringify(result.message));
182
                }
181
                }
183
                var frame = document.getElementById(sframe);
182
                var frame = document.getElementById(sframe);