About the ‘geomap’ task
Bosco Yung wrote on May 08, 2007
Hello!
I have a question about the 'output' file generated by the GEOMAP task. There was an item called: Xin and Yin fit rms.
I wish to know how are these rms values be computed.
Thank you very much.
Bosco
I have a question about the 'output' file generated by the GEOMAP task. There was an item called: Xin and Yin fit rms.
I wish to know how are these rms values be computed.
Thank you very much.
Bosco
Valeev Azamat wrote on May 08, 2007
Hi Bosco!
1)compute sum residual[size=9:3f35e9626a]i[/size:3f35e9626a]*residual[size=9:3f35e9626a]i[/size:3f35e9626a],
where i is from 1 to point counts, residual is (input value - function fitted value)
2) divide this sum to (counts-1)
3) compute sqrt
expression like this:
sqrt [ sum[size=9:3f35e9626a]i=1,ncount[/size:3f35e9626a](residual[size=9:3f35e9626a]i[/size:3f35e9626a]*residual[size=9:3f35e9626a]i[/size:3f35e9626a]) / (count-1) ]
Do I answer to your question?
Azamat
see this source code with my comment:
real wts[npts] #array of weights (by default 1 for all value)
double xresid[npts] #x fit residuals
double yresid[npts] #y fit residuals
int npts #number of points
int xfit #label,which show X or Y fit ?
# calculate the rms of the fit
if (xfit == YES) {
GM_XRMS(fit) = 0.0d0 #set zero value
do i = 1, npts # change i from 1 to npts with step 1
GM_XRMS(fit) = GM_XRMS(fit) + wts * xresid ** 2
} else {
GM_YRMS(fit) = 0.0d0
do i = 1, npts
GM_YRMS(fit) = GM_YRMS(fit) + wts * yresid ** 2
}
#print computed value devided to (count-1) in STDOUT
if (verbose && res != STDOUT) {
call printf (" Xin and Yin fit rms: %0.7g %0.7g\n")
call pargd (sqrt (GM_XRMS(fit) / (ngood - 1)))
call pargd (sqrt (GM_YRMS(fit) / (ngood - 1))) </div> --- **Bosco Yung** wrote on May 08, 2007
1)compute sum residual[size=9:3f35e9626a]i[/size:3f35e9626a]*residual[size=9:3f35e9626a]i[/size:3f35e9626a],
where i is from 1 to point counts, residual is (input value - function fitted value)
2) divide this sum to (counts-1)
3) compute sqrt
expression like this:
sqrt [ sum[size=9:3f35e9626a]i=1,ncount[/size:3f35e9626a](residual[size=9:3f35e9626a]i[/size:3f35e9626a]*residual[size=9:3f35e9626a]i[/size:3f35e9626a]) / (count-1) ]
Do I answer to your question?
Azamat
see this source code with my comment:
real wts[npts] #array of weights (by default 1 for all value)
double xresid[npts] #x fit residuals
double yresid[npts] #y fit residuals
int npts #number of points
int xfit #label,which show X or Y fit ?
# calculate the rms of the fit
if (xfit == YES) {
GM_XRMS(fit) = 0.0d0 #set zero value
do i = 1, npts # change i from 1 to npts with step 1
GM_XRMS(fit) = GM_XRMS(fit) + wts * xresid ** 2
} else {
GM_YRMS(fit) = 0.0d0
do i = 1, npts
GM_YRMS(fit) = GM_YRMS(fit) + wts * yresid ** 2
}
#print computed value devided to (count-1) in STDOUT
if (verbose && res != STDOUT) {
call printf (" Xin and Yin fit rms: %0.7g %0.7g\n")
call pargd (sqrt (GM_XRMS(fit) / (ngood - 1)))
call pargd (sqrt (GM_YRMS(fit) / (ngood - 1))) </div> --- **Bosco Yung** wrote on May 08, 2007
Hi Azamat,
Thank you for your help!
Bosco
---
*Last post on May 08, 2007*
Thank you for your help!
Bosco