--- ray/src/util/rfluxmtx.c 2021/12/15 01:38:50 2.54 +++ ray/src/util/rfluxmtx.c 2024/02/08 02:26:01 2.56 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rfluxmtx.c,v 2.54 2021/12/15 01:38:50 greg Exp $"; +static const char RCSid[] = "$Id: rfluxmtx.c,v 2.56 2024/02/08 02:26:01 greg Exp $"; #endif /* * Calculate flux transfer matrix or matrices using rcontrib @@ -41,6 +41,7 @@ char *shirchiufn = "disk2square.cal"; char *kfullfn = "klems_full.cal"; char *khalffn = "klems_half.cal"; char *kquarterfn = "klems_quarter.cal"; +char *ciefn = "cieskyscan.cal"; /* string indicating parameters */ const char PARAMSTART[] = "@rfluxmtx"; @@ -499,6 +500,14 @@ finish_receiver(void) calfn = kquarterfn; kquarterfn = NULL; binf = "kqbin"; nbins = "Nkqbins"; + } else if (!strcasecmp(curparams.hemis, "cie")) { + calfn = ciefn; ciefn = NULL; + sprintf(sbuf, "rNx=%g,rNy=%g,rNz=%g,Ux=%g,Uy=%g,Uz=%g,RHS=%c1", + curparams.nrm[0], curparams.nrm[1], curparams.nrm[2], + curparams.vup[0], curparams.vup[1], curparams.vup[2], + curparams.sign); + binv = "cbin"; + nbins = "Ncbins"; } else { fprintf(stderr, "%s: unrecognized hemisphere sampling: h=%s\n", progname, curparams.hemis); @@ -1283,11 +1292,21 @@ main(int argc, char *argv[]) yrs = argv[++a]; na = 0; continue; - case 'c': /* number of samples */ - sampcnt = atoi(argv[++a]); - if (sampcnt <= 0) - goto userr; - na = 0; /* we re-add this later */ + case 'c': /* spectral sampling or count */ + switch (argv[a][2]) { + case 's': + na = 2; + break; + case 'w': + na = 3; + break; + case '\0': + sampcnt = atoi(argv[++a]); + if (sampcnt <= 0) + goto userr; + na = 0; /* we re-add this later */ + break; + } continue; case 'I': /* only for pass-through mode */ case 'i':