diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-05-01 16:13:57 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-05-01 16:13:57 +0200 |
commit | 094535c010320967639e8e86f974d878e80baa72 (patch) | |
tree | efc3094b20355dcbeebb2c4ece4fcfc69bffedb5 /profile/printcal.c | |
parent | c07d0c2d2f6f7b0eb6e92cc6204bf05037957e82 (diff) |
Imported Upstream version 1.7.0upstream/1.7.0
Diffstat (limited to 'profile/printcal.c')
-rw-r--r-- | profile/printcal.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/profile/printcal.c b/profile/printcal.c index f9107eb..38ceb9b 100644 --- a/profile/printcal.c +++ b/profile/printcal.c @@ -51,6 +51,7 @@ #include "rspl.h" #include "xicc.h" #include "plot.h" +#include "ui.h" #define RSPLFLAGS (0 /* | RSPL_2PASSSMTH | RSPL_EXTRAFIT2 */) @@ -1366,7 +1367,22 @@ int main(int argc, char *argv[]) { NULL); /* iwidth */ - if (verb > 1) { + /* Compute & show fit quality */ + if (verb > 0) { + double avgde = 0.0, maxde = 0.0; + for (i = 0; i < n_pvals[j]; i++) { + co tp; /* Test point */ + double de; + tp.p[0] = pvals[j][i].dev; + raw[j]->interp(raw[j], &tp); + de = icmLabDE(pvals[j][i].Lab, tp.v); + + avgde += de; + if (de > maxde) + maxde = de; + } + avgde /= (double)n_pvals[j]; + printf("Chan %d raw fit avg DE %f, max %f\n",j,avgde,maxde); } free(dpoints); |