57 double& ymin,
double& ymax,
int& nypts,
int& nlpts,
58 double* parlims, QVector< US_ModelRecord >& mrecs )
62 int stype = parlims[ 4 ];
63 int attr_x = ( stype >> 6 ) & 7;
64 int attr_y = ( stype >> 3 ) & 7;
68 double prng = (double)( nlpts - 1 );
69 double yrng = (double)( nypts - 1 );
70 double xrng = xmax -
xmin;
71 double xinc = xrng / prng;
72 if ( parlims[ 0 ] < 0.0 )
80 double yslo = parlims[ 0 ];
81 double yshi = parlims[ 1 ];
82 double yelo = parlims[ 2 ];
83 double yehi = parlims[ 3 ];
84 double zval = parlims[ 5 ];
85 double ysinc = ( yshi - yslo ) / yrng;
86 double yeinc = ( yehi - yelo ) / yrng;
90 int mndx = mrecs.size();
91 int nmodl = nypts * nypts;
94 for (
int ii = 0; ii < nypts; ii++ )
98 for (
int jj = 0; jj < nypts; jj++ )
102 double yinc = ( yend - ystr ) / prng;
107 for (
int kk = 0; kk < nlpts; kk++ )
109 isol.
x = xval * xscl;
110 isol.
y = yval * yscl;
121 mrec.
par2 = ( yend - ystr ) / xrng;
138 double& ymin,
double& ymax,
int& nypts,
int& nlpts,
139 double* parlims, QVector< US_ModelRecord >& mrecs )
141 if ( parlims[ 0 ] < 0.0 )
143 parlims[ 0 ] = 0.001;
148 double p1lo = parlims[ 0 ];
149 double p1up = parlims[ 1 ];
150 double p2lo = parlims[ 2 ];
151 double p2up = parlims[ 3 ];
152 int stype = parlims[ 4 ];
153 double zval = parlims[ 5 ];
156 int attr_x = ( stype >> 6 ) & 7;
157 int attr_y = ( stype >> 3 ) & 7;
161 double xrng = xmax -
xmin;
162 double p1llg = log( p1lo );
163 double p1ulg = log( p1up );
164 double prng = (double)( nlpts - 1 );
165 double yrng = (double)( nypts - 1 );
166 double p1inc = ( p1ulg - p1llg ) / yrng;
167 double p2inc = ( p2up - p2lo ) / yrng;
168 double xinc = 1.0 / prng;
172 double ydif = ymax -
ymin;
178 double p1vlg = p1llg;
179 int mndx = mrecs.size();
180 int nmodl = nypts * nypts;
182 for (
int ii = 0; ii < nypts; ii++ )
184 double p1val = exp( p1vlg );
185 double p1fac = sqrt( 2.0 * p1val );
188 for (
int jj = 0; jj < nypts; jj++ )
198 for (
int kk = 0; kk < nlpts; kk++ )
200 double efac = 0.5 * erf( ( xoff - p2val ) / p1fac ) + 0.5;
201 yval = ystr + ydif * efac;
202 xval = xmin + xoff * xrng;
207 isol.
x = xval * xscl;
208 isol.
y = yval * yscl;
232 double& ymin,
double& ymax,
int& nypts,
int& nlpts,
233 double* parlims, QVector< US_ModelRecord >& mrecs )
238 double yrng = (double)( nypts - 1 );
239 double prng = (double)( nlpts - 1 );
240 double xinc = ( xmax -
xmin ) / prng;
241 int stype = parlims[ 4 ];
244 if ( parlims[ 0 ] < 0.0 )
252 int attr_x = ( stype >> 6 ) & 7;
253 int attr_y = ( stype >> 3 ) & 7;
254 double yval = parlims[ 0 ];
257 double yinc = ( parlims[ 1 ] - yval ) / yrng;
258 double zval = parlims[ 5 ];
259 int mndx = mrecs.size();
262 for (
int ii = 0; ii < nypts; ii++ )
269 for (
int kk = 0; kk < nlpts; kk++ )
271 isol.
x = xval * xscl;
272 isol.
y = yval * yscl;
294 double& ymin,
double& ymax,
int& nypts,
int& nlpts,
295 double* parlims, QVector< US_ModelRecord >& mrecs )
301 int stype = parlims[ 4 ];
302 double zval = parlims[ 5 ];
303 int lyptx = nypts - 1;
306 int attr_x = ( stype >> 6 ) & 7;
307 int attr_y = ( stype >> 3 ) & 7;
311 double xrng = xmax -
xmin;
312 double xterm = log10( 5.0 ) / log10( qMax( 1.00001, xrng * 0.5 ) );
313 double lprng = (double)( nlpts - 1 );
314 double yprng = (double)( lyptx );
315 double xinc = xrng / lprng;
318 double yrng = ymax -
ymin;
319 double yinc = yrng / yprng;
321 double bmin = p1lo * xterm;
322 double bmax = p1up * xterm;
323 double amax = pow( xmin, bmax ) * ( yrng - yinc );
324 double amin = amax / yprng;
326 double cmax = ymin + yinc;
327 double ainc = ( amax - amin ) / yprng;
328 double binc = ( bmax - bmin ) / yprng;
329 double cinc = ( cmax - cmin ) / yprng;
332 DbgLv(1) <<
"MR: p1l p1u" << p1lo << p1up;
334 if ( parlims[ 0 ] > 0.0 )
342 double abest = parlims[ 8 ];
343 double bbest = parlims[ 9 ];
344 double cbest = parlims[ 10 ];
345 amin = qMin( abest, amin );
346 cmin = qMin( cbest, cmin );
347 ainc = ( amax - amin ) / yprng;
348 binc = ( bmax - bmin ) / yprng;
349 cinc = ( cmax - cmin ) / yprng;
351 double vbx = ( abest - amin ) / ainc;
352 double vbi = qFloor( vbx );
353 double vbf = vbx - vbi;
354 DbgLv(1) <<
"MR: NEW abest vbx vbi vbf" << abest << vbx << vbi << vbf;
357 else if ( vbf < 0.5 )
358 amin = abest - ainc * vbi;
360 amin = amin - ainc * vbf;
362 vbx = ( bbest - bmin ) / binc;
365 DbgLv(1) <<
"MR: NEW bbest vbx vbi vbf" << bbest << vbx << vbi << vbf;
366 DbgLv(1) <<
"MR: OLD bmin bmax binc" << bmin << bmax << binc;
369 else if ( vbf < 0.5 )
370 bmin = bbest - binc * vbi;
372 bmin = bmin - binc * vbf;
374 vbx = ( cbest - cmin ) / cinc;
377 DbgLv(1) <<
"MR: NEW cbest vbx vbi vbf" << cbest << vbx << vbi << vbf;
380 else if ( vbf < 0.5 )
381 cmin = cbest - cinc * vbi;
383 cmin = cmin - cinc * vbf;
385 amax = amin + ainc * yprng;
386 bmax = bmin + binc * yprng;
387 cmax = cmin + cinc * yprng;
388 DbgLv(1) <<
"MR: NEW amin amax ainc" << amin << amax << ainc;
389 DbgLv(1) <<
"MR: NEW bmin bmax binc" << bmin << bmax << binc;
390 DbgLv(1) <<
"MR: NEW cmin cmax cinc" << cmin << cmax << cinc;
393 QVector< double > avec;
394 QVector< double > bvec;
395 QVector< double > cvec;
396 avec.resize( nypts );
397 bvec.resize( nypts );
398 cvec.resize( nypts );
400 for (
int jj = 0; jj < nypts; jj++ )
402 double poff = (double)jj;
403 avec[ jj ] = amin + ainc * poff;
404 bvec[ jj ] = bmin + binc * poff;
405 cvec[ jj ] = cmin + cinc * poff;
408 DbgLv(1) <<
"MR: NEWER bmin bmax" << bmin << bmax;
409 double* avals = avec.data();
410 double* bvals = bvec.data();
411 double* cvals = cvec.data();
412 parlims[ 0 ] = avals[ 0 ];
413 parlims[ 1 ] = avals[ lyptx ];
414 parlims[ 2 ] = bvals[ 0 ];
415 parlims[ 3 ] = bvals[ lyptx ];
416 parlims[ 6 ] = cvals[ 0 ];
417 parlims[ 7 ] = cvals[ lyptx ];
478 int mndx = mrecs.size();
479 int nmodl = nypts * nypts * nypts;
480 double yvmin = 1e+99;
481 double yvmax = -1e+99;
483 for (
int ii = 0; ii < nypts; ii++ )
485 double aval = avals[ ii ];
487 for (
int jj = 0; jj < nypts; jj++ )
489 double bval = bvals[ jj ];
491 for (
int kk = 0; kk < nypts; kk++ )
493 double cval = cvals[ kk ];
496 mrec.
str_y = aval * pow( xval, bval ) + cval;
500 DbgLv(1) <<
"MR: a b c" << aval << bval << cval
501 <<
" ii jj kk" << ii << jj << kk;
503 for (
int ll = 0; ll < nlpts; ll++ )
505 yval = aval * pow( xval, bval ) + cval;
506 if(ll<4 || (ll+4)>nlpts)
507 DbgLv(1) <<
"MR: ll" << ll <<
"x y" << xval << yval;
509 isol.
x = xval * xscl;
510 isol.
y = yval * yscl;
524 yvmin = qMin( yvmin, qMin( mrec.str_y, mrec.end_y ) );
525 yvmax = qMax( yvmax, qMax( mrec.str_y, mrec.end_y ) );
531 DbgLv(1) <<
"MR: yvmin yvmax" << yvmin << yvmax;
538 QVector< US_ModelRecord >& mrecs, QString& descr,
int& ctype,
539 double& xmin,
double& xmax,
double& ymin,
double& ymax,
int& stype )
545 int attr_x = ( stype >> 6 ) & 7;
546 int attr_y = ( stype >> 3 ) & 7;
549 bool old_vers =
false;
550 const double ov = 1.0;
553 sctypes <<
"SL" <<
"IS" <<
"DS" <<
"All" <<
"HL" <<
"2O";
556 while ( ! xml.atEnd() )
559 QString xmlname = xml.name().toString();
561 if ( xml.isStartElement() )
563 QXmlStreamAttributes attrs = xml.attributes();
565 if ( xmlname ==
"modelrecords" )
567 double vers = attrs.value(
"version" ).toString().toDouble();
568 old_vers = ( vers <= ov );
569 QString s_type1 = attrs.value(
"type" ).toString();
570 QString s_type = attrs.value(
"curve_type" ).toString();
571 s_type = s_type.isEmpty() ? s_type1 : s_type;
572 ctype = sctypes.contains( s_type ) ?
576 ctype = ( ctype == 2 ) ?
CTYPE_DS : ctype;
577 ctype = ( ctype == 1 ) ?
CTYPE_IS : ctype;
578 ctype = ( ctype == 0 ) ?
CTYPE_SL : ctype;
581 QString xlo = attrs.value(
"xmin" ).toString();
582 QString xhi = attrs.value(
"xmax" ).toString();
583 QString ylo = attrs.value(
"ymin" ).toString();
584 QString yhi = attrs.value(
"ymax" ).toString();
585 QString slo = attrs.value(
"smin" ).toString();
586 QString shi = attrs.value(
"smax" ).toString();
587 QString klo = attrs.value(
"kmin" ).toString();
588 QString khi = attrs.value(
"kmax" ).toString();
589 QString s_stype = attrs.value(
"solute_type" ).toString();
591 xlo = xlo.isEmpty() ? slo : xlo;
592 xhi = xhi.isEmpty() ? shi : xhi;
593 ylo = ylo.isEmpty() ? klo : ylo;
594 yhi = yhi.isEmpty() ? khi : yhi;
595 xmin = xlo.toDouble();
596 xmax = xhi.toDouble();
597 ymin = ylo.toDouble();
598 ymax = yhi.toDouble();
599 nisols = attrs.value(
"curve_points" ).toString().toInt();
607 descr = attrs.value(
"description" ).toString();
608 QString s_eID = attrs.value(
"editID" ).toString();
609 QString s_mID = attrs.value(
"modelID" ).toString();
610 mrec.
mrecGUID = attrs.value(
"mrecGUID" ).toString();
611 mrec.
editGUID = attrs.value(
"editGUID" ).toString();
612 mrec.
modelGUID = attrs.value(
"modelGUID" ).toString();
613 mrec.
editID = s_eID.isEmpty() ? 0 : s_eID.toInt();
614 mrec.
modelID = s_mID.isEmpty() ? 0 : s_mID.toInt();
617 else if ( xmlname ==
"modelrecord" )
619 QString s_ctype = attrs.value(
"type" ).toString();
620 mrec.
ctype = sctypes.contains( s_ctype ) ?
628 mrec.
taskx = attrs.value(
"taskx" ).toString().toInt();
629 QString stry = attrs.value(
"start_y" ).toString();
630 QString endy = attrs.value(
"end_y" ).toString();
631 QString strk = attrs.value(
"start_k" ).toString();
632 QString endk = attrs.value(
"end_k" ).toString();
633 mrec.
str_y = stry.isEmpty() ? strk.toDouble()
635 mrec.
end_y = endy.isEmpty() ? endk.toDouble()
637 mrec.
par1 = attrs.value(
"par1" ).toString().toDouble();
638 mrec.
par2 = attrs.value(
"par2" ).toString().toDouble();
639 mrec.
par3 = attrs.value(
"par3" ).toString().toDouble();
640 mrec.
rmsd = attrs.value(
"rmsd" ).toString().toDouble();
641 QString s_cvpt = attrs.value(
"curve_points" ).toString();
642 int kisols = s_cvpt.isEmpty() ? nisols : s_cvpt.toInt();
650 QString s_mID = attrs.value(
"modelID" ).toString();
651 mrec.
modelID = s_mID.isEmpty() ? 0 : s_mID.toInt();
652 mrec.
modelGUID = attrs.value(
"modelGUID" ).toString();
658 ymin = qMin( ymin, mrec.
str_y );
659 ymax = qMax( ymax, mrec.
end_y );
662 else if ( xmlname ==
"c_solute" )
665 QString xval = attrs.value(
"x" ).toString();
666 QString sval = attrs.value(
"s" ).toString();
667 QString yval = attrs.value(
"y" ).toString();
668 QString kval = attrs.value(
"k" ).toString();
669 csolute.
x = sval.isEmpty() ? xval.toDouble()
671 csolute.
y = kval.isEmpty() ? yval.toDouble()
673 csolute.
z = attrs.value(
"z" ).toString().toDouble();
674 csolute.
c = attrs.value(
"c" ).toString().toDouble();
675 xmin = qMin( xmin, csolute.
x );
676 xmax = qMax( xmax, csolute.
x );
677 ymin = qMin( ymin, csolute.
y );
678 ymax = qMax( ymax, csolute.
y );
687 else if ( xml.isEndElement() && xmlname ==
"modelrecord" )
699 QVector< US_ModelRecord >& mrecs, QString& descr,
int& ctype,
700 double& xmin,
double& xmax,
double& ymin,
double& ymax,
int& stype )
703 int nmrecs = mrecs.size();
713 int attr_x = ( stype >> 6 ) & 7;
714 int attr_y = ( stype >> 3 ) & 7;
717 xml.setAutoFormatting(
true );
718 xml.writeStartDocument(
"1.0" );
719 xml.writeComment(
"DOCTYPE PcsaModelRecords" );
720 xml.writeCharacters(
"\n" );
721 xml.writeStartElement(
"modelrecords" );
722 xml.writeAttribute(
"version",
"1.2" );
723 xml.writeAttribute(
"description", descr );
725 xml.writeAttribute(
"xmin", QString::number( xmin ) );
726 xml.writeAttribute(
"xmax", QString::number( xmax ) );
727 xml.writeAttribute(
"ymin", QString::number( ymin ) );
728 xml.writeAttribute(
"ymax", QString::number( ymax ) );
729 xml.writeAttribute(
"curve_points", QString::number( nisols ) );
730 xml.writeAttribute(
"solute_type",
stype_text( stype ) );
732 xml.writeAttribute(
"editID", QString::number( mrec.
editID ) );
734 xml.writeAttribute(
"modelID", QString::number( mrec.
modelID ) );
736 xml.writeAttribute(
"mrecGUID", mrec.
mrecGUID );
738 xml.writeAttribute(
"editGUID", mrec.
editGUID );
740 xml.writeAttribute(
"modelGUID", mrec.
modelGUID );
742 for (
int mr = 0; mr < nmrecs; mr++ )
747 xml.writeStartElement(
"modelrecord" );
748 xml.writeAttribute(
"taskx", QString::number( mrec.
taskx ) );
750 xml.writeAttribute(
"start_y", QString::number( mrec.
str_y ) );
751 xml.writeAttribute(
"end_y", QString::number( mrec.
end_y ) );
752 xml.writeAttribute(
"par1", QString::number( mrec.
par1 ) );
753 xml.writeAttribute(
"par2", QString::number( mrec.
par2 ) );
754 xml.writeAttribute(
"par3", QString::number( mrec.
par3 ) );
755 xml.writeAttribute(
"rmsd", QString::number( mrec.
rmsd ) );
756 if ( kisols != nisols )
757 xml.writeAttribute(
"curve_points", QString::number( kisols ) );
762 xml.writeAttribute(
"editID", QString::number( mrec.
editID ) );
764 xml.writeAttribute(
"mrecGUID", mrec.
mrecGUID );
766 xml.writeAttribute(
"editGUID", mrec.
editGUID );
770 xml.writeAttribute(
"modelID", QString::number( mrec.
modelID ) );
772 xml.writeAttribute(
"modelGUID", mrec.
modelGUID );
774 for (
int cc = 0; cc < ncsols; cc++ )
776 xml.writeStartElement(
"c_solute" );
777 double xval = mrec.
csolutes[ cc ].x * xscl;
778 double yval = mrec.
csolutes[ cc ].y * yscl;
779 xml.writeAttribute(
"x", QString::number( xval ) );
780 xml.writeAttribute(
"y", QString::number( yval ) );
781 xml.writeAttribute(
"z", QString::number( mrec.
csolutes[ cc ].z ) );
782 xml.writeAttribute(
"c", QString::number( mrec.
csolutes[ cc ].c ) );
783 xml.writeEndElement();
786 xml.writeEndElement();
789 xml.writeEndElement();
790 xml.writeEndDocument();
798 int& ctype,
double& minyv,
double& maxyv,
799 double& minp1,
double& maxp1,
double& minp2,
double& maxp2,
800 double& minp3,
double& maxp3 )
806 double m0p1 = mrecs[ 0 ].par1;
807 double m0p2 = mrecs[ 0 ].par2;
812 bool ln_type =
false;
817 m0p1 = mrecs[ 0 ].str_y;
818 m0p2 = mrecs[ 0 ].end_y;
819 m0p1l = ( m0p1 > maxyv ) ? m0p1 : ( m0p1 * 1.0001 );
820 m0p1h = ( m0p1 < minyv ) ? m0p1 : ( m0p1 * 0.9991 );
821 m0p2l = ( m0p2 > maxyv ) ? m0p2 : ( m0p2 * 1.0001 );
822 m0p2h = ( m0p2 < minyv ) ? m0p2 : ( m0p2 * 0.9991 );
827 double dif1 = m0p1 - 0.001;
828 double dif2 = m0p1 - 0.500;
829 double dif3 = m0p2 - 0.000;
830 double dif4 = m0p2 - 1.000;
831 m0p1l = ( dif1 > 1.e-8 ) ? m0p1 : 0.002;
832 m0p1h = ( dif2 < -1e-8 ) ? m0p1 : 0.499;
833 m0p2l = ( dif3 > 1.e-8 ) ? m0p2 : 0.001;
834 m0p2h = ( dif4 < -1e-8 ) ? m0p2 : 0.999;
845 efrac = mrecs[ 0 ].variance;
848 int nmrec = mrecs.size();
849 int nelite = qRound( efrac * nmrec );
850 int maxel = nmrec / 2;
851 int minel = qMin( maxel, 4 );
852 nelite = qMin( nelite, maxel );
853 nelite = qMax( nelite, minel );
862 for (
int ii = 0; ii < nmrec; ii++ )
864 double str_y = mrecs[ ii ].str_y;
865 double end_y = mrecs[ ii ].end_y;
866 double par1 = ln_type ? str_y : mrecs[ ii ].par1;
867 double par2 = ln_type ? end_y : mrecs[ ii ].par2;
868 double par3 = ln_type ? 0.0 : mrecs[ ii ].par3;
869 if(ii<3||(ii+4)>nelite)
870 DbgLv(1) <<
" ElLim: ii" << ii <<
"par1 par2 par3" << par1 << par2 << par3
871 <<
"str_y end_y" << str_y << end_y <<
"rmsd" << mrecs[ii].rmsd;
872 minyv = qMin( minyv, qMin( str_y, end_y ) );
873 maxyv = qMax( maxyv, qMax( str_y, end_y ) );
874 minp1 = qMin( minp1, par1 );
875 maxp1 = qMax( maxp1, par1 );
876 minp2 = qMin( minp2, par2 );
877 maxp2 = qMax( maxp2, par2 );
878 minp3 = qMin( minp3, par3 );
879 maxp3 = qMax( maxp3, par3 );
886 DbgLv(1) <<
" ElLim: minp1 maxp1 m0p1l m0p1h" << minp1 << maxp1 << m0p1l
887 << m0p1h <<
"minp2 maxp2 m0p2l m0p2h" << minp2 << maxp2 << m0p2l << m0p2h
888 <<
"minyv maxyv" << minyv << maxyv;
890 minp1 < m0p1l && maxp1 > m0p1h &&
891 minp2 < m0p2l && maxp2 > m0p2h )
901 double& ymin,
double& ymax,
int& nypts,
int& nlpts,
double* parlims,
902 QVector< US_ModelRecord >&mrecs )
905 int nmrec = mrecs.size();
911 double minp1 = LnType ? minyv : ( SgType ? 0.500 : 1e+99 );
912 double maxp1 = LnType ? maxyv : ( SgType ? 0.001 : -1e+99 );
913 double minp2 = LnType ? minyv : ( SgType ? 1.0 : 1e+99 );
914 double maxp2 = LnType ? maxyv : ( SgType ? 0.0 : -1e+99 );
915 double minp3 = 1e+99;
916 double maxp3 = -1e+99;
920 minp1, maxp1, minp2, maxp2, minp3, maxp3 );
924 double p1best = LnType ? mrecs[ 0 ].str_y : mrecs[ 0 ].par1;
925 double p2best = LnType ? mrecs[ 0 ].end_y : mrecs[ 0 ].par2;
926 double p3best = mrecs[ 0 ].par3;
927 double yprng = (double)( nypts - 1 );
928 double p1rng = maxp1 - minp1;
929 double p2rng = maxp2 - minp2;
930 double p1inc = p1rng / yprng;
931 double p2inc = p2rng / yprng;
932 double p1dif = qRound( ( p1best - minp1 ) / p1inc ) * p1inc;
933 double p2dif = qRound( ( p2best - minp2 ) / p2inc ) * p2inc;
939 minp1 = p1best - p1dif;
940 minp2 = p2best - p2dif;
941 maxp1 = minp1 + p1inc * yprng;
942 maxp2 = minp2 + p2inc * yprng;
950 parlims[ 0 ] = qMax( ymin, minp1 );
951 parlims[ 1 ] = qMin( ymax, maxp1 );
952 parlims[ 2 ] = qMax( ymin, minp2 );
953 parlims[ 3 ] = qMin( ymax, maxp2 );
956 parlims[ 8 ] = p1best;
957 parlims[ 9 ] = p2best;
967 nypts, nlpts, parlims, mrecs );
973 nypts, nlpts, parlims, mrecs );
980 parlims[ 0 ] = qMax( 0.001, minp1 );
981 parlims[ 1 ] = qMin( 0.500, maxp1 );
982 parlims[ 2 ] = qMax( 0.000, minp2 );
983 parlims[ 3 ] = qMin( 1.000, maxp2 );
986 parlims[ 8 ] = p1best;
987 parlims[ 9 ] = p2best;
992 nypts, nlpts, parlims, mrecs );
998 if ( minp1 == maxp1 )
1003 if ( minp2 == maxp2 )
1008 if ( minp3 == maxp3 )
1013 parlims[ 0 ] = minp1;
1014 parlims[ 1 ] = maxp1;
1015 parlims[ 2 ] = minp2;
1016 parlims[ 3 ] = maxp2;
1017 parlims[ 6 ] = minp3;
1018 parlims[ 7 ] = maxp3;
1019 parlims[ 8 ] = p1best;
1020 parlims[ 9 ] = p2best;
1021 parlims[ 10 ] = p3best;
1024 DbgLv(1) <<
"RF: 2ord: nmrec" << nmrec <<
"ymin ymax" << ymin << ymax
1025 <<
"minp1 maxp1" << minp1 << maxp1 <<
"minp2 maxp2" << minp2 << maxp2
1026 <<
"parlims0" << parlims[0];
1029 nypts, nlpts, parlims, mrecs );
1030 DbgLv(1) <<
"RF: 2ord: parlims1-4" << parlims[0] << parlims[1]
1031 << parlims[2] << parlims[3];
1048 i_ctype = ( s_ctype ==
"SL" ) ?
CTYPE_SL : i_ctype;
1049 i_ctype = ( s_ctype ==
"IS" ) ?
CTYPE_IS : i_ctype;
1050 i_ctype = ( s_ctype ==
"DS" ) ?
CTYPE_DS : i_ctype;
1051 i_ctype = ( s_ctype ==
"HL" ) ?
CTYPE_HL : i_ctype;
1052 i_ctype = ( s_ctype ==
"2O" ) ?
CTYPE_2O : i_ctype;
1053 i_ctype = ( s_ctype ==
"All" ) ?
CTYPE_ALL : i_ctype;
1061 QString s_ctype =
"None";
1062 s_ctype = ( i_ctype ==
CTYPE_SL ) ?
"SL" : s_ctype;
1063 s_ctype = ( i_ctype ==
CTYPE_IS ) ?
"IS" : s_ctype;
1064 s_ctype = ( i_ctype ==
CTYPE_DS ) ?
"DS" : s_ctype;
1065 s_ctype = ( i_ctype ==
CTYPE_HL ) ?
"HL" : s_ctype;
1066 s_ctype = ( i_ctype ==
CTYPE_2O ) ?
"2O" : s_ctype;
1067 s_ctype = ( i_ctype ==
CTYPE_ALL ) ?
"All" : s_ctype;
1075 QString snum = QString( s_stype ).section(
".", 0, 0 );
1076 int i_stype = ( snum.mid( 0, 1 ).toInt() << 6 )
1077 + ( snum.mid( 1, 1 ).toInt() << 3 )
1078 + ( snum.mid( 2, 1 ).toInt() );
1086 const char atyp[] = {
's',
'k',
'w',
'v',
'd' };
1087 int ixv = ( i_stype >> 6 ) & 7;
1088 int iyv = ( i_stype >> 3 ) & 7;
1089 int izv = i_stype & 7;
1090 QString s_stype = QString().sprintf(
"%03o", i_stype ) +
"."
1091 + QString( atyp[ ixv ] )
1092 + QString( atyp[ iyv ] )
1093 + QString( atyp[ izv ] );