21 for ( i=0; i<plot->
rows(); i++ ) {
23 for ( j=1, k=plot->rows()+i; j<plot->columns(); j++, k+=plot->rows() )
24 output <<
tab << (*plot)[k];
32 if ( filename.
length() < 1 )
return;
35 cout <<
"# Reading plot file: " << filename << endl;
37 ifstream fps(filename.
c_str());
38 if ( fps.fail() )
return;
46 while ( fps.getline(aline, 1024) && strncmp(aline,
"%%Title:", 8) ) ;
52 while ( fps.getline(aline, 1024) && strncmp(aline,
"/Data [", 7) ) ;
55 fps.getline(aline, 1024);
61 while ( fps.getline(aline, 1024) && aline[0] !=
']' ) {
63 cout <<
"DEBUG Bplot::Bplot: aline = \"" << aline <<
"\"" << endl;
67 if ( ncol < temp.size() ) ncol = temp.size();
72 cout <<
"Plot file: " << filename << endl;
73 cout <<
"Columns: " << ncol << endl;
74 cout <<
"Rows: " << nrow << endl;
78 initialize(1, nrow, ncol);
82 for ( i=0, label = labels; i<ncol; i++, label = label->
next ) {
86 cout <<
" " << *label;
97 while ( fps.getline(aline, 1024) && strncmp(aline,
"/Data [", 7) ) ;
100 fps.getline(aline, 1024);
104 while ( fps.getline(aline, 1024) && aline[0] !=
']' ) {
106 cout <<
"DEBUG Bplot::Bplot: aline = \"" << aline <<
"\"" << endl;
109 for ( j=0; j<ncol; j++ ) data[j*nrow+i] = temp[j];
117 double res(999), FSCsum(0), w, IVR;
118 double *s, *FSC, *DPR;
125 cout <<
"Resolution curves:" << endl;
126 cout <<
"s(1/A)\tRes(A)\t" << label;
127 if ( nc > 2 ) cout <<
"\tDPR";
130 for ( i=0; i<nr; i++ ) {
131 if ( i ) res = 1/s[i];
133 if ( label ==
"FSC" ) w *= 2.0*i;
135 cout << showpoint << fixed << setprecision(5) << setw(7) << s[i] <<
tab
136 << setprecision(3) << setw(7) << res <<
tab
137 << setw(7) << FSC[i];
138 if ( nc > 2 ) cout <<
tab << setw(7) << DPR[i];
142 if ( label ==
"FSC" ) IVR = pow(4.0*
M_PI/(3.0*FSCsum), 1.0/3.0);
143 else IVR = sqrt(
M_PI/FSCsum);
146 if ( fsccut || dprcut )
147 cout << endl <<
"Resolution estimates:" << endl;
149 if ( fsccut )
for ( i=0; i<4; i++ )
if ( fsccut[i] ) {
150 txt = label +
Bstring(fsccut[i],
"(%g): ") +
Bstring(1/
cut(1,fsccut[i],-1),
"%g A");
155 if ( dprcut )
for ( i=0; i<4; i++ )
if ( dprcut[i] ) {
161 txt =
Bstring(IVR,
"Information volume radius: %g A");
163 cout << txt << endl << endl;