From a0442ed58dee48a521ea053083ea967894507898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 11 Jul 2018 22:19:56 +0200 Subject: New upstream version 2.0.1+repack --- spectro/ccxxmake.c | 16 ++--- spectro/chartread.c | 15 +++-- spectro/colorhug.c | 12 +++- spectro/conv.c | 3 + spectro/dispcal.c | 32 ++++++---- spectro/dispread.c | 10 +-- spectro/dispsup.c | 46 +++++++------- spectro/dispsup.h | 18 +++--- spectro/disptechs.c | 2 +- spectro/dispwin.c | 4 ++ spectro/ex1.c | 2 +- spectro/i1d3.c | 6 +- spectro/i1d3.h | 20 +++--- spectro/i1pro_imp.c | 171 +++++++++++++++++++++++++++++++++++++-------------- spectro/i1pro_imp.h | 37 ++++++++++- spectro/icoms.c | 10 +++ spectro/icoms.h | 3 + spectro/icoms_nt.c | 11 ++++ spectro/illumread.c | 6 +- spectro/inst.c | 59 ++++++++++++------ spectro/inst.h | 6 +- spectro/instappsup.c | 30 ++++++++- spectro/instappsup.h | 5 +- spectro/instlib.ksh | 1 + spectro/kleink10.c | 21 +++++-- spectro/linear.cal | 2 +- spectro/munki_imp.c | 4 +- spectro/sa_conv.h | 4 ++ spectro/spec2cie.c | 129 +++++++++++++++++++++++++------------- spectro/specbos.c | 64 +++++++++++++------ spectro/specbos.h | 4 +- spectro/spotread.c | 100 ++++++++++++++++++++---------- spectro/spyd2.c | 2 +- spectro/ss.c | 5 +- spectro/ss_imp.c | 34 ++++++---- spectro/strange.cal | 2 +- spectro/vtpglut.c | 10 +++ spectro/xrga.c | 15 ++--- 38 files changed, 639 insertions(+), 282 deletions(-) (limited to 'spectro') diff --git a/spectro/ccxxmake.c b/spectro/ccxxmake.c index 4d8c057..a982107 100755 --- a/spectro/ccxxmake.c +++ b/spectro/ccxxmake.c @@ -228,8 +228,8 @@ int main(int argc, char *argv[]) { int comno = COMPORT; /* COM port used */ flow_control fc = fc_nc; /* Default flow control */ int highres = 0; /* High res mode if available */ - int dtype = 0; /* Display kind, 0 = default, 1 = CRT, 2 = LCD, etc */ - int sdtype = -1; /* Spectro display kind, -1 = use dtype */ + int ditype = 0; /* Display kind selector, 0 = default */ + int sditype = -1; /* Spectro display kind, -1 = use ditype */ int refrmode = -1; /* Refresh mode */ double refrate = 0.0; /* 0.0 = default, > 0.0 = override refresh rate */ int cbid = 0; /* Calibration base display mode ID */ @@ -411,7 +411,9 @@ int main(int argc, char *argv[]) { } else if (argv[fa][1] == 'y') { fa = nfa; if (na == NULL) usage(0,"Parameter expected after -y"); - dtype = na[0]; + ditype = na[0]; + if (ditype == '_' && na[1] != '\000') + ditype = ditype << 8 | na[1]; /* For ccss, set a default */ if (na[0] == 'r') { @@ -424,7 +426,7 @@ int main(int argc, char *argv[]) { } else if (argv[fa][1] == 'z') { fa = nfa; if (na == NULL) usage(0,"Parameter expected after -z"); - sdtype = na[0]; + sditype = na[0]; /* Test patch offset and size */ } else if (argv[fa][1] == 'P') { @@ -884,7 +886,7 @@ int main(int argc, char *argv[]) { } /* Create a spectral conversion object */ - if ((sp2cie = new_xsp2cie(icxIT_none, NULL, obType, custObserver, icSigXYZData, icxClamp)) == NULL) + if ((sp2cie = new_xsp2cie(icxIT_none, 0.0, NULL, obType, custObserver, icSigXYZData, icxClamp)) == NULL) error("Creation of spectral conversion object failed"); for (i = 0; i < npat; i++) { @@ -1260,7 +1262,7 @@ int main(int argc, char *argv[]) { /* Should we use current cal rather than native ??? */ if ((dr = new_disprd(&errc, icmps->get_path(icmps, comno), - fc, dtype, sdtype, 1, tele, nadaptive, + fc, ditype, sditype, 1, tele, nadaptive, noinitcal, 0, highres, refrate, 3, NULL, NULL, NULL, 0, disp, 0, fullscreen, override, webdisp, ccid, @@ -1318,7 +1320,7 @@ int main(int argc, char *argv[]) { if (spec) { /* Create a spectral conversion object */ - if ((sp2cie = new_xsp2cie(icxIT_none, NULL, obType, custObserver, icSigXYZData, icxClamp)) == NULL) + if ((sp2cie = new_xsp2cie(icxIT_none, 0.0, NULL, obType, custObserver, icSigXYZData, icxClamp)) == NULL) error("Creation of spectral conversion object failed"); } for (i = 0; i < npat; i++) { /* For all grid points */ diff --git a/spectro/chartread.c b/spectro/chartread.c index 6a9db39..14ee129 100755 --- a/spectro/chartread.c +++ b/spectro/chartread.c @@ -256,7 +256,7 @@ int trans, /* Use transmission mode */ int emis, /* Use emissive mode */ int displ, /* 1 = Use display emissive mode, 2 = display bright rel. */ /* 3 = display white rel. */ -int dtype, /* Display type selection charater */ +int ditype, /* Display type selection charater */ inst_opt_filter fe, /* Optional filter */ xcalstd scalstd, /* X-Rite calibration standard to set */ xcalstd *ucalstd, /* X-Rite calibration standard actually used */ @@ -398,11 +398,11 @@ a1log *log /* verb, debug & error log */ } /* Set display type or calibration mode */ - if (dtype != 0) { + if (ditype != 0) { if (cap2 & inst2_disptype) { int ix; - if ((ix = inst_get_disptype_index(it, dtype, 0)) < 0) { + if ((ix = inst_get_disptype_index(it, ditype, 0)) < 0) { printf("Setting display type ix %d failed\n",ix); it->del(it); return -1; @@ -2188,7 +2188,7 @@ int main(int argc, char *argv[]) { int emis = 0; /* Use emissive mode */ int displ = 0; /* 1 = Use display emissive mode, 2 = display bright rel. */ /* 3 = display white rel. */ - int dtype = 0; /* Display type selection charater */ + int ditype = 0; /* Display type selection charater(s) */ inst_opt_filter fe = inst_opt_filter_unknown; int pbypatch = 0; /* Read patch by patch */ int disbidi = 0; /* Disable bi-directional strip recognition */ @@ -2383,7 +2383,10 @@ int main(int argc, char *argv[]) { } else if (argv[fa][1] == 'y') { fa = nfa; if (na == NULL) usage(); - dtype = na[0]; + ditype = na[0]; + if (ditype == '_' && na[1] != '\000') + ditype = ditype << 8 | na[1]; + /* Request patch by patch measurement */ } else if (argv[fa][1] == 'p') { @@ -2998,7 +3001,7 @@ int main(int argc, char *argv[]) { /* Read all of the strips in */ if (read_strips(itype, scols, &atype, npat, totpa, stipa, pis, paix, saix, ixord, rstart, rand, hex, ipath, fc, plen, glen, tlen, - trans, emis, displ, dtype, fe, scalstd, &ucalstd, nocal, disbidi, highres, + trans, emis, displ, ditype, fe, scalstd, &ucalstd, nocal, disbidi, highres, ccxxname, obType, custObserver, scan_tol, pbypatch, xtern, spectral, uvmode, accurate_expd, emit_warnings, doplot, g_log) == 0) { diff --git a/spectro/colorhug.c b/spectro/colorhug.c index aa8ba21..e09362c 100755 --- a/spectro/colorhug.c +++ b/spectro/colorhug.c @@ -435,6 +435,7 @@ static inst_code colorhug_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { int se; colorhug *p = (colorhug *) pp; + icomuflags usbflags = icomuf_none; a1logd(p->log, 2, "colorhug_init_coms: About to init coms\n"); @@ -444,7 +445,7 @@ colorhug_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { a1logd(p->log, 3, "colorhug_init_coms: About to init HID\n"); /* Set config, interface */ - if ((se = p->icom->set_hid_port(p->icom, icomuf_none, 0, NULL)) != ICOM_OK) { + if ((se = p->icom->set_hid_port(p->icom, usbflags, 0, NULL)) != ICOM_OK) { a1logd(p->log, 1, "colorhug_init_coms: set_hid_port failed ICOM err 0x%x\n",se); return colorhug_interp_code((inst *)p, icoms2colorhug_err(se)); } @@ -453,9 +454,16 @@ colorhug_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { a1logd(p->log, 3, "colorhug_init_coms: About to init USB\n"); +#if defined(UNIX_X11) + usbflags |= icomuf_detach; + /* Some Linux drivers can't open the device a second time, so */ + /* use the reset on close workaround. */ + usbflags |= icomuf_reset_before_close; +#endif + /* Set config, interface, write end point, read end point */ // ~~ does Linux need icomuf_reset_before_close ? Why ? - if ((se = p->icom->set_usb_port(p->icom, 1, 0x00, 0x00, icomuf_detach, 0, NULL)) + if ((se = p->icom->set_usb_port(p->icom, 1, 0x00, 0x00, usbflags, 0, NULL)) != ICOM_OK) { a1logd(p->log, 1, "colorhug_init_coms: set_usb_port failed ICOM err 0x%x\n",se); return colorhug_interp_code((inst *)p, icoms2colorhug_err(se)); diff --git a/spectro/conv.c b/spectro/conv.c index a728566..92556ec 100755 --- a/spectro/conv.c +++ b/spectro/conv.c @@ -697,6 +697,9 @@ static int delayed_beep(void *pp) { # endif #else /* UNIX */ /* Linux is pretty lame in this regard... */ + /* Maybe we could write an 8Khz 8 bit sample to /dev/dsp, or /dev/audio ? */ + /* The ALSA system is the modern way for audio output. */ + /* Also check out what sox does: */ fprintf(stdout, "\a"); fflush(stdout); #endif return 0; diff --git a/spectro/dispcal.c b/spectro/dispcal.c index a4798af..10f333b 100755 --- a/spectro/dispcal.c +++ b/spectro/dispcal.c @@ -1684,7 +1684,7 @@ int main(int argc, char *argv[]) { icompaths *icmps = NULL; icompath *ipath = NULL; flow_control fc = fc_nc; /* Default flow control */ - int dtype = 0; /* Display type selection charater */ + int ditype = 0; /* Display type selection charater(s) */ int tele = 0; /* nz if telephoto mode */ int nocal = 0; /* Disable auto calibration */ int noplace = 0; /* Disable initial user placement check */ @@ -2121,7 +2121,9 @@ int main(int argc, char *argv[]) { } else if (argv[fa][1] == 'y') { fa = nfa; if (na == NULL) usage(0,"Parameter expected after -y"); - dtype = na[0]; + ditype = na[0]; + if (ditype == '_' && na[1] != '\000') + ditype = ditype << 8 | na[1]; /* Daylight color temperature */ } else if (argv[fa][1] == 't' || argv[fa][1] == 'T') { @@ -2342,7 +2344,7 @@ int main(int argc, char *argv[]) { } if (docalib) { - if ((rv = disprd_calibration(ipath, fc, dtype, -1, 0, tele, nadaptive, nocal, disp, + if ((rv = disprd_calibration(ipath, fc, ditype, -1, 0, tele, nadaptive, nocal, disp, webdisp, ccid, #ifdef NT madvrdisp, @@ -2384,7 +2386,7 @@ int main(int argc, char *argv[]) { native = 0; /* But measure current calibrated & CM response for verify or report calibrated */ /* Get ready to do some readings */ - if ((dr = new_disprd(&errc, ipath, fc, dtype, -1, 0, tele, nadaptive, nocal, noplace, + if ((dr = new_disprd(&errc, ipath, fc, ditype, -1, 0, tele, nadaptive, nocal, noplace, highres, refrate, native, &noramdac, &nocm, NULL, 0, disp, out_tvenc, fullscreen, override, webdisp, ccid, #ifdef NT @@ -2677,14 +2679,15 @@ int main(int argc, char *argv[]) { /* Read in the setup, user and model values */ - if (dtype == 0) { /* If the use hasn't set anything */ + if (ditype == 0) { /* If the use hasn't set anything */ if ((fi = icg->find_kword(icg, 0, "DEVICE_TYPE")) >= 0) { if (strcmp(icg->t[0].kdata[fi], "CRT") == 0) - dtype = 'c'; + ditype = 'c'; else if (strcmp(icg->t[0].kdata[fi], "LCD") == 0) - dtype = 'l'; - else - dtype = icg->t[0].kdata[fi][0]; + ditype = 'l'; + else { + ditype = icg->t[0].kdata[fi][0]; // Hmm. not handling '_' ... + } } } //printf("~1 dealt with device type\n"); @@ -3024,8 +3027,8 @@ int main(int argc, char *argv[]) { if (out_tvenc) printf("Using TV encoding range of (16-235)/255\n"); - if (dtype > 0) - printf("Display type is '%c'\n",dtype); + if (ditype > 0) + printf("Display type is '%s'\n",inst_distr(ditype)); if (doupdate) { if (x.nat) @@ -5269,8 +5272,11 @@ int main(int argc, char *argv[]) { ocg->add_kword(ocg, 0, "TV_OUTPUT_ENCODING",out_tvenc ? "YES" : "NO", NULL); /* Put the target parameters in the CGATS file too */ - if (dtype != 0) { - sprintf(buf,"%c",dtype); + if (ditype != 0) { + if ((ditype & ~0xff) != 0) + sprintf(buf,"%c%c",((ditype >> 8) & 0xff), ditype & 0xff); + else + sprintf(buf,"%c",ditype); ocg->add_kword(ocg, 0, "DEVICE_TYPE", buf, NULL); } diff --git a/spectro/dispread.c b/spectro/dispread.c index 5e332cc..baa042e 100755 --- a/spectro/dispread.c +++ b/spectro/dispread.c @@ -242,7 +242,7 @@ int main(int argc, char *argv[]) { int nadaptive = 0; /* Use non-adaptive mode if available */ int bdrift = 0; /* Flag, nz for black drift compensation */ int wdrift = 0; /* Flag, nz for white drift compensation */ - int dtype = 0; /* Display type selection charater */ + int ditype = 0; /* Display type selection charater(s) */ int tele = 0; /* NZ if telephoto mode */ int noautocal = 0; /* Disable auto calibration */ int noplace = 0; /* Disable user instrument placement */ @@ -426,7 +426,9 @@ int main(int argc, char *argv[]) { } else if (argv[fa][1] == 'y') { fa = nfa; if (na == NULL) usage(0,"Parameter expected after -y"); - dtype = na[0]; + ditype = na[0]; + if (ditype == '_' && na[1] != '\000') + ditype = ditype << 8 | na[1]; /* Calibration file */ } else if (argv[fa][1] == 'k' @@ -701,7 +703,7 @@ int main(int argc, char *argv[]) { } if (docalib) { - if ((rv = disprd_calibration(ipath, fc, dtype, -1, 0, tele, nadaptive, noautocal, + if ((rv = disprd_calibration(ipath, fc, ditype, -1, 0, tele, nadaptive, noautocal, disp, webdisp, ccid, #ifdef NT madvrdisp, @@ -919,7 +921,7 @@ int main(int argc, char *argv[]) { cal[0][0] = -1.0; /* Not used */ } - if ((dr = new_disprd(&errc, ipath, fc, dtype, -1, 0, tele, nadaptive, noautocal, noplace, + if ((dr = new_disprd(&errc, ipath, fc, ditype, -1, 0, tele, nadaptive, noautocal, noplace, highres, refrate, native, &noramdac, &nocm, cal, ncal, disp, out_tvenc, fullscreen, override, webdisp, ccid, #ifdef NT diff --git a/spectro/dispsup.c b/spectro/dispsup.c index 21e847f..bbb4151 100755 --- a/spectro/dispsup.c +++ b/spectro/dispsup.c @@ -205,9 +205,9 @@ inst_code setup_display_calibrate( int disprd_calibration( icompath *ipath, /* Instrument path to open, &icomFakeDevice == fake */ flow_control fc, /* Serial flow control */ -int dtype, /* Display type selection character */ -int sdtype, /* Spectro dtype, use dtype if -1 */ -int docbid, /* NZ to only allow cbid dtypes */ +int ditype, /* Display type selection character(s) */ +int sditype, /* Spectro ditype, use ditype if -1 */ +int docbid, /* NZ to only allow cbid ditypes */ int tele, /* NZ for tele mode, falls back to spot mode */ int nadaptive, /* NZ for non-adaptive mode */ int noinitcal, /* NZ to disable initial instrument calibration */ @@ -326,16 +326,17 @@ a1log *log /* Verb, debug & error log */ p->capabilities(p, &cap, &cap2, &cap3); /* If this is a spectral instrument, and a different */ - /* spectral inst. dtype is supplied, then use it */ - if (IMODETST(cap, inst_mode_spectral) && sdtype >= 0) - dtype = sdtype; + /* spectral inst. ditype is supplied, then use it */ + if (IMODETST(cap, inst_mode_spectral) && sditype >= 0) + ditype = sditype; /* Set the display type or calibration mode */ - if (dtype != 0) { /* Given selection character */ + if (ditype != 0) { /* Given selection character */ if (cap2 & inst2_disptype) { int ix; - if ((ix = inst_get_disptype_index(p, dtype, docbid)) < 0) { - a1logd(log,1,"Display type selection '%c' is not valid for instrument\n",dtype); + if ((ix = inst_get_disptype_index(p, ditype, docbid)) < 0) { + a1logd(log,1,"Display type selection '%s' is not valid for instrument\n", + inst_distr(ditype)); p->del(p); return -1; } @@ -2156,7 +2157,7 @@ static int config_inst_displ(disprd *p) { inst2_capability cap2; inst3_capability cap3; inst_mode mode = 0; - int dtype = p->dtype; + int ditype = p->ditype; int rv; p->it->capabilities(p->it, &cap, &cap2, &cap3); @@ -2229,16 +2230,17 @@ static int config_inst_displ(disprd *p) { } /* If this is a spectral instrument, and a different */ - /* spectral inst. dtype is supplied, then use it */ - if (IMODETST(cap, inst_mode_spectral) && p->sdtype >= 0) - dtype = p->sdtype; + /* spectral inst. ditype is supplied, then use it */ + if (IMODETST(cap, inst_mode_spectral) && p->sditype >= 0) + ditype = p->sditype; /* Set the display type or calibration mode */ - if (dtype != 0) { + if (ditype != 0) { if (cap2 & inst2_disptype) { int ix; - if ((ix = inst_get_disptype_index(p->it, dtype, p->docbid)) < 0) { - a1logd(p->log,1,"Display type selection '%c' is not valid for instrument\n",dtype); + if ((ix = inst_get_disptype_index(p->it, ditype, p->docbid)) < 0) { + a1logd(p->log,1,"Display type selection '%s' is not valid for instrument\n", + inst_distr(ditype)); if (p->docbid) return 16; return 15; @@ -2356,9 +2358,9 @@ disprd *new_disprd( int *errc, /* Error code. May be NULL (could use log for this instead?) */ icompath *ipath, /* Instrument path to open, &icomFakeDevice == fake */ flow_control fc, /* Flow control */ -int dtype, /* Display type selection character */ -int sdtype, /* Spectro dtype, use dtype if -1 */ -int docbid, /* NZ to only allow cbid dtypes */ +int ditype, /* Display type selection character(s) */ +int sditype, /* Spectro ditype, use ditype if -1 */ +int docbid, /* NZ to only allow cbid ditypes */ int tele, /* NZ for tele mode. Falls back to display mode */ int nadaptive, /* NZ for non-adaptive mode */ int noinitcal, /* No initial instrument calibration */ @@ -2436,8 +2438,8 @@ a1log *log /* Verb, debug & error log */ p->custObserver = custObserver; p->bdrift = bdrift; p->wdrift = wdrift; - p->dtype = dtype; - p->sdtype = sdtype; + p->ditype = ditype; + p->sditype = sditype; p->docbid = docbid; p->refrmode = -1; /* Unknown */ p->cbid = 0; /* Unknown */ @@ -2568,7 +2570,7 @@ a1log *log /* Verb, debug & error log */ /* Create a spectral conversion object if needed */ if (p->spectral && p->obType != icxOT_none) { - if ((p->sp2cie = new_xsp2cie(icxIT_none, NULL, p->obType, custObserver, icSigXYZData, icxNoClamp)) + if ((p->sp2cie = new_xsp2cie(icxIT_none, 0.0, NULL, p->obType, custObserver, icSigXYZData, icxNoClamp)) == NULL) { a1logd(log,1,"new_disprd failed because creation of spectral conversion object failed\n"); p->del(p); diff --git a/spectro/dispsup.h b/spectro/dispsup.h index 07a66e2..3687979 100755 --- a/spectro/dispsup.h +++ b/spectro/dispsup.h @@ -49,9 +49,9 @@ inst_code setup_display_calibrate( int disprd_calibration( icompath *ipath, /* Instrument path to open, &icomFakeDevice == fake */ flow_control fc, /* Serial flow control */ -int dtype, /* Display type, 0 = unknown, 1 = CRT, 2 = LCD */ -int sdtype, /* Spectro dtype, use dtype if -1 */ -int docbid, /* NZ to only allow cbid dtypes */ +int ditype, /* Display type selection character(s) */ +int sditype, /* Spectro ditype, use ditype if -1 */ +int docbid, /* NZ to only allow cbid ditypes */ int tele, /* NZ for tele mode */ int nadaptive, /* NZ for non-adaptive mode */ int noinitcal, /* NZ to disable initial instrument calibration */ @@ -116,9 +116,9 @@ struct _disprd { baud_rate br; flow_control fc; inst *it; /* Instrument */ - int dtype; /* Display type, 0 = unknown, 1 = CRT, 2 = LCD */ - int sdtype; /* Spectro dtype */ - int docbid; /* NZ to only allow cbid dtypes */ + int ditype; /* Display type selection character(s) */ + int sditype; /* Spectro ditype */ + int docbid; /* NZ to only allow cbid ditypes */ int refrmode; /* Refresh display mode, -1 if unknow, 0 = if no, 1 if yes */ int cbid; /* The current Calibration Base display mode ID, 0 if unknown */ int tele; /* NZ for tele mode */ @@ -229,9 +229,9 @@ disprd *new_disprd( int *errc, /* Error code. May be NULL */ icompath *ipath, /* Instrument path to open, &icomFakeDevice == fake */ flow_control fc, /* Serial flow control */ -int dtype, /* Display type, 0 = unknown, 1 = CRT, 2 = LCD */ -int sdtype, /* Spectro dtype, use dtype if -1 */ -int docbid, /* NZ to only allow cbid dtypes */ +int ditype, /* Display type selection character(s) */ +int sditype, /* Spectro ditype, use ditype if -1 */ +int docbid, /* NZ to only allow cbid ditypes */ int tele, /* NZ for tele mode */ int nadaptive, /* NZ for non-adaptive mode */ int noinitcal, /* No initial instrument calibration */ diff --git a/spectro/disptechs.c b/spectro/disptechs.c index bade777..dc38480 100755 --- a/spectro/disptechs.c +++ b/spectro/disptechs.c @@ -330,7 +330,7 @@ static disptech_info disptech_info_array[] = { }; -static int unknown_ix = -1; +static int unknown_ix = -1; /* Set to actual index by find_unknown() */ static void find_unknown() { int i; diff --git a/spectro/dispwin.c b/spectro/dispwin.c index 7761db1..9261592 100755 --- a/spectro/dispwin.c +++ b/spectro/dispwin.c @@ -1754,6 +1754,8 @@ static char *cur_profile(dispwin *p) { /* Return a CMProfileRef/ColorSyncProfileRef for the */ /* displays profile. Return NULL on error */ +/* Could use CGDisplayCopyColorSpace() instead of */ +/* cur_profile_url/ColorSyncProfileCreateWithURL for 10.5 + ? */ static void *cur_colorsync_ref(dispwin *p) { void *cspr = NULL; @@ -3853,6 +3855,8 @@ static void create_my_win(void *cntx) { #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 /* Get the ColorSync profile for this display */ + /* Could use CGDisplayCopyColorSpace() instead of */ + /* cur_colorsync_ref() code for 10.5 + ? */ if ((cspr = cur_colorsync_ref(p)) == NULL) { debugr2((errout,"cur_colorsync_ref failed\n")); diff --git a/spectro/ex1.c b/spectro/ex1.c index 929af3d..ee417dd 100755 --- a/spectro/ex1.c +++ b/spectro/ex1.c @@ -382,7 +382,7 @@ ex1_init_inst(inst *pp) { } #endif /* NEVER */ - p->conv = new_xsp2cie(icxIT_none, NULL, icxOT_CIE_1931_2, NULL, icSigXYZData, icxNoClamp); + p->conv = new_xsp2cie(icxIT_none, 0.0, NULL, icxOT_CIE_1931_2, NULL, icSigXYZData, icxNoClamp); if (p->conv == NULL) return EX1_INT_CIECONVFAIL; diff --git a/spectro/i1d3.c b/spectro/i1d3.c index 7e5c396..c822324 100755 --- a/spectro/i1d3.c +++ b/spectro/i1d3.c @@ -2205,7 +2205,7 @@ i1d3_comp_calmat( sampRGB = dmatrix(0, nsamp-1, 0, 3-1); /* Compute XYZ of the sample array */ - if ((conv = new_xsp2cie(icxIT_none, NULL, obType, custObserver, icSigXYZData, icxClamp)) == NULL) + if ((conv = new_xsp2cie(icxIT_none, 0.0, NULL, obType, custObserver, icSigXYZData, icxClamp)) == NULL) return i1d3_interp_code((inst *)p, I1D3_INT_CIECONVFAIL); for (i = 0; i < nsamp; i++) { conv->convert(conv, sampXYZ[i], &samples[i]); @@ -2213,7 +2213,7 @@ i1d3_comp_calmat( conv->del(conv); /* Compute sensor RGB of the sample array */ - if ((conv = new_xsp2cie(icxIT_none, NULL, icxOT_custom, RGBcmfs, icSigXYZData, icxClamp)) == NULL) { + if ((conv = new_xsp2cie(icxIT_none, 0.0, NULL, icxOT_custom, RGBcmfs, icSigXYZData, icxClamp)) == NULL) { free_dmatrix(sampXYZ, 0, nsamp-1, 0, 3-1); free_dmatrix(sampRGB, 0, nsamp-1, 0, 3-1); return i1d3_interp_code((inst *)p, I1D3_INT_CIECONVFAIL); @@ -2880,7 +2880,7 @@ double mtx[3][3] i1d3 *p = (i1d3 *)pp; inst_code ev = inst_ok; - a1logd(p->log, 4, "i1d3_col_cor_mat%s\n",mtx == NULL ? " (noop)": ""); + a1logd(p->log, 4, "i1d3_col_cor_mat%s dtech %d cbid %d\n",mtx == NULL ? " (noop)": "",dtech,cbid); if (!p->gotcoms) return inst_no_coms; diff --git a/spectro/i1d3.h b/spectro/i1d3.h index 6152a00..c8f72df 100755 --- a/spectro/i1d3.h +++ b/spectro/i1d3.h @@ -81,16 +81,20 @@ /* Sub-type of instrument */ typedef enum { - i1d3_disppro = 0, /* i1 DisplayPro */ - i1d3_munkdisp = 1, /* ColorMunki Display */ - i1d3_oem = 2, /* Generic OEM */ - i1d3_nec_ssp = 3, /* NEC SpectraSensor Pro */ - i1d3_quato_sh3 = 4, /* Quato Silver Haze 3 */ - i1d3_hp_dreamc = 5, /* HP DreameColor */ - i1d3_sc_c6 = 6, /* SpectraCal C6 */ - i1d3_wacom_dc = 7 /* Wacom DC */ + i1d3_disppro = 0, /* i1 DisplayPro */ + i1d3_munkdisp = 1, /* ColorMunki Display */ + i1d3_oem = 2, /* Generic OEM */ + i1d3_nec_ssp = 3, /* NEC SpectraSensor Pro */ + i1d3_quato_sh3 = 4, /* Quato Silver Haze 3 */ + i1d3_hp_dreamc = 5, /* HP DreameColor */ + i1d3_sc_c6 = 6, /* SpectraCal C6 */ + i1d3_wacom_dc = 7, /* Wacom DC */ } i1d3_dtype; +/* Generic OEM aliases: + i1d3_viewsonic_xri1 +*/ + /* Measurement mode */ typedef enum { i1d3_adaptive = 0, /* Frequency over fixed period then adaptive period measurement (def) */ diff --git a/spectro/i1pro_imp.c b/spectro/i1pro_imp.c index 03f0a0d..cd870fa 100755 --- a/spectro/i1pro_imp.c +++ b/spectro/i1pro_imp.c @@ -582,25 +582,33 @@ i1pro_code i1pro_imp_init(i1pro *p) { /* Information about the instrument */ - if ((ip = m->data->get_ints(m->data, &count, key_serno)) == NULL || count < 1) + if ((ip = m->data->get_ints(m->data, &count, key_serno)) == NULL || count < 1) { + a1logd(p->log,7,"Missing key_serno\n"); return I1PRO_HW_CALIBINFO; + } m->serno = ip[0]; a1logd(p->log,2,"Serial number = %d\n",m->serno); sprintf(m->sserno,"%ud",m->serno); - if ((ip = m->data->get_ints(m->data, &count, key_dom)) == NULL || count < 1) + if ((ip = m->data->get_ints(m->data, &count, key_dom)) == NULL || count < 1) { + a1logd(p->log,7,"Missing key_dom\n"); return I1PRO_HW_CALIBINFO; + } m->dom = ip[0]; a1logd(p->log,2, "Date of manufactur = %d-%d-%d\n", m->dom/1000000, (m->dom/10000) % 100, m->dom % 10000); - if ((ip = m->data->get_ints(m->data, &count, key_cpldrev)) == NULL || count < 1) + if ((ip = m->data->get_ints(m->data, &count, key_cpldrev)) == NULL || count < 1) { + a1logd(p->log,7,"Missing key_cpldrev\n"); return I1PRO_HW_CALIBINFO; + } m->cpldrev = ip[0]; a1logd(p->log,2,"CPLD rev = %d\n",m->cpldrev); - if ((ip = m->data->get_ints(m->data, &count, key_capabilities)) == NULL || count < 1) + if ((ip = m->data->get_ints(m->data, &count, key_capabilities)) == NULL || count < 1) { + a1logd(p->log,7,"Missing key_capabilities\n"); return I1PRO_HW_CALIBINFO; + } m->capabilities = ip[0]; if (m->capabilities & 0x6000) /* Has ambient */ m->capabilities2 |= I1PRO_CAP2_AMBIENT; /* Mimic in capabilities2 */ @@ -608,8 +616,10 @@ i1pro_code i1pro_imp_init(i1pro *p) { if (m->capabilities & 0x6000) a1logd(p->log,2," Can read ambient\n"); - if ((ip = m->data->get_ints(m->data, &count, key_physfilt)) == NULL || count < 1) + if ((ip = m->data->get_ints(m->data, &count, key_physfilt)) == NULL || count < 1) { + a1logd(p->log,7,"Missing key_physfilt\n"); return I1PRO_HW_CALIBINFO; + } m->physfilt = ip[0]; if (m->physfilt == 0x82) m->capabilities2 |= I1PRO_CAP2_UV_FILT; /* Mimic in cap 2 */ @@ -639,10 +649,14 @@ i1pro_code i1pro_imp_init(i1pro *p) { if (m->nsen > NSEN_MAX) /* Static allocation assumed */ return I1PRO_HW_UNEX_SPECPARMS; } - if (m->data->get_ints(m->data, &m->nwav[0], key_mtx_index) == 0) + if (m->data->get_ints(m->data, &m->nwav[0], key_mtx_index) == 0) { + a1logd(p->log,7,"Missing key_mtx_index\n"); return I1PRO_HW_CALIBINFO; - if (m->nwav[0] != 36) + } + if (m->nwav[0] != 36) { + a1logd(p->log,7,"key_mtx_index != 36 elements\n"); return I1PRO_HW_CALIBINFO; + } m->wl_short[0] = 380.0; /* Normal res. range */ m->wl_long[0] = 730.0; @@ -651,18 +665,24 @@ i1pro_code i1pro_imp_init(i1pro *p) { m->wl_long[1] = HIGHRES_LONG; m->nwav[1] = (int)((m->wl_long[1]-m->wl_short[1])/HIGHRES_WIDTH + 0.5) + 1; - if ((dp = m->data->get_doubles(m->data, &count, key_hg_factor)) == NULL || count < 1) + if ((dp = m->data->get_doubles(m->data, &count, key_hg_factor)) == NULL || count < 1) { + a1logd(p->log,7,"Missing key_hg_factor\n"); return I1PRO_HW_CALIBINFO; + } m->highgain = dp[0]; a1logd(p->log,2,"High gain = %.10f\n",m->highgain); if ((m->lin0 = m->data->get_doubles(m->data, &m->nlin0, key_ng_lin)) == NULL - || m->nlin0 < 1) + || m->nlin0 < 1) { + a1logd(p->log,7,"Missing key_ng_lin\n"); return I1PRO_HW_CALIBINFO; + } if ((m->lin1 = m->data->get_doubles(m->data, &m->nlin1, key_hg_lin)) == NULL - || m->nlin1 < 1) + || m->nlin1 < 1) { + a1logd(p->log,7,"Missing key_hg_lin\n"); return I1PRO_HW_CALIBINFO; + } if (p->log->debug >= 2) { char oline[200] = { '\000' }, *bp = oline; @@ -681,8 +701,10 @@ i1pro_code i1pro_imp_init(i1pro *p) { a1logd(p->log,2,oline); } - if ((dp = m->data->get_doubles(m->data, &count, key_min_int_time)) == NULL || count < 1) + if ((dp = m->data->get_doubles(m->data, &count, key_min_int_time)) == NULL || count < 1) { + a1logd(p->log,7,"Missing key_min_int_time\n"); return I1PRO_HW_CALIBINFO; + } m->min_int_time = dp[0]; /* And then override it */ @@ -695,62 +717,84 @@ i1pro_code i1pro_imp_init(i1pro *p) { m->min_int_time = 0.00884; /* == 1 sub clock */ } - if ((dp = m->data->get_doubles(m->data, &count, key_max_int_time)) == NULL || count < 1) + if ((dp = m->data->get_doubles(m->data, &count, key_max_int_time)) == NULL || count < 1) { + a1logd(p->log,7,"Missing key_max_int_time\n"); return I1PRO_HW_CALIBINFO; + } m->max_int_time = dp[0]; if ((m->mtx_o.index = m->data->get_ints(m->data, &count, key_mtx_index)) == NULL - || count != m->nwav[0]) + || count != m->nwav[0]) { + a1logd(p->log,7,"Missing key_mtx_index\n"); return I1PRO_HW_CALIBINFO; + } if ((m->mtx_o.nocoef = m->data->get_ints(m->data, &count, key_mtx_nocoef)) == NULL - || count != m->nwav[0]) + || count != m->nwav[0]) { + a1logd(p->log,7,"Missing key_mtx_nocoef\n"); return I1PRO_HW_CALIBINFO; + } for (xcount = i = 0; i < m->nwav[0]; i++) /* Count number expected in matrix coeffs */ xcount += m->mtx_o.nocoef[i]; if ((m->mtx_o.coef = m->data->get_doubles(m->data, &count, key_mtx_coef)) == NULL - || count != xcount) + || count != xcount) { + a1logd(p->log,7,"Missing key_mtx_coef\n"); return I1PRO_HW_CALIBINFO; + } if ((m->white_ref[0] = m->data->get_doubles(m->data, &count, key_white_ref)) == NULL - || count != m->nwav[0]) { - if (p->dtype != instI1Monitor) + || count != m->nwav[0]) { + if (p->dtype != instI1Monitor) { + a1logd(p->log,7,"Missing key_white_ref\n"); return I1PRO_HW_CALIBINFO; + } m->white_ref[0] = NULL; } if ((m->emis_coef[0] = m->data->get_doubles(m->data, &count, key_emis_coef)) == NULL - || count != m->nwav[0]) + || count != m->nwav[0]) { + a1logd(p->log,7,"Missing key_emis_coef\n"); return I1PRO_HW_CALIBINFO; + } if ((m->amb_coef[0] = m->data->get_doubles(m->data, &count, key_amb_coef)) == NULL - || count != m->nwav[0]) { + || count != m->nwav[0]) { if (p->dtype != instI1Monitor - && m->capabilities & 0x6000) /* Expect ambient calibration */ + && m->capabilities & 0x6000) { /* Expect ambient calibration */ + a1logd(p->log,7,"Missing key_amb_coef\n"); return I1PRO_HW_CALIBINFO; + } m->amb_coef[0] = NULL; } /* Default to original EEProm raw to wav filters values*/ m->mtx[0][0] = m->mtx_o; /* Std res reflective */ m->mtx[0][1] = m->mtx_o; /* Std res emissive */ - if ((ip = m->data->get_ints(m->data, &count, key_sens_target)) == NULL || count < 1) + if ((ip = m->data->get_ints(m->data, &count, key_sens_target)) == NULL || count < 1) { + a1logd(p->log,7,"Missing key_sens_target\n"); return I1PRO_HW_CALIBINFO; + } m->sens_target = ip[0]; - if ((ip = m->data->get_ints(m->data, &count, key_sens_dark)) == NULL || count < 1) + if ((ip = m->data->get_ints(m->data, &count, key_sens_dark)) == NULL || count < 1) { + a1logd(p->log,7,"Missing key_sens_dark\n"); return I1PRO_HW_CALIBINFO; + } m->sens_dark = ip[0]; - if ((ip = m->data->get_ints(m->data, &count, key_ng_sens_sat)) == NULL || count < 1) + if ((ip = m->data->get_ints(m->data, &count, key_ng_sens_sat)) == NULL || count < 1) { + a1logd(p->log,7,"Missing key_ng_sens_sat\n"); return I1PRO_HW_CALIBINFO; + } m->sens_sat0 = ip[0]; - if ((ip = m->data->get_ints(m->data, &count, key_hg_sens_sat)) == NULL || count < 1) + if ((ip = m->data->get_ints(m->data, &count, key_hg_sens_sat)) == NULL || count < 1) { + a1logd(p->log,7,"Missing key_hg_sens_sat\n"); return I1PRO_HW_CALIBINFO; + } m->sens_sat1 = ip[0]; a1logd(p->log,2,"sens_target %d, sens_dark %d, sens_sat0 %d, sens_sat1 %d\n", @@ -809,8 +853,10 @@ i1pro_code i1pro_imp_init(i1pro *p) { /* Capability bits */ if ((ip = m->data->get_ints(m->data, &count, key2_capabilities)) == NULL - || count != 1) + || count != 1) { + a1logd(p->log,7,"Missing key2_capabilities\n"); return I1PRO_HW_CALIBINFO; + } m->capabilities2 = *ip; if (p->log->debug >= 2) { a1logd(p->log,2,"Capabilities2 flag = 0x%x\n",m->capabilities2); @@ -831,64 +877,94 @@ i1pro_code i1pro_imp_init(i1pro *p) { if (m->capabilities2 & I1PRO_CAP2_WL_LED) { /* wavelength LED calibration integration time (0.56660) */ if ((dp = m->data->get_doubles(m->data, &count, key2_wlcal_intt)) == NULL - || count != 1) + || count != 1) { + a1logd(p->log,7,"Missing key2_wlcal_intt\n"); return I1PRO_HW_CALIBINFO; + } m->wl_cal_inttime = *dp; /* Wavelength calibration minimum level */ if ((ip = m->data->get_ints(m->data, &count, key2_wlcal_minlev)) == NULL - || count != 1) + || count != 1) { + a1logd(p->log,7,"Missing key2_wlcal_minlev\n"); return I1PRO_HW_CALIBINFO; + } /* Normalize it to 1.0 seconds (ie. 500/0.56660) */ m->wl_cal_min_level = (double)(*ip) / m->wl_cal_inttime; /* wavelength LED measurement expected FWHM in nm */ if ((dp = m->data->get_doubles(m->data, &count, key2_wlcal_fwhm)) == NULL - || count != 1) + || count != 1) { + a1logd(p->log,7,"Missing key2_wlcal_fwhm\n"); return I1PRO_HW_CALIBINFO; + } m->wl_cal_fwhm = *dp; /* wavelength LED measurement FWHM tollerance in nm */ if ((dp = m->data->get_doubles(m->data, &count, key2_wlcal_fwhm_tol)) == NULL - || count != 1) + || count != 1) { + a1logd(p->log,7,"Missing key2_wlcal_fwhm_tol\n"); return I1PRO_HW_CALIBINFO; + } m->wl_cal_fwhm_tol = *dp; /* wavelength LED reference spectrum */ - if ((m->wl_led_spec = m->data->get_doubles(m->data, &m->wl_led_count, key2_wlcal_spec)) == NULL) + if ((m->wl_led_spec = m->data->get_doubles(m->data, &m->wl_led_count, + key2_wlcal_spec)) == NULL) { + a1logd(p->log,7,"Missing key2_wlcal_spec\n"); return I1PRO_HW_CALIBINFO; + } /* wavelength LED spectraum reference offset */ if ((ip = m->data->get_ints(m->data, &count, key2_wlcal_ooff)) == NULL - || count != 1) + || count != 1) { + a1logd(p->log,7,"Missing key2_wlcal_ooff\n"); return I1PRO_HW_CALIBINFO; + } m->wl_led_ref_off = *ip; /* Hmm. this is odd, but it doesn't work correctly otherwise... */ m->wl_led_ref_off--; /* wavelength calibration maximum error */ if ((dp = m->data->get_doubles(m->data, &count, key2_wlcal_max)) == NULL - || count != 1) + || count != 1) { + a1logd(p->log,7,"Missing key2_wlcal_max\n"); return I1PRO_HW_CALIBINFO; + } m->wl_err_max = *dp; } - /* CCD bin to wavelength polinomial */ - if ((m->wlpoly1 = m->data->get_doubles(m->data, &count, key2_wlpoly_1)) == NULL || count != 4) + /* CCD bin to wavelength polinomial (Emission) */ + if ((m->wlpoly2 = m->data->get_doubles(m->data, &count, key2_wlpoly_2)) == NULL + || count != 4) { + a1logd(p->log,7,"Missing key2_wlpoly_2\n"); return I1PRO_HW_CALIBINFO; + } - if ((m->wlpoly2 = m->data->get_doubles(m->data, &count, key2_wlpoly_2)) == NULL || count != 4) - return I1PRO_HW_CALIBINFO; + /* CCD bin to wavelength polinomial (Reflection) */ + if ((m->wlpoly1 = m->data->get_doubles(m->data, &count, key2_wlpoly_1)) == NULL || count != 4) { + /* Hmm. no key2_wlpoly_1. This seems to be the case for */ + /* some stripped down OEM instruments. Use key2_wlpoly_2 instead */ + if ((m->wlpoly2 = m->data->get_doubles(m->data, &count, key2_wlpoly_2)) == NULL + || count != 4) { + a1logd(p->log,7,"Missing key2_wlpoly_1 and key2_wlpoly_2\n"); + return I1PRO_HW_CALIBINFO; + } + } /* Stray light compensation. Note that 16 bit numbers are signed. */ if ((sip = m->data->get_shorts(m->data, &count, key2_straylight)) == NULL - || count != (36 * 36)) + || count != (36 * 36)) { + a1logd(p->log,7,"Missing key2_straylight\n"); return I1PRO_HW_CALIBINFO; + } /* stray light scale factor */ if ((dp = m->data->get_doubles(m->data, &count, key2_straylight_scale)) == NULL - || count != 1) + || count != 1) { + a1logd(p->log,7,"Missing key2_straylight_scale\n"); return I1PRO_HW_CALIBINFO; + } /* Convert from ints to floats */ m->straylight[0] = dmatrixz(0, 35, 0, 35); @@ -1060,6 +1136,7 @@ i1pro_code i1pro_imp_init(i1pro *p) { s->scan = 1; s->adaptive = 1; s->inttime = m->min_int_time; /* Maximize scan rate */ + /* (see i1pro_imp_calibrate() too) */ s->dark_int_time = s->inttime; if (m->fwrev >= 301) /* (We're not using scan targoscale though) */ s->targoscale = 0.25; @@ -1127,6 +1204,7 @@ i1pro_code i1pro_imp_init(i1pro *p) { s->scan = 1; s->adaptive = 1; /* ???? */ s->inttime = m->min_int_time; /* Maximize scan rate */ + /* (see i1pro_imp_calibrate() too) */ s->lamptime = 0.0; s->dark_int_time = s->inttime; if (m->fwrev >= 301) @@ -1223,6 +1301,7 @@ i1pro_code i1pro_imp_init(i1pro *p) { s->scan = 1; s->adaptive = 0; s->inttime = m->min_int_time; /* Maximize scan rate */ + /* (see i1pro_imp_calibrate() too) */ s->dark_int_time = s->inttime; if (m->fwrev >= 301) /* (We're not using scan targoscale though) */ s->targoscale = 0.25; @@ -10175,9 +10254,9 @@ i1pro_code i1pro_conv2XYZ( double sms; /* Weighting */ if (s->emiss) - conv = new_xsp2cie(icxIT_none, NULL, icxOT_CIE_1931_2, NULL, icSigXYZData, (icxClamping)clamp); + conv = new_xsp2cie(icxIT_none, 0.0, NULL, icxOT_CIE_1931_2, NULL, icSigXYZData, (icxClamping)clamp); else - conv = new_xsp2cie(icxIT_D50, NULL, icxOT_CIE_1931_2, NULL, icSigXYZData, (icxClamping)clamp); + conv = new_xsp2cie(icxIT_D50, 0.0, NULL, icxOT_CIE_1931_2, NULL, icSigXYZData, (icxClamping)clamp); if (conv == NULL) return I1PRO_INT_CIECONVFAIL; @@ -10325,16 +10404,16 @@ i1pro_code i1pro_check_white_reference1( /* And check them against tolerance for the illuminant. */ if (m->physfilt == 0x82) { /* UV filter */ - a1logd(p->log,2,"Checking white reference (UV): 0.0 < avg01 %f < 0.05, 1.2 < avg2227 %f < 1.76\n",avg01,avg2227); - if (0.0 < avg01 && avg01 < 0.05 - && 1.2 < avg2227 && avg2227 < 1.76) { + a1logd(p->log,2,"Checking white reference (UV): 0.0 <= avg01 %f <= 0.05, 1.2 <= avg2227 %f <= 1.76\n",avg01,avg2227); + if (0.0 <= avg01 && avg01 <= 0.05 + && 1.2 <= avg2227 && avg2227 <= 1.76) { return I1PRO_OK; } } else { /* No filter */ - a1logd(p->log,2,"Checking white reference: 0.11 < avg01 %f < 0.22, 1.35 < avg2227 %f < 1.6\n",avg01,avg2227); - if (0.11 < avg01 && avg01 < 0.22 - && 1.35 < avg2227 && avg2227 < 1.6) { + a1logd(p->log,2,"Checking white reference: 0.11 <= avg01 %f <= 0.22, 1.35 <= avg2227 %f <= 1.6\n",avg01,avg2227); + if (0.11 <= avg01 && avg01 <= 0.22 + && 1.35 <= avg2227 && avg2227 <= 1.6) { return I1PRO_OK; } } diff --git a/spectro/i1pro_imp.h b/spectro/i1pro_imp.h index 582cc98..00cf52d 100755 --- a/spectro/i1pro_imp.h +++ b/spectro/i1pro_imp.h @@ -248,7 +248,7 @@ struct _i1proimp { /* 0x81 == emission only ?? */ /* 0x82 == UV filter */ int capabilities2; /* Rev E capabilities - set #defines above */ - /* Also set for RevA-D */ + /* Also set for RevA-D to simplify capability testing */ /* Underlying calibration information */ int nsen; /* Raw + extra sample bands read = 128 for i1pro, 136 for Rev E */ @@ -1290,14 +1290,45 @@ typedef enum { key2_wlcal_max = 0x2f46, /* double, wavelength calibration error limit, ie. 5.0 */ - key2_wlpoly_1 = 0x2f62, /* double[4], CCD bin to wavelength polinomial #1 (normal) */ - key2_wlpoly_2 = 0x2f63, /* double[4], CCD bin to wavelength polinomial #2 ??? */ + key2_wlpoly_1 = 0x2f62, /* double[4], CCD bin to wavelength polinomial #1 (reflective ?) */ + key2_wlpoly_2 = 0x2f63, /* double[4], CCD bin to wavelength polinomial #2 (emissive ?) */ key2_straylight = 0x2f58, /* int16[36][6] signed stray light values */ key2_straylight_scale = 0x2f59 /* double stray light scale factor */ } i1key; +/* + +Missing keys for Stripped down OEM i1pro2 (Capabilities2 flag = 0x30) +i.e. missing Ambient, WL Led, UV Led, Zebra ruller, + has indicator Leds, UV filter. + +Table entry 34 is Key 0x0bba, type 3 addr 0x1c4c, size 4 Unkn + +Table entry 5 is Key 0x2eea, type 3 addr 0x2218, size 4 Unkn +Table entry 6 is Key 0x2eeb, type 3 addr 0x221c, size 4 key2_sens_target +Table entry 9 is Key 0x2ef5, type 4 addr 0x2228, size 4 Unkn +Table entry 10 is Key 0x2ef6, type 4 addr 0x222c, size 4 Unkn +Table entry 11 is Key 0x2ef9, type 4 addr 0x2230, size 4 key2_uvcal_intt +Table entry 12 is Key 0x2efa, type 4 addr 0x2234, size 4 key2_wlcal_intt +Table entry 13 is Key 0x2efe, type 3 addr 0x2238, size 4 key2_wlcal_minlev +Table entry 14 is Key 0x2eff, type 3 addr 0x223c, size 4 Unkn +Table entry 21 is Key 0x2f44, type 4 addr 0x2258, size 200 key2_wlcal_spec +Table entry 22 is Key 0x2f45, type 3 addr 0x2320, size 4 key2_wlcal_ooff +Table entry 23 is Key 0x2f46, type 4 addr 0x2324, size 4 key2_wlcal_max +Table entry 24 is Key 0x2f4e, type 4 addr 0x2328, size 4 key2_wlcal_fwhm +Table entry 25 is Key 0x2f4f, type 4 addr 0x232c, size 4 key2_wlcal_fwhm_tol +Table entry 26 is Key 0x2f50, type 4 addr 0x2330, size 4 Unkn +Table entry 29 is Key 0x2f62, type 4 addr 0x2d58, size 16 key2_wlpoly_1 +Table entry 31 is Key 0x2f6c, type 4 addr 0x2d78, size 8 Unkn +Table entry 32 is Key 0x2f6d, type 4 addr 0x2d80, size 4 Unkn +Table entry 33 is Key 0x2f6e, type 4 addr 0x2d84, size 4 Unkn +Table entry 34 is Key 0x2f76, type 4 addr 0x2d88, size 72 Unkn +Table entry 35 is Key 0x2f77, type 4 addr 0x2dd0, size 72 Unkn + +*/ + /* Data type */ typedef enum { diff --git a/spectro/icoms.c b/spectro/icoms.c index 875f3b6..08ddd92 100755 --- a/spectro/icoms.c +++ b/spectro/icoms.c @@ -760,8 +760,12 @@ int frbw /* nz to Flush Read Before Write */ int debug = p->log->debug; int bread; + p->ser_clearerr(p); + if (debug < 8) p->log->debug = 0; + /* (Could use tcflush() or ioctl(TCFLSH) on *nix, */ + /* except these don't work on USB serial ports!) */ for (;;) { bread = 0; p->read(p, tbuf, 500, &bread, NULL, 500, 0.02); @@ -813,6 +817,11 @@ double tout /* Timeout for write and then read (i.e. max = 2 x tout) */ return icoms_write_read_ex(p, wbuf, nwch, rbuf, bsize, bread, tc, ntc, tout, 0); } +/* Default NOP implementation - Serial open or set_methods may override */ +static void icoms_ser_clearerr(icoms *p) { + return; +} + /* Optional callback to client from device */ /* Default implementation is a NOOP */ static int icoms_interrupt(icoms *p, @@ -907,6 +916,7 @@ icoms *new_icoms( p->read = NULL; p->write_read = icoms_write_read; p->write_read_ex = icoms_write_read_ex; + p->ser_clearerr = icoms_ser_clearerr; /* Default NOP implementation */ p->interrupt = icoms_interrupt; p->del = icoms_del; diff --git a/spectro/icoms.h b/spectro/icoms.h index 4e18b62..74af2ee 100755 --- a/spectro/icoms.h +++ b/spectro/icoms.h @@ -515,6 +515,9 @@ struct _icoms { double tout, /* Timeout in seconds */ int frbw); /* nz to Flush Read Before Write */ + /* For serial device, clear any errors */ + void (*ser_clearerr)(struct _icoms *p); + /* For a USB device, do a control message */ /* return icom error */ int (*usb_control)(struct _icoms *p, diff --git a/spectro/icoms_nt.c b/spectro/icoms_nt.c index 39ff6f0..7ac074b 100755 --- a/spectro/icoms_nt.c +++ b/spectro/icoms_nt.c @@ -163,6 +163,16 @@ void serial_close_port(icoms *p) { } } +/* Clear any serial errors */ +static void nt_ser_clearerr(icoms *p) { + DWORD errs; + + if (!ClearCommError(p->phandle, &errs,NULL)) + error("nt_ser_clearerr: failed, and Clear error failed"); + + return; +} + /* -------------------------------------------------------------------- */ #ifndef CBR_230400 @@ -428,6 +438,7 @@ int delayms) { /* Delay after open in msec */ p->write = icoms_ser_write; p->read = icoms_ser_read; + p->ser_clearerr = nt_ser_clearerr; } a1logd(p->log, 8, "icoms_set_ser_port: port characteristics set ok\n"); diff --git a/spectro/illumread.c b/spectro/illumread.c index 28ecbca..aee546c 100755 --- a/spectro/illumread.c +++ b/spectro/illumread.c @@ -1063,14 +1063,14 @@ int main(int argc, char *argv[]) bf.r_sp = &r_sp; bf.p_sp = &p_sp; - if ((bf.pap = new_xsp2cie(icxIT_custom, &i_sp, icxOT_CIE_1931_2, NULL, icSigLabData, icxClamp)) == NULL) + if ((bf.pap = new_xsp2cie(icxIT_custom, 0.0, &i_sp, icxOT_CIE_1931_2, NULL, icSigLabData, icxClamp)) == NULL) error("new_xsp2cie pap failed"); if (bf.pap->set_fwa(bf.pap, &insp, NULL, &p_sp) != 0) error ("Setting FWA compensation failed"); /* Setup the equal energy to Lab conversion */ - if ((bf.ref = new_xsp2cie(icxIT_E, NULL, icxOT_CIE_1931_2, NULL, icSigLabData, icxClamp)) == NULL) + if ((bf.ref = new_xsp2cie(icxIT_E, 0.0, NULL, icxOT_CIE_1931_2, NULL, icSigLabData, icxClamp)) == NULL) error("new_xsp2cie ref failed"); /* Estimate an initial gain match */ @@ -1154,7 +1154,7 @@ int main(int argc, char *argv[]) xspect cpdsp; /* FWA corrected calculated daylight paper reflectance */ /* Setup the referencec comversion */ - if ((cf.ref = new_xsp2cie(icxIT_E, NULL, icxOT_CIE_1931_2, NULL, icSigLabData, icxClamp)) == NULL) + if ((cf.ref = new_xsp2cie(icxIT_E, 0.0, NULL, icxOT_CIE_1931_2, NULL, icSigLabData, icxClamp)) == NULL) error("new_xsp2cie ref failed"); cf.ill = bf.ill; diff --git a/spectro/inst.c b/spectro/inst.c index 07ace6e..7f1368a 100755 --- a/spectro/inst.c +++ b/spectro/inst.c @@ -41,11 +41,11 @@ #ifndef SALONEINSTLIB #include "copyright.h" #include "aconfig.h" +#include "rand.h" #else #include "sa_config.h" #endif /* !SALONEINSTLIB */ #include "numsup.h" -#include "rand.h" #include "cgats.h" #include "xspect.h" #include "conv.h" @@ -881,6 +881,12 @@ static inst_disptypesel *expand_dlist(inst_disptypesel *list, int nlist, int *na than any aliases that come after it, and the aliases as more important than the fallback list, so we need to do three passes through all the selections. + + If we run out of single letter selectors (i.e. K10), + then we switch to the two letter prefixed selector "_X". + + NOTE that we assume that we cannot exaust the single letter + selectors via hard coded, ccmx or ccss calibrations. */ /* Create the display type list */ @@ -892,8 +898,8 @@ int doccss, /* Add installed ccss files */ int doccmx /* Add matching installed ccmx files */ ) { inst_disptypesel *list = NULL; - int i, j, k, nlist = 0, nalist = 0; - char usels[256]; /* Used selectors */ + int i, j, k, k2, nlist = 0, nalist = 0; + char usels[256]; /* Used selectors 1 */ static char *asels = "123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; int fail = 0; @@ -902,8 +908,9 @@ int doccmx /* Add matching installed ccmx files */ *pdtlist = NULL; *pndtlist = 0; - for (i = 0; i < 256; i++) - usels[i] = ((char)-1); + for (j = 0; j < 256; j++) + usels[j] = ((char)-1); + k2 = 0; /* Single letter selector */ k = 0; /* Next selector index */ /* First create a list of calibrations and their desired selectors: */ @@ -1031,26 +1038,42 @@ int doccmx /* Add matching installed ccmx files */ /* Set remaining from fallback */ for (i = 0; i < nlist; i++) { - disptechs_set_sel(2, i, list[i].sel, list[i].isel, usels, &k, asels); - if (list[i].sel[0] == '\000') - fail = 1; + if (k2 == 0) { /* Single letter selector */ + disptechs_set_sel(2, i, list[i].sel, list[i].isel, usels, &k, asels); + if (list[i].sel[0] == '\000') { /* Switch to two letter */ + for (j = 0; j < 256; j++) + usels[j] = ((char)-1); + k2 = 1; /* Two letter selector */ + k = 0; /* Next selector index */ + } + } + if (k2 == 1) { /* Two letter selector */ + list[i].sel[0] = '_'; + disptechs_set_sel(2, i, &list[i].sel[1], list[i].isel, usels, &k, asels); + if (list[i].sel[0] == '\000') { /* Ran out of two letter selectors! */ + fail = 1; + break; + } + } } /* Any calibrations that failed to find a character will be left as a nul string */ /* Add alternate selectors if they are free. */ - for (;;) { - int more = 0; - for (i = 0; i < nlist; i++) { - /* Add unused secondaries */ - disptechs_set_sel(3, i, list[i].sel, list[i].isel, usels, &k, asels); - - if (list[i].isel[0] != '\000') { /* Still more secondaries available */ - more = 1; + if (k2 == 0) { /* If not run out of 1 letter selectors */ + for (;;) { + int more = 0; + for (i = 0; i < nlist; i++) { + /* Add unused secondaries */ + disptechs_set_sel(3, i, list[i].sel, list[i].isel, usels, &k, asels); + + if (list[i].isel[0] != '\000') { /* Still more secondaries available */ + more = 1; + } } + if (!more) + break; } - if (!more) - break; } if (pndtlist != NULL) diff --git a/spectro/inst.h b/spectro/inst.h index 04e02d6..601f7b3 100755 --- a/spectro/inst.h +++ b/spectro/inst.h @@ -43,8 +43,8 @@ and agreed to support. */ -#include "dev.h" /* Base device class */ #include "insttypes.h" /* libinst Includes this functionality */ +#include "dev.h" /* Base device class */ #include "disptechs.h" /* libinst Includes this functionality */ #include "icoms.h" /* libinst Includes this functionality */ #include "conv.h" @@ -69,6 +69,10 @@ #ifdef NEVER /* Declared in xicc/xspect.h */ +// ~~~ should add absorbance mode - +// i.e. modified transmissive mode where units are +// log10(incident/transmitted) = Beer-Lambert Law + /* Type of measurement result */ typedef enum { /* XYZ units, Spectral units */ inst_mrt_none = 0, /* Not set */ diff --git a/spectro/instappsup.c b/spectro/instappsup.c index 6c3dd68..0cb5798 100755 --- a/spectro/instappsup.c +++ b/spectro/instappsup.c @@ -479,6 +479,7 @@ inst2_capability inst_show_disptype_options(FILE *fp, char *oline, icompaths *ic if (docbib && sels[j].cbid == 0) continue; /* Skip non cbid type */ + /* Break up selector chars/pairs with '|' */ m = pstart; for (k = 0; k < (INST_DTYPE_SEL_LEN-1); k++) { if (sels[j].sel[k] == '\000') @@ -486,6 +487,8 @@ inst2_capability inst_show_disptype_options(FILE *fp, char *oline, icompaths *ic if (m > pstart) buf[m++] = '|'; buf[m++] = sels[j].sel[k]; + if (sels[j].sel[k] == '_') + buf[m++] = sels[j].sel[++k]; } while (m < (olen+1)) /* Indent it by 1 */ buf[m++] = ' '; @@ -534,8 +537,9 @@ inst2_capability inst_show_disptype_options(FILE *fp, char *oline, icompaths *ic /* A helper function to turn a -y flag into a selection index */ /* If docbib is nz, then only allow base calibration display types */ +/* c will be 16 bits ('_' + 'X') if a 2 char selector */ /* Return -1 on error */ -int inst_get_disptype_index(inst *it, int c, int docbib) { +int inst_get_disptype_index(inst *it, int ditype, int docbib) { inst2_capability cap; int j, k; @@ -555,7 +559,14 @@ int inst_get_disptype_index(inst *it, int c, int docbib) { for (k = 0; k < (INST_DTYPE_SEL_LEN-1); k++) { if (sels[j].sel[k] == '\000') break; - if (sels[j].sel[k] == c) { + if (sels[j].sel[k] == '_') { /* 2 char selector */ + k++; + if (sels[j].sel[k-1] == (0xff & (ditype >> 8)) + && sels[j].sel[k] == (0xff & ditype)) { + return j; + } + } + if (sels[j].sel[k] == ditype) { return j; } } @@ -564,6 +575,21 @@ int inst_get_disptype_index(inst *it, int c, int docbib) { return -1; } +/* Return a static string of the ditype flag char(s) */ +char *inst_distr(int ditype) { + static char buf[5]; + + if ((ditype >> 8) & 0xff) { + buf[0] = (ditype >> 8) & 0xff; + buf[1] = ditype & 0xff; + buf[2] = '\000'; + } else { + buf[0] = ditype; + buf[1] = '\000'; + } + + return buf; +} /* ================================================================= */ diff --git a/spectro/instappsup.h b/spectro/instappsup.h index 8da4325..c5b95fc 100755 --- a/spectro/instappsup.h +++ b/spectro/instappsup.h @@ -91,7 +91,10 @@ inst2_capability inst_show_disptype_options(FILE *fp, char *oline, icompaths *ic /* A helper function to turn a -y flag into a list index */ /* If docbib is nz, then only allow base calibration display types */ /* Return 0 on error */ -int inst_get_disptype_index(inst *it, int c, int docbib); +int inst_get_disptype_index(inst *it, int ditype, int docbib); + +/* Return a static string of the ditype flag char(s) */ +char *inst_distr(int ditype); #ifdef __cplusplus } diff --git a/spectro/instlib.ksh b/spectro/instlib.ksh index 8b0303f..47243e4 100755 --- a/spectro/instlib.ksh +++ b/spectro/instlib.ksh @@ -57,6 +57,7 @@ SPECTRO_FILES=" hidio.h hidio.c icoms.h + dev.h inst.h inst.c insttypes.c diff --git a/spectro/kleink10.c b/spectro/kleink10.c index d169156..6b057ff 100755 --- a/spectro/kleink10.c +++ b/spectro/kleink10.c @@ -2,7 +2,7 @@ /* * Argyll Color Correction System * - * JETI kleink10 1211/1201 related functions + * Klein K10 related functions * * Author: Graeme W. Gill * Date: 29/4/2014 @@ -68,6 +68,7 @@ #undef PLOT_REFRESH /* [und] Plot refresh rate measurement info */ #undef PLOT_UPDELAY /* [und] Plot update delay measurement info */ +#undef TEST_FAKE_CALIBS /* Fake having a full calibration set (98 calibs) */ #undef TEST_BAUD_CHANGE /* Torture test baud rate change on non high speed K10 */ static inst_disptypesel k10_disptypesel[98]; @@ -216,7 +217,7 @@ int nd /* nz to disable debug messages */ strncpy((char *)cmd, (char *)in, 2); cmd[2] = '\000'; - if ((se = p->icom->write_read(p->icom, in, 0, out, bsize, &bread, NULL, nchar, to)) + if ((se = p->icom->write_read_ex(p->icom, in, 0, out, bsize, &bread, NULL, nchar, to, 1)) != ICOM_OK) { rv = icoms2k10_err(se); @@ -331,7 +332,7 @@ struct _kleink10 *p, baud_rate br ) { int se, rv = K10_OK; - if ((se = p->icom->set_ser_port(p->icom, fc_HardwareDTR, br, parity_none, + if ((se = p->icom->set_ser_port(p->icom, fc_None, br, parity_none, stop_1, length_8)) != ICOM_OK) { rv = icoms2k10_err(se); } else { @@ -388,7 +389,7 @@ k10_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { } a1logd(p->log, 5, "k10_init_coms: Trying %s baud, %d msec to go\n", baud_rate_to_str(brt[i]), etime- msec_time()); - if ((se = p->icom->set_ser_port(p->icom, fc_HardwareDTR, brt[i], parity_none, + if ((se = p->icom->set_ser_port(p->icom, fc_None, brt[i], parity_none, stop_1, length_8)) != ICOM_OK) { amutex_unlock(p->lock); a1logd(p->log, 5, "k10_init_coms: set_ser_port failed with 0x%x\n",se); @@ -872,8 +873,16 @@ kleink10 *p) { name[j] = buf[i + j]; if (((unsigned char *)name)[0] == 0xff) { +#ifdef TEST_FAKE_CALIBS + #pragma message("!!!!!!!!!!!!!!! Klein K10 TEST_FULL_CALIB set !!!!!!!!!!!!!!!!!!!") + sprintf(name, "Fake_%d",ix); +#else + //printf("Cal %d is 0xff - skipping\n",ix); continue; +#endif } + + /* Remove trailing spaces */ for (j = 19; j >= 0; j--) { if (name[j] != ' ') { name[j+1] = '\000'; @@ -881,7 +890,7 @@ kleink10 *p) { } } -// printf("Adding Cal %d is '%s'\n",ix,name); + // printf("Adding Cal %d is '%s'\n",ix,name); /* Add it to the list */ memset((void *)&k10_disptypesel[n], 0, sizeof(inst_disptypesel)); @@ -974,7 +983,7 @@ int usefast /* If nz use fast rate is possible */ #ifdef HIGH_SPEED /* This isn't reliable, because there is no way to ensure that */ /* the T1 command has been sent before we change the baud rate, */ - /* anf if we wait too long will will loose the measurements. */ + /* and if we wait too long we will loose the measurements. */ if (usefast && strcmp(p->firm_ver, "v01.09fh") > 0) { isnew = 1; /* We can use faster T1 command */ rate = 384; diff --git a/spectro/linear.cal b/spectro/linear.cal index 1dafbde..64b2392 100755 --- a/spectro/linear.cal +++ b/spectro/linear.cal @@ -2,7 +2,7 @@ CAL DESCRIPTOR "Argyll Device Calibration Curves" ORIGINATOR "Argyll synthcal" -CREATED "Fri Nov 17 01:11:11 2017" +CREATED "Mon Jul 09 03:30:52 2018" DEVICE_CLASS "DISPLAY" COLOR_REP "RGB" diff --git a/spectro/munki_imp.c b/spectro/munki_imp.c index d8690e8..f95140b 100755 --- a/spectro/munki_imp.c +++ b/spectro/munki_imp.c @@ -7886,9 +7886,9 @@ munki_code munki_conv2XYZ( double sms; /* Weighting */ if (s->emiss) - conv = new_xsp2cie(icxIT_none, NULL, icxOT_CIE_1931_2, NULL, icSigXYZData, (icxClamping)clamp); + conv = new_xsp2cie(icxIT_none, 0.0, NULL, icxOT_CIE_1931_2, NULL, icSigXYZData, (icxClamping)clamp); else - conv = new_xsp2cie(icxIT_D50, NULL, icxOT_CIE_1931_2, NULL, icSigXYZData, (icxClamping)clamp); + conv = new_xsp2cie(icxIT_D50, 0.0, NULL, icxOT_CIE_1931_2, NULL, icSigXYZData, (icxClamping)clamp); if (conv == NULL) return MUNKI_INT_CIECONVFAIL; diff --git a/spectro/sa_conv.h b/spectro/sa_conv.h index 0f7e635..0d4718d 100755 --- a/spectro/sa_conv.h +++ b/spectro/sa_conv.h @@ -191,6 +191,10 @@ void sa_Yxy2XYZ(double *out, double *in); #define icmLab2XYZ sa_Lab2XYZ #define icmYxy2XYZ sa_Yxy2XYZ +/* Lpt isn't used by instlib, so dummy it out */ +#define icmXYZ2Lpt sa_XYZ2Lab +#define icmLpt2XYZ sa_Lab2XYZ + /* A helper object that computes MD5 checksums */ struct _sa_MD5 { /* Private: */ diff --git a/spectro/spec2cie.c b/spectro/spec2cie.c index 6c56e67..fd40c51 100755 --- a/spectro/spec2cie.c +++ b/spectro/spec2cie.c @@ -53,7 +53,7 @@ This is intended for conversion of reflective measurements to XYZ - there is no illuminant for emissive values. - L*a*b* is always D50. + L*a*b* is always D50, since it is intended for ICC profile construction. */ @@ -133,10 +133,10 @@ main(int argc, char *argv[]) int ci, mi, yi, ki; /* Indexes of device values */ int fwacomp = 0; /* FWA compensation */ int doplot = 0; /* Plot each patches spectrum */ - char* illum_str = "D50"; icxIllumeType tillum = icxIT_none; /* Target/simulated instrument illuminant, if set. */ xspect cust_tillum, *tillump = NULL; /* Custom target/simulated illumination spectrum */ /* if tillum == icxIT_custom */ + char* illum_str = "D50"; icxIllumeType illum = icxIT_none; /* CIE calc. illuminant spectrum, and FWA inst. */ /* illuminant if tillum not set. */ xspect cust_illum; /* Custom CIE illumination spectrum if illum == icxIT_custom */ @@ -149,6 +149,8 @@ main(int argc, char *argv[]) icxObserverType obType = icxOT_none; xspect custObserver[3]; /* Custom observer CMF's */ + icmXYZNumber ill_wp_XYZ; /* if ill_wp != NULL, same as ill_wp */ + int npat; /* Number of patches */ int ti; /* Field index */ char *kw; @@ -654,10 +656,11 @@ main(int argc, char *argv[]) int Xi, Yi, Zi, Li, ai, bi; /* CGATS indexes for each field */ int spi[XSPECT_MAX_BANDS]; /* CGATS indexes for each wavelength */ int oXi, oYi, oZi, oLi, oai, obi; /* CGATS indexes for each ouput field */ + int oL2i, oa2i, ob2i; /* For illuminant wp L*a*b* output */ xsp2cie *sp2cie; /* Spectral conversion object */ xspect sp; double XYZ[3]; - double Lab[3]; + double Lab[3], Lab2[3]; char buf[100]; /* These are only set if fwa is needed */ xspect rmwsp; /* Raw medium white spectrum */ @@ -710,6 +713,17 @@ main(int argc, char *argv[]) } + /* If CIE calculation illuminant is not standard, compute it's white point */ + if (illum != icxIT_D50 && illum != icxIT_none) { + ill_wp = _ill_wp; + + /* Compute normalised XYZ of illuminant */ + if (icx_ill_sp2XYZ(ill_wp, obType, custObserver, illum, 0.0, &cust_illum, 0) != 0) + error("icx_ill_sp2XYZ returned error"); + + icmAry2XYZ(ill_wp_XYZ, ill_wp); + } + /* copy fields to output file (except spectral if nospec) */ for (i = 0; i < icg->t[0].nfields; i++) { @@ -758,27 +772,51 @@ main(int argc, char *argv[]) oai = ai; obi = bi; - /* allocate elements */ + /* If non-standard illuminant is being used, add extra LAB fields */ + /* to show illuminant relative values (Not used for profiling!) */ + if (ill_wp != NULL) { + char buf[50] = { '\000' }, *cp; - if ((elems = (cgats_set_elem *) - calloc(ocg->t[0].nfields, sizeof(cgats_set_elem))) == NULL) - { - error("Out of memory"); - } + strncpy(buf, illum_str, 40); - /* If CIE calculation illuminant is not standard, compute it's white point */ - if (illum != icxIT_D50 && illum != icxIT_none) { - ill_wp = _ill_wp; + /* Replace spaces */ + for (cp = buf; *cp != '\000'; cp++) { + if (*cp == ' ') + *cp = '_'; + } + /* Remove extension */ + for (; cp >= buf; cp--) { + if (*cp == '.') { + *cp = '\000'; + break; + } + } + strcat(buf, "LAB"); + cp = buf + strlen(buf); + cp[0] = '_'; - /* Compute normalised XYZ of illuminant */ - if (icx_ill_sp2XYZ(ill_wp, obType, custObserver, illum, 0.0, &cust_illum, 0) != 0) - error("icx_ill_sp2XYZ returned error"); + cp[1] = 'L'; + if ((oL2i = ocg->add_field(ocg, 0, buf, r_t)) < 0) + error ("Cannot add field to table"); + + cp[1] = 'A'; + if ((oa2i = ocg->add_field(ocg, 0, buf, r_t)) < 0) + error ("Cannot add field to table"); + + cp[1] = 'B'; + if ((ob2i = ocg->add_field(ocg, 0, buf, r_t)) < 0) + error ("Cannot add field to table"); + } + + /* allocate elements */ + if ((elems = (cgats_set_elem *) + calloc(ocg->t[0].nfields, sizeof(cgats_set_elem))) == NULL) { + error("Out of memory"); } /* Create a spectral conversion object */ - if ((sp2cie = new_xsp2cie(illum, &cust_illum, obType, custObserver, - icSigXYZData, icxClamp)) == NULL) - { + if ((sp2cie = new_xsp2cie(illum, 0.0, &cust_illum, obType, custObserver, + icSigXYZData, icxClamp)) == NULL) { error ("Creation of spectral conversion object failed"); } @@ -921,14 +959,15 @@ main(int argc, char *argv[]) ocg->add_kword(ocg, 0, "ILLUMINANT_WHITE_POINT_XYZ",buf, NULL); } - /* Transform patches from spectral to CIE */ + /* Transform patches from spectral to CIE, */ + /* after correcting the spectrum for possible XRGA and FWA. */ for (i = 0; i < npat; i++) { - xspect corr_sp; /* copy all input colums to output (except spectral if nospec) */ for (jj = j = 0; j < icg->t[0].nfields; j++) { if (nospec) { + /* See if this is a spectral field */ for (k = 0; nospec && k < sp.spec_n; k++) { if (spi[k] == j) @@ -963,39 +1002,27 @@ main(int argc, char *argv[]) } /* Read the spectral values for this patch */ - for (j = 0; j < sp.spec_n; j++) { + for (j = 0; j < sp.spec_n; j++) sp.spec[j] = *((double *)icg->t[0].fdata[i][spi[j]]); - } + if (calstdo != xcalstd_none) xspec_convert_xrga(&sp, &sp, calpol, calstdo, calstdi); + /* Convert it to CIE space */ if (fwacomp) { - corr_sp = sp; /* Copy spectrum */ - - /* Convert it to CIE space */ - sp2cie->sconvert (sp2cie, &corr_sp, XYZ, &sp); - - /* Write the corrected spectral values for this patch */ - if (nospec == 0) { - for (j = 0; j < sp.spec_n; j++) { - elems[spi[j]].d = sp.spec[j] = corr_sp.spec[j]; - } - } + sp2cie->sconvert(sp2cie, &sp, XYZ, &sp); + } else { + sp2cie->convert(sp2cie, XYZ, &sp); } - /* No FWA comp */ - else { - /* Convert it to CIE space */ - sp2cie->convert (sp2cie, XYZ, &sp); + /* Standard pseudo-absolute D50 ICC Lab */ + icmXYZ2Lab(&icmD50, Lab, XYZ); + /* Illuminant relative Lab */ + if (ill_wp != NULL) { + icmXYZ2Lab(&ill_wp_XYZ, Lab2, XYZ); } - /* Could use sp2cie->get_cie_il() to get CIE white point */ - /* if we wanted to return L*a*b* relative to that. */ - /* We would have to mark that in the .ti3 though. */ - /* This won't work for emmisive though, since get_cie_il() will return 'E' */ - icmXYZ2Lab(&icmD50, Lab, XYZ); - #ifdef ALLOW_PLOT if (doplot) { int ii; @@ -1018,14 +1045,28 @@ main(int argc, char *argv[]) do_plot(xx,y1,NULL,NULL,ii); } #endif + /* Write the corrected spectral values for this patch */ + if (nospec == 0 + && (calstdo != xcalstd_none || fwacomp)) { + for (j = 0; j < sp.spec_n; j++) { + elems[spi[j]].d = sp.spec[j]; + } + } + elems[oXi].d = XYZ[0] * 100.0; elems[oYi].d = XYZ[1] * 100.0; elems[oZi].d = XYZ[2] * 100.0; - + elems[oLi].d = Lab[0]; elems[oai].d = Lab[1]; elems[obi].d = Lab[2]; + if (ill_wp != NULL) { + elems[oL2i].d = Lab2[0]; + elems[oa2i].d = Lab2[1]; + elems[ob2i].d = Lab2[2]; + } + ocg->add_setarr(ocg, 0, elems); } diff --git a/spectro/specbos.c b/spectro/specbos.c index 136fb34..6d2d5c0 100755 --- a/spectro/specbos.c +++ b/spectro/specbos.c @@ -383,11 +383,9 @@ specbos_init_coms(inst *pp, baud_rate br, flow_control fc, double tout) { if (dispen) { p->model = 1511; - /* Set remote mode */ + /* Set remote mode (for old firmare) */ if ((ev = specbos_command(p, "*REMOTE 1\r", buf, MAX_MES_SIZE, 1.0)) != inst_ok) { - amutex_unlock(p->lock); - a1logd(p->log, 2, "specbos_init_coms: failed to set remote mode\n"); - return inst_protocol_error; + a1logd(p->log, 2, "specbos_init_coms: remote command failed (newer firmware ?)\n"); } } @@ -579,6 +577,9 @@ specbos_init_inst(inst *pp) { } } + /* Set target maximum measure time (no averaging) */ + /* (We will then setup instrument to compy with this target) */ + /* 3.6 is the assumed maximum fixed overhead */ p->measto = 20.0; /* Set default. Specbos default is 60.0 */ if (p->model == 1211) @@ -624,10 +625,11 @@ specbos_init_inst(inst *pp) { return ev; } #else /* Bound auto by no. averages (better - limit maxint to 1.0) */ - double dmaxtint = 1.0; /* Recommended maximum */ + double dmaxtint = 1.0; /* Recommended maximum is 1.0 */ int maxtint; int maxaver; /* Maximum averages for auto int time */ + /* Set the max integration time to 1.0 seconds: */ maxtint = (int)(dmaxtint * 1000.0+0.5); if (maxtint < 1000 || maxtint > 64999) { @@ -638,23 +640,24 @@ specbos_init_inst(inst *pp) { maxtint = 64999; } - /* Set maximum integration time */ sprintf(mes, "*para:maxtint %d\r", maxtint); if ((ev = specbos_command(p, mes, buf, MAX_MES_SIZE, 1.0)) != inst_ok) { amutex_unlock(p->lock); return ev; } + /* Then compute the maximum number of measurements to meet measto: */ + /* Total time = overhead + initial sample + 2 * int time per measure */ maxaver = (int)ceil((p->measto - 3.6)/(2.0 * dmaxtint)); - //printf("maxaver %d\n",maxaver); - if (maxaver < 2) { warning("specbos: assert, maxaver %d out of range",maxaver); maxaver = 2; } + a1logd(p->log, 6, "specbos_init_inst: set maxaver %d\n",maxaver); + /* Set maximum number of auto averages. Min value is 2 */ sprintf(mes, "*para:maxaver %d\r", maxaver); if ((ev = specbos_command(p, mes, buf, MAX_MES_SIZE, 1.0)) != inst_ok) { @@ -679,16 +682,25 @@ specbos_init_inst(inst *pp) { warning("specbos: assert, maxtint %d out of range",maxtin); if (maxtin < 1000) maxtin = 1000; - else if (maxtin > 64999) - maxtin = 64999; + else if (maxtin > 60000) /* 60 secs according to auxiliary doco. */ + maxtin = 60000; } - /* Set maximum integration time */ - /* (1201 *para:maxtint doesn't work !!) */ + /* Set maximum integration time that auto will use */ sprintf(mes, "*conf:maxtin %d\r", maxtin); if ((ev = specbos_command(p, mes, buf, MAX_MES_SIZE, 1.0)) != inst_ok) { - amutex_unlock(p->lock); - return ev; + /* 1201 Firmware V1.8.3 and earlier doesn't support maxtin. */ + /* Ignore error with a warning. */ + if (p->model == 1201) { + if (!p->maxtin_warn) + warning("specbos: conf:maxtin %d command failed (Old Firmware ?)",maxtin); + p->maxtin_warn = 1; + + /* Fatal error otherwise */ + } else { + amutex_unlock(p->lock); + return ev; + } } #ifdef NEVER /* Use default */ @@ -972,6 +984,7 @@ instClamping clamp) { /* NZ if clamp XYZ/Lab to be +ve */ int user_trig = 0; int pos = -1; inst_code rv = inst_protocol_error; + double measto = p->measto; if (!p->gotcoms) return inst_no_coms; @@ -1062,10 +1075,21 @@ instClamping clamp) { /* NZ if clamp XYZ/Lab to be +ve */ if ((rv = set_average(p, p->noaverage, 0)) != inst_ok) return rv; + /* Adjust timeout to account for averaging */ + /* (Allow extra 1 sec fudge factor per average) */ + if (p->noaverage > 1) { + measto = p->noaverage * (p->measto - 3.6 + 1.0) + 3.6; + a1logd(p->log, 6, " Adjusted measto to %f for noaver %d\n",measto,p->noaverage); + } + /* Set to average 10 readings for transmission */ } else if ((p->mode & inst_mode_illum_mask) == inst_mode_transmission) { if ((rv = set_average(p, DEFAULT_TRANS_NAV, 0)) != inst_ok) return rv; + + measto = DEFAULT_TRANS_NAV * (p->measto - 3.6 + 1.0) + 3.6; + a1logd(p->log, 6, " Adjusted measto to %f for noaver %d\n",measto,DEFAULT_TRANS_NAV); + /* Or default 1 otherwise */ } else { if ((rv = set_average(p, DEFAULT_NAV, 0)) != inst_ok) @@ -1080,12 +1104,12 @@ instClamping clamp) { /* NZ if clamp XYZ/Lab to be +ve */ } } - /* Trigger a measurement */ + /* Trigger a measurement (Allow 10 second timeout margine) */ /* (Note that ESC will abort it) */ if (p->model == 1501 || p->model == 1511) - ec = specbos_fcommand(p, "*meas:refer\r", buf, MAX_MES_SIZE, p->measto + 10.0 , 1, tmeas, 0); + ec = specbos_fcommand(p, "*meas:refer\r", buf, MAX_MES_SIZE, measto + 10.0 , 1, tmeas, 0); else - ec = specbos_fcommand(p, "*init\r", buf, MAX_MES_SIZE, p->measto + 10.0 , 1, tmeas, 0); + ec = specbos_fcommand(p, "*init\r", buf, MAX_MES_SIZE, measto + 10.0 , 1, tmeas, 0); // Test out bug workaround // if (!p->badCal) ec = SPECBOS_EXCEED_CAL_WL; @@ -1118,9 +1142,9 @@ instClamping clamp) { /* NZ if clamp XYZ/Lab to be +ve */ /* Try command again */ if (p->model == 1501 || p->model == 1511) - ec = specbos_fcommand(p, "*meas:refer\r", buf, MAX_MES_SIZE, p->measto + 10.0 , 1, tmeas, 0); + ec = specbos_fcommand(p, "*meas:refer\r", buf, MAX_MES_SIZE, measto + 10.0 , 1, tmeas, 0); else - ec = specbos_fcommand(p, "*init\r", buf, MAX_MES_SIZE, p->measto + 10.0 , 1, tmeas, 0); + ec = specbos_fcommand(p, "*init\r", buf, MAX_MES_SIZE, measto + 10.0 , 1, tmeas, 0); } /* Restore single reading if transmission */ @@ -1405,7 +1429,7 @@ instClamping clamp) { /* NZ if clamp XYZ/Lab to be +ve */ /* Convert to XYZ */ if (p->conv == NULL) { - p->conv = new_xsp2cie(icxIT_D50, NULL, icxOT_CIE_1931_2, NULL, icSigXYZData, + p->conv = new_xsp2cie(icxIT_D50, 0.0, NULL, icxOT_CIE_1931_2, NULL, icSigXYZData, icxNoClamp); if (p->conv == NULL) { a1logd(p->log, 1, "specbos_read_sample: Emulated transmission new_xsp2cie() failed"); diff --git a/spectro/specbos.h b/spectro/specbos.h index ef6fc2f..4ef4a88 100755 --- a/spectro/specbos.h +++ b/spectro/specbos.h @@ -150,7 +150,7 @@ struct _specbos { inst_opt_type trig; /* Reading trigger mode */ - double measto; /* Expected measurement timeout value */ + double measto; /* Measurement maximum time target value */ int nbands; /* Number of spectral bands */ double wl_short; double wl_long; @@ -169,6 +169,8 @@ struct _specbos { int dpos; /* Diffuser position, 0 = emissive, 1 = ambient */ int laser; /* Target laser state, nz = on */ + int maxtin_warn; /* NZ if conf:maxtin failure warning has been given */ + }; typedef struct _specbos specbos; /* Constructor */ diff --git a/spectro/spotread.c b/spectro/spotread.c index 16f6f2d..1b4189b 100755 --- a/spectro/spotread.c +++ b/spectro/spotread.c @@ -21,6 +21,8 @@ /* TTBD * + * Add option to automatically read continuously, until stopped. (A bit like -O) + * Make -V average the spectrum too (if present), and allow it to * be saved to a .sp file. * @@ -45,19 +47,19 @@ #include #include #ifndef SALONEINSTLIB -#include "copyright.h" -#include "aconfig.h" -#include "numlib.h" -#include "cgats.h" -#include "xicc.h" -#include "conv.h" -#include "plot.h" -#include "ui.h" +# include "copyright.h" +# include "aconfig.h" +# include "numlib.h" +# include "cgats.h" +# include "xicc.h" +# include "conv.h" +# include "plot.h" +# include "ui.h" #else /* SALONEINSTLIB */ -#include "sa_config.h" -#include "numsup.h" -#include "xspect.h" -#include "conv.h" +# include "sa_config.h" +# include "numsup.h" +# include "xspect.h" +# include "conv.h" #endif /* SALONEINSTLIB */ #include "inst.h" #include "icoms.h" @@ -252,7 +254,7 @@ static inst_code uicallback(void *cntx, inst_ui_purp purp) { ABCDEFGHIJKLMNOPQRSTUVWXYZ upper ... . . .. . .. ... - lower . .... .. . .. . .. + lower . .... .. . .. .... */ @@ -332,6 +334,9 @@ usage(char *diag, ...) { fprintf(stderr," u U.V. Cut\n"); fprintf(stderr," -E extrafilterfile Apply extra filter compensation file\n"); fprintf(stderr," -A N|A|X|G XRGA conversion (default N)\n"); +#ifndef SALONEINSTLIB + fprintf(stderr," -w Use -i param. illuminant for comuting L*a*b*\n"); +#endif fprintf(stderr," -x Display Yxy instead of Lab\n"); fprintf(stderr," -h Display LCh instead of Lab\n"); #ifndef SALONEINSTLIB @@ -413,7 +418,7 @@ int main(int argc, char *argv[]) { icompaths *icmps = NULL; int comport = COMPORT; /* COM port used */ icompath *ipath = NULL; - int dtype = 0; /* Display type selection charater */ + int ditype = 0; /* Display type selection character(s) */ inst_mode cap = inst_mode_none; /* Instrument mode capabilities */ inst2_capability cap2 = inst2_none; /* Instrument capabilities 2 */ inst3_capability cap3 = inst3_none; /* Instrument capabilities 3 */ @@ -430,7 +435,10 @@ int main(int argc, char *argv[]) { int illum_set = 0; /* User asked for custom illuminant spectrum */ icxIllumeType illum = icxIT_D50; /* Spectral defaults */ xspect cust_illum; /* Custom illumination spectrum */ - icxObserverType obType = icxOT_default; + int labwpillum = 0; /* nz to use illum WP for L*a*b* conversion */ + icmXYZNumber labwp = { icmD50_100.X, icmD50_100.Y, icmD50_100.Z }; /* Lab conversion wp */ + char labwpname[100] = "D50"; /* Name of Lab conversion wp */ + icxObserverType obType = icxOT_default; /* Default is 1931_2 */ xspect custObserver[3]; /* If obType = icxOT_custom */ xspect sp; /* Last spectrum read */ xspect rsp; /* Reference spectrum */ @@ -519,7 +527,9 @@ int main(int argc, char *argv[]) { } else if (argv[fa][1] == 'y') { fa = nfa; if (na == NULL) usage("Paramater expected following -y"); - dtype = na[0]; + ditype = na[0]; + if (ditype == '_' && na[1] != '\000') + ditype = ditype << 8 | na[1]; #ifndef SALONEINSTLIB /* Simulated instrument illumination (FWA) */ @@ -620,6 +630,12 @@ int main(int argc, char *argv[]) { usage("Unrecognised illuminant '%s'",na); #endif /* SALONEINSTLIB */ +#ifndef SALONEINSTLIB + /* Use -i illuminant for L*a*b* conversion */ + } else if (argv[fa][1] == 'w') { + labwpillum = 1; +#endif /* !SALONEINSTLIB */ + /* Spectral Observer type */ } else if (argv[fa][1] == 'Q') { fa = nfa; @@ -901,11 +917,29 @@ int main(int argc, char *argv[]) { } /* Check for some user mistakes */ - - if ((tillum_set || illum_set) && emiss) + if ((tillum_set || illum_set) && emiss ) warning("-I or -i parameter makes no sense with emissive or ambient measurement!"); + if (illum_set && labwpillum && emiss) { + warning("-w for emissive is ignored!"); + labwpillum = 0; + } + /* - - - - - - - - - - - - - - - - - - - */ + /* Setup Lab conversion wp if not D50 */ + if (illum_set && labwpillum && !emiss) { + double xyz[3]; + + strcpy(labwpname, standardIlluminant_name(illum, 0.0)); + + if (icx_ill_sp2XYZ(xyz, obType, custObserver, illum, 0.0, &cust_illum, 0)) + error("Looking up W.P. of illuminant failed"); + + icmScale3(xyz, xyz, 100.0); + icmAry2XYZ(labwp, xyz); + + } + if ((icmps = new_icompaths(g_log)) == NULL) error("Finding instrument paths failed"); if ((ipath = icmps->get_path(icmps, comport)) == NULL) @@ -1204,12 +1238,12 @@ int main(int argc, char *argv[]) { } /* Set displaytype or calibration mode */ - if (dtype != 0) { + if (ditype != 0) { if (cap2 & inst2_disptype) { int ix; - if ((ix = inst_get_disptype_index(it, dtype, 0)) < 0) { + if ((ix = inst_get_disptype_index(it, ditype, 0)) < 0) { it->del(it); - usage("Failed to locate display type matching '%c'",dtype); + usage("Failed to locate display type matching '%s'",inst_distr(ditype)); } if ((rv = it->set_disptype(it, ix)) != inst_ok) { @@ -1547,7 +1581,7 @@ int main(int argc, char *argv[]) { illum = icxIT_none; /* Create a spectral conversion object */ - if ((sp2cie = new_xsp2cie(illum, &cust_illum, obType, custObserver, icSigXYZData, + if ((sp2cie = new_xsp2cie(illum, 0.0, &cust_illum, obType, custObserver, icSigXYZData, refstats ? icxNoClamp : icxClamp)) == NULL) error("Creation of spectral conversion object failed"); @@ -1593,9 +1627,9 @@ int main(int argc, char *argv[]) { for (j = 0; j < 3; j++) rXYZ[j] *= 100.0; /* 0..100 scale */ } - icmXYZ2Lab(&icmD50_100, rLab, rXYZ); + icmXYZ2Lab(&labwp, rLab, rXYZ); if (verb) - printf("Preset ref. XYZ %f %f %f, Lab %f %f %f\n", rXYZ[0], rXYZ[1], rXYZ[2], rLab[0], rLab[1], rLab[2]); + printf("Preset ref. XYZ %f %f %f, %s Lab %f %f %f\n", rXYZ[0], rXYZ[1], rXYZ[2], labwpname, rLab[0], rLab[1], rLab[2]); } #endif @@ -2315,7 +2349,7 @@ int main(int argc, char *argv[]) { /* Creat the base conversion object */ if (sp2cief[fidx] == NULL) { - if ((sp2cief[fidx] = new_xsp2cie(illum, &cust_illum, obType, + if ((sp2cief[fidx] = new_xsp2cie(illum, 0.0, &cust_illum, obType, custObserver, icSigXYZData, refstats ? icxNoClamp : icxClamp)) == NULL) error("Creation of spectral conversion object failed"); } @@ -2520,8 +2554,8 @@ int main(int argc, char *argv[]) { vdt_sn = -1.0; } - /* Compute D50 Lab from XYZ */ - icmXYZ2Lab(&icmD50_100, Lab, XYZ); + /* Compute D50 (or other) Lab from XYZ */ + icmXYZ2Lab(&labwp, Lab, XYZ); /* Compute Yxy from XYZ */ icmXYZ2Yxy(Yxy, XYZ); @@ -2529,7 +2563,7 @@ int main(int argc, char *argv[]) { /* Compute LCh from Lab */ icmLab2LCh(LCh, Lab); - /* Compute D50 Yuv from XYZ */ + /* Compute Yuv from XYZ */ icmXYZ21976UCS(Yuv, XYZ); #else /* SALONEINSTLIB */ @@ -2547,8 +2581,8 @@ int main(int argc, char *argv[]) { if (wXYZ[0] < 0.0) { /* If we haven't save a white ref. yet */ if (XYZ[1] < 10.0) error ("White of XYZ %f %f %f doesn't seem reasonable",XYZ[0], XYZ[1], XYZ[2]); - printf("\n Making result XYZ: %f %f %f, D50 Lab: %f %f %f white reference.\n", - XYZ[0], XYZ[1], XYZ[2], Lab[0], Lab[1], Lab[2]); + printf("\n Making result XYZ: %f %f %f, %s Lab: %f %f %f white reference.\n", + XYZ[0], XYZ[1], XYZ[2], labwpname, Lab[0], Lab[1], Lab[2]); wXYZ[0] = XYZ[0]; wXYZ[1] = XYZ[1]; wXYZ[2] = XYZ[2]; @@ -2576,7 +2610,7 @@ int main(int argc, char *argv[]) { } /* recompute Lab */ - icmXYZ2Lab(&icmD50_100, Lab, XYZ); + icmXYZ2Lab(&labwp, Lab, XYZ); /* recompute Yxy from XYZ */ icmXYZ2Yxy(Yxy, XYZ); @@ -2625,8 +2659,8 @@ int main(int argc, char *argv[]) { #endif } else { /* Print out the XYZ and Lab */ - printf("\n Result is XYZ: %f %f %f, D50 Lab: %f %f %f\n", - XYZ[0], XYZ[1], XYZ[2], Lab[0], Lab[1], Lab[2]); + printf("\n Result is XYZ: %f %f %f, %s Lab: %f %f %f\n", + XYZ[0], XYZ[1], XYZ[2], labwpname, Lab[0], Lab[1], Lab[2]); } } diff --git a/spectro/spyd2.c b/spectro/spyd2.c index 28051f3..539c2c0 100755 --- a/spectro/spyd2.c +++ b/spectro/spyd2.c @@ -2146,7 +2146,7 @@ spyd4_comp_calmat( } /* Compute XYZ of the real sample array. */ - if ((conv = new_xsp2cie(icxIT_none, NULL, obType, custObserver, icSigXYZData, icxClamp)) == NULL) + if ((conv = new_xsp2cie(icxIT_none, 0.0, NULL, obType, custObserver, icSigXYZData, icxClamp)) == NULL) return spyd2_interp_code((inst *)p, SPYD2_INT_CIECONVFAIL); sampXYZ = dmatrix(0, nasamp-1, 0, 3-1); for (i = 0; i < nsamp; i++) { diff --git a/spectro/ss.c b/spectro/ss.c index 4f95fdb..7e67fbe 100755 --- a/spectro/ss.c +++ b/spectro/ss.c @@ -54,10 +54,11 @@ You should be able to use the table enter key anywhere the user is asked to hit a key. - The corner positioning could be smarter. + The corner positioning could be smarter (i.e. move to the anticipated corned + automatically). The SpectroscanT transmission cal. merely reminds the user (via verbose) - that it is assuming the correct apatture, rather than given them + that it is assuming the correct apature, rather than given them a chance to change it. */ diff --git a/spectro/ss_imp.c b/spectro/ss_imp.c index 0de14ea..bfe7e25 100755 --- a/spectro/ss_imp.c +++ b/spectro/ss_imp.c @@ -1497,8 +1497,8 @@ ss_tmt tm /* Table mode (Reflectance/Transmission) */ inst_code ss_do_SetDeviceOnline(ss *p) { #ifdef EMSST if (p->tmode != 0) - *((char *)0) = 55; -// return inst_unsupported; +// *((char *)0) = 55; // Trigger backtrace + return inst_unsupported; #endif ss_add_ssreq(p, ss_SetDeviceOnline); ss_command(p, DF_TMO); @@ -1514,7 +1514,8 @@ inst_code ss_do_SetDeviceOnline(ss *p) { inst_code ss_do_SetDeviceOffline(ss *p) { #ifdef EMSST if (p->tmode != 0) - *((char *)0) = 55; +// *((char *)0) = 55; // Trigger backtrace + return inst_unsupported; #endif ss_add_ssreq(p, ss_SetDeviceOffline); ss_command(p, DF_TMO); @@ -1559,7 +1560,8 @@ double y /* Y coord in mm, 0-230.0, accurate to 0.1mm */ ) { #ifdef EMSST if (p->tmode != 0) - *((char *)0) = 55; +// *((char *)0) = 55; // Trigger backtrace + return inst_unsupported; #endif ss_add_ssreq(p, ss_MoveAbsolut); ss_add_1(p, r); @@ -1581,7 +1583,8 @@ double y /* Y distance in mm, 0-230.0, accurate to 0.1mm */ ) { #ifdef EMSST if (p->tmode != 0) - *((char *)0) = 55; +// *((char *)0) = 55; // Trigger backtrace + return inst_unsupported; #endif ss_add_ssreq(p, ss_MoveRelative); ss_add_2(p, (int)(x * 10 + 0.5)); @@ -1600,7 +1603,8 @@ ss *p ) { #ifdef EMSST if (p->tmode != 0) - *((char *)0) = 55; +// *((char *)0) = 55; // Trigger backtrace + return inst_unsupported; #endif ss_add_ssreq(p, ss_MoveHome); ss_command(p, MV_TMO); @@ -1617,7 +1621,8 @@ ss *p ) { #ifdef EMSST if (p->tmode != 0) - *((char *)0) = 55; +// *((char *)0) = 55; // Trigger backtrace + return inst_unsupported; #endif ss_add_ssreq(p, ss_MoveUp); ss_command(p, MV_TMO); @@ -1634,7 +1639,8 @@ ss *p ) { #ifdef EMSST if (p->tmode != 0) - *((char *)0) = 55; +// *((char *)0) = 55; // Trigger backtrace + return inst_unsupported; #endif ss_add_ssreq(p, ss_MoveDown); ss_command(p, MV_TMO); @@ -1656,7 +1662,8 @@ ss_zkt *zk /* Return the Z coordinate (Up/Down) */ ) { #ifdef EMSST if (p->tmode != 0) - *((char *)0) = 55; +// *((char *)0) = 55; // Trigger backtrace + return inst_unsupported; #endif ss_add_ssreq(p, ss_OutputActualPosition); ss_add_1(p, r); @@ -1680,7 +1687,8 @@ ss_wrpt wrp /* White Reference Position (Tile1/Tile2) */ ) { #ifdef EMSST if (p->tmode != 0) - *((char *)0) = 55; +// *((char *)0) = 55; // Trigger backtrace + return inst_unsupported; #endif ss_add_ssreq(p, ss_MoveToWhiteRefPos); ss_add_1(p, wrp); @@ -1749,7 +1757,8 @@ ss_llt ll /* Transmission light level (Off/Surround/Low) */ if (p->tmode != 0) return inst_ok; else - *((char *)0) = 55; +// *((char *)0) = 55; // Trigger backtrace + return inst_unsupported; #endif ss_add_ssreq(p, ss_SetLightLevel); ss_add_1(p, ll); @@ -1775,7 +1784,8 @@ double y /* Y coord in mm, 0-230.0, accurate to 0.1mm */ p->sby = y; return inst_ok; } else { - *((char *)0) = 55; +// *((char *)0) = 55; // Trigger backtrace + return inst_unsupported; } #endif ss_add_ssreq(p, ss_SetTransmStandbyPos); diff --git a/spectro/strange.cal b/spectro/strange.cal index b31bbed..5f4d4b4 100755 --- a/spectro/strange.cal +++ b/spectro/strange.cal @@ -2,7 +2,7 @@ CAL DESCRIPTOR "Argyll Device Calibration Curves" ORIGINATOR "Argyll synthcal" -CREATED "Fri Nov 17 01:11:11 2017" +CREATED "Mon Jul 09 03:30:52 2018" DEVICE_CLASS "DISPLAY" COLOR_REP "RGB" diff --git a/spectro/vtpglut.c b/spectro/vtpglut.c index 2308466..b558bf4 100755 --- a/spectro/vtpglut.c +++ b/spectro/vtpglut.c @@ -14,6 +14,16 @@ * see the License2.txt file for licencing details. */ +/* + TTBD: + + Note that there is some support for HW 3dLUTs in X11 xrandr + in a patch for xf86-videeo-amdgpu drmmode_display.c + submitted on 3 May 2018. + See + +*/ + #include #include #include diff --git a/spectro/xrga.c b/spectro/xrga.c index 7318fce..d481b6a 100755 --- a/spectro/xrga.c +++ b/spectro/xrga.c @@ -160,23 +160,20 @@ void xspec_convert_xrga(xspect *dst, xspect *srcp, xcalpol pol, xcalstd dsp, xca xspect tmp, *src = srcp; /* If no conversion and no copy needed */ - if ((ssp == xcalstd_native || dsp == xcalstd_native || dsp == ssp) - && dst == src) + if (!XCALSTD_NEEDED(ssp, dsp) && dst == src) return; - /* If no conversion needed */ - if (ssp == xcalstd_native || dsp == xcalstd_native || dsp == ssp) { + /* If no conversion needed */ + if (!XCALSTD_NEEDED(ssp, dsp)) { *dst = *src; /* Struct copy */ return; } - /* If the dest is the same as the src, make a temporary copy */ + /* If the dest is the same as the src, make a temporary copy, */ + /* since convert_xrga() needs them to be distinct */ if (dst == src) { tmp = *src; /* Struct copy */ src = &tmp; - - } else { - XSPECT_COPY_INFO(dst, src); /* Copy parameters */ } eq = &xrga_equations[pol][ssp][dsp]; @@ -210,7 +207,7 @@ void ipatch_convert_xrga(ipatch *vals, int nvals, /* Re-compute XYZ */ if (vals[i].XYZ_v) { if (conv == NULL) { - conv = new_xsp2cie(icxIT_D50, NULL, icxOT_CIE_1931_2, + conv = new_xsp2cie(icxIT_D50, 0.0, NULL, icxOT_CIE_1931_2, NULL, icSigXYZData, (icxClamping)clamp); } conv->convert(conv, vals[i].XYZ, &vals[i].sp); -- cgit v1.2.3 From f5991c577f8c4cd7cf5305bc244dd0ee70136aba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 11 Jul 2018 23:14:38 +0200 Subject: refresh patches --- spectro/linear.cal | 272 ---------------------------------------------------- spectro/strange.cal | 272 ---------------------------------------------------- 2 files changed, 544 deletions(-) delete mode 100755 spectro/linear.cal delete mode 100755 spectro/strange.cal (limited to 'spectro') diff --git a/spectro/linear.cal b/spectro/linear.cal deleted file mode 100755 index 64b2392..0000000 --- a/spectro/linear.cal +++ /dev/null @@ -1,272 +0,0 @@ -CAL - -DESCRIPTOR "Argyll Device Calibration Curves" -ORIGINATOR "Argyll synthcal" -CREATED "Mon Jul 09 03:30:52 2018" -DEVICE_CLASS "DISPLAY" -COLOR_REP "RGB" - -NUMBER_OF_FIELDS 4 -BEGIN_DATA_FORMAT -RGB_I RGB_R RGB_G RGB_B -END_DATA_FORMAT - -NUMBER_OF_SETS 256 -BEGIN_DATA -0.00000 0.00000 0.00000 0.00000 -0.00392157 0.00392157 0.00392157 0.00392157 -0.00784314 0.00784314 0.00784314 0.00784314 -0.0117647 0.0117647 0.0117647 0.0117647 -0.0156863 0.0156863 0.0156863 0.0156863 -0.0196078 0.0196078 0.0196078 0.0196078 -0.0235294 0.0235294 0.0235294 0.0235294 -0.0274510 0.0274510 0.0274510 0.0274510 -0.0313725 0.0313725 0.0313725 0.0313725 -0.0352941 0.0352941 0.0352941 0.0352941 -0.0392157 0.0392157 0.0392157 0.0392157 -0.0431373 0.0431373 0.0431373 0.0431373 -0.0470588 0.0470588 0.0470588 0.0470588 -0.0509804 0.0509804 0.0509804 0.0509804 -0.0549020 0.0549020 0.0549020 0.0549020 -0.0588235 0.0588235 0.0588235 0.0588235 -0.0627451 0.0627451 0.0627451 0.0627451 -0.0666667 0.0666667 0.0666667 0.0666667 -0.0705882 0.0705882 0.0705882 0.0705882 -0.0745098 0.0745098 0.0745098 0.0745098 -0.0784314 0.0784314 0.0784314 0.0784314 -0.0823529 0.0823529 0.0823529 0.0823529 -0.0862745 0.0862745 0.0862745 0.0862745 -0.0901961 0.0901961 0.0901961 0.0901961 -0.0941176 0.0941176 0.0941176 0.0941176 -0.0980392 0.0980392 0.0980392 0.0980392 -0.101961 0.101961 0.101961 0.101961 -0.105882 0.105882 0.105882 0.105882 -0.109804 0.109804 0.109804 0.109804 -0.113725 0.113725 0.113725 0.113725 -0.117647 0.117647 0.117647 0.117647 -0.121569 0.121569 0.121569 0.121569 -0.125490 0.125490 0.125490 0.125490 -0.129412 0.129412 0.129412 0.129412 -0.133333 0.133333 0.133333 0.133333 -0.137255 0.137255 0.137255 0.137255 -0.141176 0.141176 0.141176 0.141176 -0.145098 0.145098 0.145098 0.145098 -0.149020 0.149020 0.149020 0.149020 -0.152941 0.152941 0.152941 0.152941 -0.156863 0.156863 0.156863 0.156863 -0.160784 0.160784 0.160784 0.160784 -0.164706 0.164706 0.164706 0.164706 -0.168627 0.168627 0.168627 0.168627 -0.172549 0.172549 0.172549 0.172549 -0.176471 0.176471 0.176471 0.176471 -0.180392 0.180392 0.180392 0.180392 -0.184314 0.184314 0.184314 0.184314 -0.188235 0.188235 0.188235 0.188235 -0.192157 0.192157 0.192157 0.192157 -0.196078 0.196078 0.196078 0.196078 -0.200000 0.200000 0.200000 0.200000 -0.203922 0.203922 0.203922 0.203922 -0.207843 0.207843 0.207843 0.207843 -0.211765 0.211765 0.211765 0.211765 -0.215686 0.215686 0.215686 0.215686 -0.219608 0.219608 0.219608 0.219608 -0.223529 0.223529 0.223529 0.223529 -0.227451 0.227451 0.227451 0.227451 -0.231373 0.231373 0.231373 0.231373 -0.235294 0.235294 0.235294 0.235294 -0.239216 0.239216 0.239216 0.239216 -0.243137 0.243137 0.243137 0.243137 -0.247059 0.247059 0.247059 0.247059 -0.250980 0.250980 0.250980 0.250980 -0.254902 0.254902 0.254902 0.254902 -0.258824 0.258824 0.258824 0.258824 -0.262745 0.262745 0.262745 0.262745 -0.266667 0.266667 0.266667 0.266667 -0.270588 0.270588 0.270588 0.270588 -0.274510 0.274510 0.274510 0.274510 -0.278431 0.278431 0.278431 0.278431 -0.282353 0.282353 0.282353 0.282353 -0.286275 0.286275 0.286275 0.286275 -0.290196 0.290196 0.290196 0.290196 -0.294118 0.294118 0.294118 0.294118 -0.298039 0.298039 0.298039 0.298039 -0.301961 0.301961 0.301961 0.301961 -0.305882 0.305882 0.305882 0.305882 -0.309804 0.309804 0.309804 0.309804 -0.313725 0.313725 0.313725 0.313725 -0.317647 0.317647 0.317647 0.317647 -0.321569 0.321569 0.321569 0.321569 -0.325490 0.325490 0.325490 0.325490 -0.329412 0.329412 0.329412 0.329412 -0.333333 0.333333 0.333333 0.333333 -0.337255 0.337255 0.337255 0.337255 -0.341176 0.341176 0.341176 0.341176 -0.345098 0.345098 0.345098 0.345098 -0.349020 0.349020 0.349020 0.349020 -0.352941 0.352941 0.352941 0.352941 -0.356863 0.356863 0.356863 0.356863 -0.360784 0.360784 0.360784 0.360784 -0.364706 0.364706 0.364706 0.364706 -0.368627 0.368627 0.368627 0.368627 -0.372549 0.372549 0.372549 0.372549 -0.376471 0.376471 0.376471 0.376471 -0.380392 0.380392 0.380392 0.380392 -0.384314 0.384314 0.384314 0.384314 -0.388235 0.388235 0.388235 0.388235 -0.392157 0.392157 0.392157 0.392157 -0.396078 0.396078 0.396078 0.396078 -0.400000 0.400000 0.400000 0.400000 -0.403922 0.403922 0.403922 0.403922 -0.407843 0.407843 0.407843 0.407843 -0.411765 0.411765 0.411765 0.411765 -0.415686 0.415686 0.415686 0.415686 -0.419608 0.419608 0.419608 0.419608 -0.423529 0.423529 0.423529 0.423529 -0.427451 0.427451 0.427451 0.427451 -0.431373 0.431373 0.431373 0.431373 -0.435294 0.435294 0.435294 0.435294 -0.439216 0.439216 0.439216 0.439216 -0.443137 0.443137 0.443137 0.443137 -0.447059 0.447059 0.447059 0.447059 -0.450980 0.450980 0.450980 0.450980 -0.454902 0.454902 0.454902 0.454902 -0.458824 0.458824 0.458824 0.458824 -0.462745 0.462745 0.462745 0.462745 -0.466667 0.466667 0.466667 0.466667 -0.470588 0.470588 0.470588 0.470588 -0.474510 0.474510 0.474510 0.474510 -0.478431 0.478431 0.478431 0.478431 -0.482353 0.482353 0.482353 0.482353 -0.486275 0.486275 0.486275 0.486275 -0.490196 0.490196 0.490196 0.490196 -0.494118 0.494118 0.494118 0.494118 -0.498039 0.498039 0.498039 0.498039 -0.501961 0.501961 0.501961 0.501961 -0.505882 0.505882 0.505882 0.505882 -0.509804 0.509804 0.509804 0.509804 -0.513725 0.513725 0.513725 0.513725 -0.517647 0.517647 0.517647 0.517647 -0.521569 0.521569 0.521569 0.521569 -0.525490 0.525490 0.525490 0.525490 -0.529412 0.529412 0.529412 0.529412 -0.533333 0.533333 0.533333 0.533333 -0.537255 0.537255 0.537255 0.537255 -0.541176 0.541176 0.541176 0.541176 -0.545098 0.545098 0.545098 0.545098 -0.549020 0.549020 0.549020 0.549020 -0.552941 0.552941 0.552941 0.552941 -0.556863 0.556863 0.556863 0.556863 -0.560784 0.560784 0.560784 0.560784 -0.564706 0.564706 0.564706 0.564706 -0.568627 0.568627 0.568627 0.568627 -0.572549 0.572549 0.572549 0.572549 -0.576471 0.576471 0.576471 0.576471 -0.580392 0.580392 0.580392 0.580392 -0.584314 0.584314 0.584314 0.584314 -0.588235 0.588235 0.588235 0.588235 -0.592157 0.592157 0.592157 0.592157 -0.596078 0.596078 0.596078 0.596078 -0.600000 0.600000 0.600000 0.600000 -0.603922 0.603922 0.603922 0.603922 -0.607843 0.607843 0.607843 0.607843 -0.611765 0.611765 0.611765 0.611765 -0.615686 0.615686 0.615686 0.615686 -0.619608 0.619608 0.619608 0.619608 -0.623529 0.623529 0.623529 0.623529 -0.627451 0.627451 0.627451 0.627451 -0.631373 0.631373 0.631373 0.631373 -0.635294 0.635294 0.635294 0.635294 -0.639216 0.639216 0.639216 0.639216 -0.643137 0.643137 0.643137 0.643137 -0.647059 0.647059 0.647059 0.647059 -0.650980 0.650980 0.650980 0.650980 -0.654902 0.654902 0.654902 0.654902 -0.658824 0.658824 0.658824 0.658824 -0.662745 0.662745 0.662745 0.662745 -0.666667 0.666667 0.666667 0.666667 -0.670588 0.670588 0.670588 0.670588 -0.674510 0.674510 0.674510 0.674510 -0.678431 0.678431 0.678431 0.678431 -0.682353 0.682353 0.682353 0.682353 -0.686275 0.686275 0.686275 0.686275 -0.690196 0.690196 0.690196 0.690196 -0.694118 0.694118 0.694118 0.694118 -0.698039 0.698039 0.698039 0.698039 -0.701961 0.701961 0.701961 0.701961 -0.705882 0.705882 0.705882 0.705882 -0.709804 0.709804 0.709804 0.709804 -0.713725 0.713725 0.713725 0.713725 -0.717647 0.717647 0.717647 0.717647 -0.721569 0.721569 0.721569 0.721569 -0.725490 0.725490 0.725490 0.725490 -0.729412 0.729412 0.729412 0.729412 -0.733333 0.733333 0.733333 0.733333 -0.737255 0.737255 0.737255 0.737255 -0.741176 0.741176 0.741176 0.741176 -0.745098 0.745098 0.745098 0.745098 -0.749020 0.749020 0.749020 0.749020 -0.752941 0.752941 0.752941 0.752941 -0.756863 0.756863 0.756863 0.756863 -0.760784 0.760784 0.760784 0.760784 -0.764706 0.764706 0.764706 0.764706 -0.768627 0.768627 0.768627 0.768627 -0.772549 0.772549 0.772549 0.772549 -0.776471 0.776471 0.776471 0.776471 -0.780392 0.780392 0.780392 0.780392 -0.784314 0.784314 0.784314 0.784314 -0.788235 0.788235 0.788235 0.788235 -0.792157 0.792157 0.792157 0.792157 -0.796078 0.796078 0.796078 0.796078 -0.800000 0.800000 0.800000 0.800000 -0.803922 0.803922 0.803922 0.803922 -0.807843 0.807843 0.807843 0.807843 -0.811765 0.811765 0.811765 0.811765 -0.815686 0.815686 0.815686 0.815686 -0.819608 0.819608 0.819608 0.819608 -0.823529 0.823529 0.823529 0.823529 -0.827451 0.827451 0.827451 0.827451 -0.831373 0.831373 0.831373 0.831373 -0.835294 0.835294 0.835294 0.835294 -0.839216 0.839216 0.839216 0.839216 -0.843137 0.843137 0.843137 0.843137 -0.847059 0.847059 0.847059 0.847059 -0.850980 0.850980 0.850980 0.850980 -0.854902 0.854902 0.854902 0.854902 -0.858824 0.858824 0.858824 0.858824 -0.862745 0.862745 0.862745 0.862745 -0.866667 0.866667 0.866667 0.866667 -0.870588 0.870588 0.870588 0.870588 -0.874510 0.874510 0.874510 0.874510 -0.878431 0.878431 0.878431 0.878431 -0.882353 0.882353 0.882353 0.882353 -0.886275 0.886275 0.886275 0.886275 -0.890196 0.890196 0.890196 0.890196 -0.894118 0.894118 0.894118 0.894118 -0.898039 0.898039 0.898039 0.898039 -0.901961 0.901961 0.901961 0.901961 -0.905882 0.905882 0.905882 0.905882 -0.909804 0.909804 0.909804 0.909804 -0.913725 0.913725 0.913725 0.913725 -0.917647 0.917647 0.917647 0.917647 -0.921569 0.921569 0.921569 0.921569 -0.925490 0.925490 0.925490 0.925490 -0.929412 0.929412 0.929412 0.929412 -0.933333 0.933333 0.933333 0.933333 -0.937255 0.937255 0.937255 0.937255 -0.941176 0.941176 0.941176 0.941176 -0.945098 0.945098 0.945098 0.945098 -0.949020 0.949020 0.949020 0.949020 -0.952941 0.952941 0.952941 0.952941 -0.956863 0.956863 0.956863 0.956863 -0.960784 0.960784 0.960784 0.960784 -0.964706 0.964706 0.964706 0.964706 -0.968627 0.968627 0.968627 0.968627 -0.972549 0.972549 0.972549 0.972549 -0.976471 0.976471 0.976471 0.976471 -0.980392 0.980392 0.980392 0.980392 -0.984314 0.984314 0.984314 0.984314 -0.988235 0.988235 0.988235 0.988235 -0.992157 0.992157 0.992157 0.992157 -0.996078 0.996078 0.996078 0.996078 -1.000000 1.000000 1.000000 1.000000 -END_DATA diff --git a/spectro/strange.cal b/spectro/strange.cal deleted file mode 100755 index 5f4d4b4..0000000 --- a/spectro/strange.cal +++ /dev/null @@ -1,272 +0,0 @@ -CAL - -DESCRIPTOR "Argyll Device Calibration Curves" -ORIGINATOR "Argyll synthcal" -CREATED "Mon Jul 09 03:30:52 2018" -DEVICE_CLASS "DISPLAY" -COLOR_REP "RGB" - -NUMBER_OF_FIELDS 4 -BEGIN_DATA_FORMAT -RGB_I RGB_R RGB_G RGB_B -END_DATA_FORMAT - -NUMBER_OF_SETS 256 -BEGIN_DATA -0.00000 0.00000 0.00000 0.00000 -0.00392157 0.0000567518 0.0118787 0.0186065 -0.00784314 0.000184387 0.0206820 0.0302263 -0.0117647 0.000367355 0.0286065 0.0401466 -0.0156863 0.000599076 0.0360094 0.0491028 -0.0196078 0.000875445 0.0430471 0.0574042 -0.0235294 0.00119354 0.0498068 0.0652184 -0.0274510 0.00155112 0.0563438 0.0726496 -0.0313725 0.00194640 0.0626960 0.0797678 -0.0352941 0.00237789 0.0688909 0.0866232 -0.0392157 0.00284433 0.0749493 0.0932533 -0.0431373 0.00334462 0.0808876 0.0996872 -0.0470588 0.00387782 0.0867187 0.105948 -0.0509804 0.00444307 0.0924533 0.112053 -0.0549020 0.00503962 0.0981003 0.118020 -0.0588235 0.00566676 0.103667 0.123859 -0.0627451 0.00632388 0.109160 0.129583 -0.0666667 0.00701040 0.114585 0.135201 -0.0705882 0.00772579 0.119946 0.140720 -0.0745098 0.00846956 0.125248 0.146148 -0.0784314 0.00924125 0.130494 0.151490 -0.0823529 0.0100404 0.135689 0.156754 -0.0862745 0.0108667 0.140834 0.161942 -0.0901961 0.0117197 0.145932 0.167061 -0.0941176 0.0125991 0.150986 0.172112 -0.0980392 0.0135045 0.155998 0.177102 -0.101961 0.0144356 0.160971 0.182031 -0.105882 0.0153921 0.165905 0.186904 -0.109804 0.0163738 0.170803 0.191723 -0.113725 0.0173803 0.175665 0.196491 -0.117647 0.0184114 0.180495 0.201210 -0.121569 0.0194668 0.185292 0.205882 -0.125490 0.0205464 0.190059 0.210508 -0.129412 0.0216498 0.194796 0.215092 -0.133333 0.0227769 0.199504 0.219634 -0.137255 0.0239274 0.204184 0.224136 -0.141176 0.0251012 0.208838 0.228600 -0.145098 0.0262980 0.213466 0.233027 -0.149020 0.0275177 0.218069 0.237418 -0.152941 0.0287600 0.222648 0.241774 -0.156863 0.0300249 0.227204 0.246097 -0.160784 0.0313121 0.231737 0.250388 -0.164706 0.0326215 0.236248 0.254647 -0.168627 0.0339528 0.240737 0.258876 -0.172549 0.0353061 0.245205 0.263076 -0.176471 0.0366810 0.249654 0.267247 -0.180392 0.0380775 0.254082 0.271391 -0.184314 0.0394954 0.258491 0.275507 -0.188235 0.0409345 0.262882 0.279597 -0.192157 0.0423948 0.267254 0.283662 -0.196078 0.0438762 0.271609 0.287702 -0.200000 0.0453784 0.275946 0.291718 -0.203922 0.0469014 0.280266 0.295710 -0.207843 0.0484450 0.284570 0.299680 -0.211765 0.0500091 0.288857 0.303627 -0.215686 0.0515937 0.293128 0.307552 -0.219608 0.0531985 0.297384 0.311455 -0.223529 0.0548235 0.301625 0.315338 -0.227451 0.0564686 0.305851 0.319201 -0.231373 0.0581337 0.310063 0.323043 -0.235294 0.0598187 0.314260 0.326866 -0.239216 0.0615234 0.318443 0.330670 -0.243137 0.0632478 0.322613 0.334456 -0.247059 0.0649918 0.326769 0.338223 -0.250980 0.0667553 0.330911 0.341972 -0.254902 0.0685382 0.335041 0.345703 -0.258824 0.0703403 0.339159 0.349418 -0.262745 0.0721617 0.343264 0.353115 -0.266667 0.0740022 0.347356 0.356797 -0.270588 0.0758618 0.351437 0.360461 -0.274510 0.0777403 0.355505 0.364110 -0.278431 0.0796377 0.359563 0.367744 -0.282353 0.0815539 0.363608 0.371362 -0.286275 0.0834889 0.367643 0.374965 -0.290196 0.0854424 0.371666 0.378553 -0.294118 0.0874146 0.375679 0.382127 -0.298039 0.0894052 0.379681 0.385686 -0.301961 0.0914143 0.383672 0.389231 -0.305882 0.0934417 0.387653 0.392763 -0.309804 0.0954873 0.391624 0.396281 -0.313725 0.0975512 0.395585 0.399786 -0.317647 0.0996332 0.399536 0.403277 -0.321569 0.101733 0.403477 0.406756 -0.325490 0.103851 0.407409 0.410222 -0.329412 0.105987 0.411331 0.413676 -0.333333 0.108141 0.415244 0.417117 -0.337255 0.110313 0.419147 0.420546 -0.341176 0.112503 0.423042 0.423963 -0.345098 0.114710 0.426927 0.427368 -0.349020 0.116935 0.430804 0.430762 -0.352941 0.119177 0.434672 0.434144 -0.356863 0.121437 0.438532 0.437515 -0.360784 0.123714 0.442383 0.440875 -0.364706 0.126009 0.446225 0.444224 -0.368627 0.128321 0.450060 0.447563 -0.372549 0.130650 0.453886 0.450890 -0.376471 0.132997 0.457704 0.454207 -0.380392 0.135360 0.461514 0.457514 -0.384314 0.137741 0.465317 0.460811 -0.388235 0.140139 0.469111 0.464097 -0.392157 0.142554 0.472898 0.467374 -0.396078 0.144986 0.476678 0.470641 -0.400000 0.147435 0.480450 0.473898 -0.403922 0.149900 0.484214 0.477145 -0.407843 0.152383 0.487972 0.480383 -0.411765 0.154882 0.491722 0.483612 -0.415686 0.157398 0.495465 0.486831 -0.419608 0.159931 0.499200 0.490042 -0.423529 0.162480 0.502929 0.493243 -0.427451 0.165046 0.506651 0.496436 -0.431373 0.167628 0.510366 0.499619 -0.435294 0.170227 0.514075 0.502794 -0.439216 0.172842 0.517776 0.505961 -0.443137 0.175474 0.521472 0.509119 -0.447059 0.178122 0.525160 0.512269 -0.450980 0.180787 0.528842 0.515410 -0.454902 0.183467 0.532518 0.518543 -0.458824 0.186164 0.536187 0.521668 -0.462745 0.188877 0.539850 0.524785 -0.466667 0.191606 0.543507 0.527895 -0.470588 0.194351 0.547158 0.530996 -0.474510 0.197113 0.550803 0.534090 -0.478431 0.199890 0.554441 0.537176 -0.482353 0.202684 0.558074 0.540254 -0.486275 0.205493 0.561701 0.543325 -0.490196 0.208318 0.565322 0.546388 -0.494118 0.211159 0.568937 0.549444 -0.498039 0.214016 0.572547 0.552493 -0.501961 0.216889 0.576150 0.555535 -0.505882 0.219777 0.579748 0.558569 -0.509804 0.222681 0.583341 0.561597 -0.513725 0.225601 0.586928 0.564617 -0.517647 0.228536 0.590510 0.567631 -0.521569 0.231487 0.594086 0.570638 -0.525490 0.234454 0.597657 0.573638 -0.529412 0.237436 0.601222 0.576631 -0.533333 0.240434 0.604782 0.579618 -0.537255 0.243447 0.608337 0.582598 -0.541176 0.246476 0.611887 0.585571 -0.545098 0.249520 0.615431 0.588538 -0.549020 0.252579 0.618971 0.591499 -0.552941 0.255654 0.622505 0.594453 -0.556863 0.258744 0.626035 0.597401 -0.560784 0.261849 0.629559 0.600343 -0.564706 0.264970 0.633079 0.603279 -0.568627 0.268105 0.636594 0.606208 -0.572549 0.271256 0.640103 0.609132 -0.576471 0.274422 0.643608 0.612049 -0.580392 0.277603 0.647109 0.614961 -0.584314 0.280800 0.650604 0.617867 -0.588235 0.284011 0.654095 0.620766 -0.592157 0.287237 0.657581 0.623661 -0.596078 0.290478 0.661063 0.626549 -0.600000 0.293735 0.664540 0.629431 -0.603922 0.297006 0.668012 0.632308 -0.607843 0.300292 0.671480 0.635180 -0.611765 0.303593 0.674944 0.638045 -0.615686 0.306909 0.678403 0.640906 -0.619608 0.310239 0.681857 0.643761 -0.623529 0.313585 0.685308 0.646610 -0.627451 0.316945 0.688754 0.649454 -0.631373 0.320320 0.692195 0.652293 -0.635294 0.323709 0.695633 0.655126 -0.639216 0.327114 0.699066 0.657954 -0.643137 0.330533 0.702495 0.660777 -0.647059 0.333966 0.705919 0.663595 -0.650980 0.337414 0.709340 0.666408 -0.654902 0.340877 0.712756 0.669215 -0.658824 0.344354 0.716169 0.672018 -0.662745 0.347846 0.719577 0.674816 -0.666667 0.351352 0.722981 0.677608 -0.670588 0.354873 0.726381 0.680396 -0.674510 0.358408 0.729778 0.683179 -0.678431 0.361958 0.733170 0.685957 -0.682353 0.365522 0.736559 0.688730 -0.686275 0.369100 0.739943 0.691498 -0.690196 0.372693 0.743324 0.694262 -0.694118 0.376300 0.746701 0.697021 -0.698039 0.379921 0.750074 0.699775 -0.701961 0.383557 0.753443 0.702525 -0.705882 0.387207 0.756808 0.705270 -0.709804 0.390871 0.760170 0.708010 -0.713725 0.394549 0.763528 0.710746 -0.717647 0.398242 0.766882 0.713477 -0.721569 0.401948 0.770233 0.716204 -0.725490 0.405669 0.773580 0.718927 -0.729412 0.409404 0.776923 0.721645 -0.733333 0.413153 0.780263 0.724358 -0.737255 0.416916 0.783599 0.727068 -0.741176 0.420693 0.786932 0.729773 -0.745098 0.424484 0.790261 0.732473 -0.749020 0.428289 0.793587 0.735170 -0.752941 0.432108 0.796909 0.737862 -0.756863 0.435940 0.800228 0.740550 -0.760784 0.439787 0.803543 0.743234 -0.764706 0.443648 0.806855 0.745914 -0.768627 0.447523 0.810164 0.748589 -0.772549 0.451411 0.813469 0.751261 -0.776471 0.455314 0.816770 0.753928 -0.780392 0.459230 0.820069 0.756592 -0.784314 0.463160 0.823364 0.759251 -0.788235 0.467103 0.826656 0.761906 -0.792157 0.471061 0.829944 0.764558 -0.796078 0.475032 0.833230 0.767205 -0.800000 0.479017 0.836512 0.769849 -0.803922 0.483016 0.839790 0.772489 -0.807843 0.487028 0.843066 0.775124 -0.811765 0.491054 0.846339 0.777756 -0.815686 0.495094 0.849608 0.780385 -0.819608 0.499147 0.852874 0.783009 -0.823529 0.503214 0.856137 0.785630 -0.827451 0.507294 0.859397 0.788247 -0.831373 0.511388 0.862654 0.790860 -0.835294 0.515496 0.865908 0.793469 -0.839216 0.519617 0.869158 0.796075 -0.843137 0.523751 0.872406 0.798677 -0.847059 0.527899 0.875651 0.801276 -0.850980 0.532061 0.878892 0.803871 -0.854902 0.536236 0.882131 0.806462 -0.858824 0.540424 0.885367 0.809050 -0.862745 0.544626 0.888599 0.811634 -0.866667 0.548841 0.891829 0.814215 -0.870588 0.553070 0.895056 0.816792 -0.874510 0.557311 0.898280 0.819366 -0.878431 0.561567 0.901501 0.821936 -0.882353 0.565835 0.904719 0.824503 -0.886275 0.570117 0.907935 0.827066 -0.890196 0.574412 0.911147 0.829626 -0.894118 0.578721 0.914357 0.832183 -0.898039 0.583042 0.917564 0.834736 -0.901961 0.587377 0.920768 0.837286 -0.905882 0.591725 0.923969 0.839833 -0.909804 0.596087 0.927168 0.842376 -0.913725 0.600461 0.930363 0.844916 -0.917647 0.604849 0.933556 0.847453 -0.921569 0.609249 0.936747 0.849986 -0.925490 0.613663 0.939934 0.852516 -0.929412 0.618090 0.943119 0.855044 -0.933333 0.622530 0.946301 0.857567 -0.937255 0.626984 0.949481 0.860088 -0.941176 0.631450 0.952658 0.862606 -0.945098 0.635929 0.955832 0.865120 -0.949020 0.640421 0.959003 0.867631 -0.952941 0.644927 0.962172 0.870139 -0.956863 0.649445 0.965339 0.872644 -0.960784 0.653976 0.968502 0.875146 -0.964706 0.658521 0.971664 0.877645 -0.968627 0.663078 0.974822 0.880141 -0.972549 0.667648 0.977978 0.882634 -0.976471 0.672231 0.981132 0.885124 -0.980392 0.676827 0.984283 0.887610 -0.984314 0.681436 0.987431 0.890094 -0.988235 0.686058 0.990577 0.892575 -0.992157 0.690692 0.993721 0.895053 -0.996078 0.695340 0.996862 0.897528 -1.000000 0.700000 1.000000 0.900000 -END_DATA -- cgit v1.2.3