Bsoft  2.1.0
Bernard's software package
bafm.cpp
Go to the documentation of this file.
1 
9 #include "rwimg.h"
10 #include "utilities.h"
11 #include "options.h"
12 #include "timer.h"
13 
14 // Declaration of global variables
15 extern int verbose; // Level of output to the screen
16 
17 // Function prototypes
19  double radius, double angle, double resolution);
20 Bplot* afm_simulate(Bimage* ptip, Bimage* p, double spring,
21  double modulus, double thick);
22 Bimage* afm_force_to_height(Bimage* pf, double force_step);
23 
24 /* Usage assistance */
25 const char* use[] = {
26 " ",
27 "Usage: bafm [options] input.map height.img",
28 "------------------------------------------",
29 "Simulates AFM imaging.",
30 "An optional force map is produced (where every 2D slice is a force profile ",
31 " at a cantilever height).",
32 "A set of height images is written.",
33 " ",
34 "Actions:",
35 "-invert Invert inside & outside (default not).",
36 " ",
37 "Parameters:",
38 "-verbose 7 Verbosity of output.",
39 "-sampling 1.5 Sampling (default 1 A/pixel).",
40 " ",
41 "Tip generation:",
42 "-tipradius 5.3 Generate tip: radius (angstrom).",
43 "-tipsize 10,12,5 Tip size (x,y,z pixels).",
44 "-tipangle 55.7 Tip side angle (degrees).",
45 " ",
46 "Simulation parameters:",
47 "-spring 0.1 Spring constant (default 0.05 N/m).",
48 "-modulus 2e8 Bulk modulus (default 1e9 N/m2).",
49 "-thickness 55 Thickness (default 50 A).",
50 "-forcestep 15 Force intervals for height maps (default 10 pN).",
51 " ",
52 "Input:",
53 "-Tip tip.map Read tip from file.",
54 " ",
55 "Output:",
56 "-Postscript file.ps Postscript force curve.",
57 "-Force force.map Force map file name.",
58 " ",
59 NULL
60 };
61 
62 int main(int argc, char **argv)
63 {
64  /* Initialize variables */
65  Vector3<long> tipsize = {1,1,1}; // Tip dimensions
66  double tipradius(0); // Tip radius also flag to generate tip
67  double tipangle(45); // Tip side angle
68  double resmin(1 + sqrt(5.0)); // Resolution for tip generation
69  Vector3<double> sam; // Unit dimension scaling (Angstrom/pixel)
70  int setinvert(0); // Don't invert inside-outside
71  double spring(0.05); // Spring constant (typically 0.01-0.1 N/m)
72  double modulus(1e9); // Bulk modulus (typically ~10 pN/A2 ???)
73  double thick(50); // Thickness of sample in Angstrom
74  double forcestep(10); // Force intervals for height maps
75  Bstring tipfile; // Tip file name
76  Bstring psfile; // Postscript file name
77  Bstring forcefile; // Force map file name
78 
79  int optind;
80  Boption* option = get_option_list(use, argc, argv, optind);
81  Boption* curropt;
82  for ( curropt = option; curropt; curropt = curropt->next ) {
83  if ( curropt->tag == "sampling" )
84  sam = curropt->scale();
85  if ( curropt->tag == "tipradius" )
86  if ( ( tipradius = curropt->value.real() ) < 1 )
87  cerr << "-tipradius: A radius must be specified!" << endl;
88  if ( curropt->tag == "tipsize" )
89  tipsize = curropt->size();
90  if ( curropt->tag == "tipangle" )
91  if ( ( tipangle = curropt->value.real() ) < 1 )
92  cerr << "-tipangle: An angle must be specified!" << endl;
93  if ( curropt->tag == "invert" )
94  setinvert = 1;
95  if ( curropt->tag == "spring" )
96  if ( ( spring = curropt->value.real() ) < 0.00000001 )
97  cerr << "-spring: The spring constant must be specified!" << endl;
98  if ( curropt->tag == "modulus" )
99  if ( ( modulus = curropt->value.real() ) < 0.001 )
100  cerr << "-modulus: The bulk modulus must be specified!" << endl;
101  if ( curropt->tag == "thickness" )
102  if ( ( thick = curropt->value.real() ) < 1 )
103  cerr << "-thickness: The thickness must be specified!" << endl;
104  if ( curropt->tag == "forcestep" )
105  if ( ( forcestep = curropt->value.real() ) < 0.001 )
106  cerr << "-forcestep: The force step must be specified!" << endl;
107  if ( curropt->tag == "Tip" )
108  tipfile = curropt->filename();
109  if ( curropt->tag == "Postscript" )
110  psfile = curropt->filename();
111  if ( curropt->tag == "Force" )
112  forcefile = curropt->filename();
113  }
114  option_kill(option);
115 
116  double ti = timer_start();
117 
118  // Read the input file if a file name is given
119  Bimage* p = read_img(argv[optind++], 1, 0);
120  Bimage* ptip = NULL;
121 
122  if ( !p ) {
123  cerr << "Error: No input file given!" << endl;
124  bexit(-1);
125  }
126 
127  p->change_type(Float);
128 
129  p->truncate_to_min_max(0, p->maximum());
130 
131  if ( sam.volume() > 0 ) p->sampling(sam);
132  else sam = p->sampling(0);
133 
134  // Tip density generation
135  if ( tipradius > 0 ) {
136  tipangle *= M_PI/180.0;
137  ptip = afm_generate_tip(tipsize, sam, tipradius, tipangle, resmin);
138  write_img("tip.map", ptip, 0);
139 // bexit(0);
140  } else {
141  if ( tipfile.length() ) {
142  ptip = read_img(tipfile, 1, 0);
143  ptip->change_type(Float);
144  }
145  }
146 
147  // Invert if requested
148  if ( setinvert ) p->invert();
149 
150  // Simulate an AFM scan if a tip is given
151  Bplot* plot = NULL;
152  if ( ptip )
153  plot = afm_simulate(ptip, p, spring, modulus, thick);
154 
155  delete ptip;
156 
157  if ( psfile.length() && plot ) ps_plot(psfile, plot);
158 
159  delete plot;
160 
161  // Copy the command line to the label field of the image structure
162 
163  // Write an output force map file if a file name is given
164  if ( forcefile.length() )
165  write_img(forcefile, p, 0);
166 
167  // Calculate height images
168  Bimage* ph = afm_force_to_height(p, forcestep);
169 
170  delete p;
171 
172  // Write an output file if a file name is given
173  if ( argc > optind && strspn(argv[optind],"-") != 1 )
174  write_img(argv[optind], ph, 0);
175 
176  delete ph;
177 
178  if ( verbose & VERB_TIME )
179  timer_report(ti);
180 
181  bexit(0);
182 }
183 
201  double radius, double angle, double resolution)
202 {
203  long i, xx, yy;
204  double dx, dy, dz, dis, dis2;
205 
206  if ( size[0] < 4*radius/sampling[0] ) size[0] = (long) (4*radius/sampling[0]);
207  if ( size[1] < 4*radius/sampling[1] ) size[1] = (long) (4*radius/sampling[1]);
208  if ( size[2] < 4*radius/sampling[2] ) size[2] = (long) (4*radius/sampling[2]);
209 
210  if ( verbose & VERB_PROCESS ) {
211  cout << "Generating a 2D tip image" << endl;
212  cout << "Tip dimensions: " << size << endl;
213  cout << "Tip radius: " << radius << " A" << endl << endl;
214  } else if ( verbose & VERB_LABEL )
215  cout << "Generating a 2D tip image" << endl;
216 
217  // Generate a 2D tip height image to be converted to 3D later
218  Bimage* p = new Bimage(Float, TSimple, size[0], size[1], 1, 1);
219  p->sampling(sampling);
220  p->origin(p->default_origin());
221 
222  radius /= sampling[0]; // Convert the radius to pixel units
223  double radcut(radius/sqrt(2.0)); // Edge between sphere and cone
224 // double radcut(radius*cos(angle)); // Edge between sphere and cone
225  double rad2(radius*radius);
226  double max(sqrt(1.0*p->sizeX()*p->sizeX() + p->sizeY()*p->sizeY())/2);
227 // double ta(1/tan(angle));
228 
229  // Generate 45 degree cone with spherical tip with input radius
230  for ( i=yy=0; yy<p->sizeY(); yy++ ) {
231  dy = yy - p->image->origin()[1];
232  for ( xx=0; xx<p->sizeX(); xx++, i++ ) {
233  dx = xx - p->image->origin()[0];
234  dis2 = dx*dx + dy*dy;
235  dis = sqrt(dis2);
236  if ( dis < radcut )
237  dz = max - (2*radcut - sqrt(rad2 - dis2));
238 // dz = max - radius/sin(angle) + sqrt(rad2 - dis2);
239  else
240  dz = max - dis;
241 // dz = max - dis*ta;
242 // if ( dz < 0 ) dz = 0;
243  p->set(i, dz);
244  }
245  }
246 
247  p->statistics();
248 
249 // p->show_maximum((sqrt(2.0) - 1)*radius*p->sampling(0)[2]);
250 // p->show_maximum(cos(angle)*radius*p->sampling(0)[2]);
251 // p->show_maximum(sin(angle)*p->maximum()*p->sampling(0)[2]);
252 // p->show_maximum((1-cos(angle))*p->maximum()*p->sampling(0)[2]);
253  p->show_maximum(radius*p->sampling(0)[2]);
254  p->show_minimum(p->maximum()*p->sampling(0)[2]/sin(angle));
255 
256  Bimage* ptip = p->topograph_to_surface(NULL, size[2], 1.925, resolution);
257 
258  ptip->image->origin(ptip->size()/2);
259 
260  delete p;
261 
262  return ptip;
263 }
264 
265 int afm_simulate_at_xy(Bimage* ptip, Bimage* p, long ii,
266  float* force, double spring, double modulus, double thick)
267 {
268  long i, ti, di, xx, yy, zz, tx, ty, tz, hiz;
269  long dx, dy, dz, zshift;
270  long ss(p->sizeX()*p->sizeY()), tss(ptip->sizeX()*ptip->sizeY());
271  double fraction, overlap_volume(1);
272  double scale(p->sampling(0).volume()/(p->maximum()*ptip->maximum())); // Adjustment for correct units
273 
274  // Tip displacement = proportion * volume overlap
275  double proportion(scale*modulus/(spring*thick));
276 
277  double* shift = new double[p->sizeZ()];
278 
279  yy = ii/p->sizeX();
280  xx = ii - yy*p->sizeX();
281  for ( zz=0; zz<p->sizeZ(); zz++ ) {
282  shift[zz] = 0;
283  if ( overlap_volume > 1e-30 ) {
284  overlap_volume = 0;
285  i = zz*ss + ii;
286  hiz = ptip->sizeZ();
287  if ( hiz > p->sizeZ() - zz ) hiz = p->sizeZ() - zz;
288  for ( ti=ty=0; ty<ptip->sizeY(); ty++ ) { // Calculate overlap volume
289  dy = yy + ty - (long)ptip->image->origin()[1];
290  while ( dy < 0 ) dy += p->sizeY(); // Wrap y
291  while ( dy >= p->sizeY() ) dy -= p->sizeY();
292  for ( tx=0; tx<ptip->sizeX(); tx++, ti++ ) {
293  dx = xx + tx - (long)ptip->image->origin()[0];
294  while ( dx < 0 ) dx += p->sizeX(); // Wrap x
295  while ( dx >= p->sizeX() ) dx -= p->sizeX();
296  di = dy*p->sizeX()+dx;
297  for ( tz=0; tz<hiz; tz++ ) {
298  dz = zz + tz;
299  overlap_volume += (*p)[dz*ss+di]*(*ptip)[tz*tss+ti];
300  }
301  }
302  }
303  }
304  shift[zz] = overlap_volume*proportion;
305 // cout << "%ld\t%g\n", z, shift[z]);
306  }
307 
308  for ( zz=0; zz<p->sizeZ(); zz++ ) { // Calculate zshift where the forces are equal
309  zshift = 0;
310  while ( zshift*p->sampling(0)[2] < shift[zz+zshift] &&
311  zshift+zz < p->sizeZ() ) zshift++;
312  if ( zshift > 0 ) zshift--;
313  fraction = (zshift*p->sampling(0)[2] - shift[zz+zshift])/
314  (zshift*p->sampling(0)[2] - shift[zz+zshift] -
315  (zshift+1)*p->sampling(0)[2] + shift[zz+zshift+1]);
316  if ( !isfinite(fraction) )
317  cout << "Problem:\t" << xx << tab << yy << tab << zz << tab <<
318  fraction << tab << zshift*p->sampling(0)[2] << tab <<
319  shift[zz+zshift] << tab << shift[zz+zshift+1] << endl;
320  i = zz*ss + ii;
321  force[i] = spring*(zshift + fraction)*p->sampling(0)[2];
322  }
323 // cout << "%ld\t%ld\t%ld\n", x, y, zshift);
324 
325  delete[] shift;
326 
327  return 0;
328 }
329 
358 Bplot* afm_simulate(Bimage* ptip, Bimage* p, double spring, double modulus, double thick)
359 {
360  long i, ii, zz;
361  long ss(p->sizeX()*p->sizeY());
362  double avg_force;
363 
364  if ( verbose & VERB_PROCESS ) {
365  cout << "Simulating an AFM experiment" << endl;
366  cout << "Spring constant: " << spring << " N/m" << endl;
367  cout << "Bulk modulus: " << modulus << " N/m2" << endl;
368  cout << "Specimen thickness: " << thick << " A" << endl;
369  cout << "Density scale: " << p->sampling(0).volume()/(p->maximum()*ptip->maximum()) << " A/pixel" << endl << endl;
370  } else if ( verbose & VERB_LABEL )
371  cout << "Simulating an AFM experiment" << endl << endl;
372 
373  // Conversions to Angstrom and pN
374  spring *= 100; // 100 pN/A = N/m
375  modulus *= 1e-8; // 0.01 aN/A2 = N/m2
376 
377  float* force = new float[p->sizeX()*p->sizeY()*p->sizeZ()];
378 
379 #ifdef HAVE_GCD
380  dispatch_apply(ss, dispatch_get_global_queue(0, 0), ^(size_t i){
381  afm_simulate_at_xy(ptip, p, i, force, spring, modulus, thick);
382  });
383 #else
384 #pragma omp parallel for
385  for ( long i=0; i<ss; i++ )
386  afm_simulate_at_xy(ptip, p, i, force, spring, modulus, thick);
387 #endif
388 
389  p->maximum(0);
390  for ( i=0; i<ss*p->sizeZ(); i++ )
391  if ( p->maximum() < force[i] ) p->maximum(force[i]);
392 
393  Bstring title("AFM simulation");
394  int ncol(3), nv(p->sizeZ());
395  Bplot* plot = new Bplot(1, nv, ncol);
396  plot->title(title);
397  plot->page(0).title(title);
398  plot->page(0).columns(ncol);
399  for ( i=0; i<ncol; i++ ) plot->page(0).column(i).number(i);
400  plot->page(0).column(0).label("Distance");
401  plot->page(0).column(0).axis(1);
402  plot->page(0).column(1).type(2);
403  plot->page(0).column(1).label("Deflection");
404  plot->page(0).column(1).axis(4);
405  plot->page(0).column(2).type(2);
406  plot->page(0).column(2).label("Force");
407  plot->page(0).column(2).axis(3);
408 // plot->page(0).axis(1).min(0);
409 // plot->page(0).axis(1).max(360);
410 // plot->page(0).axis(1).inc(30);
411 
412  for ( zz=0; zz<nv; zz++ ) {
413  for ( i=0, ii=zz*ss, avg_force=0; i<ss; i++, ii++ )
414  avg_force += force[ii];
415  avg_force /= ss;
416  (*plot)[zz] = zz*p->sampling(0)[2];
417  (*plot)[zz+nv] = avg_force/spring;
418  (*plot)[zz+2*nv] = avg_force;
419  }
420 
421  Bstring txt;
422  txt = "Cantilever spring constant: " + Bstring(spring/100, "%lg N/m");
423  plot->page(0).add_text(txt);
424  txt = "Bulk modulus: " + Bstring(modulus*1e8, "%lg N/m2");
425  plot->page(0).add_text(txt);
426  txt = "Sample thickness: " + Bstring(thick, "%lg A");
427  plot->page(0).add_text(txt);
428 
429  if ( verbose & VERB_PROCESS ) {
430  cout << "Distance(A)\tDeflection(A)\tForce(pN)" << endl;
431  for ( zz=0; zz<nv; zz++ )
432  cout << setw(12) << (*plot)[zz] << tab << setw(12)
433  << (*plot)[zz+nv] << tab << (*plot)[zz+2*nv] << endl;
434  cout << endl;
435  }
436 
437  p->data_assign((unsigned char *) force);
438 
439  return plot;
440 }
441 
448 Bimage* afm_force_to_height(Bimage* pf, double force_step)
449 {
450  long i, j, xx, yy, zz, nn;
451  long ss(pf->sizeX()*pf->sizeY());
452  double force, denom, diff, scale, min, max;
453 
454  nn = (long) (pf->maximum()/force_step); // A height image every 10 pN
455  Bimage* ph = pf->copy_header(nn);
456  ph->sizeZ(1);
457  ph->data_type(Float);
458  ph->data_alloc();
459 
460  if ( verbose & VERB_PROCESS ) {
461  cout << "Converting an AFM force map into " << ph->images() << " height images" << endl;
462  cout << "Force(pN)\tHeight_min(A)\tHeight_range(A)" << endl;
463  } else if ( verbose & VERB_LABEL )
464  cout << "Converting an AFM force map into " << ph->images() << " height images" << endl << endl;
465 
466  for ( nn=0; nn<ph->images(); nn++ ) {
467  force = force_step*(nn+1);
468  min = 1e30;
469  max = -1e30;
470  for ( i=nn*ss, yy=0; yy<ph->sizeY(); yy++ ) {
471  for ( xx=0; xx<ph->sizeX(); xx++, i++ ) {
472  zz = 1;
473  j = yy*pf->sizeX() + xx;
474  while ( zz < pf->sizeZ() && (*pf)[zz*ss + j] > force )
475  zz++;
476  j += zz*ss;
477  denom = (*pf)[j-ss] - (*pf)[j];
478  diff = force - (*pf)[j];
479 // cout << zz << tab << denom << tab << diff << endl;
480 // if ( diff > 0 && denom > 0 )
481 // ph->set(i, (*ph)[i] - ph->sampling(0)[2]*diff/denom);
482  ph->set(i, ph->sampling(0)[2]*zz);
483  if ( denom != 0 ) {
484  diff /= denom;
485  if ( fabs(diff) < 1 )
486  ph->set(i, (*ph)[i] - ph->sampling(0)[2]*diff);
487  }
488  if ( min > (*ph)[i] ) min = (*ph)[i];
489  if ( max < (*ph)[i] ) max = (*ph)[i];
490  }
491  }
492  scale = max - min;
493  if ( verbose & VERB_PROCESS )
494  cout << setw(12) << force << tab << setw(12) << min << tab << scale << endl;
495  for ( i=0, j=nn*ss; i<ss; i++, j++ )
496  ph->set(j, (*ph)[j] - min);
497  }
498  cout << endl;
499 
500  ph->statistics();
501 
502  if ( verbose & VERB_DEBUG )
503  cout << "DEBUG afm_force_to_height: Done!" << endl << endl;
504 
505  return ph;
506 }
Boption
A class for a command line input option.
Definition: options.h:26
Bimage::sizeZ
void sizeZ(long nz)
Definition: Bimage.h:392
ps_plot
int ps_plot(Bstring filename, Bplot *plot)
Generates postscript graphs.
Definition: ps_plot.cpp:129
Boption::scale
Vector3< double > scale()
Definition: options.h:190
VERB_DEBUG
#define VERB_DEBUG
Definition: utilities.h:116
Bimage::set
void set(long j, double v)
Sets a single value at the given index.
Definition: Bimage.cpp:1118
Bstring
Definition: Bstring.h:29
Boption::next
Boption * next
Definition: options.h:28
use
const char * use[]
Definition: bafm.cpp:25
Vector3< long >
Bimage::sizeX
void sizeX(long nx)
Definition: Bimage.h:390
bexit
int bexit(int value)
Exit function for cleanup and debugging.
Definition: utilities.cpp:280
Bimage::default_origin
Vector3< double > default_origin()
Definition: Bimage.h:592
get_option_list
Boption * get_option_list(const char *use[], int argc, char *argv[], int &optind)
Parses command line arguments based on a template.
Definition: options.cpp:40
Bimage::size
Vector3< long > size() const
Definition: Bimage.h:386
Bplot
Definition: Bplot.h:146
Bstring::real
double real()
Definition: Bstring.cpp:553
options.h
Header file for option handlers.
Bcolumn::type
long type()
Definition: Bplot.h:66
Bimage::image
Bsub_image * image
Definition: Bimage.h:202
VERB_PROCESS
#define VERB_PROCESS
Definition: utilities.h:111
Bimage::maximum
double maximum()
Definition: Bimage.h:542
Bcolumn::axis
long axis()
Definition: Bplot.h:68
Bpage::title
Bstring & title()
Definition: Bplot.h:100
Bimage::images
long images()
Definition: Bimage.h:504
Boption::tag
Bstring tag
Definition: options.h:29
read_img
Bimage * read_img(char *filename, int readdata, int img_select)
General driver function to read multiple image formats.
Definition: rwimg.cpp:77
Bsub_image::origin
void origin(double x, double y, double z)
Definition: Bimage.h:136
TSimple
@ TSimple
Definition: Bimage.h:59
write_img
int write_img(const char *filename, Bimage *p, int compression)
General driver function to write multiple image formats.
Definition: rwimg.cpp:281
Bimage::sizeY
void sizeY(long ny)
Definition: Bimage.h:391
Boption::value
Bstring value
Definition: options.h:30
Bpage::add_text
void add_text(Bstring &s)
Definition: Bplot.h:122
Bimage
General image parameter class.
Definition: Bimage.h:177
timer.h
Utilities for timing functions.
Bpage::column
Bcolumn & column(long i)
Definition: Bplot.h:110
Bimage::data_alloc
unsigned char * data_alloc()
Definition: Bimage.h:271
Bplot::title
Bstring & title()
Definition: Bplot.h:194
afm_generate_tip
Bimage * afm_generate_tip(Vector3< long > size, Vector3< double > sampling, double radius, double angle, double resolution)
Generates a rounded conical AFM tip.
Definition: bafm.cpp:200
VERB_TIME
#define VERB_TIME
Definition: utilities.h:114
Bimage::truncate_to_min_max
int truncate_to_min_max(double minim, double maxim)
Truncates image data to a given minimum and maximum.
Definition: Bimage_rescale.cpp:331
timer_start
double timer_start()
Starts timer and prints the time.
Definition: timer.cpp:61
Bimage::data_type
DataType data_type()
Definition: Bimage.h:362
M_PI
#define M_PI
Definition: utilities.h:63
utilities.h
Header file for general utilities.
tab
ostream & tab(ostream &out)
Definition: utilities.cpp:22
Boption::size
Vector3< long > size()
Definition: options.h:163
Bstring::length
long length() const
Definition: Bstring.cpp:263
isfinite
bool isfinite(complex< T > &value)
timer_report
double timer_report(double lasttime)
Reports the time elapsed since a given time.
Definition: timer.cpp:76
Bimage::origin
void origin(double ox, double oy, double oz)
Definition: Bimage.h:570
Bimage::change_type
void change_type(char letter)
Get the data type indicated by a single letter code.
Definition: Bimage.cpp:1765
Vector3::volume
double volume()
Definition: Vector3.h:237
rwimg.h
Header file for 2D and 3D image I/O.
Bimage::copy_header
Bimage * copy_header()
Definition: Bimage.h:658
Bimage::topograph_to_surface
Bimage * topograph_to_surface(Bimage *psd, long nz, double density, double resolution)
Converts a 2D AFM image to a 3D density map.
Definition: Bimage_topo.cpp:39
afm_simulate_at_xy
int afm_simulate_at_xy(Bimage *ptip, Bimage *p, long ii, float *force, double spring, double modulus, double thick)
Definition: bafm.cpp:265
Boption::filename
Bstring filename()
Definition: options.h:85
Bimage::show_minimum
double show_minimum()
Definition: Bimage.h:565
option_kill
int option_kill(Boption *option)
Deallocates a linked list of option structures.
Definition: options.cpp:111
Bimage::invert
void invert()
Inverts the data in the image.
Definition: Bimage.cpp:3111
Bimage::data_assign
unsigned char * data_assign(unsigned char *nudata)
Assign image data.
Definition: Bimage.cpp:875
Bimage::sampling
void sampling(long nn, Vector3< double > u)
Definition: Bimage.h:514
main
int main(int argc, char **argv)
Definition: bafm.cpp:62
Bcolumn::label
Bstring & label()
Definition: Bplot.h:63
Bplot::page
Bpage & page(long i)
Definition: Bplot.h:216
verbose
int verbose
Bimage::show_maximum
double show_maximum()
Definition: Bimage.h:566
Bcolumn::number
long number()
Definition: Bplot.h:61
Float
@ Float
Definition: utilities.h:161
VERB_LABEL
#define VERB_LABEL
Definition: utilities.h:110
afm_force_to_height
Bimage * afm_force_to_height(Bimage *pf, double force_step)
Converts an AFM force map into a set of 2D height images at different constant force values.
Definition: bafm.cpp:448
afm_simulate
Bplot * afm_simulate(Bimage *ptip, Bimage *p, double spring, double modulus, double thick)
Simulates and AFM experiment.
Definition: bafm.cpp:358
Bpage::columns
void columns(long ncol)
Definition: Bplot.h:105
Bimage::statistics
long statistics()
Calculates the statistics for an image.
Definition: Bimage_stats.cpp:22