Module gwy
[hide private]
[frames] | no frames]

Source Code for Module gwy

    1  # vim: set fileencoding=utf-8 : 
    2  # This is dummy GENERATED file used for generation of documentation 
    3   
4 -class Axis:
5 - def __init__(orientation):
6 """ 7 Creates a new axis. 8 9 10 @param orientation: axis orientation I{(int)} 11 @return: New axis as a B{C{GtkWidget}}. I{(L{gtk.Widget})} 12 """ 13 return None
14
15 - def set_logarithmic(is_logarithmic):
16 """ 17 Sets logarithmic mode. 18 19 @param is_logarithmic: logarithmic mode I{(bool)} 20 """ 21 pass
22
23 - def set_visible(is_visible):
24 """ 25 Sets the visibility of an axis. 26 27 @param is_visible: visibility I{(bool)} 28 """ 29 pass
30
31 - def is_visible():
32 """ 33 Determines whether axis is set to be visible. 34 35 Return: B{C{True}} if B{C{axis}} is set to be visible. 36 37 @return: I{(bool)} 38 """ 39 return None
40
41 - def is_logarithmic():
42 """ 43 Determines whether axis is set to be locarithmic. 44 45 46 @return: B{C{True}} if B{C{axis}} is logarithmic. I{(bool)} 47 """ 48 return None
49
50 - def get_orientation():
51 """ 52 Gets the orientation of an axis. 53 54 55 @return: The orientation. I{(GtkPositionType)} 56 """ 57 return None
58
59 - def set_auto(is_auto):
60 """ 61 Enables or disables automatic axis adjustmet. 62 63 @param is_auto: B{C{True}} to enable automatic tick size and distribution adjustment, 64 B{C{False}} to disable it. I{(bool)} 65 """ 66 pass
67
68 - def request_range(min, max):
69 """ 70 Sets the requisition of axis boundaries. 71 72 The axis will adjust the boundaries to satisfy requisition but still have 73 reasonable tick values and spacing. Use L{Axis.get_range}() to obtain the 74 boundaries the axis actually decided to use. 75 76 @param min: Minimum requisition (min boundary value). I{(float)} 77 @param max: Maximum requisition (max boundary value). I{(float)} 78 """ 79 pass
80
81 - def get_range():
82 """ 83 Gets the actual boundaries of an axis. 84 85 @return: Tuple consisting of 2 values (B{C{min}}, B{C{max}}). (I{(float)}, I{(float)}) 86 """ 87 return None, None
88
90 """ 91 Gets the requested boundaries of an axis. 92 93 @return: Tuple consisting of 2 values (B{C{min}}, B{C{max}}). (I{(float)}, I{(float)}) 94 """ 95 return None, None
96
97 - def get_magnification():
98 """ 99 Gets the magnification value of a graph axis. 100 101 102 @return: Magnification value of the axis. I{(float)} 103 """ 104 return None
105
107 """ 108 Gets the magnification string of an axis. 109 110 111 @return: Magnification string of the axis, owned by the axis. I{(string)} 112 """ 113 return None
114
115 - def set_label(label):
116 """ 117 Sets the label text of an axis. 118 119 @param label: The new label text (it can be B{C{None}} for an empty label). I{(string)} 120 """ 121 pass
122
123 - def get_label():
124 """ 125 Gets the label of an axis. 126 127 128 @return: Axis label as a string owned by B{C{axis}}. I{(string)} 129 """ 130 return None
131
132 - def set_si_unit(unit):
133 """ 134 Sets the axis unit. This will be added automatically 135 to the label. B{C{unit}} is duplicated. 136 137 @param unit: axis unit I{(L{SIUnit})} 138 """ 139 pass
140
141 - def enable_label_edit(enable):
142 """ 143 Enables/disables user to change axis label by clicking on axis widget. 144 145 @param enable: enable/disable user to change axis label I{(bool)} 146 """ 147 pass
148
149 - def draw_on_drawable(drawable, gc, xmin, ymin, width, height):
150 """ 151 Draws the x and y-axis on a drawable 152 153 @param drawable: Drawable to draw on. I{(L{gdk.Drawable})} 154 @param gc: Graphics context. 155 It is modified by this function unpredictably. I{(L{gdk.GC})} 156 @param xmin: The minimum x-axis value. I{(int)} 157 @param ymin: The minimum y-axis value. I{(int)} 158 @param width: The width of the x-axis. I{(int)} 159 @param height: The height of the y-axis. I{(int)} 160 """ 161 pass
162
163 - def export_vector(xmin, ymin, width, height, fontsize):
164 """ 165 Renders a graph axis in PostScript. 166 167 This is a helper functions for L{Graph.export_postscript}() and probably 168 not useful anywhere else. 169 170 171 @param xmin: Left edge of the bounding rectangle. I{(int)} 172 @param ymin: Bottom edge of the bounding rectangle. I{(int)} 173 @param width: Width of the bounding rectangle. I{(int)} 174 @param height: Height of the bounding rectangle. I{(int)} 175 @param fontsize: Font size to use. I{(int)} 176 @return: A newly created B{C{GString}}. I{(string)} 177 """ 178 return None
179
180 - def get_major_ticks():
181 """ 182 Gets the positions of major ticks of an axis. 183 184 185 @return: The positions of axis major ticks (as real values, not pixels). 186 The returned array is owned by the axis. I{(list)} 187 """ 188 return None
189 190
191 -class Brick:
192 """ 193 Three-dimensional data representation 194 195 196 B{C{Brick}} represents 3D data arrays in Gwyddion. It is typically useful for 197 different volume data obtained from SPMs, like in force volume measurements. 198 199 """
200 - def __init__(xres, yres, zres, xreal, yreal, zreal, nullme):
201 """ 202 Creates a new data brick. 203 204 @since: 2.31 205 206 @param xres: X resolution, i.e., the number of samples in x direction I{(int)} 207 @param yres: Y resolution, i.e., the number of samples in y direction I{(int)} 208 @param zres: Z resolution, i.e., the number of samples in z direction I{(int)} 209 @param xreal: Real physical dimension in x direction. I{(float)} 210 @param yreal: Real physical dimension in y direction. I{(float)} 211 @param zreal: Real physical dimension in z direction. I{(float)} 212 @param nullme: Whether the data brick should be initialized to zeroes. If B{C{False}}, 213 the data will not be initialized. I{(bool)} 214 @return: A newly created data brick. I{(L{Brick})} 215 """ 216 return None
217
218 - def new_alike(nullme):
219 """ 220 Creates a new data brick similar to an existing one. 221 222 Use L{Brick.duplicate}() if you want to copy a data brick including 223 data. 224 225 @since: 2.31 226 227 @param nullme: Whether the data brick should be initialized to zeroes. If B{C{False}}, 228 the data will not be initialized. I{(bool)} 229 @return: A newly created data brick. I{(L{Brick})} 230 """ 231 return None
232
233 - def new_part(xpos, ypos, zpos, xres, yres, zres, keep_offsets):
234 """ 235 Creates a new data brick as a part of existing one. 236 237 Use L{Brick.duplicate}() if you want to copy a whole data brick. 238 239 @since: 2.32 240 241 @param xpos: x position where to start from I{(int)} 242 @param ypos: y position where to start from I{(int)} 243 @param zpos: z position where to start from I{(int)} 244 @param xres: x resolution (width) to be extracted I{(int)} 245 @param yres: y resolution (height) to be extracted I{(int)} 246 @param zres: z resolution (depth) to be extracted I{(int)} 247 @param keep_offsets: keep offsets of data during extraction I{(bool)} 248 @return: A newly created data brick. I{(L{Brick})} 249 """ 250 return None
251
252 - def data_changed():
253 """ 254 Emits signal "data_changed" on a data brick. 255 256 @since: 2.31 257 258 """ 259 pass
260
261 - def resample(xres, yres, zres, interpolation):
262 """ 263 Resamples a data brick. 264 265 In other words changes the size of three dimensional field related with data 266 brick. The original values are used for resampling using a requested 267 interpolation alorithm. 268 269 @since: 2.31 270 271 @param xres: Desired x resolution. I{(int)} 272 @param yres: Desired y resolution. I{(int)} 273 @param zres: Desired z resolution. I{(int)} 274 @param interpolation: Interpolation method to use. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 275 """ 276 pass
277
278 - def get_xres():
279 """ 280 Gets the x resolution of a data brick. 281 282 @since: 2.31 283 284 @return: Resolution (number of data points). I{(int)} 285 """ 286 return None
287
288 - def get_yres():
289 """ 290 Gets the y resolution of a data brick. 291 292 @since: 2.31 293 294 @return: Resolution (number of data points). I{(int)} 295 """ 296 return None
297
298 - def get_zres():
299 """ 300 Gets the z resolution of a data brick. 301 302 @since: 2.31 303 304 @return: Resolution (number of data points). I{(int)} 305 """ 306 return None
307
308 - def get_xreal():
309 """ 310 Gets the physical size of a data brick in the x direction. 311 312 @since: 2.31 313 314 @return: Real size of a data brick the x direction. I{(float)} 315 """ 316 return None
317
318 - def get_yreal():
319 """ 320 Gets the physical size of a data brick in the y direction. 321 322 @since: 2.31 323 324 @return: Real size of a data brick the y direction. I{(float)} 325 """ 326 return None
327
328 - def get_zreal():
329 """ 330 Gets the physical size of a data brick in the z direction. 331 332 @since: 2.31 333 334 @return: Real size of a data brick the z direction. I{(float)} 335 """ 336 return None
337
338 - def get_xoffset():
339 """ 340 Gets the offset of data brick origin in x direction. 341 342 @since: 2.31 343 344 @return: Offset value. I{(float)} 345 """ 346 return None
347
348 - def get_yoffset():
349 """ 350 Gets the offset of data brick origin in y direction. 351 352 @since: 2.31 353 354 @return: Offset value. I{(float)} 355 """ 356 return None
357
358 - def get_zoffset():
359 """ 360 Gets the offset of data brick origin in z direction. 361 362 @since: 2.31 363 364 @return: Offset value. I{(float)} 365 """ 366 return None
367
368 - def set_xreal(xreal):
369 """ 370 Sets the real x dimension of a brick. 371 372 @since: 2.31 373 374 @param xreal: New real x dimensions value I{(float)} 375 """ 376 pass
377
378 - def set_yreal(yreal):
379 """ 380 Sets the real y dimension of a brick. 381 382 @since: 2.31 383 384 @param yreal: New real y dimensions value I{(float)} 385 """ 386 pass
387
388 - def set_zreal(zreal):
389 """ 390 Sets the real z dimension of a brick. 391 392 @since: 2.31 393 394 @param zreal: New real z dimensions value I{(float)} 395 """ 396 pass
397
398 - def set_xoffset(xoffset):
399 """ 400 Sets the offset of a data brick origin in the x direction. 401 402 Note offsets don't affect any calculation, nor functions like 403 L{Brick.rtoi}(). 404 405 @since: 2.31 406 407 @param xoffset: New offset value. I{(float)} 408 """ 409 pass
410
411 - def set_yoffset(yoffset):
412 """ 413 Sets the offset of a data brick origin in the y direction. 414 415 Note offsets don't affect any calculation, nor functions like 416 L{Brick.rtoi}(). 417 418 @since: 2.31 419 420 @param yoffset: New offset value. I{(float)} 421 """ 422 pass
423
424 - def set_zoffset(zoffset):
425 """ 426 Sets the offset of a data brick origin in the z direction. 427 428 Note offsets don't affect any calculation, nor functions like 429 L{Brick.rtoi}(). 430 431 @since: 2.31 432 433 @param zoffset: New offset value. I{(float)} 434 """ 435 pass
436
437 - def get_si_unit_x():
438 """ 439 Returns x direction SI unit of a data brick. 440 441 @since: 2.31 442 443 @return: SI unit corresponding to the lateral (X) dimension of the data 444 brick. Its reference count is not incremented. I{(L{SIUnit})} 445 """ 446 return None
447
448 - def get_si_unit_y():
449 """ 450 Returns y direction SI unit of a data brick. 451 452 @since: 2.31 453 454 @return: SI unit corresponding to the lateral (Y) dimension of the data 455 brick. Its reference count is not incremented. I{(L{SIUnit})} 456 """ 457 return None
458
459 - def get_si_unit_z():
460 """ 461 Returns z direction SI unit of a data brick. 462 463 @since: 2.31 464 465 @return: SI unit corresponding to the "height" (Z) dimension of the data 466 brick. Its reference count is not incremented. I{(L{SIUnit})} 467 """ 468 return None
469
470 - def get_si_unit_w():
471 """ 472 Returns value SI unit of a data brick. 473 474 @since: 2.31 475 476 @return: SI unit corresponding to the "value" of the data 477 brick. Its reference count is not incremented. I{(L{SIUnit})} 478 """ 479 return None
480
481 - def set_si_unit_x(si_unit):
482 """ 483 Sets the SI unit corresponding to the lateral (X) dimension of a data 484 brick. 485 486 It does not assume a reference on B{C{si_unit}}, instead it adds its own 487 reference. 488 489 @since: 2.31 490 491 @param si_unit: SI unit to be set. I{(L{SIUnit})} 492 """ 493 pass
494
495 - def set_si_unit_y(si_unit):
496 """ 497 Sets the SI unit corresponding to the lateral (Y) dimension of a data 498 brick. 499 500 It does not assume a reference on B{C{si_unit}}, instead it adds its own 501 reference. 502 503 @since: 2.31 504 505 @param si_unit: SI unit to be set. I{(L{SIUnit})} 506 """ 507 pass
508
509 - def set_si_unit_z(si_unit):
510 """ 511 Sets the SI unit corresponding to the "height" (Z) dimension of a data 512 brick. 513 514 It does not assume a reference on B{C{si_unit}}, instead it adds its own 515 reference. 516 517 @since: 2.31 518 519 @param si_unit: SI unit to be set. I{(L{SIUnit})} 520 """ 521 pass
522
523 - def set_si_unit_w(si_unit):
524 """ 525 Sets the SI unit corresponding to the "value" of a data 526 brick. 527 528 It does not assume a reference on B{C{si_unit}}, instead it adds its own 529 reference. 530 531 @since: 2.31 532 533 @param si_unit: SI unit to be set. I{(L{SIUnit})} 534 """ 535 pass
536
537 - def get_min():
538 """ 539 Find the minimum value in a data brick. 540 541 @since: 2.31 542 543 @return: The minimum value within the brick. I{(float)} 544 """ 545 return None
546
547 - def get_max():
548 """ 549 Find the maximum value in a data brick. 550 551 @since: 2.31 552 553 @return: The maximum value within the brick. I{(float)} 554 """ 555 return None
556
557 - def get_value_format_x(style):
558 """ 559 Finds value format good for displaying coordinates of a data brick. 560 561 @since: 2.31 562 563 @param style: Unit format style. Expected values: C{B{SI_UNIT_FORMAT_NONE}}, C{B{SI_UNIT_FORMAT_PLAIN}}, C{B{SI_UNIT_FORMAT_MARKUP}}, C{B{SI_UNIT_FORMAT_VFMARKUP}}, C{B{SI_UNIT_FORMAT_TEX}}. I{(L{SIUnitFormatStyle})} 564 @return: Tuple consisting of 2 values (B{C{value}}, B{C{format}}). (I{(L{SIValueFormat})}, I{(SkipArg)}) 565 """ 566 return None, None
567
568 - def get_value_format_y(style):
569 """ 570 Finds value format good for displaying values of a data brick. 571 572 @since: 2.31 573 574 @param style: Unit format style. Expected values: C{B{SI_UNIT_FORMAT_NONE}}, C{B{SI_UNIT_FORMAT_PLAIN}}, C{B{SI_UNIT_FORMAT_MARKUP}}, C{B{SI_UNIT_FORMAT_VFMARKUP}}, C{B{SI_UNIT_FORMAT_TEX}}. I{(L{SIUnitFormatStyle})} 575 @return: Tuple consisting of 2 values (B{C{value}}, B{C{format}}). (I{(L{SIValueFormat})}, I{(SkipArg)}) 576 """ 577 return None, None
578
579 - def get_value_format_z(style):
580 """ 581 Finds value format good for displaying values of a data brick. 582 583 @since: 2.31 584 585 @param style: Unit format style. Expected values: C{B{SI_UNIT_FORMAT_NONE}}, C{B{SI_UNIT_FORMAT_PLAIN}}, C{B{SI_UNIT_FORMAT_MARKUP}}, C{B{SI_UNIT_FORMAT_VFMARKUP}}, C{B{SI_UNIT_FORMAT_TEX}}. I{(L{SIUnitFormatStyle})} 586 @return: Tuple consisting of 2 values (B{C{value}}, B{C{format}}). (I{(L{SIValueFormat})}, I{(SkipArg)}) 587 """ 588 return None, None
589
590 - def get_value_format_w(style):
591 """ 592 Finds value format good for displaying values of a data brick. 593 594 Note this functions searches for minimum and maximum value in B{C{brick}}, 595 therefore it's relatively slow. 596 597 @since: 2.31 598 599 @param style: Unit format style. Expected values: C{B{SI_UNIT_FORMAT_NONE}}, C{B{SI_UNIT_FORMAT_PLAIN}}, C{B{SI_UNIT_FORMAT_MARKUP}}, C{B{SI_UNIT_FORMAT_VFMARKUP}}, C{B{SI_UNIT_FORMAT_TEX}}. I{(L{SIUnitFormatStyle})} 600 @return: Tuple consisting of 2 values (B{C{value}}, B{C{format}}). (I{(L{SIValueFormat})}, I{(SkipArg)}) 601 """ 602 return None, None
603
604 - def itor(pixpos):
605 """ 606 Transforms pixel coordinate to real (physical) coordinate in x direction. 607 608 That is it maps range [0..x resolution] to range [0..x real-size]. It is not 609 suitable for conversion of matrix indices to physical coordinates, you 610 have to use L{Brick.itor}(B{C{brick}}, B{C{pixpos}} + 0.5) for that. 611 612 @since: 2.31 613 614 @param pixpos: Pixel coordinate. I{(float)} 615 @return: B{C{pixpos}} in real coordinates. I{(float)} 616 """ 617 return None
618
619 - def rtoi(realpos):
620 """ 621 Transforms real (physical) coordinate to pixel coordinate in x axis. 622 623 That is it maps range [0..x real-size] to range [0..x resolution]. 624 625 @since: 2.31 626 627 @param realpos: Real coordinate. I{(float)} 628 @return: B{C{realpos}} in pixel coordinates. I{(float)} 629 """ 630 return None
631
632 - def jtor(pixpos):
633 """ 634 Transforms pixel coordinate to real (physical) coordinate in y direction. 635 636 That is it maps range [0..y resolution] to range [0..y real-size]. It is not 637 suitable for conversion of matrix indices to physical coordinates, you 638 have to use L{Brick.itor}(B{C{brick}}, B{C{pixpos}} + 0.5) for that. 639 640 @since: 2.31 641 642 @param pixpos: Pixel coordinate. I{(float)} 643 @return: B{C{pixpos}} in real coordinates. I{(float)} 644 """ 645 return None
646
647 - def rtoj(realpos):
648 """ 649 Transforms real (physical) coordinate to pixel coordinate in y axis. 650 651 That is it maps range [0..y real-size] to range [0..y resolution]. 652 653 @since: 2.31 654 655 @param realpos: Real coordinate. I{(float)} 656 @return: B{C{realpos}} in pixel coordinates. I{(float)} 657 """ 658 return None
659
660 - def ktor(pixpos):
661 """ 662 Transforms pixel coordinate to real (physical) coordinate in z direction. 663 664 That is it maps range [0..z resolution] to range [0..z real-size]. It is not 665 suitable for conversion of matrix indices to physical coordinates, you 666 have to use L{Brick.itor}(B{C{brick}}, B{C{pixpos}} + 0.5) for that. 667 668 @since: 2.31 669 670 @param pixpos: Pixel coordinate. I{(float)} 671 @return: B{C{pixpos}} in real coordinates. I{(float)} 672 """ 673 return None
674
675 - def rtok(realpos):
676 """ 677 Transforms real (physical) coordinate to pixel coordinate in z axis. 678 679 That is it maps range [0..z real-size] to range [0..z resolution]. 680 681 @since: 2.31 682 683 @param realpos: Real coordinate. I{(float)} 684 @return: B{C{realpos}} in pixel coordinates. I{(float)} 685 """ 686 return None
687
688 - def ktor_cal(pixpos):
689 """ 690 Transforms pixel coordinate to real (physical) coordinate in z direction, 691 taking into account calibration. 692 693 Unlike L{Brick.ktor}(), this function takes into account the B{C{z}} 694 calibration and, if calibration is not present, the B{C{z}} axis offset. 695 Since the calibration is available only for discrete pixel coordinates, 696 the values are interpolated between and clamped if outside the range. 697 698 The values in the calibration are assumed to correspond to pixel centres. 699 This convention is also kept when no calibration is present. 700 701 @since: 2.42 702 703 @param pixpos: Pixel coordinate. I{(float)} 704 @return: B{C{pixpos}} in real coordinates. I{(float)} 705 """ 706 return None
707
708 - def rtok_cal(realpos):
709 """ 710 Transforms real (physical) coordinate to pixel coordinate in z axis, 711 taking into account calibration. 712 713 Unlike L{Brick.rtok}(), this function takes into account the B{C{z}} 714 calibration and, if calibration is not present, the B{C{z}} axis offset. 715 Since the calibration is available only for discrete pixel coordinates, 716 the values are interpolated between and clamped if outside the range. 717 718 The values in the calibration are assumed to correspond to pixel centres. 719 This convention is also kept when no calibration is present. 720 721 @since: 2.42 722 723 @param realpos: Real coordinate. I{(float)} 724 @return: B{C{realpos}} in pixel coordinates. I{(float)} 725 """ 726 return None
727
728 - def get_val(col, row, lev):
729 """ 730 Gets value at given position in a data brick. 731 732 Do not access data with this function inside inner loops, it's slow. 733 Get raw data buffer with L{Brick.get_data_const}() and access it 734 directly instead. 735 736 @since: 2.31 737 738 @param col: Position in the brick (column index). I{(int)} 739 @param row: Position in the brick (row index). I{(int)} 740 @param lev: Position in the brick (level index). I{(int)} 741 @return: Value at given index. I{(float)} 742 """ 743 return None
744
745 - def set_val(col, row, lev, value):
746 """ 747 Sets value at given position in a data brick. 748 749 Do not access data with this function inside inner loops, it's slow. 750 Get raw data buffer with L{Brick.get_data_const}() and access it 751 directly instead. 752 753 @since: 2.31 754 755 @param col: Position in the brick (column index). I{(int)} 756 @param row: Position in the brick (row index). I{(int)} 757 @param lev: Position in the brick (level index). I{(int)} 758 @param value: Value to be set. I{(float)} 759 """ 760 pass
761
762 - def get_val_real(x, y, z):
763 """ 764 Gets value at given position in a data brick, in real coordinates. 765 766 Do not access data with this function inside inner loops, it's slow. 767 Get raw data buffer with L{Brick.get_data_const}() and access it 768 directly instead. 769 770 @since: 2.31 771 772 @param x: Position in the brick (x direction). I{(float)} 773 @param y: Position in the brick (y direction). I{(float)} 774 @param z: Position in the brick (z direction). I{(float)} 775 @return: Value at given index. I{(float)} 776 """ 777 return None
778
779 - def set_val_real(x, y, z, value):
780 """ 781 Sets value at given position in a data brick. 782 783 Do not access data with this function inside inner loops, it's slow. 784 Get raw data buffer with L{Brick.get_data_const}() and access it 785 directly instead. 786 787 @since: 2.31 788 789 @param x: Position in the brick (x direction). I{(float)} 790 @param y: Position in the brick (y direction). I{(float)} 791 @param z: Position in the brick (z direction). I{(float)} 792 @param value: Value to be set. I{(float)} 793 """ 794 pass
795
796 - def get_dval(x, y, z, interpolation):
797 """ 798 Gets interpolated value at arbitrary data brick point indexed by pixel 799 coordinates. 800 801 Note pixel values are centered in intervals [B{C{i}}, B{C{i}}+1]. 802 See also L{Brick.get_dval_real}() that does the same, but takes 803 real coordinates. 804 805 @since: 2.31 806 807 @param x: Position in data brick in range [0, x resolution]. If the value is outside 808 this range, the nearest border value is returned. I{(float)} 809 @param y: Position in data brick in range [0, y resolution]. If the value is outside 810 this range, the nearest border value is returned. I{(float)} 811 @param z: Position in data brick in range [0, z resolution]. If the value is outside 812 this range, the nearest border value is returned. I{(float)} 813 @param interpolation: Interpolation method to use. I{(int)} 814 @return: Value interpolated in the data brick. I{(float)} 815 """ 816 return None
817
818 - def get_dval_real(x, y, z, interpolation):
819 """ 820 Gets interpolated value at arbitrary data brick point indexed by pixel 821 coordinates. 822 823 Note pixel values are centered in intervals [B{C{j}}, B{C{j}}+1]. 824 See also L{Brick.get_dval}() that does the same, but takes 825 pixel coordinates. 826 827 @since: 2.31 828 829 @param x: Position in data brick in range [0, x resolution]. If the value is outside 830 this range, the nearest border value is returned. I{(float)} 831 @param y: Position in data brick in range [0, y resolution]. If the value is outside 832 this range, the nearest border value is returned. I{(float)} 833 @param z: Position in data brick in range [0, z resolution]. If the value is outside 834 this range, the nearest border value is returned. I{(float)} 835 @param interpolation: Interpolation method to use. I{(int)} 836 @return: Value interpolated in the data brick. I{(float)} 837 """ 838 return None
839
840 - def clear():
841 """ 842 Fills a data brick with zeroes. 843 844 @since: 2.31 845 846 """ 847 pass
848
849 - def fill(value):
850 """ 851 Fills a data brick with specified value. 852 853 @since: 2.31 854 855 @param value: Value to fill data brick with. I{(float)} 856 """ 857 pass
858
859 - def multiply(value):
860 """ 861 Multiplies all values in a data brick with a specified value. 862 863 @since: 2.31 864 865 @param value: Value to multiply data brick with. I{(float)} 866 """ 867 pass
868
869 - def add(value):
870 """ 871 Adds a specified value to all values in a data brick. 872 873 @since: 2.31 874 875 @param value: Value to be added. I{(float)} 876 """ 877 pass
878
879 - def extract_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets):
880 """ 881 Extract a plane (DataField) from the brick. 882 883 One value of set (B{C{width}}, B{C{height}}, B{C{depth}}) needs to be -1, determining the 884 plane orientation. 885 886 @since: 2.31 887 888 @param target: Datafield to be filled by extracted plane. It will be resized if 889 necessary. I{(L{DataField})} 890 @param istart: Column where to start (pixel coordinates). I{(int)} 891 @param jstart: Row where to start (pixel coordinates). I{(int)} 892 @param kstart: Level where to start (pixel coordinates). I{(int)} 893 @param width: Pixel width of extracted plane. If B{C{width}} is -1, the yz plane will 894 be extracted. I{(int)} 895 @param height: Pixel height of extracted plane. If B{C{height}} is -1, the xz plane 896 will be extracted I{(int)} 897 @param depth: Pixel depth of extracted plane. If B{C{depth}} is -1, the xy plane will 898 be extracted I{(int)} 899 @param keep_offsets: Keep the physical offsets in extracted field. I{(bool)} 900 """ 901 pass
902
903 - def sum_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets):
904 """ 905 Sums planes in certain direction and extract the result (DataField). One 906 value of set (B{C{width}}, B{C{height}}, B{C{depth}}) needs to be -1, determining the plane 907 orientation. In contrast to L{Brick.extract_plane}, the appropriate start 908 coordinate (e.g. B{C{istart}} if B{C{width}} = -1) is not used for single plane 909 extraction, but the planes are accumulated in whole range (0..xres for given 910 example) 911 912 @since: 2.31 913 914 @param target: Datafield to be filled by summed plane. It will be resized if 915 necessary. I{(L{DataField})} 916 @param istart: Column where to start (pixel coordinates). I{(int)} 917 @param jstart: Row where to start (pixel coordinates). I{(int)} 918 @param kstart: Level where to start (pixel coordinates). I{(int)} 919 @param width: Pixel width of summed plane. If B{C{width}} is -1, the yz planes will be 920 summed. I{(int)} 921 @param height: Pixel height of summed plane. If B{C{height}} is -1, the xz planes will 922 be summed I{(int)} 923 @param depth: Pixel depth of summed plane. If B{C{depth}} is -1, the xy planes will 924 be summed I{(int)} 925 @param keep_offsets: Keep the physical offsets in extracted field. Not 926 implemented. I{(bool)} 927 """ 928 pass
929
930 - def min_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets):
931 """ 932 Finds minima of planes in certain direction and extract the result 933 (DataField). One value of set (B{C{width}}, B{C{height}}, B{C{depth}}) needs to be -1, 934 determining the plane orientation. In contrast to L{Brick.extract_plane}, 935 the appropriate start coordinate (e.g. B{C{istart}} if B{C{width}} = -1) is not used 936 for single plane extraction, but the planes are accumulated in whole range 937 (0..xres for given example) 938 939 @since: 2.32 940 941 @param target: Datafield to be filled by the minima plane. It will be resized if 942 necessary. I{(L{DataField})} 943 @param istart: Column where to start (pixel coordinates). I{(int)} 944 @param jstart: Row where to start (pixel coordinates). I{(int)} 945 @param kstart: Level where to start (pixel coordinates). I{(int)} 946 @param width: Pixel width of summarized plane. If B{C{width}} is -1, the yz planes will 947 be summarized. I{(int)} 948 @param height: Pixel height of summarized plane. If B{C{height}} is -1, the xz planes 949 will be summarized. I{(int)} 950 @param depth: Pixel depth of summarized plane. If B{C{depth}} is -1, the xy planes will 951 be summarized I{(int)} 952 @param keep_offsets: Keep the physical offsets in extracted field. Not 953 implemented. I{(bool)} 954 """ 955 pass
956
957 - def max_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets):
958 """ 959 Finds minima of planes in certain direction and extract the result 960 (DataField). One value of set (B{C{width}}, B{C{height}}, B{C{depth}}) needs to be -1, 961 determining the plane orientation. In contrast to L{Brick.extract_plane}, 962 the appropriate start coordinate (e.g. B{C{istart}} if B{C{width}} = -1) is not used 963 for single plane extraction, but the planes are accumulated in whole range 964 (0..xres for given example) 965 966 @since: 2.32 967 968 @param target: Datafield to be filled by the maxima plane. It will be resized if 969 necessary. I{(L{DataField})} 970 @param istart: Column where to start (pixel coordinates). I{(int)} 971 @param jstart: Row where to start (pixel coordinates). I{(int)} 972 @param kstart: Level where to start (pixel coordinates). I{(int)} 973 @param width: Pixel width of summarized plane. If B{C{width}} is -1, the yz planes will 974 be summarized. I{(int)} 975 @param height: Pixel height of summarized plane. If B{C{height}} is -1, the xz planes 976 will be summarized. I{(int)} 977 @param depth: Pixel depth of extracted plane. If B{C{depth}} is -1, the xy planes will 978 be summarized I{(int)} 979 @param keep_offsets: Keep the physical offsets in extracted field. Not 980 implemented. I{(bool)} 981 """ 982 pass
983
984 - def minpos_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets):
985 """ 986 Finds minima positions of planes in certain direction and extract the result 987 (DataField). One value of set (B{C{width}}, B{C{height}}, B{C{depth}}) needs to be -1, 988 determining the plane orientation. In contrast to L{Brick.extract_plane}, 989 the appropriate start coordinate (e.g. B{C{istart}} if B{C{width}} = -1) is not used 990 for single plane extraction, but the planes are accumulated in whole range 991 (0..xres for given example) 992 993 @since: 2.32 994 995 @param target: Datafield to be filled by the minima positions plane. 996 It will be resized if necessary. I{(L{DataField})} 997 @param istart: Column where to start (pixel coordinates). I{(int)} 998 @param jstart: Row where to start (pixel coordinates). I{(int)} 999 @param kstart: Level where to start (pixel coordinates). I{(int)} 1000 @param width: Pixel width of summarized plane. If B{C{width}} is -1, the yz planes will 1001 be summarized. I{(int)} 1002 @param height: Pixel height of summarized plane. If B{C{height}} is -1, the xz planes 1003 will be summarized. I{(int)} 1004 @param depth: Pixel depth of summarized plane. If B{C{depth}} is -1, the xy planes will 1005 be summarized I{(int)} 1006 @param keep_offsets: Keep the physical offsets in summarized field. Not 1007 implemented. I{(bool)} 1008 """ 1009 pass
1010
1011 - def maxpos_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets):
1012 """ 1013 Finds maxima positions of planes in certain direction and extract the result 1014 (DataField). One value of set (B{C{width}}, B{C{height}}, B{C{depth}}) needs to be -1, 1015 determining the plane orientation. In contrast to L{Brick.extract_plane}, 1016 the appropriate start coordinate (e.g. B{C{istart}} if B{C{width}} = -1) is not used 1017 for single plane extraction, but the planes are accumulated in whole range 1018 (0..xres for given example) 1019 1020 @since: 2.32 1021 1022 @param target: Datafield to be filled by the maxima positions plane. 1023 It will be resized if necessary. I{(L{DataField})} 1024 @param istart: Column where to start (pixel coordinates). I{(int)} 1025 @param jstart: Row where to start (pixel coordinates). I{(int)} 1026 @param kstart: Level where to start (pixel coordinates). I{(int)} 1027 @param width: Pixel width of summarized plane. If B{C{width}} is -1, the yz planes will 1028 be summarized. I{(int)} 1029 @param height: Pixel height of summarized plane. If B{C{height}} is -1, the xz planes 1030 will be summarized I{(int)} 1031 @param depth: Pixel depth of summarized plane. If B{C{depth}} is -1, the xy planes will 1032 be summarized I{(int)} 1033 @param keep_offsets: Keep the physical offsets in summarized field. Not 1034 implemented. I{(bool)} 1035 """ 1036 pass
1037
1038 - def mean_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets):
1039 """ 1040 Finds mean of planes in certain direction and extract the result 1041 (DataField). One value of set (B{C{width}}, B{C{height}}, B{C{depth}}) needs to be -1, 1042 determining the plane orientation. In contrast to L{Brick.extract_plane}, 1043 the appropriate start coordinate (e.g. B{C{istart}} if B{C{width}} = -1) is not used 1044 for single plane extraction, but the planes are accumulated in whole range 1045 (0..xres for given example) 1046 1047 @since: 2.32 1048 1049 @param target: Datafield to be filled by the mean plane. It will be resized if 1050 necessary. I{(L{DataField})} 1051 @param istart: Column where to start (pixel coordinates). I{(int)} 1052 @param jstart: Row where to start (pixel coordinates). I{(int)} 1053 @param kstart: Level where to start (pixel coordinates). I{(int)} 1054 @param width: Pixel width of summarized plane. If B{C{width}} is -1, the yz planes will 1055 be summarized. I{(int)} 1056 @param height: Pixel height of summarized plane. If B{C{height}} is -1, the xz planes 1057 will be summarized. I{(int)} 1058 @param depth: Pixel depth of summarized plane. If B{C{depth}} is -1, the xy planes will 1059 be summarized. I{(int)} 1060 @param keep_offsets: Keep the physical offsets in summarized field. Not 1061 implemented. I{(bool)} 1062 """ 1063 pass
1064
1065 - def rms_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets):
1066 """ 1067 Finds rms of planes in certain direction and extract the result 1068 (DataField). One value of set (B{C{width}}, B{C{height}}, B{C{depth}}) needs to be -1, 1069 determining the plane orientation. In contrast to L{Brick.extract_plane}, 1070 the appropriate start coordinate (e.g. B{C{istart}} if B{C{width}} = -1) is not used 1071 for single plane extraction, but the planes are accumulated in whole range 1072 (0..xres for given example) 1073 1074 @since: 2.32 1075 1076 @param target: Datafield to be filled by the rms plane. It will be resized if 1077 necessary. I{(L{DataField})} 1078 @param istart: Column where to start (pixel coordinates). I{(int)} 1079 @param jstart: Row where to start (pixel coordinates). I{(int)} 1080 @param kstart: Level where to start (pixel coordinates). I{(int)} 1081 @param width: Pixel width of summarized plane. If B{C{width}} is -1, the yz planes will 1082 be summarized. I{(int)} 1083 @param height: Pixel height of summarized plane. If B{C{height}} is -1, the xz planes 1084 will be summarized. I{(int)} 1085 @param depth: Pixel depth of summarized plane. If B{C{depth}} is -1, the xy planes will 1086 be summarized. I{(int)} 1087 @param keep_offsets: Keep the physical offsets in extracted field. Not 1088 implemented. I{(bool)} 1089 """ 1090 pass
1091
1092 - def extract_line(target, istart, jstart, kstart, iend, jend, kend, keep_offsets):
1093 """ 1094 Extract a line (DataLine) from the brick. 1095 1096 Only line orientations parallel to coordinate axes are supported now, i.e. 1097 two of the start coordinates need to be same as end ones. 1098 1099 @since: 2.31 1100 1101 @param target: Dataline to be filled by extracted line. It will be resized if 1102 necessary. I{(L{DataLine})} 1103 @param istart: Column where to start (pixel coordinates). I{(int)} 1104 @param jstart: Row where to start (pixel coordinates). I{(int)} 1105 @param kstart: Level where to start (pixel coordinates). I{(int)} 1106 @param iend: Column where to start (pixel coordinates). I{(int)} 1107 @param jend: Row where to start (pixel coordinates). I{(int)} 1108 @param kend: Level where to start (pixel coordinates). I{(int)} 1109 @param keep_offsets: Keep physical offsets in extracted line. I{(bool)} 1110 """ 1111 pass
1112
1113 - def get_zcalibration():
1114 """ 1115 Gets the z-axis non-linear calibration of a data brick. 1116 1117 @since: 2.32 1118 1119 @return: Z Calibration (non-linear Z-axis values as ordinates). I{(L{DataLine})} 1120 """ 1121 return None
1122
1123 - def set_zcalibration(calibration):
1124 """ 1125 Sets the z-axis non-linear calibration of a data brick. 1126 1127 @since: 2.32 1128 1129 @param calibration: DataLine pointer with z-axis non-linear calibration 1130 of a data brick (values are stored as ordinates). It can also 1131 be B{C{None}} to unset the calibration. I{(L{DataLine})} 1132 """ 1133 pass
1134
1135 - def get_data():
1136 """ 1137 Extract the data of a data brick. 1138 1139 The returned list contains a copy of the data. Changing its contents does 1140 not change the data brick's data. 1141 1142 1143 @return: List containing extracted data brick data. I{(list)} 1144 """ 1145 return None
1146
1147 - def set_data(data):
1148 """ 1149 Sets the entire contents of a data brick. 1150 1151 The length of B{C{data}} must be equal to the number of elements of the data 1152 brick. 1153 1154 @param data: Sequence of floating point values. I{(list)} 1155 """ 1156 pass
1157
1158 - def duplicate():
1159 """ 1160 Convenience macro doing L{gwy_serializable_duplicate}() with all the necessary 1161 typecasting. 1162 1163 @since: 2.31 1164 1165 @return: I{(L{Brick})} 1166 """ 1167 return None
1168
1169 - def get_data_pointer():
1170 """ 1171 Gets pointer to data which the brick contains. 1172 1173 1174 @return: integer pointing to the raw data of the brick I{(long)} 1175 """ 1176 return None
1177 1178
1179 -class ColorAxis:
1180 - def __init__(orientation):
1181 """ 1182 Creates a new color axis. 1183 1184 1185 @param orientation: The orientation of the axis. I{(GtkOrientation)} 1186 @return: The newly created color axis as a B{C{GtkWidget}}. I{(L{gtk.Widget})} 1187 """ 1188 return None
1189
1190 - def get_range():
1191 """ 1192 Gets the range of a color axis. 1193 1194 @return: Tuple consisting of 2 values (B{C{min}}, B{C{max}}). (I{(float)}, I{(float)}) 1195 """ 1196 return None, None
1197
1198 - def set_range(min, max):
1199 """ 1200 Sets the range of a color axis. 1201 1202 @param min: The range minimum. I{(float)} 1203 @param max: The range maximum. I{(float)} 1204 """ 1205 pass
1206
1207 - def get_si_unit():
1208 """ 1209 Gets the SI unit a color axis displays. 1210 1211 1212 @return: The SI unit. I{(L{SIUnit})} 1213 """ 1214 return None
1215
1216 - def set_si_unit(unit):
1217 """ 1218 Sets the SI unit a color axis displays. 1219 1220 @param unit: A SI unit to display next to minimum and maximum value. I{(L{SIUnit})} 1221 """ 1222 pass
1223
1224 - def set_gradient(gradient):
1225 """ 1226 Sets the color gradient a color axis should use. 1227 1228 @param gradient: Name of gradient B{C{axis}} should use. It should exist. I{(string)} 1229 """ 1230 pass
1231
1232 - def get_gradient():
1233 """ 1234 Gets the color gradient a color axis uses. 1235 1236 1237 @return: The color gradient. I{(string)} 1238 """ 1239 return None
1240
1241 - def get_ticks_style():
1242 """ 1243 Gets ticks style of a color axis. 1244 1245 1246 @return: The ticks style. I{(TicksStyle)} 1247 """ 1248 return None
1249
1250 - def set_ticks_style(ticks_style):
1251 """ 1252 Sets the ticks style of a color axis. 1253 1254 @param ticks_style: The ticks style to use. Expected values: C{B{TICKS_STYLE_NONE}}, C{B{TICKS_STYLE_CENTER}}, C{B{TICKS_STYLE_AUTO}}, C{B{TICKS_STYLE_UNLABELED}}, C{B{TICKS_STYLE_UNLABELLED}}. I{(L{TicksStyle})} 1255 """ 1256 pass
1257
1258 - def get_labels_visible():
1259 """ 1260 Gets the visibility of labels of a color axis. 1261 1262 1263 @return: B{C{True}} if labels are displayed, B{C{False}} if they are omitted. I{(bool)} 1264 """ 1265 return None
1266
1267 - def set_labels_visible(labels_visible):
1268 """ 1269 Sets the visibility of labels of a color axis. 1270 1271 @param labels_visible: B{C{True}} to display labels with minimum and maximum values, 1272 B{C{False}} to display no labels. I{(bool)} 1273 """ 1274 pass
1275 1276
1277 -class ColorButton:
1278 - def __init__():
1279 """ 1280 Creates a new color button. This returns a widget in the form of 1281 a small button containing a swatch representing the current selected 1282 color. When the button is clicked, a color-selection dialog will open, 1283 allowing the user to select a color. The swatch will be updated to reflect 1284 the new color when the user finishes. 1285 1286 1287 @return: a new color button. I{(L{gtk.Widget})} 1288 """ 1289 return None
1290
1291 - def set_color(color):
1292 """ 1293 Sets the current color to be B{C{color}}. 1294 1295 @param color: A B{C{RGBA}} to set the current color with. I{(const-RGBA*)} 1296 """ 1297 pass
1298
1299 - def get_color():
1300 """ 1301 Sets B{C{color}} to be the current color in the B{C{ColorButton}} widget. 1302 1303 @return: Value B{C{color}}. (I{(RGBAOutArg)}) 1304 """ 1305 return None
1306
1307 - def set_use_alpha(use_alpha):
1308 """ 1309 Sets whether or not the color button should use the alpha channel. 1310 1311 @param use_alpha: B{C{True}} if color button should use alpha channel, B{C{False}} if not. I{(bool)} 1312 """ 1313 pass
1314
1315 - def get_use_alpha():
1316 """ 1317 Does the color selection dialog use the alpha channel? 1318 1319 1320 @return: B{C{True}} if the color sample uses alpha channel, B{C{False}} if not. I{(bool)} 1321 """ 1322 return None
1323 1324
1325 -class Container:
1326 """ 1327 A container with items identified by a GQuark 1328 1329 1330 B{C{Container}} is a general-purpose container, it can hold atomic types, 1331 strings and objects. However, objects must implement the B{C{Serializable}} 1332 interface, because the container itself is serializable. 1333 1334 A new container can be created with L{Container.new}(), items can be stored 1335 with function like L{Container.set_double}(), read with 1336 L{Container.get_double}(), and removed with L{Container.remove}() or 1337 L{Container.remove_by_prefix}(). A presence of a value can be tested with 1338 L{Container.contains}(), convenience functions for reading (updating) a 1339 value only if it is present like L{Container.gis_double}(), are available 1340 too. 1341 1342 B{C{Container}} takes ownership of stored non-atomic items. For strings, this 1343 means you cannot store static strings (use g_strdup() to duplicate them), 1344 and must not free stored dynamic strings, as the container will free them 1345 itself when they are removed or when the container is finalized. For 1346 objects, this means it takes a reference on the object (released when the 1347 object is removed or the container is finalized), so you usually want to 1348 g_object_unref() objects after storing them to a container. 1349 1350 Items in a B{C{Container}} can be identified by a B{C{GQuark}} or the corresponding 1351 string. While B{C{GQuark}}'s are atomic values and allow faster acces, they are 1352 less convenient for casual usage -- each B{C{GQuark}} key function like 1353 L{Container.set_double}() thus has a string-key counterpart 1354 L{Container.set_double_by_name}(). 1355 1356 """
1357 - def __init__():
1358 """ 1359 Creates a new B{C{Container}}. 1360 1361 1362 @return: The container, as a B{C{GObject}}. I{(L{Container})} 1363 """ 1364 return None
1365
1366 - def get_n_items():
1367 """ 1368 Gets the number of items in a container. 1369 1370 1371 @return: The number of items. I{(int)} 1372 """ 1373 return None
1374
1375 - def value_type(key):
1376 """ 1377 Returns the type of value in B{C{container}} identified by B{C{key}}. 1378 1379 1380 @param key: A B{C{GQuark}} key. I{(int)} 1381 @return: The value type as B{C{GType}}; 0 if there is no such value. I{(GType)} 1382 """ 1383 return None
1384
1385 - def contains(key):
1386 """ 1387 Returns B{C{True}} if B{C{container}} contains a value identified by B{C{key}}. 1388 1389 1390 @param key: A B{C{GQuark}} key. I{(int)} 1391 @return: Whether B{C{container}} contains something identified by B{C{key}}. I{(bool)} 1392 """ 1393 return None
1394
1395 - def remove(key):
1396 """ 1397 Removes a value identified by B{C{key}} from a container. 1398 1399 1400 @param key: A B{C{GQuark}} key. I{(int)} 1401 @return: B{C{True}} if there was such a value and was removed. I{(bool)} 1402 """ 1403 return None
1404
1405 - def remove_by_prefix(prefix):
1406 """ 1407 Removes a values whose key start with B{C{prefix}} from container B{C{container}}. 1408 1409 B{C{prefix}} can be B{C{None}}, all values are then removed. 1410 1411 1412 @param prefix: A nul-terminated id prefix. I{(string)} 1413 @return: The number of values removed. I{(int)} 1414 """ 1415 return None
1416
1417 - def transfer(dest, source_prefix, dest_prefix, force):
1418 """ 1419 Copies a items from one place in container to another place. 1420 1421 The copies are shallow, objects are not physically duplicated, only 1422 referenced in B{C{dest}}. 1423 1424 1425 @param dest: Destination container. It may be the same container as B{C{source}}, but 1426 B{C{source_prefix}} and B{C{dest_prefix}} may not overlap then. I{(L{Container})} 1427 @param source_prefix: Prefix in B{C{source}} to take values from. I{(string)} 1428 @param dest_prefix: Prefix in B{C{dest}} to put values to. I{(string)} 1429 @param force: B{C{True}} to replace existing values in B{C{dest}}. I{(bool)} 1430 @return: The number of actually transferred items. I{(int)} 1431 """ 1432 return None
1433
1434 - def rename(key, newkey, force):
1435 """ 1436 Makes a value in B{C{container}} identified by B{C{key}} to be identified by B{C{newkey}}. 1437 1438 When B{C{force}} is B{C{True}} existing value at B{C{newkey}} is removed from B{C{container}}. 1439 When it's B{C{False}}, an existing value B{C{newkey}} inhibits the rename and B{C{False}} 1440 is returned. 1441 1442 1443 @param key: The current key. I{(int)} 1444 @param newkey: A new key for the value. I{(int)} 1445 @param force: Whether to replace existing value at B{C{newkey}}. I{(bool)} 1446 @return: Whether the rename succeeded. I{(bool)} 1447 """ 1448 return None
1449
1450 - def foreach(prefix, function, user_data):
1451 """ 1452 Calls B{C{function}} on each B{C{container}} item whose identifier starts with 1453 B{C{prefix}}. 1454 1455 The function is called B{C{function}}(B{C{GQuark}} key, B{C{GValue}} *value, user_data). 1456 1457 1458 @param prefix: A nul-terminated id prefix. I{(string)} 1459 @param function: The function called on the items. I{(GHFunc)} 1460 @param user_data: The user data passed to B{C{function}}. I{(gpointer)} 1461 @return: The number of items B{C{function}} was called on. I{(int)} 1462 """ 1463 return None
1464
1465 - def set_boolean(key, value):
1466 """ 1467 Stores a boolean into B{C{container}}, identified by B{C{key}}. 1468 1469 @param key: A B{C{GQuark}} key. I{(int)} 1470 @param value: A boolean. I{(bool)} 1471 """ 1472 pass
1473
1474 - def get_boolean(key):
1475 """ 1476 Returns the boolean in B{C{container}} identified by B{C{key}}. 1477 1478 1479 @param key: A B{C{GQuark}} key. I{(int)} 1480 @return: The boolean as B{C{gboolean}}. I{(bool)} 1481 """ 1482 return None
1483
1484 - def set_uchar(key, value):
1485 """ 1486 Stores an unsigned character into B{C{container}}, identified by B{C{key}}. 1487 1488 @param key: A B{C{GQuark}} key. I{(int)} 1489 @param value: An unsigned character. I{(guchar)} 1490 """ 1491 pass
1492
1493 - def get_uchar(key):
1494 """ 1495 Returns the unsigned character in B{C{container}} identified by B{C{key}}. 1496 1497 1498 @param key: A B{C{GQuark}} key. I{(int)} 1499 @return: The character as B{C{guchar}}. I{(guchar)} 1500 """ 1501 return None
1502
1503 - def set_int32(key, value):
1504 """ 1505 Stores a 32bit integer into B{C{container}}, identified by B{C{key}}. 1506 1507 @param key: A B{C{GQuark}} key. I{(int)} 1508 @param value: A 32bit integer. I{(int)} 1509 """ 1510 pass
1511
1512 - def get_int32(key):
1513 """ 1514 Returns the 32bit integer in B{C{container}} identified by B{C{key}}. 1515 1516 1517 @param key: A B{C{GQuark}} key. I{(int)} 1518 @return: The integer as B{C{guint32}}. I{(int)} 1519 """ 1520 return None
1521
1522 - def set_enum(key, value):
1523 """ 1524 Stores an enum into B{C{container}}, identified by B{C{key}}. 1525 1526 Note enums are treated as 32bit integers. 1527 1528 @param key: A B{C{GQuark}} key. I{(int)} 1529 @param value: An enum integer. I{(int)} 1530 """ 1531 pass
1532
1533 - def get_enum(key):
1534 """ 1535 Returns the enum in B{C{container}} identified by B{C{key}}. 1536 1537 Note enums are treated as 32bit integers. 1538 1539 1540 @param key: A B{C{GQuark}} key. I{(int)} 1541 @return: The enum as B{C{gint}}. I{(int)} 1542 """ 1543 return None
1544
1545 - def set_int64(key, value):
1546 """ 1547 Stores a 64bit integer into B{C{container}}, identified by B{C{key}}. 1548 1549 @param key: A B{C{GQuark}} key. I{(int)} 1550 @param value: A 64bit integer. I{(gint64)} 1551 """ 1552 pass
1553
1554 - def get_int64(key):
1555 """ 1556 Returns the 64bit integer in B{C{container}} identified by B{C{key}}. 1557 1558 1559 @param key: A B{C{GQuark}} key. I{(int)} 1560 @return: The 64bit integer as B{C{guint64}}. I{(gint64)} 1561 """ 1562 return None
1563
1564 - def set_double(key, value):
1565 """ 1566 Stores a double into B{C{container}}, identified by B{C{key}}. 1567 1568 @param key: A B{C{GQuark}} key. I{(int)} 1569 @param value: A double. I{(float)} 1570 """ 1571 pass
1572
1573 - def get_double(key):
1574 """ 1575 Returns the double in B{C{container}} identified by B{C{key}}. 1576 1577 1578 @param key: A B{C{GQuark}} key. I{(int)} 1579 @return: The double as B{C{gdouble}}. I{(float)} 1580 """ 1581 return None
1582
1583 - def get_string(key):
1584 """ 1585 Returns the string in B{C{container}} identified by B{C{key}}. 1586 1587 The returned string must be treated as constant and never freed or modified. 1588 1589 1590 @param key: A B{C{GQuark}} key. I{(int)} 1591 @return: The string. I{(string)} 1592 """ 1593 return None
1594
1595 - def set_object(key, value):
1596 """ 1597 Stores an object into B{C{container}}, identified by B{C{key}}. 1598 1599 The container claims ownership on the object, i.e. its reference count is 1600 incremented. 1601 1602 The object must implement B{C{Serializable}} interface to allow serialization 1603 of the container. 1604 1605 @param key: A B{C{GQuark}} key. I{(int)} 1606 @param value: An object to store into container. I{(L{gobject.GObject})} 1607 """ 1608 pass
1609
1610 - def get_object(key):
1611 """ 1612 Returns the object in B{C{container}} identified by B{C{key}}. 1613 1614 The returned object doesn't have its reference count increased, use 1615 g_object_ref() if you want to access it even when B{C{container}} may cease 1616 to exist. 1617 1618 1619 @param key: A B{C{GQuark}} key. I{(int)} 1620 @return: The object as B{C{gpointer}}. I{(L{gobject.GObject})} 1621 """ 1622 return None
1623
1624 - def keys():
1625 """ 1626 Gets all quark keys of a container. 1627 1628 @since: 2.7 1629 1630 @return: A newly allocated array with quark keys of all B{C{container}} items, 1631 in no particular order. The number of items can be obtained 1632 with L{Container.get_n_items}(). If there are no items, B{C{None}} 1633 is returned. I{(list)} 1634 """ 1635 return None
1636
1637 - def keys_by_name():
1638 """ 1639 Gets all string keys of a container. 1640 1641 @since: 2.7 1642 1643 @return: A newly allocated array with string keys of all B{C{container}} items, 1644 in no particular order. The number of items can be obtained 1645 with L{Container.get_n_items}(). If there are no items, B{C{None}} 1646 is returned. Unlike the array the strings are owned by GLib and 1647 must not be freed. I{(ConstStringArray*)} 1648 """ 1649 return None
1650
1651 - def duplicate_by_prefix(keys):
1652 """ 1653 Duplicates a container keeping only values under given prefixes. 1654 1655 Like L{Container.duplicate}(), this method creates a deep copy, that is 1656 contained object are physically duplicated too, not just referenced again. 1657 1658 1659 @param keys: I{(StringArray*)} 1660 @return: A newly created container. I{(L{Container})} 1661 """ 1662 return None
1663
1664 - def serialize_to_text():
1665 """ 1666 Creates a text representation of B{C{container}} contents. 1667 1668 Note only simple data types are supported as serialization of compound 1669 objects is not controllable. 1670 1671 1672 @return: A pointer array, each item containing string with one container 1673 item representation (name, type, value). The array is sorted by name. I{(StringArray*)} 1674 """ 1675 return None
1676
1677 - def contains_by_name(n):
1678 """ 1679 Expands to B{C{True}} if container B{C{c}} contains a value identified by name B{C{n}}. 1680 1681 @param n: A nul-terminated name (id). I{(string)} 1682 @return: I{(bool)} 1683 """ 1684 return None
1685
1686 - def remove_by_name(n):
1687 """ 1688 Removes a value identified by name B{C{n}} from container B{C{c}}. 1689 1690 Expands to B{C{True}} if there was such a value and was removed. 1691 1692 @param n: A nul-terminated name (id). I{(string)} 1693 @return: I{(bool)} 1694 """ 1695 return None
1696
1697 - def rename_by_name(n, new_name, force):
1698 """ 1699 Makes a value in container B{C{c}} identified by name B{C{n}} to be identified by 1700 new name B{C{nn}}. 1701 1702 See L{Container.rename}() for details. 1703 1704 @param n: A nul-terminated name (id). I{(string)} 1705 @param new_name: I{(string)} 1706 @param force: I{(bool)} 1707 @return: I{(bool)} 1708 """ 1709 return None
1710
1711 - def set_boolean_by_name(n, v):
1712 """ 1713 Stores a boolean into container B{C{c}}, identified by name B{C{n}}. 1714 1715 @param n: A nul-terminated name (id). I{(string)} 1716 @param v: A boolean. I{(bool)} 1717 """ 1718 pass
1719
1720 - def set_double_by_name(n, v):
1721 """ 1722 Stores a double into container B{C{c}}, identified by name B{C{n}}. 1723 1724 @param n: A nul-terminated name (id). I{(string)} 1725 @param v: A double integer. I{(float)} 1726 """ 1727 pass
1728
1729 - def set_enum_by_name(n, v):
1730 """ 1731 Stores an enum into container B{C{c}}, identified by name B{C{n}}. 1732 1733 Note enums are treated as 32bit integers. 1734 1735 @param n: A nul-terminated name (id). I{(string)} 1736 @param v: An enum. I{(int)} 1737 """ 1738 pass
1739
1740 - def set_int32_by_name(n, v):
1741 """ 1742 Stores a 32bit integer into container B{C{c}}, identified by name B{C{n}}. 1743 1744 @param n: A nul-terminated name (id). I{(string)} 1745 @param v: A 32bit integer. I{(int)} 1746 """ 1747 pass
1748
1749 - def set_int64_by_name(n, v):
1750 """ 1751 Stores a 64bit integer into container B{C{c}}, identified by name B{C{n}}. 1752 1753 @param n: A nul-terminated name (id). I{(string)} 1754 @param v: A 64bit integer. I{(gint64)} 1755 """ 1756 pass
1757
1758 - def set_object_by_name(n, v):
1759 """ 1760 Stores an object into container B{C{c}}, identified by name B{C{n}}. 1761 1762 See L{Container.set_object}() for details. 1763 1764 @param n: A nul-terminated name (id). I{(string)} 1765 @param v: An object to store into container. I{(L{gobject.GObject})} 1766 """ 1767 pass
1768
1769 - def set_uchar_by_name(n, v):
1770 """ 1771 Stores an unsigned character into container B{C{c}}, identified by name B{C{n}}. 1772 1773 @param n: A nul-terminated name (id). I{(string)} 1774 @param v: An unsigned character. I{(guchar)} 1775 """ 1776 pass
1777
1778 - def get_boolean_by_name(n):
1779 """ 1780 Gets the boolean in container B{C{c}} identified by name B{C{n}}. 1781 1782 @param n: A nul-terminated name (id). I{(string)} 1783 @return: I{(bool)} 1784 """ 1785 return None
1786
1787 - def get_double_by_name(n):
1788 """ 1789 Gets the double in container B{C{c}} identified by name B{C{n}}. 1790 1791 @param n: A nul-terminated name (id). I{(string)} 1792 @return: I{(float)} 1793 """ 1794 return None
1795
1796 - def get_enum_by_name(n):
1797 """ 1798 Gets the enum in container B{C{c}} identified by name B{C{n}}. 1799 1800 Note enums are treated as 32bit integers. 1801 1802 @param n: A nul-terminated name (id). I{(string)} 1803 @return: I{(int)} 1804 """ 1805 return None
1806
1807 - def get_int32_by_name(n):
1808 """ 1809 Gets the 32bit integer in container B{C{c}} identified by name B{C{n}}. 1810 1811 @param n: A nul-terminated name (id). I{(string)} 1812 @return: I{(int)} 1813 """ 1814 return None
1815
1816 - def get_int64_by_name(n):
1817 """ 1818 Gets the 64bit integer in container B{C{c}} identified by name B{C{n}}. 1819 1820 @param n: A nul-terminated name (id). I{(string)} 1821 @return: I{(gint64)} 1822 """ 1823 return None
1824
1825 - def get_uchar_by_name(n):
1826 """ 1827 Gets the unsigned character in container B{C{c}} identified by name B{C{n}}. 1828 1829 @param n: A nul-terminated name (id). I{(string)} 1830 @return: I{(guchar)} 1831 """ 1832 return None
1833
1834 - def get_object_by_name(n):
1835 """ 1836 Gets the object in container B{C{c}} identified by name B{C{n}}. 1837 1838 The returned object doesn't have its reference count increased, use 1839 g_object_ref() if you want to access it even when B{C{container}} may cease 1840 to exist. 1841 1842 @param n: A nul-terminated name (id). I{(string)} 1843 @return: I{(L{gobject.GObject})} 1844 """ 1845 return None
1846
1847 - def get_string_by_name(n):
1848 """ 1849 Gets the string in container B{C{c}} identified by name B{C{n}}. 1850 1851 The returned string must be treated as constant and never freed or modified. 1852 1853 @param n: A nul-terminated name (id). I{(string)} 1854 @return: I{(string)} 1855 """ 1856 return None
1857
1858 - def duplicate():
1859 """ 1860 Convenience macro doing L{gwy_serializable_duplicate}() with all the necessary 1861 typecasting. 1862 1863 @return: I{(L{Container})} 1864 """ 1865 return None
1866
1867 - def set_string_by_name(name, value):
1868 """ 1869 Stores a string into container B{C{c}}, identified by name B{C{n}}. 1870 1871 The container makes a copy of the string, so it can be used on static 1872 strings. 1873 1874 @since: 2.38 1875 1876 @param name: I{(string)} 1877 @param value: I{(string)} 1878 """ 1879 pass
1880
1881 - def set_string(key, value):
1882 """ 1883 Stores a string into B{C{container}}, identified by B{C{key}}. 1884 1885 The container makes a copy of the string, so it can be used on static 1886 strings. 1887 1888 @since: 2.38 1889 1890 @param key: A B{C{GQuark}} key. I{(int)} 1891 @param value: A nul-terminated string. I{(string)} 1892 """ 1893 pass
1894
1895 - def keys_by_name():
1896 """ 1897 Gets all string keys of a container. 1898 1899 @since: 2.7 1900 1901 @return: A newly allocated array with string keys of all B{C{container}} items, 1902 in no particular order. The number of items can be obtained 1903 with L{Container.get_n_items}(). If there are no items, B{C{None}} 1904 is returned. Unlike the array the strings are owned by GLib and 1905 must not be freed. I{(list)} 1906 """ 1907 return None
1908
1909 - def get_value_by_name(name):
1910 """ 1911 Gets the value in container B{C{c}} identified by name B{C{n}}. 1912 1913 @param name: I{(string)} 1914 @return: I{(any)} 1915 """ 1916 return None
1917
1918 - def get_value(key):
1919 """ 1920 Returns the value in B{C{container}} identified by B{C{key}}. 1921 1922 1923 @param key: A B{C{GQuark}} key. I{(int)} 1924 @return: The value as a B{C{GValue}}. I{(any)} 1925 """ 1926 return None
1927
1928 - def set_value_by_name(name, value):
1929 """ 1930 Inserts or updates several values in B{C{container}}. 1931 1932 @param name: I{(string)} 1933 @param value: I{(any)} 1934 """ 1935 pass
1936
1937 - def set_value(key, value):
1938 """ 1939 Inserts or updates several values in B{C{container}}. 1940 1941 @param key: I{(int)} 1942 @param value: I{(any)} 1943 """ 1944 pass
1945 1946
1947 -class Curve:
1948 - def __init__():
1949 """ 1950 Creates B{C{Curve}} widget. By default, the widget will have 3 curves. 1951 1952 1953 @return: new B{C{Curve}} widget. I{(L{gtk.Widget})} 1954 """ 1955 return None
1956
1957 - def reset():
1958 """ 1959 Removes all control points, resetting the curves to their initial state. 1960 1961 1962 """ 1963 pass
1964
1965 - def set_range(min_x, max_x, min_y, max_y):
1966 pass
1967
1968 - def set_curve_type(type):
1969 pass
1970
1971 - def set_channels(num_channels, colors):
1972 pass
1973 1974
1975 -class DataField:
1976 """ 1977 Two-dimensional data representation 1978 1979 1980 B{C{DataField}} is an object that is used for representation of all 1981 two-dimensional data matrices. Most of the basic data handling and 1982 processing functions in Gwyddion are declared here as they are connected 1983 with B{C{DataField}}. 1984 1985 """
1986 - def __init__(xres, yres, xreal, yreal, nullme):
1987 """ 1988 Creates a new data field. 1989 1990 1991 @param xres: X-resolution, i.e., the number of columns. I{(int)} 1992 @param yres: Y-resolution, i.e., the number of rows. I{(int)} 1993 @param xreal: Real horizontal physical dimension. I{(float)} 1994 @param yreal: Real vertical physical dimension. I{(float)} 1995 @param nullme: Whether the data field should be initialized to zeroes. If B{C{False}}, 1996 the data will not be initialized. I{(bool)} 1997 @return: A newly created data field. I{(L{DataField})} 1998 """ 1999 return None
2000
2001 - def sum_fields(operand1, operand2):
2002 """ 2003 Sums two data fields. 2004 2005 @param operand1: First data field operand. I{(L{DataField})} 2006 @param operand2: Second data field operand. I{(L{DataField})} 2007 """ 2008 pass
2009
2010 - def subtract_fields(operand1, operand2):
2011 """ 2012 Subtracts one data field from another. 2013 2014 @param operand1: First data field operand. I{(L{DataField})} 2015 @param operand2: Second data field operand. I{(L{DataField})} 2016 """ 2017 pass
2018
2019 - def divide_fields(operand1, operand2):
2020 """ 2021 Divides one data field with another. 2022 2023 @param operand1: First data field operand. I{(L{DataField})} 2024 @param operand2: Second data field operand. I{(L{DataField})} 2025 """ 2026 pass
2027
2028 - def multiply_fields(operand1, operand2):
2029 """ 2030 Multiplies two data fields. 2031 2032 @param operand1: First data field operand. I{(L{DataField})} 2033 @param operand2: Second data field operand. I{(L{DataField})} 2034 """ 2035 pass
2036
2037 - def min_of_fields(operand1, operand2):
2038 """ 2039 Finds point-wise maxima of two data fields. 2040 2041 @param operand1: First data field operand. I{(L{DataField})} 2042 @param operand2: Second data field operand. I{(L{DataField})} 2043 """ 2044 pass
2045
2046 - def max_of_fields(operand1, operand2):
2047 """ 2048 Finds point-wise minima of two data fields. 2049 2050 @param operand1: First data field operand. I{(L{DataField})} 2051 @param operand2: Second data field operand. I{(L{DataField})} 2052 """ 2053 pass
2054
2055 - def hypot_of_fields(operand1, operand2):
2056 """ 2057 Finds point-wise hypotenuse of two data fields. 2058 2059 @since: 2.31 2060 2061 @param operand1: First data field operand. I{(L{DataField})} 2062 @param operand2: Second data field operand. I{(L{DataField})} 2063 """ 2064 pass
2065
2066 - def check_compatibility(data_field2, check):
2067 """ 2068 Checks whether two data fields are compatible. 2069 2070 2071 @param data_field2: Another data field. I{(L{DataField})} 2072 @param check: The compatibility tests to perform. Expected values: C{B{DATA_COMPATIBILITY_RES}}, C{B{DATA_COMPATIBILITY_REAL}}, C{B{DATA_COMPATIBILITY_MEASURE}}, C{B{DATA_COMPATIBILITY_LATERAL}}, C{B{DATA_COMPATIBILITY_VALUE}}, C{B{DATA_COMPATIBILITY_ALL}}. I{(L{DataCompatibilityFlags})} 2073 @return: Zero if all tested properties are compatible. Flags corresponding 2074 to failed tests if data fields are not compatible. I{(DataCompatibilityFlags)} 2075 """ 2076 return None
2077
2078 - def extend(left, right, up, down, exterior, fill_value, keep_offsets):
2079 """ 2080 Creates a new data field by extending another data field using the specified 2081 method of exterior handling. 2082 2083 @since: 2.36 2084 2085 @param left: Number of pixels to extend to the left (towards lower column indices). I{(int)} 2086 @param right: Number of pixels to extend to the right (towards higher column 2087 indices). I{(int)} 2088 @param up: Number of pixels to extend up (towards lower row indices). I{(int)} 2089 @param down: Number of pixels to extend down (towards higher row indices). I{(int)} 2090 @param exterior: Exterior pixels handling. Expected values: C{B{EXTERIOR_UNDEFINED}}, C{B{EXTERIOR_BORDER_EXTEND}}, C{B{EXTERIOR_MIRROR_EXTEND}}, C{B{EXTERIOR_PERIODIC}}, C{B{EXTERIOR_FIXED_VALUE}}. I{(L{ExteriorType})} 2091 @param fill_value: The value to use with B{C{EXTERIOR_FIXED_VALUE}} exterior. I{(float)} 2092 @param keep_offsets: B{C{True}} to set the X and Y offsets of the new field 2093 using B{C{field}} offsets. B{C{False}} to set offsets 2094 of the new field to zeroes. I{(bool)} 2095 @return: A newly created data field. I{(L{DataField})} 2096 """ 2097 return None
2098
2099 - def laplace_solve(mask, grain_id, qprec):
2100 """ 2101 Replaces masked areas by the solution of Laplace equation. 2102 2103 The boundary conditions on mask boundaries are Dirichlet with values given 2104 by pixels on the outer boundary of the masked area. Boundary conditions at 2105 field edges are Neumann conditions ∂z/∂n=0 where n denotes the normal to the 2106 edge. If entire area of B{C{field}} is to be replaced the problem is 2107 underspecified; B{C{field}} will be filled with zeroes. 2108 2109 For the default value of B{C{qprec}} the the result should be good enough for any 2110 image processing purposes with the typical local error of order 10⁻⁵ for 2111 very large grains and possibly much smaller for small grains. You can lower 2112 B{C{qprec}} down to about 0.3 or even 0.2 if speed is crucial and some precision 2113 can be sacrificed. Below that the result just starts becoming somewhat 2114 worse for not much speed increase. Conversely, you may wish to increase 2115 B{C{qprec}} up to 3 or even 5 if accuracy is important and you can afford the 2116 increased computation time. 2117 2118 @since: 2.47 2119 2120 @param mask: A two-dimensional data field containing mask defining the areas to 2121 interpolate. I{(L{DataField})} 2122 @param grain_id: The id number of the grain to replace with the solution of 2123 Laplace equation, from 1 to B{C{ngrains}} (see 2124 L{DataField.grain_numbers}()). Passing 0 means to replace the 2125 entire empty space outside grains while passing a negative value 2126 means to replace the entire masked area. I{(int)} 2127 @param qprec: Speed-accuracy tuning parameter. Pass 1.0 for the default that is 2128 fast and sufficiently precise. I{(float)} 2129 """ 2130 pass
2131
2132 - def correct_laplace_iteration(mask_field, buffer_field, corrfactor):
2133 """ 2134 Performs one interation of Laplace data correction. 2135 2136 Tries to remove all the points in mask off the data by using 2137 iterative method similar to solving heat flux equation. 2138 2139 Use this function repeatedly until reasonable B{C{error}} is reached. 2140 2141 @warning:For almost all purposes this function was superseded by 2142 non-iteratie L{DataField.laplace_solve}() which is simultaneously much 2143 faster and more accurate. 2144 2145 @param mask_field: Mask of places to be corrected. I{(L{DataField})} 2146 @param buffer_field: Initialized to same size as mask and data. I{(L{DataField})} 2147 @param corrfactor: Correction factor within step. I{(float)} 2148 @return: Value B{C{error}}. (I{(float)}) 2149 """ 2150 return None
2151
2152 - def correct_average(mask_field):
2153 """ 2154 Fills data under mask with the average value. 2155 2156 This function simply puts average value of all the B{C{data_field}} values (both 2157 masked and unmasked) into points in B{C{data_field}} lying under points where 2158 B{C{mask_field}} values are nonzero. 2159 2160 In most cases you probably want to use 2161 L{DataField.correct_average_unmasked}() instead. 2162 2163 @param mask_field: Mask of places to be corrected. I{(L{DataField})} 2164 """ 2165 pass
2166
2167 - def correct_average_unmasked(mask_field):
2168 """ 2169 Fills data under mask with the average value of unmasked data. 2170 2171 This function calculates the average value of all unmasked pixels in 2172 B{C{data_field}} and then fills all the masked pixels with this average value. 2173 It is useful as the first rough step of correction of data under the mask. 2174 2175 If all data are masked the field is filled with zeroes. 2176 2177 @since: 2.44 2178 2179 @param mask_field: Mask of places to be corrected. I{(L{DataField})} 2180 """ 2181 pass
2182
2183 - def mask_outliers(mask_field, thresh):
2184 """ 2185 Creates mask of data that are above or below B{C{thresh}}*sigma from average 2186 height. 2187 2188 Sigma denotes root-mean square deviation of heights. This criterium 2189 corresponds to the usual Gaussian distribution outliers detection if 2190 B{C{thresh}} is 3. 2191 2192 @param mask_field: A data field to be filled with mask. I{(L{DataField})} 2193 @param thresh: Threshold value. I{(float)} 2194 """ 2195 pass
2196
2197 - def mask_outliers2(mask_field, thresh_low, thresh_high):
2198 """ 2199 Creates mask of data that are above or below multiples of rms from average 2200 height. 2201 2202 Data that are below B{C{mean}}-B{C{thresh_low}}*B{C{sigma}} or above 2203 B{C{mean}}+B{C{thresh_high}}*B{C{sigma}} are marked as outliers, where B{C{sigma}} denotes the 2204 root-mean square deviation of heights. 2205 2206 @since: 2.26 2207 2208 @param mask_field: A data field to be filled with mask. I{(L{DataField})} 2209 @param thresh_low: Lower threshold value. I{(float)} 2210 @param thresh_high: Upper threshold value. I{(float)} 2211 """ 2212 pass
2213
2214 - def distort(dest, invtrans, user_data, interp, exterior, fill_value):
2215 """ 2216 Distorts a data field in the horizontal plane. 2217 2218 Note the transform function B{C{invtrans}} is the inverse transform, in other 2219 words it calculates the old coordinates from the new coordinates (the 2220 transform would not be uniquely defined the other way round). 2221 2222 @since: 2.5 2223 2224 @param dest: Destination data field. I{(L{DataField})} 2225 @param invtrans: Inverse transform function, that is the transformation from 2226 new coordinates to old coordinates. It gets 2227 (B{C{j}}+0.5, B{C{i}}+0.5), where B{C{i}} and B{C{j}} are the new row and column 2228 indices, passed as the input coordinates. The output coordinates 2229 should follow the same convention. Unless a special exterior 2230 handling is required, the transform function does not need to 2231 concern itself with coordinates being outside of the data. I{(CoordTransform2DFunc)} 2232 @param user_data: Pointer passed as B{C{user_data}} to B{C{invtrans}}. I{(gpointer)} 2233 @param interp: Interpolation type to use. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 2234 @param exterior: Exterior pixels handling. Expected values: C{B{EXTERIOR_UNDEFINED}}, C{B{EXTERIOR_BORDER_EXTEND}}, C{B{EXTERIOR_MIRROR_EXTEND}}, C{B{EXTERIOR_PERIODIC}}, C{B{EXTERIOR_FIXED_VALUE}}. I{(L{ExteriorType})} 2235 @param fill_value: The value to use with B{C{EXTERIOR_FIXED_VALUE}}. I{(float)} 2236 """ 2237 pass
2238
2239 - def sample_distorted(dest, coords, interp, exterior, fill_value):
2240 """ 2241 Resamples a data field in an arbitrarily distorted manner. 2242 2243 Each item in B{C{coords}} corresponds to one pixel in B{C{dest}} and gives the 2244 coordinates in B{C{source}} defining the value to set in this pixel. 2245 2246 @since: 2.45 2247 2248 @param dest: Destination data field. I{(L{DataField})} 2249 @param coords: Array of B{C{source}} coordinates with the same number of items as 2250 B{C{dest}}, ordered as data field data. 2251 See L{DataField.distort}() for coordinate convention discussion. I{(const-XY*)} 2252 @param interp: Interpolation type to use. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 2253 @param exterior: Exterior pixels handling. Expected values: C{B{EXTERIOR_UNDEFINED}}, C{B{EXTERIOR_BORDER_EXTEND}}, C{B{EXTERIOR_MIRROR_EXTEND}}, C{B{EXTERIOR_PERIODIC}}, C{B{EXTERIOR_FIXED_VALUE}}. I{(L{ExteriorType})} 2254 @param fill_value: The value to use with B{C{EXTERIOR_FIXED_VALUE}}. I{(float)} 2255 """ 2256 pass
2257
2258 - def mark_scars(result, threshold_high, threshold_low, min_scar_len, max_scar_width, negative):
2259 """ 2260 Find and marks scars in a data field. 2261 2262 Scars are linear horizontal defects, consisting of shifted values. 2263 Zero or negative values in B{C{result}} siginify normal data, positive 2264 values siginify samples that are part of a scar. 2265 2266 @since: 2.46 2267 2268 @param result: A data field to store the result to (it is resized to match 2269 B{C{data_field}}). I{(L{DataField})} 2270 @param threshold_high: Miminum relative step for scar marking, must be positive. I{(float)} 2271 @param threshold_low: Definite relative step for scar marking, must be at least 2272 equal to B{C{threshold_high}}. I{(float)} 2273 @param min_scar_len: Minimum length of a scar, shorter ones are discarded 2274 (must be at least one). I{(float)} 2275 @param max_scar_width: Maximum width of a scar, must be at least one. I{(float)} 2276 @param negative: B{C{True}} to detect negative scars, B{C{False}} to positive. I{(bool)} 2277 """ 2278 pass
2279
2280 - def get_correlation_score(kernel_field, col, row, kernel_col, kernel_row, kernel_width, kernel_height):
2281 """ 2282 Calculates a correlation score in one point. 2283 2284 Correlation window size is given 2285 by B{C{kernel_col}}, B{C{kernel_row}}, B{C{kernel_width}}, B{C{kernel_height}}, 2286 postion of the correlation window on data is given by 2287 B{C{col}}, B{C{row}}. 2288 2289 If anything fails (data too close to boundary, etc.), 2290 function returns -1.0 (none correlation).. 2291 2292 2293 @param kernel_field: Kernel to correlate data field with. I{(L{DataField})} 2294 @param col: Upper-left column position in the data field. I{(int)} 2295 @param row: Upper-left row position in the data field. I{(int)} 2296 @param kernel_col: Upper-left column position in kernel field. I{(int)} 2297 @param kernel_row: Upper-left row position in kernel field. I{(int)} 2298 @param kernel_width: Width of kernel field area. I{(int)} 2299 @param kernel_height: Heigh of kernel field area. I{(int)} 2300 @return: Correlation score (between -1.0 and 1.0). Value 1.0 denotes 2301 maximum correlation, -1.0 none correlation. I{(float)} 2302 """ 2303 return None
2304
2305 - def get_weighted_correlation_score(kernel_field, weight_field, col, row, kernel_col, kernel_row, kernel_width, kernel_height):
2306 """ 2307 Calculates a correlation score in one point using weights to center 2308 the used information to the center of kernel. 2309 2310 Correlation window size is given 2311 by B{C{kernel_col}}, B{C{kernel_row}}, B{C{kernel_width}}, B{C{kernel_height}}, 2312 postion of the correlation window on data is given by 2313 B{C{col}}, B{C{row}}. 2314 2315 If anything fails (data too close to boundary, etc.), 2316 function returns -1.0 (none correlation).. 2317 2318 2319 @param kernel_field: Kernel to correlate data field with. I{(L{DataField})} 2320 @param weight_field: data field of same size as kernel window size I{(L{DataField})} 2321 @param col: Upper-left column position in the data field. I{(int)} 2322 @param row: Upper-left row position in the data field. I{(int)} 2323 @param kernel_col: Upper-left column position in kernel field. I{(int)} 2324 @param kernel_row: Upper-left row position in kernel field. I{(int)} 2325 @param kernel_width: Width of kernel field area. I{(int)} 2326 @param kernel_height: Heigh of kernel field area. I{(int)} 2327 @return: Correlation score (between -1.0 and 1.0). Value 1.0 denotes 2328 maximum correlation, -1.0 none correlation. I{(float)} 2329 """ 2330 return None
2331
2332 - def crosscorrelate(data_field2, x_dist, y_dist, score, search_width, search_height, window_width, window_height):
2333 """ 2334 Algorithm for matching two different images of the same object under changes. 2335 2336 It does not use any special features 2337 for matching. It simply searches for all points (with their neighbourhood) 2338 of B{C{data_field1}} within B{C{data_field2}}. Parameters B{C{search_width}} and 2339 B{C{search_height}} 2340 determine maimum area where to search for points. The area is cenetered 2341 in the B{C{data_field2}} at former position of points at B{C{data_field1}}. 2342 2343 @param data_field2: A data field. I{(L{DataField})} 2344 @param x_dist: A data field to store x-distances to. I{(L{DataField})} 2345 @param y_dist: A data field to store y-distances to. I{(L{DataField})} 2346 @param score: Data field to store correlation scores to. I{(L{DataField})} 2347 @param search_width: Search area width. I{(int)} 2348 @param search_height: Search area height. I{(int)} 2349 @param window_width: Correlation window width. This parameter is not actually 2350 used. Pass zero. I{(int)} 2351 @param window_height: Correlation window height. This parameter is not actually 2352 used. Pass zero. I{(int)} 2353 """ 2354 pass
2355
2356 - def correlate(kernel_field, score, method):
2357 """ 2358 Computes correlation score for all positions in a data field. 2359 2360 Correlation score is compute for all points in data field B{C{data_field}} 2361 and full size of correlation kernel B{C{kernel_field}}. 2362 2363 The points in B{C{score}} correspond to centers of kernel. More precisely, the 2364 point ((B{C{kxres}}-1)/2, (B{C{kyres}}-1)/2) in B{C{score}} corresponds to kernel field 2365 top left corner coincident with data field top left corner. Points outside 2366 the area where the kernel field fits into the data field completely are 2367 set to -1 for B{C{CORRELATION_NORMAL}}. 2368 2369 @param kernel_field: Correlation kernel. I{(L{DataField})} 2370 @param score: Data field to store correlation scores to. I{(L{DataField})} 2371 @param method: Correlation score calculation method. Expected values: C{B{CORRELATION_NORMAL}}, C{B{CORRELATION_FFT}}, C{B{CORRELATION_POC}}. I{(L{CorrelationType})} 2372 """ 2373 pass
2374
2375 - def invalidate():
2376 """ 2377 Invalidates cached data field stats. 2378 2379 User code should rarely need this macro, as all B{C{DataField}} methods do 2380 proper invalidation when they change data, as well as 2381 L{DataField.get_data}() does. 2382 2383 However, if you get raw data with L{DataField.get_data}() and then mix 2384 direct changes to it with calls to methods like L{DataField.get_max}(), 2385 you may need to explicitely invalidate cached values to let 2386 L{DataField.get_max}() know it has to recompute the maximum. 2387 2388 """ 2389 pass
2390
2391 - def new_alike(nullme):
2392 """ 2393 Creates a new data field similar to an existing one. 2394 2395 Use L{DataField.duplicate}() if you want to copy a data field including 2396 data. 2397 2398 2399 @param nullme: Whether the data field should be initialized to zeroes. If B{C{False}}, 2400 the data will not be initialized. I{(bool)} 2401 @return: A newly created data field. I{(L{DataField})} 2402 """ 2403 return None
2404
2405 - def data_changed():
2406 """ 2407 Emits signal "data-changed" on a data field. 2408 2409 """ 2410 pass
2411
2412 - def new_resampled(xres, yres, interpolation):
2413 """ 2414 Creates a new data field by resampling an existing one. 2415 2416 This method is equivalent to L{DataField.duplicate}() followed by 2417 L{DataField.resample}(), but it is more efficient. 2418 2419 2420 @param xres: Desired X resolution. I{(int)} 2421 @param yres: Desired Y resolution. I{(int)} 2422 @param interpolation: Interpolation method to use. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 2423 @return: A newly created data field. I{(L{DataField})} 2424 """ 2425 return None
2426
2427 - def resample(xres, yres, interpolation):
2428 """ 2429 Resamples a data field using given interpolation method 2430 2431 This method may invalidate raw data buffer returned by 2432 L{DataField.get_data}(). 2433 2434 @param xres: Desired X resolution. I{(int)} 2435 @param yres: Desired Y resolution. I{(int)} 2436 @param interpolation: Interpolation method to use. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 2437 """ 2438 pass
2439
2440 - def resize(ulcol, ulrow, brcol, brrow):
2441 """ 2442 Resizes (crops) a data field. 2443 2444 Crops a data field to a rectangle between upper-left and bottom-right 2445 points, recomputing real size. 2446 2447 This method may invalidate raw data buffer returned by 2448 L{DataField.get_data}(). 2449 2450 @param ulcol: Upper-left column coordinate. I{(int)} 2451 @param ulrow: Upper-left row coordinate. I{(int)} 2452 @param brcol: Bottom-right column coordinate + 1. I{(int)} 2453 @param brrow: Bottom-right row coordinate + 1. I{(int)} 2454 """ 2455 pass
2456
2457 - def area_extract(col, row, width, height):
2458 """ 2459 Extracts a rectangular part of a data field to a new data field. 2460 2461 2462 @param col: Upper-left column coordinate. I{(int)} 2463 @param row: Upper-left row coordinate. I{(int)} 2464 @param width: Area width (number of columns). I{(int)} 2465 @param height: Area height (number of rows). I{(int)} 2466 @return: The extracted area as a newly created data field. I{(L{DataField})} 2467 """ 2468 return None
2469
2470 - def copy(dest, nondata_too):
2471 """ 2472 Copies the contents of an already allocated data field to a data field 2473 of the same size. 2474 2475 @param dest: Destination data field. I{(L{DataField})} 2476 @param nondata_too: Whether non-data (units) should be copied too. I{(bool)} 2477 """ 2478 pass
2479
2480 - def area_copy(dest, col, row, width, height, destcol, destrow):
2481 """ 2482 Copies a rectangular area from one data field to another. 2483 2484 The area starts at (B{C{col}}, B{C{row}}) in B{C{src}} and its dimension is B{C{width}}*B{C{height}}. 2485 It is copied to B{C{dest}} starting from (B{C{destcol}}, B{C{destrow}}). 2486 2487 The source area has to be completely contained in B{C{src}}. No assumptions are 2488 made about destination position, however, parts of the source area sticking 2489 out the destination data field B{C{dest}} are cut off. 2490 2491 If B{C{src}} is equal to B{C{dest}}, the areas may not overlap. 2492 2493 @param dest: Destination data field. I{(L{DataField})} 2494 @param col: Area upper-left column coordinate in B{C{src}}. I{(int)} 2495 @param row: Area upper-left row coordinate B{C{src}}. I{(int)} 2496 @param width: Area width (number of columns), pass -1 for full B{C{src}} widdth. I{(int)} 2497 @param height: Area height (number of rows), pass -1 for full B{C{src}} height. I{(int)} 2498 @param destcol: Destination column in B{C{dest}}. I{(int)} 2499 @param destrow: Destination row in B{C{dest}}. I{(int)} 2500 """ 2501 pass
2502
2503 - def get_xres():
2504 """ 2505 Gets X resolution (number of columns) of a data field. 2506 2507 2508 @return: X resolution. I{(int)} 2509 """ 2510 return None
2511
2512 - def get_yres():
2513 """ 2514 Gets Y resolution (number of rows) of the field. 2515 2516 2517 @return: Y resolution. I{(int)} 2518 """ 2519 return None
2520
2521 - def get_xreal():
2522 """ 2523 Gets the X real (physical) size of a data field. 2524 2525 2526 @return: X real size value. I{(float)} 2527 """ 2528 return None
2529
2530 - def get_yreal():
2531 """ 2532 Gets the Y real (physical) size of a data field. 2533 2534 2535 @return: Y real size value. I{(float)} 2536 """ 2537 return None
2538
2539 - def set_xreal(xreal):
2540 """ 2541 Sets X real (physical) size value of a data field. 2542 2543 @param xreal: New X real size value. I{(float)} 2544 """ 2545 pass
2546
2547 - def set_yreal(yreal):
2548 """ 2549 Sets Y real (physical) size value of a data field. 2550 2551 @param yreal: New Y real size value. I{(float)} 2552 """ 2553 pass
2554
2555 - def get_xoffset():
2556 """ 2557 Gets the X offset of data field origin. 2558 2559 2560 @return: X offset value. I{(float)} 2561 """ 2562 return None
2563
2564 - def get_yoffset():
2565 """ 2566 Gets the Y offset of data field origin. 2567 2568 2569 @return: Y offset value. I{(float)} 2570 """ 2571 return None
2572
2573 - def set_xoffset(xoff):
2574 """ 2575 Sets the X offset of a data field origin. 2576 2577 Note offsets don't affect any calculation, nor functions like 2578 L{DataField.rtoj}(). 2579 2580 @param xoff: New X offset value. I{(float)} 2581 """ 2582 pass
2583
2584 - def set_yoffset(yoff):
2585 """ 2586 Sets the Y offset of a data field origin. 2587 2588 Note offsets don't affect any calculation, nor functions like 2589 L{DataField.rtoi}(). 2590 2591 @param yoff: New Y offset value. I{(float)} 2592 """ 2593 pass
2594
2595 - def get_si_unit_xy():
2596 """ 2597 Returns lateral SI unit of a data field. 2598 2599 2600 @return: SI unit corresponding to the lateral (XY) dimensions of the data 2601 field. Its reference count is not incremented. I{(L{SIUnit})} 2602 """ 2603 return None
2604
2605 - def get_si_unit_z():
2606 """ 2607 Returns value SI unit of a data field. 2608 2609 2610 @return: SI unit corresponding to the "height" (Z) dimension of the data 2611 field. Its reference count is not incremented. I{(L{SIUnit})} 2612 """ 2613 return None
2614
2615 - def set_si_unit_xy(si_unit):
2616 """ 2617 Sets the SI unit corresponding to the lateral (XY) dimensions of a data 2618 field. 2619 2620 It does not assume a reference on B{C{si_unit}}, instead it adds its own 2621 reference. 2622 2623 @param si_unit: SI unit to be set. I{(L{SIUnit})} 2624 """ 2625 pass
2626
2627 - def set_si_unit_z(si_unit):
2628 """ 2629 Sets the SI unit corresponding to the "height" (Z) dimension of a data 2630 field. 2631 2632 It does not assume a reference on B{C{si_unit}}, instead it adds its own 2633 reference. 2634 2635 @param si_unit: SI unit to be set. I{(L{SIUnit})} 2636 """ 2637 pass
2638
2639 - def get_value_format_xy(style):
2640 """ 2641 Finds value format good for displaying coordinates of a data field. 2642 2643 2644 @param style: Unit format style. Expected values: C{B{SI_UNIT_FORMAT_NONE}}, C{B{SI_UNIT_FORMAT_PLAIN}}, C{B{SI_UNIT_FORMAT_MARKUP}}, C{B{SI_UNIT_FORMAT_VFMARKUP}}, C{B{SI_UNIT_FORMAT_TEX}}. I{(L{SIUnitFormatStyle})} 2645 @return: Tuple consisting of 2 values (B{C{value}}, B{C{format}}). (I{(L{SIValueFormat})}, I{(SkipArg)}) 2646 """ 2647 return None, None
2648
2649 - def get_value_format_z(style):
2650 """ 2651 Finds value format good for displaying values of a data field. 2652 2653 2654 @param style: Unit format style. Expected values: C{B{SI_UNIT_FORMAT_NONE}}, C{B{SI_UNIT_FORMAT_PLAIN}}, C{B{SI_UNIT_FORMAT_MARKUP}}, C{B{SI_UNIT_FORMAT_VFMARKUP}}, C{B{SI_UNIT_FORMAT_TEX}}. I{(L{SIUnitFormatStyle})} 2655 @return: Tuple consisting of 2 values (B{C{value}}, B{C{format}}). (I{(L{SIValueFormat})}, I{(SkipArg)}) 2656 """ 2657 return None, None
2658
2659 - def copy_units_to_data_line(data_line):
2660 """ 2661 Sets lateral and value units of a data line to match a data field. 2662 2663 @param data_line: A data line to set units of. I{(L{DataLine})} 2664 """ 2665 pass
2666
2667 - def itor(row):
2668 """ 2669 Transforms vertical pixel coordinate to real (physical) Y coordinate. 2670 2671 That is it maps range [0..y-resolution] to range [0..real-y-size]. 2672 It is not suitable for conversion of matrix indices to physical coordinates, 2673 you have to use L{DataField.itor}(B{C{data_field}}, B{C{row}} + 0.5) for that. 2674 2675 2676 @param row: Vertical pixel coordinate. I{(float)} 2677 @return: Real Y coordinate. I{(float)} 2678 """ 2679 return None
2680
2681 - def jtor(col):
2682 """ 2683 Transforms horizontal pixel coordinate to real (physical) X coordinate. 2684 2685 That is it maps range [0..x-resolution] to range [0..real-x-size]. 2686 It is not suitable for conversion of matrix indices to physical coordinates, 2687 you have to use L{DataField.jtor}(B{C{data_field}}, B{C{col}} + 0.5) for that. 2688 2689 2690 @param col: Horizontal pixel coordinate. I{(float)} 2691 @return: Real X coordinate. I{(float)} 2692 """ 2693 return None
2694
2695 - def rtoi(realy):
2696 """ 2697 Transforms real (physical) Y coordinate to row. 2698 2699 That is it maps range [0..real-y-size] to range [0..y-resolution]. 2700 2701 2702 @param realy: Real (physical) Y coordinate. I{(float)} 2703 @return: Vertical pixel coodinate. I{(float)} 2704 """ 2705 return None
2706
2707 - def rtoj(realx):
2708 """ 2709 Transforms real (physical) X coordinate to column. 2710 2711 That is it maps range [0..real-x-size] to range [0..x-resolution]. 2712 2713 2714 @param realx: Real (physical) X coodinate. I{(float)} 2715 @return: Horizontal pixel coordinate. I{(float)} 2716 """ 2717 return None
2718
2719 - def get_val(col, row):
2720 """ 2721 Gets value at given position in a data field. 2722 2723 Do not access data with this function inside inner loops, it's slow. 2724 Get the raw data buffer with L{DataField.get_data_const}() and access it 2725 directly instead. 2726 2727 2728 @param col: Column index. I{(int)} 2729 @param row: Row index. I{(int)} 2730 @return: Value at (B{C{col}}, B{C{row}}). I{(float)} 2731 """ 2732 return None
2733
2734 - def set_val(col, row, value):
2735 """ 2736 Sets value at given position in a data field. 2737 2738 Do not set data with this function inside inner loops, it's slow. Get the 2739 raw data buffer with L{DataField.get_data}() and write to it directly 2740 instead. 2741 2742 @param col: Column index. I{(int)} 2743 @param row: Row index. I{(int)} 2744 @param value: Value to set. I{(float)} 2745 """ 2746 pass
2747
2748 - def get_dval(x, y, interpolation):
2749 """ 2750 Gets interpolated value at arbitrary data field point indexed by pixel 2751 coordinates. 2752 2753 Note pixel values are centered in pixels, so to get the same 2754 value as L{DataField.get_val}(B{C{data_field}}, B{C{j}}, B{C{i}}) returns, 2755 it's necessary to add 0.5: 2756 L{DataField.get_dval}(B{C{data_field}}, B{C{j}}+0.5, B{C{i}}+0.5, B{C{interpolation}}). 2757 2758 See also L{DataField.get_dval_real}() that does the same, but takes 2759 real coordinates. 2760 2761 2762 @param x: Horizontal position in pixel units, in range [0, x-resolution]. I{(float)} 2763 @param y: Vertical postition in pixel units, in range [0, y-resolution]. I{(float)} 2764 @param interpolation: Interpolation method to be used. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 2765 @return: Interpolated value at position (B{C{x}},B{C{y}}). I{(float)} 2766 """ 2767 return None
2768
2769 - def get_dval_real(x, y, interpolation):
2770 """ 2771 Gets interpolated value at arbitrary data field point indexed by real 2772 coordinates. 2773 2774 See also L{DataField.get_dval}() that does the same, but takes pixel 2775 coordinates. 2776 2777 2778 @param x: X postion in real coordinates. I{(float)} 2779 @param y: Y postition in real coordinates. I{(float)} 2780 @param interpolation: Interpolation method to use. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 2781 @return: Value at position (B{C{x}},B{C{y}}). I{(float)} 2782 """ 2783 return None
2784
2785 - def rotate(angle, interpolation):
2786 """ 2787 Rotates a data field by a given angle. 2788 2789 This function is mostly obsolete. See L{DataField.new_rotated}() 2790 and L{DataField.rotated_90}(). 2791 2792 Values that get outside of data field by the rotation are lost. 2793 Undefined values from outside of data field that get inside are set to 2794 data field minimum value. 2795 2796 The rotation is performed in pixel space, i.e. it can be in fact a more 2797 general affine transform in the real coordinates when pixels are not square. 2798 2799 @param angle: Rotation angle (in radians). I{(float)} 2800 @param interpolation: Interpolation method to use. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 2801 """ 2802 pass
2803
2804 - def new_rotated(exterior_mask, angle, interp, resize):
2805 """ 2806 Creates a new data field by rotating a data field by an atribtrary angle. 2807 2808 The returned data field can have pixel corresponding to exterior in B{C{dfield}} 2809 (unless B{C{resize}} is B{C{ROTATE_RESIZE_CUT}}). They are filled with a neutral 2810 value; pass B{C{exterior_mask}} and replace them as you wish if you need more 2811 control. 2812 2813 The rotation is performed in real space, i.e. it is a more general affine 2814 transform in the pixel space for data field with non-square pixels. 2815 See L{DataField.rotate}() which rotates in the pixel space. 2816 2817 The returned data field has usually square pixels, the exception being when 2818 B{C{angle}} is a multiple of B{C{glib.PI}}/2 when the function reduces to 2819 L{DataField.rotated_90}() and original pixels are preserved. This is of 2820 concern only when B{C{dfield}} has non-square pixels. 2821 2822 @since: 2.46 2823 2824 @param exterior_mask: Optional data field where pixels corresponding to exterior 2825 will be set to 1. It will be resized to match the returned 2826 field. I{(L{DataField})} 2827 @param angle: Rotation angle (in radians). I{(float)} 2828 @param interp: Interpolation type to use. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 2829 @param resize: Controls how the result size is determined. Expected values: C{B{ROTATE_RESIZE_SAME_SIZE}}, C{B{ROTATE_RESIZE_EXPAND}}, C{B{ROTATE_RESIZE_CUT}}. I{(L{RotateResizeType})} 2830 @return: A newly created data field. I{(L{DataField})} 2831 """ 2832 return None
2833
2834 - def new_rotated_90(clockwise):
2835 """ 2836 Creates a new data field by rotating a data field by 90 degrees. 2837 2838 @since: 2.46 2839 2840 @param clockwise: B{C{True}} to rotate clocwise, B{C{False}} to rotate anti-clockwise. I{(bool)} 2841 @return: A newly created data field. I{(L{DataField})} 2842 """ 2843 return None
2844
2845 - def invert(x, y, z):
2846 """ 2847 Reflects amd/or inverts a data field. 2848 2849 In the case of value reflection, it's inverted about the mean value. 2850 2851 @param x: B{C{True}} to reflect about X axis (i.e., vertically). I{(bool)} 2852 @param y: B{C{True}} to reflect about Y axis (i.e., horizontally). I{(bool)} 2853 @param z: B{C{True}} to invert in Z direction (i.e., invert values). I{(bool)} 2854 """ 2855 pass
2856
2857 - def fill(value):
2858 """ 2859 Fills a data field with given value. 2860 2861 @param value: Value to be entered. I{(float)} 2862 """ 2863 pass
2864
2865 - def clear():
2866 """ 2867 Fills a data field with zeroes. 2868 2869 """ 2870 pass
2871
2872 - def multiply(value):
2873 """ 2874 Multiplies all values in a data field by given value. 2875 2876 @param value: Value to multiply B{C{data_field}} with. I{(float)} 2877 """ 2878 pass
2879
2880 - def add(value):
2881 """ 2882 Adds given value to all values in a data field. 2883 2884 @param value: Value to be added to data field values. I{(float)} 2885 """ 2886 pass
2887
2888 - def area_fill(col, row, width, height, value):
2889 """ 2890 Fills a rectangular part of a data field with given value. 2891 2892 @param col: Upper-left column coordinate. I{(int)} 2893 @param row: Upper-left row coordinate. I{(int)} 2894 @param width: Area width (number of columns). I{(int)} 2895 @param height: Area height (number of rows). I{(int)} 2896 @param value: Value to be entered I{(float)} 2897 """ 2898 pass
2899
2900 - def area_fill_mask(mask, mode, col, row, width, height, value):
2901 """ 2902 Fills a masked rectangular part of a data field with given value. 2903 2904 @since: 2.44 2905 2906 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 2907 @param mode: Masking mode to use. See the introduction for description of 2908 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 2909 @param col: Upper-left column coordinate. I{(int)} 2910 @param row: Upper-left row coordinate. I{(int)} 2911 @param width: Area width (number of columns). I{(int)} 2912 @param height: Area height (number of rows). I{(int)} 2913 @param value: Value to be entered I{(float)} 2914 """ 2915 pass
2916
2917 - def area_clear(col, row, width, height):
2918 """ 2919 Fills a rectangular part of a data field with zeroes. 2920 2921 @param col: Upper-left column coordinate. I{(int)} 2922 @param row: Upper-left row coordinate. I{(int)} 2923 @param width: Area width (number of columns). I{(int)} 2924 @param height: Area height (number of rows). I{(int)} 2925 """ 2926 pass
2927
2928 - def area_multiply(col, row, width, height, value):
2929 """ 2930 Multiplies values in a rectangular part of a data field by given value 2931 2932 @param col: Upper-left column coordinate. I{(int)} 2933 @param row: Upper-left row coordinate. I{(int)} 2934 @param width: Area width (number of columns). I{(int)} 2935 @param height: Area height (number of rows). I{(int)} 2936 @param value: Value to multiply area with. I{(float)} 2937 """ 2938 pass
2939
2940 - def area_add(col, row, width, height, value):
2941 """ 2942 Adds given value to all values in a rectangular part of a data field. 2943 2944 @param col: Upper-left column coordinate. I{(int)} 2945 @param row: Upper-left row coordinate. I{(int)} 2946 @param width: Area width (number of columns). I{(int)} 2947 @param height: Area height (number of rows). I{(int)} 2948 @param value: Value to be added to area values. I{(float)} 2949 """ 2950 pass
2951
2952 - def get_profile(scol, srow, ecol, erow, res, thickness, interpolation):
2953 """ 2954 Extracts a possibly averaged profile from data field to a data line. 2955 2956 2957 @param scol: The column the line starts at (inclusive). I{(int)} 2958 @param srow: The row the line starts at (inclusive). I{(int)} 2959 @param ecol: The column the line ends at (inclusive). I{(int)} 2960 @param erow: The row the line ends at (inclusive). I{(int)} 2961 @param res: Requested resolution of data line (the number of samples to take). 2962 If nonpositive, data line resolution is chosen to match B{C{data_field}}'s. I{(int)} 2963 @param thickness: Thickness of line to be averaged. I{(int)} 2964 @param interpolation: Interpolation type to use. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 2965 @return: Tuple consisting of 2 values (B{C{value}}, B{C{data_line}}). (I{(L{DataLine})}, I{(SkipArg)}) 2966 """ 2967 return None, None
2968
2969 - def get_row(data_line, row):
2970 """ 2971 Extracts a data field row into a data line. 2972 2973 @param data_line: A data line. It will be resized to width ot B{C{data_field}}. I{(L{DataLine})} 2974 @param row: Row index. I{(int)} 2975 """ 2976 pass
2977
2978 - def get_column(data_line, col):
2979 """ 2980 Extracts a data field column into a data line. 2981 2982 @param data_line: A data line. It will be resized to height of B{C{data_field}}. I{(L{DataLine})} 2983 @param col: Column index. I{(int)} 2984 """ 2985 pass
2986
2987 - def set_row(data_line, row):
2988 """ 2989 Sets a row in the data field to values of a data line. 2990 2991 Data line length must be equal to width of data field. 2992 2993 @param data_line: A data line. I{(L{DataLine})} 2994 @param row: Row index. I{(int)} 2995 """ 2996 pass
2997
2998 - def set_column(data_line, col):
2999 """ 3000 Sets a column in the data field to values of a data line. 3001 3002 Data line length must be equal to height of data field. 3003 3004 @param data_line: A data line. I{(L{DataLine})} 3005 @param col: Column index. I{(int)} 3006 """ 3007 pass
3008
3009 - def get_row_part(data_line, row, from_, to):
3010 """ 3011 Extracts part of a data field row into a data line. 3012 3013 @param data_line: A data line. It will be resized to the row part width. I{(L{DataLine})} 3014 @param row: Row index. I{(int)} 3015 @param from_: I{(int)} 3016 @param to: End column index + 1. I{(int)} 3017 """ 3018 pass
3019
3020 - def get_column_part(data_line, col, from_, to):
3021 """ 3022 Extracts part of a data field column into a data line. 3023 3024 @param data_line: A data line. It will be resized to the column part height. I{(L{DataLine})} 3025 @param col: Column index. I{(int)} 3026 @param from_: I{(int)} 3027 @param to: End row index + 1. I{(int)} 3028 """ 3029 pass
3030
3031 - def set_row_part(data_line, row, from_, to):
3032 """ 3033 Puts a data line into a data field row. 3034 3035 If data line length differs from B{C{to}}-B{C{from}}, it is resampled to this length. 3036 3037 @param data_line: A data line. I{(L{DataLine})} 3038 @param row: Row index. I{(int)} 3039 @param from_: I{(int)} 3040 @param to: End row index + 1. I{(int)} 3041 """ 3042 pass
3043
3044 - def set_column_part(data_line, col, from_, to):
3045 """ 3046 Puts a data line into data field column. 3047 3048 If data line length differs from B{C{to}}-B{C{from}}, it is resampled to this length. 3049 3050 @param data_line: A data line. I{(L{DataLine})} 3051 @param col: Column index. I{(int)} 3052 @param from_: I{(int)} 3053 @param to: End row index + 1. I{(int)} 3054 """ 3055 pass
3056
3057 - def get_xder(col, row):
3058 """ 3059 Computes central derivative in X direction. 3060 3061 On border points, one-side derivative is returned. 3062 3063 3064 @param col: Column index. I{(int)} 3065 @param row: Row index. I{(int)} 3066 @return: Derivative in X direction. I{(float)} 3067 """ 3068 return None
3069
3070 - def get_yder(col, row):
3071 """ 3072 Computes central derivative in Y direction. 3073 3074 On border points, one-side derivative is returned. 3075 3076 Note the derivative is for legacy reasons calulcated for the opposite 3077 y direction than is usual elsewhere in Gwyddion, i.e. if values increase 3078 with increasing row number, the returned value is negative. 3079 3080 3081 @param col: Column index. I{(int)} 3082 @param row: Row index. I{(int)} 3083 @return: Derivative in Y direction I{(float)} 3084 """ 3085 return None
3086
3087 - def get_angder(col, row, theta):
3088 """ 3089 Computes derivative in direction specified by given angle. 3090 3091 3092 @param col: Column index. I{(int)} 3093 @param row: Row index. I{(int)} 3094 @param theta: Angle defining the direction (in radians, counterclockwise). I{(float)} 3095 @return: Derivative in direction given by angle B{C{theta}}. I{(float)} 3096 """ 3097 return None
3098
3099 - def average_xyz(density_map, points, npoints):
3100 """ 3101 Fills a data field with regularised XYZ data using a simple method. 3102 3103 The real dimensions and offsets of B{C{field}} determine the rectangle in the XY 3104 plane that will be regularised. The regularisation method is fast but 3105 simple and there are no absolute guarantees of quality, even though the 3106 result will be usually quite acceptable. 3107 3108 This especially applies to reasonable views of the XYZ data. Unreasonable 3109 views can be rendered unreasonably. In particular if the rectangle does not 3110 contain any point from B{C{points}} (either due to high zoom to an empty region 3111 or by just being completely off) B{C{data_field}} will be filled entirely with 3112 the value of the closest point or something similar. 3113 3114 @since: 2.44 3115 3116 @param density_map: Optional data field to fill with XYZ point density map. It can 3117 be B{C{None}}. I{(L{DataField})} 3118 @param points: Array of XYZ points. Coordinates X and Y represent positions in 3119 the plane; the Z-coordinate represents values. I{(const-XYZ*)} 3120 @param npoints: Number of points. I{(int)} 3121 """ 3122 pass
3123
3124 - def xdwt(wt_coefs, direction, minsize):
3125 """ 3126 Performs steps of the X-direction image wavelet decomposition. 3127 3128 The smallest low pass coefficients block is equal to B{C{minsize}}. Run with 3129 B{C{minsize}} = B{C{dfield}}->xres/2 to perform one step of decomposition 3130 or B{C{minsize}} = 4 to perform full decomposition (or anything between). 3131 3132 3133 @param wt_coefs: Data line where the wavelet transform coefficients are stored. I{(L{DataLine})} 3134 @param direction: Transform direction. Expected values: C{B{TRANSFORM_DIRECTION_BACKWARD}}, C{B{TRANSFORM_DIRECTION_FORWARD}}. I{(L{TransformDirection})} 3135 @param minsize: size of minimal transform result block I{(int)} 3136 """ 3137 pass
3138
3139 - def ydwt(wt_coefs, direction, minsize):
3140 """ 3141 Performs steps of the Y-direction image wavelet decomposition. 3142 3143 The smallest low pass coefficients block is equal to B{C{minsize}}. Run with 3144 B{C{minsize}} = B{C{dfield}}->yres/2 to perform one step of decomposition 3145 or B{C{minsize}} = 4 to perform full decomposition (or anything between). 3146 3147 3148 @param wt_coefs: Data line where the wavelet transform coefficients are stored. I{(L{DataLine})} 3149 @param direction: Transform direction. Expected values: C{B{TRANSFORM_DIRECTION_BACKWARD}}, C{B{TRANSFORM_DIRECTION_FORWARD}}. I{(L{TransformDirection})} 3150 @param minsize: size of minimal transform result block I{(int)} 3151 """ 3152 pass
3153
3154 - def dwt(wt_coefs, direction, minsize):
3155 """ 3156 Performs steps of the 2D image wavelet decomposition. 3157 3158 The smallest low pass coefficients block is equal to B{C{minsize}}. Run with 3159 B{C{minsize}} = B{C{dfield}}->xres/2 to perform one step of decomposition 3160 or B{C{minsize}} = 4 to perform full decomposition (or anything between). 3161 3162 3163 @param wt_coefs: Data line where the wavelet transform coefficients are stored. I{(L{DataLine})} 3164 @param direction: Transform direction. Expected values: C{B{TRANSFORM_DIRECTION_BACKWARD}}, C{B{TRANSFORM_DIRECTION_FORWARD}}. I{(L{TransformDirection})} 3165 @param minsize: size of minimal transform result block I{(int)} 3166 """ 3167 pass
3168
3169 - def dwt_mark_anisotropy(mask, wt_coefs, ratio, lowlimit):
3170 """ 3171 Performs steps of the 2D image wavelet decomposition. 3172 3173 The smallest low pass coefficients block is equal to B{C{minsize}}. Run with 3174 B{C{minsize}} = B{C{dfield}}->xres/2 to perform one step of decomposition 3175 or B{C{minsize}} = 4 to perform full decomposition (or anything between). 3176 3177 3178 @param mask: I{(L{DataField})} 3179 @param wt_coefs: Data line to store wavelet transform coefficients to. I{(L{DataLine})} 3180 @param ratio: I{(float)} 3181 @param lowlimit: I{(int)} 3182 """ 3183 pass
3184
3185 - def elliptic_area_fill(col, row, width, height, value):
3186 """ 3187 Fills an elliptic region of a data field with given value. 3188 3189 The elliptic region is defined by its bounding box which must be completely 3190 contained in the data field. 3191 3192 3193 @param col: Upper-left bounding box column coordinate. I{(int)} 3194 @param row: Upper-left bounding box row coordinate. I{(int)} 3195 @param width: Bounding box width (number of columns). I{(int)} 3196 @param height: Bounding box height (number of rows). I{(int)} 3197 @param value: Value to be entered. I{(float)} 3198 @return: The number of filled values. I{(int)} 3199 """ 3200 return None
3201
3202 - def circular_area_fill(col, row, radius, value):
3203 """ 3204 Fills an elliptic region of a data field with given value. 3205 3206 3207 @param col: Row index of circular area centre. I{(int)} 3208 @param row: Column index of circular area centre. I{(int)} 3209 @param radius: Circular area radius (in pixels). Any value is allowed, although 3210 to get areas that do not deviate from true circles after 3211 pixelization too much, half-integer values are recommended, 3212 integer values are NOT recommended. I{(float)} 3213 @param value: Value to be entered. I{(float)} 3214 @return: The number of filled values. I{(int)} 3215 """ 3216 return None
3217
3218 - def normalize():
3219 """ 3220 Normalizes data in a data field to range 0.0 to 1.0. 3221 3222 It is equivalent to L{DataField.renormalize}(B{C{data_field}}, 1.0, 0.0); 3223 3224 If B{C{data_field}} is filled with only one value, it is changed to 0.0. 3225 3226 """ 3227 pass
3228
3229 - def renormalize(range, offset):
3230 """ 3231 Transforms data in a data field with linear function to given range. 3232 3233 When B{C{range}} is positive, the new data range is (B{C{offset}}, B{C{offset}}+B{C{range}}); 3234 when B{C{range}} is negative, the new data range is (B{C{offset}}-B{C{range}}, B{C{offset}}). 3235 In neither case the data are flipped, negative range only means different 3236 selection of boundaries. 3237 3238 When B{C{range}} is zero, this method is equivalent to 3239 L{DataField.fill}(B{C{data_field}}, B{C{offset}}). 3240 3241 @param range: New data interval size. I{(float)} 3242 @param offset: New data interval offset. I{(float)} 3243 """ 3244 pass
3245
3246 - def area_renormalize(col, row, width, height, range, offset):
3247 """ 3248 Transforms data in a part of a data field with linear function to given 3249 range. 3250 3251 When B{C{range}} is positive, the new data range is (B{C{offset}}, B{C{offset}}+B{C{range}}); 3252 when B{C{range}} is negative, the new data range is (B{C{offset}}-B{C{range}}, B{C{offset}}). 3253 In neither case the data are flipped, negative range only means different 3254 selection of boundaries. 3255 3256 When B{C{range}} is zero, this method is equivalent to 3257 L{DataField.fill}(B{C{data_field}}, B{C{offset}}). 3258 3259 @since: 2.45 3260 3261 @param col: Upper-left column coordinate. I{(int)} 3262 @param row: Upper-left row coordinate. I{(int)} 3263 @param width: Area width (number of columns). I{(int)} 3264 @param height: Area height (number of rows). I{(int)} 3265 @param range: New data interval size. I{(float)} 3266 @param offset: New data interval offset. I{(float)} 3267 """ 3268 pass
3269
3270 - def threshold(threshval, bottom, top):
3271 """ 3272 Tresholds values of a data field. 3273 3274 Values smaller than B{C{threshold}} are set to value B{C{bottom}}, values higher 3275 than B{C{threshold}} or equal to it are set to value B{C{top}} 3276 3277 3278 @param threshval: Threshold value. I{(float)} 3279 @param bottom: Lower replacement value. I{(float)} 3280 @param top: Upper replacement value. I{(float)} 3281 @return: The total number of values above threshold. I{(int)} 3282 """ 3283 return None
3284
3285 - def area_threshold(col, row, width, height, threshval, bottom, top):
3286 """ 3287 Tresholds values of a rectangular part of a data field. 3288 3289 Values smaller than B{C{threshold}} are set to value B{C{bottom}}, values higher 3290 than B{C{threshold}} or equal to it are set to value B{C{top}} 3291 3292 3293 @param col: Upper-left column coordinate. I{(int)} 3294 @param row: Upper-left row coordinate. I{(int)} 3295 @param width: Area width (number of columns). I{(int)} 3296 @param height: Area height (number of rows). I{(int)} 3297 @param threshval: Threshold value. I{(float)} 3298 @param bottom: Lower replacement value. I{(float)} 3299 @param top: Upper replacement value. I{(float)} 3300 @return: The total number of values above threshold. I{(int)} 3301 """ 3302 return None
3303
3304 - def clamp(bottom, top):
3305 """ 3306 Limits data field values to a range. 3307 3308 3309 @param bottom: Lower limit value. I{(float)} 3310 @param top: Upper limit value. I{(float)} 3311 @return: The number of changed values, i.e., values that were outside 3312 [B{C{bottom}}, B{C{top}}]. I{(int)} 3313 """ 3314 return None
3315
3316 - def area_clamp(col, row, width, height, bottom, top):
3317 """ 3318 Limits values in a rectangular part of a data field to a range. 3319 3320 3321 @param col: Upper-left column coordinate. I{(int)} 3322 @param row: Upper-left row coordinate. I{(int)} 3323 @param width: Area width (number of columns). I{(int)} 3324 @param height: Area height (number of rows). I{(int)} 3325 @param bottom: Lower limit value. I{(float)} 3326 @param top: Upper limit value. I{(float)} 3327 @return: The number of changed values, i.e., values that were outside 3328 [B{C{bottom}}, B{C{top}}]. I{(int)} 3329 """ 3330 return None
3331
3332 - def area_gather(result, buffer, hsize, vsize, average, col, row, width, height):
3333 """ 3334 Sums or averages values in reactangular areas around each sample in a data 3335 field. 3336 3337 When the gathered area extends out of calculation area, only samples from 3338 their intersection are taken into the local sum (or average). 3339 3340 There are no restrictions on values of B{C{hsize}} and B{C{vsize}} with regard to 3341 B{C{width}} and B{C{height}}, but they have to be positive. 3342 3343 The result is calculated by the means of two-dimensional rolling sums. 3344 One one hand it means the calculation time depends linearly on 3345 (B{C{width}} + B{C{hsize}})*(B{C{height}} + B{C{vsize}}) instead of 3346 B{C{width}}*B{C{hsize}}*B{C{height}}*B{C{vsize}}. On the other hand it means absolute rounding 3347 errors of all output values are given by the largest input values, that is 3348 relative precision of results small in absolute value may be poor. 3349 3350 @param result: A data field to put the result to, it may be B{C{data_field}} itself. I{(L{DataField})} 3351 @param buffer: A data field to use as a scratch area, its size must be at least 3352 B{C{width}}*B{C{height}}. May be B{C{None}} to allocate a private temporary 3353 buffer. I{(L{DataField})} 3354 @param hsize: Horizontal size of gathered area. The area is centered around 3355 each sample if B{C{hsize}} is odd, it extends one pixel more to the 3356 right if B{C{hsize}} is even. I{(int)} 3357 @param vsize: Vertical size of gathered area. The area is centered around 3358 each sample if B{C{vsize}} is odd, it extends one pixel more down 3359 if B{C{vsize}} is even. I{(int)} 3360 @param average: B{C{True}} to divide resulting sums by the number of involved samples 3361 to get averages instead of sums. I{(bool)} 3362 @param col: Upper-left column coordinate. I{(int)} 3363 @param row: Upper-left row coordinate. I{(int)} 3364 @param width: Area width (number of columns). I{(int)} 3365 @param height: Area height (number of rows). I{(int)} 3366 """ 3367 pass
3368
3369 - def convolve(kernel_field):
3370 """ 3371 Convolves a data field with given kernel. 3372 3373 @param kernel_field: Kenrel field to convolve B{C{data_field}} with. I{(L{DataField})} 3374 """ 3375 pass
3376
3377 - def area_convolve(kernel_field, col, row, width, height):
3378 """ 3379 Convolves a rectangular part of a data field with given kernel. 3380 3381 @param kernel_field: Kenrel field to convolve B{C{data_field}} with. I{(L{DataField})} 3382 @param col: Upper-left column coordinate. I{(int)} 3383 @param row: Upper-left row coordinate. I{(int)} 3384 @param width: Area width (number of columns). I{(int)} 3385 @param height: Area height (number of rows). I{(int)} 3386 """ 3387 pass
3388
3389 - def convolve_1d(kernel_line, orientation):
3390 """ 3391 Convolves a data field with given linear kernel. 3392 3393 @since: 2.4 3394 3395 @param kernel_line: Kenrel line to convolve B{C{data_field}} with. I{(L{DataLine})} 3396 @param orientation: Filter orientation (see L{DataField.area_convolve_1d}()). Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 3397 """ 3398 pass
3399
3400 - def area_convolve_1d(kernel_line, orientation, col, row, width, height):
3401 """ 3402 Convolves a rectangular part of a data field with given linear kernel. 3403 3404 For large separable kernels it can be more efficient to use a sequence of 3405 horizontal and vertical convolutions instead one 2D convolution. 3406 3407 @since: 2.4 3408 3409 @param kernel_line: Kernel line to convolve B{C{data_field}} with. I{(L{DataLine})} 3410 @param orientation: Filter orientation (B{C{ORIENTATION_HORIZONTAL}} for 3411 row-wise convolution, B{C{ORIENTATION_VERTICAL}} for 3412 column-wise convolution). Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 3413 @param col: Upper-left column coordinate. I{(int)} 3414 @param row: Upper-left row coordinate. I{(int)} 3415 @param width: Area width (number of columns). I{(int)} 3416 @param height: Area height (number of rows). I{(int)} 3417 """ 3418 pass
3419
3420 - def filter_median(size):
3421 """ 3422 Filters a data field with median filter. 3423 3424 @param size: Size of area to take median of. I{(int)} 3425 """ 3426 pass
3427
3428 - def area_filter_median(size, col, row, width, height):
3429 """ 3430 Filters a rectangular part of a data field with median filter. 3431 3432 @param size: Size of area to take median of. I{(int)} 3433 @param col: Upper-left column coordinate. I{(int)} 3434 @param row: Upper-left row coordinate. I{(int)} 3435 @param width: Area width (number of columns). I{(int)} 3436 @param height: Area height (number of rows). I{(int)} 3437 """ 3438 pass
3439
3440 - def filter_mean(size):
3441 """ 3442 Filters a data field with mean filter of size B{C{size}}. 3443 3444 @param size: Averaged area size. I{(int)} 3445 """ 3446 pass
3447
3448 - def area_filter_mean(size, col, row, width, height):
3449 """ 3450 Filters a rectangular part of a data field with mean filter of size B{C{size}}. 3451 3452 This method is a simple L{DataField.area_gather}() wrapper. 3453 3454 @param size: Averaged area size. I{(int)} 3455 @param col: Upper-left column coordinate. I{(int)} 3456 @param row: Upper-left row coordinate. I{(int)} 3457 @param width: Area width (number of columns). I{(int)} 3458 @param height: Area height (number of rows). I{(int)} 3459 """ 3460 pass
3461
3462 - def filter_conservative(size):
3463 """ 3464 Filters a data field with conservative denoise filter. 3465 3466 @param size: Filtered area size. I{(int)} 3467 """ 3468 pass
3469
3470 - def area_filter_conservative(size, col, row, width, height):
3471 """ 3472 Filters a rectangular part of a data field with conservative denoise filter. 3473 3474 @param size: Filtered area size. I{(int)} 3475 @param col: Upper-left column coordinate. I{(int)} 3476 @param row: Upper-left row coordinate. I{(int)} 3477 @param width: Area width (number of columns). I{(int)} 3478 @param height: Area height (number of rows). I{(int)} 3479 """ 3480 pass
3481
3482 - def filter_laplacian():
3483 """ 3484 Filters a data field with Laplacian filter. 3485 3486 """ 3487 pass
3488
3489 - def area_filter_laplacian(col, row, width, height):
3490 """ 3491 Filters a rectangular part of a data field with Laplacian filter. 3492 3493 @param col: Upper-left column coordinate. I{(int)} 3494 @param row: Upper-left row coordinate. I{(int)} 3495 @param width: Area width (number of columns). I{(int)} 3496 @param height: Area height (number of rows). I{(int)} 3497 """ 3498 pass
3499
3501 """ 3502 Filters a data field with Laplacian of Gaussians filter. 3503 3504 @since: 2.23 3505 3506 """ 3507 pass
3508
3509 - def area_filter_laplacian_of_gaussians(col, row, width, height):
3510 """ 3511 Filters a rectangular part of a data field 3512 with Laplacian of Gaussians filter. 3513 3514 @since: 2.23 3515 3516 @param col: Upper-left column coordinate. I{(int)} 3517 @param row: Upper-left row coordinate. I{(int)} 3518 @param width: Area width (number of columns). I{(int)} 3519 @param height: Area height (number of rows). I{(int)} 3520 """ 3521 pass
3522
3523 - def filter_sobel(orientation):
3524 """ 3525 Filters a data field with a directional Sobel filter. 3526 3527 @param orientation: Filter orientation. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 3528 """ 3529 pass
3530
3531 - def area_filter_sobel(orientation, col, row, width, height):
3532 """ 3533 Filters a rectangular part of a data field with a directional Sobel filter. 3534 3535 @param orientation: Filter orientation. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 3536 @param col: Upper-left column coordinate. I{(int)} 3537 @param row: Upper-left row coordinate. I{(int)} 3538 @param width: Area width (number of columns). I{(int)} 3539 @param height: Area height (number of rows). I{(int)} 3540 """ 3541 pass
3542
3543 - def filter_sobel_total():
3544 """ 3545 Filters a data field with total Sobel filter. 3546 3547 @since: 2.31 3548 3549 """ 3550 pass
3551
3552 - def filter_prewitt(orientation):
3553 """ 3554 Filters a data field with Prewitt filter. 3555 3556 @param orientation: Filter orientation. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 3557 """ 3558 pass
3559
3560 - def area_filter_prewitt(orientation, col, row, width, height):
3561 """ 3562 Filters a rectangular part of a data field with a directional Prewitt 3563 filter. 3564 3565 @param orientation: Filter orientation. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 3566 @param col: Upper-left column coordinate. I{(int)} 3567 @param row: Upper-left row coordinate. I{(int)} 3568 @param width: Area width (number of columns). I{(int)} 3569 @param height: Area height (number of rows). I{(int)} 3570 """ 3571 pass
3572
3573 - def filter_prewitt_total():
3574 """ 3575 Filters a data field with total Prewitt filter. 3576 3577 @since: 2.31 3578 3579 """ 3580 pass
3581
3582 - def filter_slope(xder, yder):
3583 """ 3584 Calculates x and y derivaties for an entire field. 3585 3586 The derivatives are calculated as the simple symmetrical differences (in 3587 physical units, not pixel-wise), except at the edges where the differences 3588 are one-sided. 3589 3590 @since: 2.37 3591 3592 @param xder: Data field where the x-derivarive is to be stored, or B{C{None}} if you 3593 are only interested in the y-derivarive. I{(L{DataField})} 3594 @param yder: Data field where the y-derivarive is to be stored, or B{C{None}} if you 3595 are only interested in the x-derivarive. I{(L{DataField})} 3596 """ 3597 pass
3598
3599 - def filter_dechecker():
3600 """ 3601 Filters a data field with 5x5 checker pattern removal filter. 3602 3603 @since: 2.1 3604 3605 """ 3606 pass
3607
3608 - def area_filter_dechecker(col, row, width, height):
3609 """ 3610 Filters a rectangular part of a data field with 5x5 checker pattern removal 3611 filter. 3612 3613 @since: 2.1 3614 3615 @param col: Upper-left column coordinate. I{(int)} 3616 @param row: Upper-left row coordinate. I{(int)} 3617 @param width: Area width (number of columns). I{(int)} 3618 @param height: Area height (number of rows). I{(int)} 3619 """ 3620 pass
3621
3622 - def filter_gaussian(sigma):
3623 """ 3624 Filters a data field with a Gaussian filter. 3625 3626 @since: 2.4 3627 3628 @param sigma: The sigma parameter of the Gaussian. I{(float)} 3629 """ 3630 pass
3631
3632 - def area_filter_gaussian(sigma, col, row, width, height):
3633 """ 3634 Filters a rectangular part of a data field with a Gaussian filter. 3635 3636 The Gausian is normalized, i.e. it is sum-preserving. 3637 3638 @since: 2.4 3639 3640 @param sigma: The sigma parameter of the Gaussian. I{(float)} 3641 @param col: Upper-left column coordinate. I{(int)} 3642 @param row: Upper-left row coordinate. I{(int)} 3643 @param width: Area width (number of columns). I{(int)} 3644 @param height: Area height (number of rows). I{(int)} 3645 """ 3646 pass
3647
3648 - def filter_minimum(size):
3649 """ 3650 Filters a data field with minimum filter. 3651 3652 @param size: Neighbourhood size for minimum search. I{(int)} 3653 """ 3654 pass
3655
3656 - def area_filter_minimum(size, col, row, width, height):
3657 """ 3658 Filters a rectangular part of a data field with minimum filter. 3659 3660 This operation is often called erosion filter. 3661 3662 @param size: Neighbourhood size for minimum search. I{(int)} 3663 @param col: Upper-left column coordinate. I{(int)} 3664 @param row: Upper-left row coordinate. I{(int)} 3665 @param width: Area width (number of columns). I{(int)} 3666 @param height: Area height (number of rows). I{(int)} 3667 """ 3668 pass
3669
3670 - def filter_maximum(size):
3671 """ 3672 Filters a data field with maximum filter. 3673 3674 @param size: Neighbourhood size for maximum search. I{(int)} 3675 """ 3676 pass
3677
3678 - def area_filter_maximum(size, col, row, width, height):
3679 """ 3680 Filters a rectangular part of a data field with maximum filter. 3681 3682 This operation is often called dilation filter. 3683 3684 @param size: Neighbourhood size for maximum search. I{(int)} 3685 @param col: Upper-left column coordinate. I{(int)} 3686 @param row: Upper-left row coordinate. I{(int)} 3687 @param width: Area width (number of columns). I{(int)} 3688 @param height: Area height (number of rows). I{(int)} 3689 """ 3690 pass
3691
3692 - def area_filter_min_max(kernel, filtertype, col, row, width, height):
3693 """ 3694 Applies a morphological operation with a flat structuring element to a 3695 part of a data field. 3696 3697 Morphological operations with flat structuring elements can be expressed 3698 using minimum (erosion) and maximum (dilation) filters that are the basic 3699 operations this function can perform. 3700 3701 The kernel field is a mask that defines the shape of the flat structuring 3702 element. It is reflected for all maximum operations (dilation). For 3703 symmetrical kernels this does not matter. You can use 3704 L{DataField.elliptic_area_fill}() to create a true circular (or 3705 elliptical) kernel. 3706 3707 The kernel is implicitly centered, i.e. it will be applied symmetrically to 3708 avoid unexpected data movement. Even-sized kernels (generally not 3709 recommended) will extend farther towards the top left image corner for 3710 minimum (erosion) and towards the bottom right corner for maximum (dilation) 3711 operations due to the reflection. If you need off-center structuring 3712 elements you can add empty rows or columns to one side of the kernel to 3713 counteract the symmetrisation. 3714 3715 The operation is linear-time in kernel size for any convex kernel. Note 3716 L{DataField.area_filter_minimum}() and 3717 L{DataField.area_filter_maximum}(), which are limited to square 3718 structuring elements, are much faster for large sizes of the squares. 3719 3720 The exterior is always handled as B{C{EXTERIOR_BORDER_EXTEND}}. 3721 3722 @since: 2.43 3723 3724 @param kernel: Data field defining the flat structuring element. I{(L{DataField})} 3725 @param filtertype: The type of filter to apply. Expected values: C{B{MIN_MAX_FILTER_MINIMUM}}, C{B{MIN_MAX_FILTER_EROSION}}, C{B{MIN_MAX_FILTER_MAXIMUM}}, C{B{MIN_MAX_FILTER_DILATION}}, C{B{MIN_MAX_FILTER_OPENING}}, C{B{MIN_MAX_FILTER_CLOSING}}, C{B{MIN_MAX_FILTER_RANGE}}, C{B{MIN_MAX_FILTER_NORMALIZATION}}. I{(L{MinMaxFilterType})} 3726 @param col: Upper-left column coordinate. I{(int)} 3727 @param row: Upper-left row coordinate. I{(int)} 3728 @param width: Area width (number of columns). I{(int)} 3729 @param height: Area height (number of rows). I{(int)} 3730 """ 3731 pass
3732
3733 - def area_filter_disc_asf(radius, closing, col, row, width, height):
3734 """ 3735 Applies an alternating sequential morphological filter with a flat disc 3736 structuring element to a part of a data field. 3737 3738 Alternating sequential filter is a filter consisting of repeated opening and 3739 closing (or closing and opening) with progressively larger structuring 3740 elements. This function performs such filtering for sequence of structuring 3741 elements consisting of true Euclidean discs with increasing radii. The 3742 largest disc in the sequence fits into a (2B{C{size}} + 1) × (2B{C{size}} + 1) square. 3743 3744 @since: 2.43 3745 3746 @param radius: Maximum radius of the circular structuring element, in pixels. 3747 For radius 0 and smaller the filter is no-op. I{(int)} 3748 @param closing: B{C{True}} requests an opening-closing filter (i.e. ending with 3749 closing), B{C{False}} requests a closing-opening filter (i.e. ending 3750 with opening). I{(bool)} 3751 @param col: Upper-left column coordinate. I{(int)} 3752 @param row: Upper-left row coordinate. I{(int)} 3753 @param width: Area width (number of columns). I{(int)} 3754 @param height: Area height (number of rows). I{(int)} 3755 """ 3756 pass
3757
3758 - def filter_rms(size):
3759 """ 3760 Filters a data field with RMS filter. 3761 3762 @param size: Area size. I{(int)} 3763 """ 3764 pass
3765
3766 - def area_filter_rms(size, col, row, width, height):
3767 """ 3768 Filters a rectangular part of a data field with RMS filter of size B{C{size}}. 3769 3770 RMS filter computes root mean square in given area. 3771 3772 @param size: Area size. I{(int)} 3773 @param col: Upper-left column coordinate. I{(int)} 3774 @param row: Upper-left row coordinate. I{(int)} 3775 @param width: Area width (number of columns). I{(int)} 3776 @param height: Area height (number of rows). I{(int)} 3777 """ 3778 pass
3779
3780 - def filter_kuwahara():
3781 """ 3782 Filters a data field with Kuwahara filter. 3783 3784 """ 3785 pass
3786
3787 - def area_filter_kuwahara(col, row, width, height):
3788 """ 3789 Filters a rectangular part of a data field with a Kuwahara 3790 (edge-preserving smoothing) filter. 3791 3792 @param col: Upper-left column coordinate. I{(int)} 3793 @param row: Upper-left row coordinate. I{(int)} 3794 @param width: Area width (number of columns). I{(int)} 3795 @param height: Area height (number of rows). I{(int)} 3796 """ 3797 pass
3798
3799 - def filter_canny(threshold):
3800 """ 3801 Filters a rectangular part of a data field with canny edge detector filter. 3802 3803 @param threshold: Slope detection threshold (range 0..1). I{(float)} 3804 """ 3805 pass
3806
3807 - def shade(target_field, theta, phi):
3808 """ 3809 Shades a data field. 3810 3811 @param target_field: A data field to put the shade to. It will be resized to 3812 match B{C{data_field}}. I{(L{DataField})} 3813 @param theta: Shading angle (in radians, from north pole). I{(float)} 3814 @param phi: Shade orientation in xy plane (in radians, counterclockwise). I{(float)} 3815 """ 3816 pass
3817
3818 - def filter_harris(y_gradient, result, neighbourhood, alpha):
3819 """ 3820 Applies Harris corner detection filter to a pair of gradient data fields. 3821 3822 All passed data field must have the same size. 3823 3824 @param y_gradient: Data field with pre-calculated vertical derivative. I{(L{DataField})} 3825 @param result: Data field for the result. I{(L{DataField})} 3826 @param neighbourhood: Neighbourhood size. I{(int)} 3827 @param alpha: Sensitivity paramter (the squared trace is multiplied by it). I{(float)} 3828 """ 3829 pass
3830
3831 - def fractal_partitioning(xresult, yresult, interpolation):
3832 """ 3833 Computes data for log-log plot by partitioning. 3834 3835 Data lines B{C{xresult}} and B{C{yresult}} will be resized to the output size and 3836 they will contain corresponding values at each position. 3837 3838 @param xresult: Data line to store x-values for log-log plot to. I{(L{DataLine})} 3839 @param yresult: Data line to store y-values for log-log plot to. I{(L{DataLine})} 3840 @param interpolation: Interpolation type. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 3841 """ 3842 pass
3843
3844 - def fractal_cubecounting(xresult, yresult, interpolation):
3845 """ 3846 Computes data for log-log plot by cube counting. 3847 3848 Data lines B{C{xresult}} and B{C{yresult}} will be resized to the output size and 3849 they will contain corresponding values at each position. 3850 3851 @param xresult: Data line to store x-values for log-log plot to. I{(L{DataLine})} 3852 @param yresult: Data line to store y-values for log-log plot to. I{(L{DataLine})} 3853 @param interpolation: Interpolation type. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 3854 """ 3855 pass
3856
3857 - def fractal_triangulation(xresult, yresult, interpolation):
3858 """ 3859 Computes data for log-log plot by triangulation. 3860 3861 Data lines B{C{xresult}} and B{C{yresult}} will be resized to the output size and 3862 they will contain corresponding values at each position. 3863 3864 @param xresult: Data line to store x-values for log-log plot to. I{(L{DataLine})} 3865 @param yresult: Data line to store y-values for log-log plot to. I{(L{DataLine})} 3866 @param interpolation: Interpolation type. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 3867 """ 3868 pass
3869
3870 - def fractal_psdf(xresult, yresult, interpolation):
3871 """ 3872 Computes data for log-log plot by spectral density method. 3873 3874 Data lines B{C{xresult}} and B{C{yresult}} will be resized to the output size and 3875 they will contain corresponding values at each position. 3876 3877 @param xresult: Data line to store x-values for log-log plot to. I{(L{DataLine})} 3878 @param yresult: Data line to store y-values for log-log plot to. I{(L{DataLine})} 3879 @param interpolation: Interpolation type. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 3880 """ 3881 pass
3882
3883 - def fractal_correction(mask_field, interpolation):
3884 """ 3885 Replaces data under mask with interpolated values using fractal 3886 interpolation. 3887 3888 @param mask_field: Mask of places to be corrected. I{(L{DataField})} 3889 @param interpolation: Interpolation type. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 3890 """ 3891 pass
3892
3893 - def grains_mark_curvature(grain_field, threshval, below):
3894 """ 3895 Marks data that are above/below curvature threshold. 3896 3897 @param grain_field: Data field to store the resulting mask to. I{(L{DataField})} 3898 @param threshval: Relative curvature threshold, in percents. I{(float)} 3899 @param below: If B{C{True}}, data below threshold are marked, otherwise data above 3900 threshold are marked. I{(bool)} 3901 """ 3902 pass
3903
3904 - def grains_mark_watershed(grain_field, locate_steps, locate_thresh, locate_dropsize, wshed_steps, wshed_dropsize, prefilter, below):
3905 """ 3906 Performs watershed algorithm. 3907 3908 @param grain_field: Result of marking (mask). I{(L{DataField})} 3909 @param locate_steps: Locating algorithm steps. I{(int)} 3910 @param locate_thresh: Locating algorithm threshold. I{(int)} 3911 @param locate_dropsize: Locating drop size. I{(float)} 3912 @param wshed_steps: Watershed steps. I{(int)} 3913 @param wshed_dropsize: Watershed drop size. I{(float)} 3914 @param prefilter: Use prefiltering. I{(bool)} 3915 @param below: If B{C{True}}, valleys are marked, otherwise mountains are marked. I{(bool)} 3916 """ 3917 pass
3918
3919 - def grains_remove_grain(col, row):
3920 """ 3921 Removes one grain at given position. 3922 3923 3924 @param col: Column inside a grain. I{(int)} 3925 @param row: Row inside a grain. I{(int)} 3926 @return: B{C{True}} if a grain was actually removed (i.e., (B{C{col}},B{C{row}}) was 3927 inside a grain). I{(bool)} 3928 """ 3929 return None
3930
3931 - def grains_extract_grain(col, row):
3932 """ 3933 Removes all grains except that one at given position. 3934 3935 If there is no grain at (B{C{col}}, B{C{row}}), all grains are removed. 3936 3937 3938 @param col: Column inside a grain. I{(int)} 3939 @param row: Row inside a grain. I{(int)} 3940 @return: B{C{True}} if a grain remained (i.e., (B{C{col}},B{C{row}}) was inside a grain). I{(bool)} 3941 """ 3942 return None
3943
3944 - def grains_remove_by_number(number):
3945 """ 3946 Removes grain identified by B{C{number}}. 3947 3948 @since: 2.35 3949 3950 @param number: Grain number was filled by L{DataField.number_grains}(). I{(int)} 3951 """ 3952 pass
3953
3954 - def grains_remove_by_size(size):
3955 """ 3956 Removes all grains below specified area. 3957 3958 @param size: Grain area threshold, in square pixels. I{(int)} 3959 """ 3960 pass
3961
3962 - def grains_remove_by_height(grain_field, threshval, below):
3963 """ 3964 Removes grains that are higher/lower than given threshold value. 3965 3966 @param grain_field: Field of marked grains (mask) I{(L{DataField})} 3967 @param threshval: Relative height threshold, in percents. I{(float)} 3968 @param below: If B{C{True}}, grains below threshold are removed, otherwise grains above 3969 threshold are removed. I{(bool)} 3970 """ 3971 pass
3972
3974 """ 3975 Removes all grains that touch field borders. 3976 3977 @since: 2.30 3978 3979 """ 3980 pass
3981
3982 - def grains_mark_height(grain_field, threshval, below):
3983 """ 3984 Marks data that are above/below height threshold. 3985 3986 @param grain_field: Data field to store the resulting mask to. I{(L{DataField})} 3987 @param threshval: Relative height threshold, in percents. I{(float)} 3988 @param below: If B{C{True}}, data below threshold are marked, otherwise data above 3989 threshold are marked. I{(bool)} 3990 """ 3991 pass
3992
3993 - def grains_mark_slope(grain_field, threshval, below):
3994 """ 3995 Marks data that are above/below slope threshold. 3996 3997 @param grain_field: Data field to store the resulting mask to. I{(L{DataField})} 3998 @param threshval: Relative slope threshold, in percents. I{(float)} 3999 @param below: If B{C{True}}, data below threshold are marked, otherwise data above 4000 threshold are marked. I{(bool)} 4001 """ 4002 pass
4003
4004 - def otsu_threshold():
4005 """ 4006 Finds Otsu's height threshold for a data field. 4007 4008 The Otsu's threshold is optimal in the sense that it minimises the 4009 inter-class variances of two classes of pixels: above and below theshold. 4010 4011 @since: 2.37 4012 4013 @return: I{(float)} 4014 """ 4015 return None
4016
4017 - def grains_add(add_field):
4018 """ 4019 Adds B{C{add_field}} grains to B{C{grain_field}}. 4020 4021 Note: This function is equivalent to 4022 |[ 4023 L{DataField.max_of_fields}(grain_field, grain_field, add_field); 4024 ]| 4025 4026 @param add_field: Field of marked grains (mask) to be added. I{(L{DataField})} 4027 """ 4028 pass
4029
4030 - def grains_intersect(intersect_field):
4031 """ 4032 Performs intersection betweet two grain fields, 4033 result is stored in B{C{grain_field}}. 4034 4035 Note: This function is equivalent to 4036 |[ 4037 L{DataField.min_of_fields}(grain_field, grain_field, intersect_field); 4038 ]| 4039 4040 @param intersect_field: Field of marked grains (mask). I{(L{DataField})} 4041 """ 4042 pass
4043
4044 - def grains_invert():
4045 """ 4046 Inverts a data field representing a mask. 4047 4048 All non-positive values are transformed to 1.0. All positive values are 4049 transformed to 0.0. 4050 4051 @since: 2.43 4052 4053 """ 4054 pass
4055
4056 - def grains_autocrop(symmetrically):
4057 """ 4058 Removes empty border rows and columns from a data field representing a mask. 4059 4060 If there are border rows and columns filled completely with non-positive 4061 values the size of the data field is reduced, removing these rows. The 4062 parameter B{C{symmetrically}} controls whether the size reduction is maximum 4063 possible or symmetrical. 4064 4065 When there is no positive value in the field the field size is reduced to 4066 the smallest possible. This means 1x1 for B{C{symmetrical}} being B{C{False}} and 4067 even original dimensions to 2 for B{C{symmetrical}} being B{C{True}}. 4068 4069 @since: 2.43 4070 4071 @param symmetrically: B{C{True}} to remove borders symmetrically, i.e the same number 4072 of pixels from left and right, and also top and bottom. 4073 B{C{False}} to remove as many empty rows and columns as possible. I{(bool)} 4074 @return: Tuple consisting of 5 values (B{C{value}}, B{C{left}}, B{C{right}}, B{C{up}}, B{C{down}}). (I{(bool)}, I{(int)}, I{(int)}, I{(int)}, I{(int)}) 4075 """ 4076 return None, None, None, None, None
4077
4078 - def area_grains_tgnd(target_line, col, row, width, height, below, nstats):
4079 """ 4080 Calculates threshold grain number distribution. 4081 4082 This function is a simple L{DataField.area_grains_tgnd_range}() that 4083 calculates the distribution in the full range. 4084 4085 @param target_line: A data line to store the distribution to. It will be 4086 resampled to the requested width. I{(L{DataLine})} 4087 @param col: Upper-left column coordinate. I{(int)} 4088 @param row: Upper-left row coordinate. I{(int)} 4089 @param width: Area width (number of columns). I{(int)} 4090 @param height: Area height (number of rows). I{(int)} 4091 @param below: If B{C{True}}, valleys are marked, otherwise mountains are marked. I{(bool)} 4092 @param nstats: The number of samples to take on the distribution function. If 4093 nonpositive, a suitable resolution is determined automatically. I{(int)} 4094 """ 4095 pass
4096
4097 - def area_grains_tgnd_range(target_line, col, row, width, height, min, max, below, nstats):
4098 """ 4099 Calculates threshold grain number distribution in given height range. 4100 4101 This is the number of grains for each of B{C{nstats}} equidistant height 4102 threshold levels. For large B{C{nstats}} this function is much faster than the 4103 equivalent number of L{DataField.grains_mark_height}() calls. 4104 4105 @param target_line: A data line to store the distribution to. It will be 4106 resampled to the requested width. I{(L{DataLine})} 4107 @param col: Upper-left column coordinate. I{(int)} 4108 @param row: Upper-left row coordinate. I{(int)} 4109 @param width: Area width (number of columns). I{(int)} 4110 @param height: Area height (number of rows). I{(int)} 4111 @param min: Minimum threshold value. I{(float)} 4112 @param max: Maximum threshold value. I{(float)} 4113 @param below: If B{C{True}}, valleys are marked, otherwise mountains are marked. I{(bool)} 4114 @param nstats: The number of samples to take on the distribution function. If 4115 nonpositive, a suitable resolution is determined automatically. I{(int)} 4116 """ 4117 pass
4118
4119 - def grains_splash_water(minima, locate_steps, locate_dropsize):
4120 pass
4121
4123 """ 4124 Performs Euclidean distance transform of a data field with grains. 4125 4126 Each non-zero value will be replaced with Euclidean distance to the grain 4127 boundary, measured in pixels. 4128 4129 See also L{DataField.grain_simple_dist_trans}() for simple distance 4130 transforms such as city-block or chessboard. 4131 4132 @since: 2.36 4133 4134 """ 4135 pass
4136
4137 - def grain_simple_dist_trans(dtype, from_border):
4138 """ 4139 Performs a distance transform of a data field with grains. 4140 4141 Each non-zero value will be replaced with a distance to the grain boundary, 4142 measured in pixels. 4143 4144 Note this function can calculate the true Euclidean distance transform 4145 only since 2.43. Use L{DataField.grain_distance_transform}() for the EDT 4146 if you need compatibility with older versions. 4147 4148 @since: 2.41 4149 4150 @param dtype: Type of simple distance to use. Expected values: C{B{DISTANCE_TRANSFORM_CITYBLOCK}}, C{B{DISTANCE_TRANSFORM_CONN4}}, C{B{DISTANCE_TRANSFORM_CHESS}}, C{B{DISTANCE_TRANSFORM_CONN8}}, C{B{DISTANCE_TRANSFORM_OCTAGONAL48}}, C{B{DISTANCE_TRANSFORM_OCTAGONAL84}}, C{B{DISTANCE_TRANSFORM_OCTAGONAL}}, C{B{DISTANCE_TRANSFORM_EUCLIDEAN}}. I{(L{DistanceTransformType})} 4151 @param from_border: B{C{True}} to consider image edges to be grain boundaries. I{(bool)} 4152 """ 4153 pass
4154
4155 - def grains_shrink(amount, dtype, from_border):
4156 """ 4157 Erodes a data field containing mask by specified amount using a distance 4158 measure. 4159 4160 Non-zero pixels in B{C{data_field}} will be replaced with zeroes if they are not 4161 farther than B{C{amount}} from the grain boundary as defined by B{C{dtype}}. 4162 4163 @since: 2.43 4164 4165 @param amount: How much the grains should be reduced, in pixels. It is inclusive, 4166 i.e. pixels that are B{C{amount}} far from the border will be removed. I{(float)} 4167 @param dtype: Type of simple distance to use. Expected values: C{B{DISTANCE_TRANSFORM_CITYBLOCK}}, C{B{DISTANCE_TRANSFORM_CONN4}}, C{B{DISTANCE_TRANSFORM_CHESS}}, C{B{DISTANCE_TRANSFORM_CONN8}}, C{B{DISTANCE_TRANSFORM_OCTAGONAL48}}, C{B{DISTANCE_TRANSFORM_OCTAGONAL84}}, C{B{DISTANCE_TRANSFORM_OCTAGONAL}}, C{B{DISTANCE_TRANSFORM_EUCLIDEAN}}. I{(L{DistanceTransformType})} 4168 @param from_border: B{C{True}} to consider image edges to be grain boundaries. 4169 B{C{False}} to reduce grains touching field boundaries only along 4170 the boundaries. I{(bool)} 4171 """ 4172 pass
4173
4174 - def grains_grow(amount, dtype, prevent_merging):
4175 """ 4176 Dilates a data field containing mask by specified amount using a distance 4177 measure. 4178 4179 Non-positive pixels in B{C{data_field}} will be replaced with ones if they are 4180 not farther than B{C{amount}} from the grain boundary as defined by B{C{dtype}}. 4181 4182 @since: 2.43 4183 4184 @param amount: How much the grains should be expanded, in pixels. It is 4185 inclusive, i.e. exterior pixels that are B{C{amount}} far from the 4186 border will be filled. I{(float)} 4187 @param dtype: Type of simple distance to use. Expected values: C{B{DISTANCE_TRANSFORM_CITYBLOCK}}, C{B{DISTANCE_TRANSFORM_CONN4}}, C{B{DISTANCE_TRANSFORM_CHESS}}, C{B{DISTANCE_TRANSFORM_CONN8}}, C{B{DISTANCE_TRANSFORM_OCTAGONAL48}}, C{B{DISTANCE_TRANSFORM_OCTAGONAL84}}, C{B{DISTANCE_TRANSFORM_OCTAGONAL}}, C{B{DISTANCE_TRANSFORM_EUCLIDEAN}}. I{(L{DistanceTransformType})} 4188 @param prevent_merging: B{C{True}} to prevent grain merging, i.e. the growth stops 4189 where two grains would merge. B{C{False}} to simply expand the 4190 grains, without regard to grain connectivity. I{(bool)} 4191 """ 4192 pass
4193
4194 - def fill_voids(nonsimple):
4195 """ 4196 Fills voids in grains in a data field representing a mask. 4197 4198 Voids in grains are zero pixels in B{C{data_field}} from which no path exists 4199 through other zero pixels to the field boundary. The paths are considered 4200 in 8-connectivity because grains themselves are considered in 4201 4-connectivity. 4202 4203 @since: 2.37 4204 4205 @param nonsimple: Pass B{C{True}} to fill also voids that are not simple-connected 4206 (e.g. ring-like). This can result in grain merging if a small 4207 grain is contained within a void. Pass B{C{False}} to fill only 4208 simple-connected grains. I{(bool)} 4209 @return: B{C{True}} if any voids were filled at all, B{C{False}} if no change was 4210 made. I{(bool)} 4211 """ 4212 return None
4213
4214 - def mark_extrema(extrema, maxima):
4215 """ 4216 Marks local maxima or minima in a two-dimensional field. 4217 4218 Local (or regional) maximum is a contiguous set of pixels that have the same 4219 value and this value is sharply greater than the value of any pixel touching 4220 the set. A minimum is defined analogously. A field filled with a single 4221 value is considered to have neither minimum nor maximum. 4222 4223 @since: 2.37 4224 4225 @param extrema: Target field for the extrema mask. I{(L{DataField})} 4226 @param maxima: B{C{True}} to mark maxima, B{C{False}} to mark minima. I{(bool)} 4227 """ 4228 pass
4229
4230 - def hough_line(x_gradient, y_gradient, result, hwidth, overlapping):
4231 pass
4232
4233 - def hough_circle(x_gradient, y_gradient, result, radius):
4234 pass
4235
4236 - def hough_line_strenghten(x_gradient, y_gradient, hwidth, threshold):
4237 pass
4238
4239 - def hough_circle_strenghten(x_gradient, y_gradient, radius, threshold):
4240 pass
4241
4242 - def hough_polar_line_to_datafield(rho, theta):
4243 return None, None, None, None
4244
4245 - def fft1d(iin, rout, iout, orientation, windowing, direction, interpolation, preserverms, level):
4246 """ 4247 Transforms all rows or columns in a data field with Fast Fourier Transform. 4248 4249 If requested a windowing and/or leveling is applied to preprocess data to 4250 obtain reasonable results. 4251 4252 @param iin: Imaginary input data field. It can be B{C{None}} for real-to-complex 4253 transform which can be somewhat faster than complex-to-complex 4254 transform. I{(L{DataField})} 4255 @param rout: Real output data field, it will be resized to area size. I{(L{DataField})} 4256 @param iout: Imaginary output data field, it will be resized to area size. I{(L{DataField})} 4257 @param orientation: Orientation: pass B{C{ORIENTATION_HORIZONTAL}} to 4258 transform rows, B{C{ORIENTATION_VERTICAL}} to transform 4259 columns. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 4260 @param windowing: Windowing type. Expected values: C{B{WINDOWING_NONE}}, C{B{WINDOWING_HANN}}, C{B{WINDOWING_HAMMING}}, C{B{WINDOWING_BLACKMANN}}, C{B{WINDOWING_LANCZOS}}, C{B{WINDOWING_WELCH}}, C{B{WINDOWING_RECT}}, C{B{WINDOWING_NUTTALL}}, C{B{WINDOWING_FLAT_TOP}}, C{B{WINDOWING_KAISER25}}. I{(L{WindowingType})} 4261 @param direction: FFT direction. Expected values: C{B{TRANSFORM_DIRECTION_BACKWARD}}, C{B{TRANSFORM_DIRECTION_FORWARD}}. I{(L{TransformDirection})} 4262 @param interpolation: Interpolation type. 4263 Ignored since 2.8 as no resampling is performed. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 4264 @param preserverms: B{C{True}} to preserve RMS while windowing. I{(bool)} 4265 @param level: 0 to perform no leveling, 1 to subtract mean value, 2 to subtract 4266 line (the number can be interpreted as the first polynomial degree 4267 to keep, but only the enumerated three values are available). I{(int)} 4268 """ 4269 pass
4270
4271 - def area_1dfft(iin, rout, iout, col, row, width, height, orientation, windowing, direction, interpolation, preserverms, level):
4272 """ 4273 Transforms all rows or columns in a rectangular part of a data field with 4274 Fast Fourier Transform. 4275 4276 If requested a windowing and/or leveling is applied to preprocess data to 4277 obtain reasonable results. 4278 4279 @param iin: Imaginary input data field. It can be B{C{None}} for real-to-complex 4280 transform which can be somewhat faster than complex-to-complex 4281 transform. I{(L{DataField})} 4282 @param rout: Real output data field, it will be resized to area size. I{(L{DataField})} 4283 @param iout: Imaginary output data field, it will be resized to area size. I{(L{DataField})} 4284 @param col: Upper-left column coordinate. I{(int)} 4285 @param row: Upper-left row coordinate. I{(int)} 4286 @param width: Area width (number of columns), must be at least 2 for horizontal 4287 transforms. I{(int)} 4288 @param height: Area height (number of rows), must be at least 2 for vertical 4289 transforms. I{(int)} 4290 @param orientation: Orientation: pass B{C{ORIENTATION_HORIZONTAL}} to 4291 transform rows, B{C{ORIENTATION_VERTICAL}} to transform 4292 columns. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 4293 @param windowing: Windowing type. Expected values: C{B{WINDOWING_NONE}}, C{B{WINDOWING_HANN}}, C{B{WINDOWING_HAMMING}}, C{B{WINDOWING_BLACKMANN}}, C{B{WINDOWING_LANCZOS}}, C{B{WINDOWING_WELCH}}, C{B{WINDOWING_RECT}}, C{B{WINDOWING_NUTTALL}}, C{B{WINDOWING_FLAT_TOP}}, C{B{WINDOWING_KAISER25}}. I{(L{WindowingType})} 4294 @param direction: FFT direction. Expected values: C{B{TRANSFORM_DIRECTION_BACKWARD}}, C{B{TRANSFORM_DIRECTION_FORWARD}}. I{(L{TransformDirection})} 4295 @param interpolation: Interpolation type. 4296 Ignored since 2.8 as no resampling is performed. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 4297 @param preserverms: B{C{True}} to preserve RMS while windowing. I{(bool)} 4298 @param level: 0 to perform no leveling, 1 to subtract mean value, 2 to subtract 4299 lines (the number can be interpreted as the first polynomial degree 4300 to keep, but only the enumerated three values are available). I{(int)} 4301 """ 4302 pass
4303
4304 - def fft1d_raw(iin, rout, iout, orientation, direction):
4305 """ 4306 Transforms all rows or columns in a data field with Fast Fourier Transform. 4307 4308 No leveling, windowing nor scaling is performed. 4309 4310 Since 2.8 the dimensions need not to be from the set of sizes returned 4311 by L{gwy_fft_find_nice_size}(). 4312 4313 @since: 2.1 4314 4315 @param iin: Imaginary input data field. It can be B{C{None}} for real-to-complex 4316 transform. I{(L{DataField})} 4317 @param rout: Real output data field, it will be resized to B{C{rin}} size. I{(L{DataField})} 4318 @param iout: Imaginary output data field, it will be resized to B{C{rin}} size. I{(L{DataField})} 4319 @param orientation: Orientation: pass B{C{ORIENTATION_HORIZONTAL}} to 4320 transform rows, B{C{ORIENTATION_VERTICAL}} to transform 4321 columns. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 4322 @param direction: FFT direction. Expected values: C{B{TRANSFORM_DIRECTION_BACKWARD}}, C{B{TRANSFORM_DIRECTION_FORWARD}}. I{(L{TransformDirection})} 4323 """ 4324 pass
4325
4326 - def fft2d(iin, rout, iout, windowing, direction, interpolation, preserverms, level):
4327 """ 4328 Calculates 2D Fast Fourier Transform of a rectangular a data field. 4329 4330 If requested a windowing and/or leveling is applied to preprocess data to 4331 obtain reasonable results. 4332 4333 Lateral dimensions, offsets and units are unchanged. See 4334 L{DataField.fft_postprocess}() for that. 4335 4336 @param iin: Imaginary input data field. It can be B{C{None}} for real-to-complex 4337 transform which can be somewhat faster than complex-to-complex 4338 transform. I{(L{DataField})} 4339 @param rout: Real output data field, it will be resized to area size. I{(L{DataField})} 4340 @param iout: Imaginary output data field, it will be resized to area size. I{(L{DataField})} 4341 @param windowing: Windowing type. Expected values: C{B{WINDOWING_NONE}}, C{B{WINDOWING_HANN}}, C{B{WINDOWING_HAMMING}}, C{B{WINDOWING_BLACKMANN}}, C{B{WINDOWING_LANCZOS}}, C{B{WINDOWING_WELCH}}, C{B{WINDOWING_RECT}}, C{B{WINDOWING_NUTTALL}}, C{B{WINDOWING_FLAT_TOP}}, C{B{WINDOWING_KAISER25}}. I{(L{WindowingType})} 4342 @param direction: FFT direction. Expected values: C{B{TRANSFORM_DIRECTION_BACKWARD}}, C{B{TRANSFORM_DIRECTION_FORWARD}}. I{(L{TransformDirection})} 4343 @param interpolation: Interpolation type. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 4344 @param preserverms: B{C{True}} to preserve RMS while windowing. I{(bool)} 4345 @param level: 0 to perform no leveling, 1 to subtract mean value, 2 to subtract 4346 plane (the number can be interpreted as the first polynomial degree 4347 to keep, but only the enumerated three values are available). I{(int)} 4348 """ 4349 pass
4350
4351 - def area_2dfft(iin, rout, iout, col, row, width, height, windowing, direction, interpolation, preserverms, level):
4352 """ 4353 Calculates 2D Fast Fourier Transform of a rectangular area of a data field. 4354 4355 If requested a windowing and/or leveling is applied to preprocess data to 4356 obtain reasonable results. 4357 4358 @param iin: Imaginary input data field. It can be B{C{None}} for real-to-complex 4359 transform which can be somewhat faster than complex-to-complex 4360 transform. I{(L{DataField})} 4361 @param rout: Real output data field, it will be resized to area size. I{(L{DataField})} 4362 @param iout: Imaginary output data field, it will be resized to area size. I{(L{DataField})} 4363 @param col: Upper-left column coordinate. I{(int)} 4364 @param row: Upper-left row coordinate. I{(int)} 4365 @param width: Area width (number of columns), must be at least 2. I{(int)} 4366 @param height: Area height (number of rows), must be at least 2. I{(int)} 4367 @param windowing: Windowing type. Expected values: C{B{WINDOWING_NONE}}, C{B{WINDOWING_HANN}}, C{B{WINDOWING_HAMMING}}, C{B{WINDOWING_BLACKMANN}}, C{B{WINDOWING_LANCZOS}}, C{B{WINDOWING_WELCH}}, C{B{WINDOWING_RECT}}, C{B{WINDOWING_NUTTALL}}, C{B{WINDOWING_FLAT_TOP}}, C{B{WINDOWING_KAISER25}}. I{(L{WindowingType})} 4368 @param direction: FFT direction. Expected values: C{B{TRANSFORM_DIRECTION_BACKWARD}}, C{B{TRANSFORM_DIRECTION_FORWARD}}. I{(L{TransformDirection})} 4369 @param interpolation: Interpolation type. 4370 Ignored since 2.8 as no resampling is performed. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 4371 @param preserverms: B{C{True}} to preserve RMS while windowing. I{(bool)} 4372 @param level: 0 to perform no leveling, 1 to subtract mean value, 2 to subtract 4373 plane (the number can be interpreted as the first polynomial degree 4374 to keep, but only the enumerated three values are available). I{(int)} 4375 """ 4376 pass
4377
4378 - def fft2d_raw(iin, rout, iout, direction):
4379 """ 4380 Calculates 2D Fast Fourier Transform of a data field. 4381 4382 No leveling, windowing nor scaling is performed. 4383 4384 Since 2.8 the dimensions need not to be from the set of sizes returned 4385 by L{gwy_fft_find_nice_size}(). 4386 4387 Lateral dimensions, offsets and units are unchanged. See 4388 L{DataField.fft_postprocess}() for that. 4389 4390 @since: 2.1 4391 4392 @param iin: Imaginary input data field. It can be B{C{None}} for real-to-complex 4393 transform. I{(L{DataField})} 4394 @param rout: Real output data field, it will be resized to B{C{rin}} size. I{(L{DataField})} 4395 @param iout: Imaginary output data field, it will be resized to B{C{rin}} size. I{(L{DataField})} 4396 @param direction: FFT direction. Expected values: C{B{TRANSFORM_DIRECTION_BACKWARD}}, C{B{TRANSFORM_DIRECTION_FORWARD}}. I{(L{TransformDirection})} 4397 """ 4398 pass
4399
4400 - def fft2d_humanize():
4401 """ 4402 Rearranges 2D FFT output to a human-friendly form. 4403 4404 Top-left, top-right, bottom-left and bottom-right sub-rectangles are swapped 4405 to obtain a humanized 2D FFT output with (0,0) in the centre. 4406 4407 More precisely, for even field dimensions the equally-sized blocks starting 4408 with the Nyquist frequency and with the zero frequency (constant component) 4409 will exchange places. For odd field dimensions, the block containing the 4410 zero frequency is one item larger and the constant component will actually 4411 end up in the exact centre. 4412 4413 Also note if both dimensions are even, this function is involutory and 4414 identical to L{DataField.fft2d_dehumanize}(). However, if any dimension 4415 is odd, L{DataField.fft2d_humanize}() and 4416 L{DataField.fft2d_dehumanize}() are different, therefore they must be 4417 paired properly. 4418 4419 """ 4420 pass
4421
4422 - def fft2d_dehumanize():
4423 """ 4424 Rearranges 2D FFT output back from the human-friendly form. 4425 4426 Top-left, top-right, bottom-left and bottom-right sub-rectangles are swapped 4427 to reshuffle a humanized 2D FFT output back into the natural positions. 4428 4429 See L{DataField.fft2d_humanize}() for discussion. 4430 4431 @since: 2.8 4432 4433 """ 4434 pass
4435
4436 - def fft_postprocess(humanize):
4437 """ 4438 Updates units, dimensions and offsets for a 2D FFT-processed field. 4439 4440 The field is expected to have dimensions and units of the original 4441 direct-space data. The lateral units and resolutions are updated to 4442 correspond to its Fourier transform. 4443 4444 If B{C{humanize}} is B{C{True}} L{DataField.fft2d_humanize}() is applied to the 4445 field data and the lateral offsets are set accordingly. Otherwise the 4446 offsets are cleared. 4447 4448 Value units are kept intact. 4449 4450 @since: 2.38 4451 4452 @param humanize: B{C{True}} to rearrange data to have the frequency origin in the 4453 centre. I{(bool)} 4454 """ 4455 pass
4456
4457 - def fft_filter_1d(result_field, weights, orientation, interpolation):
4458 """ 4459 Performs 1D FFT filtering of a data field. 4460 4461 @param result_field: A data field to store the result to. It will be resampled 4462 to B{C{data_field}}'s size. I{(L{DataField})} 4463 @param weights: Filter weights for the lower half of the spectrum (the other 4464 half is symmetric). Its size can be arbitrary, it will be 4465 interpolated. I{(L{DataLine})} 4466 @param orientation: Filter direction. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 4467 @param interpolation: The interpolation to use for resampling. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 4468 """ 4469 pass
4470
4471 - def area_fit_plane(mask, col, row, width, height):
4472 """ 4473 Fits a plane through a rectangular part of a data field. 4474 4475 The coefficients can be used for plane leveling using the same relation 4476 as in L{DataField.fit_plane}(), counting indices from area top left 4477 corner. 4478 4479 @param mask: Mask of values to take values into account, or B{C{None}} for full 4480 B{C{data_field}}. Values equal to 0.0 and below cause corresponding 4481 B{C{data_field}} samples to be ignored, values equal to 1.0 and above 4482 cause inclusion of corresponding B{C{data_field}} samples. The behaviour 4483 for values inside (0.0, 1.0) is undefined (it may be specified 4484 in the future). I{(L{DataField})} 4485 @param col: Upper-left column coordinate. I{(int)} 4486 @param row: Upper-left row coordinate. I{(int)} 4487 @param width: Area width (number of columns). I{(int)} 4488 @param height: Area height (number of rows). I{(int)} 4489 @return: Tuple consisting of 3 values (B{C{pa}}, B{C{pbx}}, B{C{pby}}). (I{(float)}, I{(float)}, I{(float)}) 4490 """ 4491 return None, None, None
4492
4493 - def fit_plane():
4494 """ 4495 Fits a plane through a data field. 4496 4497 The coefficients can be used for plane leveling using relation 4498 data[i] := data[i] - (pa + pby*i + pbx*j); 4499 4500 @return: Tuple consisting of 3 values (B{C{pa}}, B{C{pbx}}, B{C{pby}}). (I{(float)}, I{(float)}, I{(float)}) 4501 """ 4502 return None, None, None
4503
4504 - def fit_facet_plane(mfield, masking):
4505 """ 4506 Calculates the inclination of a plane close to the dominant plane in a data 4507 field. 4508 4509 The dominant plane is determined by taking into account larger local slopes 4510 with exponentially smaller weight. 4511 4512 This is the basis of so-called facet levelling algorithm. Usually, the 4513 plane found by this method is subtracted using L{DataField.plane_level}() 4514 and the entire process is repeated until it converges. A convergence 4515 criterion may be sufficiently small values of the x and y plane 4516 coefficients. Note that since L{DataField.plane_level}() uses pixel-based 4517 lateral coordinates, the coefficients must be divided by 4518 L{DataField.get_xmeasure}(data_field) and 4519 L{DataField.get_ymeasure}(data_field) to obtain physical plane 4520 coefficients. 4521 4522 @since: 2.37 4523 4524 @param mfield: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 4525 @param masking: Masking mode to use. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 4526 @return: Tuple consisting of 4 values (B{C{value}}, B{C{pa}}, B{C{pbx}}, B{C{pby}}). (I{(bool)}, I{(float)}, I{(float)}, I{(float)}) 4527 """ 4528 return None, None, None, None
4529
4530 - def plane_level(a, bx, by):
4531 """ 4532 Subtracts plane from a data field. 4533 4534 See L{DataField.fit_plane}() for details. 4535 4536 @param a: Constant coefficient. I{(float)} 4537 @param bx: X plane coefficient. I{(float)} 4538 @param by: Y plane coefficient. I{(float)} 4539 """ 4540 pass
4541
4542 - def plane_rotate(xangle, yangle, interpolation):
4543 """ 4544 Performs rotation of plane along x and y axis. 4545 4546 @param xangle: Rotation angle in x direction (rotation along y axis, in radians). I{(float)} 4547 @param yangle: Rotation angle in y direction (rotation along x axis, in radians). I{(float)} 4548 @param interpolation: Interpolation type (can be only of two-point type). Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 4549 """ 4550 pass
4551
4552 - def fit_lines(col, row, width, height, degree, exclude, orientation):
4553 """ 4554 Independently levels profiles on each row/column in a data field. 4555 4556 Lines that have no intersection with area selected by B{C{ulcol}}, B{C{ulrow}}, 4557 B{C{brcol}}, B{C{brrow}} are always leveled as a whole. Lines that have intersection 4558 with selected area, are leveled using polynomial coefficients computed only 4559 from data inside (or outside for B{C{exclude}} = B{C{True}}) the area. 4560 4561 @param col: Upper-left column coordinate. I{(int)} 4562 @param row: Upper-left row coordinate. I{(int)} 4563 @param width: Area width (number of columns). I{(int)} 4564 @param height: Area height (number of rows). I{(int)} 4565 @param degree: Fitted polynomial degree. I{(int)} 4566 @param exclude: If B{C{True}}, outside of area selected by B{C{ulcol}}, B{C{ulrow}}, B{C{brcol}}, 4567 B{C{brrow}} will be used for polynomial coefficients computation, 4568 instead of inside. I{(bool)} 4569 @param orientation: Line orientation. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 4570 """ 4571 pass
4572
4573 - def area_local_plane_quantity(size, col, row, width, height, type, result):
4574 """ 4575 Convenience function to get just one quantity from 4576 L{DataField.area_fit_local_planes}(). 4577 4578 4579 @param size: Neighbourhood size. I{(int)} 4580 @param col: Upper-left column coordinate. I{(int)} 4581 @param row: Upper-left row coordinate. I{(int)} 4582 @param width: Area width (number of columns). I{(int)} 4583 @param height: Area height (number of rows). I{(int)} 4584 @param type: The type of requested quantity. Expected values: C{B{PLANE_FIT_A}}, C{B{PLANE_FIT_BX}}, C{B{PLANE_FIT_BY}}, C{B{PLANE_FIT_ANGLE}}, C{B{PLANE_FIT_SLOPE}}, C{B{PLANE_FIT_S0}}, C{B{PLANE_FIT_S0_REDUCED}}. I{(L{PlaneFitQuantity})} 4585 @param result: A data field to store result to, or B{C{None}} to allocate a new one. I{(L{DataField})} 4586 @return: B{C{result}} if it isn't B{C{None}}, otherwise a newly allocated data field. I{(L{DataField})} 4587 """ 4588 return None
4589
4590 - def local_plane_quantity(size, type, result):
4591 """ 4592 Convenience function to get just one quantity from 4593 L{DataField.fit_local_planes}(). 4594 4595 4596 @param size: Neighbourhood size. I{(int)} 4597 @param type: The type of requested quantity. Expected values: C{B{PLANE_FIT_A}}, C{B{PLANE_FIT_BX}}, C{B{PLANE_FIT_BY}}, C{B{PLANE_FIT_ANGLE}}, C{B{PLANE_FIT_SLOPE}}, C{B{PLANE_FIT_S0}}, C{B{PLANE_FIT_S0_REDUCED}}. I{(L{PlaneFitQuantity})} 4598 @param result: A data field to store result to, or B{C{None}} to allocate a new one. I{(L{DataField})} 4599 @return: B{C{result}} if it isn't B{C{None}}, otherwise a newly allocated data field. I{(L{DataField})} 4600 """ 4601 return None
4602
4603 - def get_max():
4604 """ 4605 Finds the maximum value of a data field. 4606 4607 This quantity is cached. 4608 4609 4610 @return: The maximum value. I{(float)} 4611 """ 4612 return None
4613
4614 - def get_min():
4615 """ 4616 Finds the minimum value of a data field. 4617 4618 This quantity is cached. 4619 4620 4621 @return: The minimum value. I{(float)} 4622 """ 4623 return None
4624
4625 - def get_min_max():
4626 """ 4627 Finds minimum and maximum values of a data field. 4628 4629 @return: Tuple consisting of 2 values (B{C{min}}, B{C{max}}). (I{(float)}, I{(float)}) 4630 """ 4631 return None, None
4632
4633 - def get_avg():
4634 """ 4635 Computes average value of a data field. 4636 4637 This quantity is cached. 4638 4639 4640 @return: The average value. I{(float)} 4641 """ 4642 return None
4643
4644 - def get_rms():
4645 """ 4646 Computes root mean square value of a data field. 4647 4648 This quantity is cached. 4649 4650 4651 @return: The root mean square value. I{(float)} 4652 """ 4653 return None
4654
4655 - def get_sum():
4656 """ 4657 Sums all values in a data field. 4658 4659 This quantity is cached. 4660 4661 4662 @return: The sum of all values. I{(float)} 4663 """ 4664 return None
4665
4666 - def get_median():
4667 """ 4668 Computes median value of a data field. 4669 4670 This quantity is cached. 4671 4672 4673 @return: The median value. I{(float)} 4674 """ 4675 return None
4676
4677 - def get_surface_area():
4678 """ 4679 Computes surface area of a data field. 4680 4681 This quantity is cached. 4682 4683 4684 @return: The surface area. I{(float)} 4685 """ 4686 return None
4687
4688 - def get_variation():
4689 """ 4690 Computes the total variation of a data field. 4691 4692 See L{DataField.area_get_variation}() for the definition. 4693 4694 This quantity is cached. 4695 4696 @since: 2.38 4697 4698 @return: The variation. I{(float)} 4699 """ 4700 return None
4701
4702 - def get_entropy():
4703 """ 4704 Computes the entropy of a data field. 4705 4706 See L{DataField.area_get_entropy}() for the definition. 4707 4708 This quantity is cached. 4709 4710 @since: 2.42 4711 4712 @return: The value distribution entropy. I{(float)} 4713 """ 4714 return None
4715
4716 - def get_entropy_2d(yfield):
4717 """ 4718 Computes the entropy of a two-dimensional point cloud. 4719 4720 Each pair of corresponding B{C{xfield}} and B{C{yfield}} pixels is assumed to 4721 represent the coordinates (B{C{x}},B{C{y}}) of a point in plane. Hence they must have 4722 the same dimensions. 4723 4724 @since: 2.44 4725 4726 @param yfield: A data field containing the B{C{y}}-coordinates. I{(L{DataField})} 4727 @return: The two-dimensional distribution entropy. I{(float)} 4728 """ 4729 return None
4730
4731 - def area_get_max(mask, col, row, width, height):
4732 """ 4733 Finds the maximum value in a rectangular part of a data field. 4734 4735 4736 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 4737 @param col: Upper-left column coordinate. I{(int)} 4738 @param row: Upper-left row coordinate. I{(int)} 4739 @param width: Area width (number of columns). I{(int)} 4740 @param height: Area height (number of rows). I{(int)} 4741 @return: The maximum value. When the number of samples to calculate 4742 maximum of is zero, -B{C{glib.MAXDOUBLE}} is returned. I{(float)} 4743 """ 4744 return None
4745
4746 - def area_get_min(mask, col, row, width, height):
4747 """ 4748 Finds the minimum value in a rectangular part of a data field. 4749 4750 4751 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 4752 @param col: Upper-left column coordinate. I{(int)} 4753 @param row: Upper-left row coordinate. I{(int)} 4754 @param width: Area width (number of columns). I{(int)} 4755 @param height: Area height (number of rows). I{(int)} 4756 @return: The minimum value. When the number of samples to calculate 4757 minimum of is zero, -B{C{glib.MAXDOUBLE}} is returned. I{(float)} 4758 """ 4759 return None
4760
4761 - def area_get_min_max(mask, col, row, width, height):
4762 """ 4763 Finds minimum and maximum values in a rectangular part of a data field. 4764 4765 This function is equivalent to calling 4766 B{C{L{DataField.area_get_min_max_mask}}}() 4767 with masking mode B{C{MASK_INCLUDE}}. 4768 4769 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 4770 @param col: Upper-left column coordinate. I{(int)} 4771 @param row: Upper-left row coordinate. I{(int)} 4772 @param width: Area width (number of columns). I{(int)} 4773 @param height: Area height (number of rows). I{(int)} 4774 @return: Tuple consisting of 2 values (B{C{min}}, B{C{max}}). (I{(float)}, I{(float)}) 4775 """ 4776 return None, None
4777
4778 - def area_get_min_max_mask(mask, mode, col, row, width, height):
4779 """ 4780 Finds minimum and maximum values in a rectangular part of a data field. 4781 4782 @since: 2.18 4783 4784 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 4785 @param mode: Masking mode to use. See the introduction for description of 4786 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 4787 @param col: Upper-left column coordinate. I{(int)} 4788 @param row: Upper-left row coordinate. I{(int)} 4789 @param width: Area width (number of columns). I{(int)} 4790 @param height: Area height (number of rows). I{(int)} 4791 @return: Tuple consisting of 2 values (B{C{min}}, B{C{max}}). (I{(float)}, I{(float)}) 4792 """ 4793 return None, None
4794
4795 - def area_get_avg(mask, col, row, width, height):
4796 """ 4797 Computes average value of a rectangular part of a data field. 4798 4799 This function is equivalent to calling B{C{L{DataField.area_get_avg_mask}}}() 4800 with masking mode B{C{MASK_INCLUDE}}. 4801 4802 4803 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 4804 @param col: Upper-left column coordinate. I{(int)} 4805 @param row: Upper-left row coordinate. I{(int)} 4806 @param width: Area width (number of columns). I{(int)} 4807 @param height: Area height (number of rows). I{(int)} 4808 @return: The average value. I{(float)} 4809 """ 4810 return None
4811
4812 - def area_get_avg_mask(mask, mode, col, row, width, height):
4813 """ 4814 Computes average value of a rectangular part of a data field. 4815 4816 @since: 2.18 4817 4818 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 4819 @param mode: Masking mode to use. See the introduction for description of 4820 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 4821 @param col: Upper-left column coordinate. I{(int)} 4822 @param row: Upper-left row coordinate. I{(int)} 4823 @param width: Area width (number of columns). I{(int)} 4824 @param height: Area height (number of rows). I{(int)} 4825 @return: The average value. I{(float)} 4826 """ 4827 return None
4828
4829 - def area_get_rms(mask, col, row, width, height):
4830 """ 4831 Computes root mean square value of a rectangular part of a data field. 4832 4833 4834 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 4835 @param col: Upper-left column coordinate. I{(int)} 4836 @param row: Upper-left row coordinate. I{(int)} 4837 @param width: Area width (number of columns). I{(int)} 4838 @param height: Area height (number of rows). I{(int)} 4839 @return: The root mean square value. 4840 4841 This function is equivalent to calling B{C{L{DataField.area_get_rms_mask}}}() 4842 with masking mode B{C{MASK_INCLUDE}}. I{(float)} 4843 """ 4844 return None
4845
4846 - def area_get_rms_mask(mask, mode, col, row, width, height):
4847 """ 4848 Computes root mean square value of deviations of a rectangular part of a 4849 data field. 4850 4851 @since: 2.18 4852 4853 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 4854 @param mode: Masking mode to use. See the introduction for description of 4855 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 4856 @param col: Upper-left column coordinate. I{(int)} 4857 @param row: Upper-left row coordinate. I{(int)} 4858 @param width: Area width (number of columns). I{(int)} 4859 @param height: Area height (number of rows). I{(int)} 4860 @return: The root mean square value of deviations from the mean value. I{(float)} 4861 """ 4862 return None
4863
4864 - def area_get_grainwise_rms(mask, mode, col, row, width, height):
4865 """ 4866 Computes grain-wise root mean square value of deviations of a rectangular 4867 part of a data field. 4868 4869 Grain-wise means that the mean value is determined for each grain (i.e. 4870 cotinguous part of the mask or inverted mask) separately and the deviations 4871 are calculated from these mean values. 4872 4873 @since: 2.29 4874 4875 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 4876 @param mode: Masking mode to use. See the introduction for description of 4877 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 4878 @param col: Upper-left column coordinate. I{(int)} 4879 @param row: Upper-left row coordinate. I{(int)} 4880 @param width: Area width (number of columns). I{(int)} 4881 @param height: Area height (number of rows). I{(int)} 4882 @return: The root mean square value of deviations from the mean value. I{(float)} 4883 """ 4884 return None
4885
4886 - def area_get_sum(mask, col, row, width, height):
4887 """ 4888 Sums values of a rectangular part of a data field. 4889 4890 This function is equivalent to calling B{C{L{DataField.area_get_sum_mask}}}() 4891 with masking mode B{C{MASK_INCLUDE}}. 4892 4893 4894 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 4895 @param col: Upper-left column coordinate. I{(int)} 4896 @param row: Upper-left row coordinate. I{(int)} 4897 @param width: Area width (number of columns). I{(int)} 4898 @param height: Area height (number of rows). I{(int)} 4899 @return: The sum of all values inside area. I{(float)} 4900 """ 4901 return None
4902
4903 - def area_get_sum_mask(mask, mode, col, row, width, height):
4904 """ 4905 Sums values of a rectangular part of a data field. 4906 4907 @since: 2.18 4908 4909 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 4910 @param mode: Masking mode to use. See the introduction for description of 4911 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 4912 @param col: Upper-left column coordinate. I{(int)} 4913 @param row: Upper-left row coordinate. I{(int)} 4914 @param width: Area width (number of columns). I{(int)} 4915 @param height: Area height (number of rows). I{(int)} 4916 @return: The sum of all values inside area. I{(float)} 4917 """ 4918 return None
4919
4920 - def area_get_median(mask, col, row, width, height):
4921 """ 4922 Computes median value of a data field area. 4923 4924 This function is equivalent to calling 4925 B{C{L{DataField.area_get_median_mask}}}() 4926 with masking mode B{C{MASK_INCLUDE}}. 4927 4928 4929 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 4930 @param col: Upper-left column coordinate. I{(int)} 4931 @param row: Upper-left row coordinate. I{(int)} 4932 @param width: Area width (number of columns). I{(int)} 4933 @param height: Area height (number of rows). I{(int)} 4934 @return: The median value. I{(float)} 4935 """ 4936 return None
4937
4938 - def area_get_median_mask(mask, mode, col, row, width, height):
4939 """ 4940 Computes median value of a data field area. 4941 4942 @since: 2.18 4943 4944 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 4945 @param mode: Masking mode to use. See the introduction for description of 4946 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 4947 @param col: Upper-left column coordinate. I{(int)} 4948 @param row: Upper-left row coordinate. I{(int)} 4949 @param width: Area width (number of columns). I{(int)} 4950 @param height: Area height (number of rows). I{(int)} 4951 @return: The median value. I{(float)} 4952 """ 4953 return None
4954
4955 - def area_get_surface_area(mask, col, row, width, height):
4956 """ 4957 Computes surface area of a rectangular part of a data field. 4958 4959 This function is equivalent to calling 4960 B{C{L{DataField.area_get_surface_area_mask}}}() with masking mode 4961 B{C{MASK_INCLUDE}}. 4962 4963 4964 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 4965 @param col: Upper-left column coordinate. I{(int)} 4966 @param row: Upper-left row coordinate. I{(int)} 4967 @param width: Area width (number of columns). I{(int)} 4968 @param height: Area height (number of rows). I{(int)} 4969 @return: The surface area. I{(float)} 4970 """ 4971 return None
4972
4973 - def area_get_surface_area_mask(mask, mode, col, row, width, height):
4974 """ 4975 Computes surface area of a rectangular part of a data field. 4976 4977 This quantity makes sense only if the lateral dimensions and values of 4978 B{C{data_field}} are the same physical quantities. 4979 4980 @since: 2.18 4981 4982 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 4983 @param mode: Masking mode to use. See the introduction for description of 4984 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 4985 @param col: Upper-left column coordinate. I{(int)} 4986 @param row: Upper-left row coordinate. I{(int)} 4987 @param width: Area width (number of columns). I{(int)} 4988 @param height: Area height (number of rows). I{(int)} 4989 @return: The surface area. I{(float)} 4990 """ 4991 return None
4992
4993 - def area_get_entropy_at_scales(target_line, mask, mode, col, row, width, height, maxdiv):
4994 """ 4995 Calculates estimates of value distribution entropy at various scales. 4996 4997 @since: 2.44 4998 4999 @param target_line: A data line to store the result to. It will be resampled to 5000 B{C{maxdiv}}+1 items. I{(L{DataLine})} 5001 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 5002 @param mode: Masking mode to use. See the introduction for description of 5003 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 5004 @param col: Upper-left column coordinate. I{(int)} 5005 @param row: Upper-left row coordinate. I{(int)} 5006 @param width: Area width (number of columns). I{(int)} 5007 @param height: Area height (number of rows). I{(int)} 5008 @param maxdiv: Maximum number of divisions of the value range. Pass zero to 5009 choose it automatically. I{(int)} 5010 @return: The best estimate, as L{DataField.area_get_entropy}(). I{(float)} 5011 """ 5012 return None
5013
5014 - def get_entropy_2d_at_scales(yfield, target_line, maxdiv):
5015 """ 5016 Calculates estimates of entropy of two-dimensional point cloud at various 5017 scales. 5018 5019 @since: 2.44 5020 5021 @param yfield: A data field containing the B{C{y}}-coordinates. I{(L{DataField})} 5022 @param target_line: A data line to store the result to. It will be resampled to 5023 B{C{maxdiv}}+1 items. I{(L{DataLine})} 5024 @param maxdiv: Maximum number of divisions of the value range. Pass zero to 5025 choose it automatically. I{(int)} 5026 @return: The best estimate, as L{DataField.get_entropy_2d}(). I{(float)} 5027 """ 5028 return None
5029
5030 - def area_get_variation(mask, mode, col, row, width, height):
5031 """ 5032 Computes the total variation of a rectangular part of a data field. 5033 5034 The total variation is estimated as the integral of the absolute value of 5035 local gradient. 5036 5037 This quantity has the somewhat odd units of value unit times lateral unit. 5038 It can be envisioned as follows. If the surface has just two height levels 5039 (upper and lower planes) then the quantity is the length of the boundary 5040 between the upper and lower part, multiplied by the step height. If the 5041 surface is piece-wise constant, then the variation is the step height 5042 integrated along the boundaries between the constant parts. Therefore, for 5043 non-fractal surfaces it scales with the linear dimension of the image, not 5044 with its area, despite being an area integral. 5045 5046 @since: 2.38 5047 5048 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 5049 @param mode: Masking mode to use. See the introduction for description of 5050 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 5051 @param col: Upper-left column coordinate. I{(int)} 5052 @param row: Upper-left row coordinate. I{(int)} 5053 @param width: Area width (number of columns). I{(int)} 5054 @param height: Area height (number of rows). I{(int)} 5055 @return: The variation. I{(float)} 5056 """ 5057 return None
5058
5059 - def area_get_entropy(mask, mode, col, row, width, height):
5060 """ 5061 Estimates the entropy of field data distribution. 5062 5063 The estimate is calculated as B{C{S}} = ln(B{C{n}} Δ) − 1/B{C{n}} ∑ B{C{n_i}} ln(B{C{n_i}}), where 5064 B{C{n}} is the number of pixels considered, Δ the bin size and B{C{n_i}} the count in 5065 the B{C{i}}-th bin. If B{C{S}} is plotted as a function of the bin size Δ, it is, 5066 generally, a growing function with a plateau for ‘reasonable’ bin sizes. 5067 The estimate is taken at the plateau. If no plateau is found, which means 5068 the distribution is effectively a sum of δ-functions, -B{C{glib.MAXDOUBLE}} is 5069 returned. 5070 5071 It should be noted that this estimate may be biased. 5072 5073 @since: 2.42 5074 5075 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 5076 @param mode: Masking mode to use. See the introduction for description of 5077 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 5078 @param col: Upper-left column coordinate. I{(int)} 5079 @param row: Upper-left row coordinate. I{(int)} 5080 @param width: Area width (number of columns). I{(int)} 5081 @param height: Area height (number of rows). I{(int)} 5082 @return: The estimated entropy of the data values. The entropy of no data 5083 or a single single is returned as -B{C{glib.MAXDOUBLE}}. I{(float)} 5084 """ 5085 return None
5086
5087 - def area_get_volume(basis, mask, col, row, width, height):
5088 """ 5089 Computes volume of a rectangular part of a data field. 5090 5091 @since: 2.3 5092 5093 @param basis: The basis or background for volume calculation if not B{C{None}}. 5094 The height of each vertex is then the difference between 5095 B{C{data_field}} value and B{C{basis}} value. Value B{C{None}} is the same 5096 as passing all zeroes for the basis. I{(L{DataField})} 5097 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 5098 @param col: Upper-left column coordinate. I{(int)} 5099 @param row: Upper-left row coordinate. I{(int)} 5100 @param width: Area width (number of columns). I{(int)} 5101 @param height: Area height (number of rows). I{(int)} 5102 @return: The volume. I{(float)} 5103 """ 5104 return None
5105
5106 - def get_autorange():
5107 """ 5108 Computes value range with outliers cut-off. 5109 5110 The purpose of this function is to find a range is suitable for false color 5111 mapping. The precise method how it is calculated is unspecified and may be 5112 subject to changes. 5113 5114 However, it is guaranteed minimum <= B{C{from}} <= B{C{to}} <= maximum. 5115 5116 This quantity is cached. 5117 5118 @return: Tuple consisting of 2 values (B{C{from_}}, B{C{to}}). (I{(float)}, I{(float)}) 5119 """ 5120 return None, None
5121
5122 - def get_stats():
5123 """ 5124 Computes basic statistical quantities of a data field. 5125 5126 @return: Tuple consisting of 5 values (B{C{avg}}, B{C{ra}}, B{C{rms}}, B{C{skew}}, B{C{kurtosis}}). (I{(float)}, I{(float)}, I{(float)}, I{(float)}, I{(float)}) 5127 """ 5128 return None, None, None, None, None
5129
5130 - def area_get_stats(mask, col, row, width, height):
5131 """ 5132 Computes basic statistical quantities of a rectangular part of a data field. 5133 5134 This function is equivalent to calling B{C{L{DataField.area_get_stats_mask}}}() 5135 with masking mode B{C{MASK_INCLUDE}}. 5136 5137 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 5138 @param col: Upper-left column coordinate. I{(int)} 5139 @param row: Upper-left row coordinate. I{(int)} 5140 @param width: Area width (number of columns). I{(int)} 5141 @param height: Area height (number of rows). I{(int)} 5142 @return: Tuple consisting of 5 values (B{C{avg}}, B{C{ra}}, B{C{rms}}, B{C{skew}}, B{C{kurtosis}}). (I{(float)}, I{(float)}, I{(float)}, I{(float)}, I{(float)}) 5143 """ 5144 return None, None, None, None, None
5145
5146 - def area_get_stats_mask(mask, mode, col, row, width, height):
5147 """ 5148 Computes basic statistical quantities of a rectangular part of a data field. 5149 5150 @since: 2.18 5151 5152 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 5153 @param mode: Masking mode to use. See the introduction for description of 5154 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 5155 @param col: Upper-left column coordinate. I{(int)} 5156 @param row: Upper-left row coordinate. I{(int)} 5157 @param width: Area width (number of columns). I{(int)} 5158 @param height: Area height (number of rows). I{(int)} 5159 @return: Tuple consisting of 5 values (B{C{avg}}, B{C{ra}}, B{C{rms}}, B{C{skew}}, B{C{kurtosis}}). (I{(float)}, I{(float)}, I{(float)}, I{(float)}, I{(float)}) 5160 """ 5161 return None, None, None, None, None
5162
5163 - def area_count_in_range(mask, col, row, width, height, below, above):
5164 """ 5165 Counts data samples in given range. 5166 5167 No assertion is made about the values of B{C{above}} and B{C{below}}, in other words 5168 B{C{above}} may be larger than B{C{below}}. To count samples in an open interval 5169 instead of a closed interval, exchange B{C{below}} and B{C{above}} and then subtract 5170 the B{C{nabove}} and B{C{nbelow}} from B{C{width}}*B{C{height}} to get the complementary counts. 5171 5172 With this trick the common task of counting positive values can be 5173 realized: 5174 <informalexample><programlisting> 5175 L{DataField.area_count_in_range}(data_field, None, 5176 col, row, width, height, 5177 0.0, 0.0, &amp;count, None); 5178 count = width*height - count; 5179 </programlisting></informalexample> 5180 5181 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 5182 @param col: Upper-left column coordinate. I{(int)} 5183 @param row: Upper-left row coordinate. I{(int)} 5184 @param width: Area width (number of columns). I{(int)} 5185 @param height: Area height (number of rows). I{(int)} 5186 @param below: Upper bound to compare data to. The number of samples less 5187 than or equal to B{C{below}} is stored in B{C{nbelow}}. I{(float)} 5188 @param above: Lower bound to compare data to. The number of samples greater 5189 than or equal to B{C{above}} is stored in B{C{nabove}}. I{(float)} 5190 @return: Tuple consisting of 2 values (B{C{nbelow}}, B{C{nabove}}). (I{(int)}, I{(int)}) 5191 """ 5192 return None, None
5193
5194 - def area_dh(mask, target_line, col, row, width, height, nstats):
5195 """ 5196 Calculates distribution of heights in a rectangular part of data field. 5197 5198 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 5199 @param target_line: A data line to store the distribution to. It will be 5200 resampled to requested width. I{(L{DataLine})} 5201 @param col: Upper-left column coordinate. I{(int)} 5202 @param row: Upper-left row coordinate. I{(int)} 5203 @param width: Area width (number of columns). I{(int)} 5204 @param height: Area height (number of rows). I{(int)} 5205 @param nstats: The number of samples to take on the distribution function. If 5206 nonpositive, a suitable resolution is determined automatically. I{(int)} 5207 """ 5208 pass
5209
5210 - def dh(target_line, nstats):
5211 """ 5212 Calculates distribution of heights in a data field. 5213 5214 @param target_line: A data line to store the distribution to. It will be 5215 resampled to requested width. I{(L{DataLine})} 5216 @param nstats: The number of samples to take on the distribution function. If 5217 nonpositive, a suitable resolution is determined automatically. I{(int)} 5218 """ 5219 pass
5220
5221 - def area_cdh(mask, target_line, col, row, width, height, nstats):
5222 """ 5223 Calculates cumulative distribution of heights in a rectangular part of data 5224 field. 5225 5226 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 5227 @param target_line: A data line to store the distribution to. It will be 5228 resampled to requested width. I{(L{DataLine})} 5229 @param col: Upper-left column coordinate. I{(int)} 5230 @param row: Upper-left row coordinate. I{(int)} 5231 @param width: Area width (number of columns). I{(int)} 5232 @param height: Area height (number of rows). I{(int)} 5233 @param nstats: The number of samples to take on the distribution function. If 5234 nonpositive, a suitable resolution is determined automatically. I{(int)} 5235 """ 5236 pass
5237
5238 - def cdh(target_line, nstats):
5239 """ 5240 Calculates cumulative distribution of heights in a data field. 5241 5242 @param target_line: A data line to store the distribution to. It will be 5243 resampled to requested width. I{(L{DataLine})} 5244 @param nstats: The number of samples to take on the distribution function. If 5245 nonpositive, a suitable resolution is determined automatically. I{(int)} 5246 """ 5247 pass
5248
5249 - def area_da(target_line, col, row, width, height, orientation, nstats):
5250 """ 5251 Calculates distribution of slopes in a rectangular part of data field. 5252 5253 @param target_line: A data line to store the distribution to. It will be 5254 resampled to requested width. I{(L{DataLine})} 5255 @param col: Upper-left column coordinate. I{(int)} 5256 @param row: Upper-left row coordinate. I{(int)} 5257 @param width: Area width (number of columns). I{(int)} 5258 @param height: Area height (number of rows). I{(int)} 5259 @param orientation: Orientation to compute the slope distribution in. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 5260 @param nstats: The number of samples to take on the distribution function. If 5261 nonpositive, a suitable resolution is determined automatically. I{(int)} 5262 """ 5263 pass
5264
5265 - def da(target_line, orientation, nstats):
5266 """ 5267 Calculates distribution of slopes in a data field. 5268 5269 @param target_line: A data line to store the distribution to. It will be 5270 resampled to requested width. I{(L{DataLine})} 5271 @param orientation: Orientation to compute the slope distribution in. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 5272 @param nstats: The number of samples to take on the distribution function. If 5273 nonpositive, a suitable resolution is determined automatically. I{(int)} 5274 """ 5275 pass
5276
5277 - def area_cda(target_line, col, row, width, height, orientation, nstats):
5278 """ 5279 Calculates cumulative distribution of slopes in a rectangular part of data 5280 field. 5281 5282 @param target_line: A data line to store the distribution to. It will be 5283 resampled to requested width. I{(L{DataLine})} 5284 @param col: Upper-left column coordinate. I{(int)} 5285 @param row: Upper-left row coordinate. I{(int)} 5286 @param width: Area width (number of columns). I{(int)} 5287 @param height: Area height (number of rows). I{(int)} 5288 @param orientation: Orientation to compute the slope distribution in. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 5289 @param nstats: The number of samples to take on the distribution function. If 5290 nonpositive, a suitable resolution is determined automatically. I{(int)} 5291 """ 5292 pass
5293
5294 - def cda(target_line, orientation, nstats):
5295 """ 5296 Calculates cumulative distribution of slopes in a data field. 5297 5298 @param target_line: A data line to store the distribution to. It will be 5299 resampled to requested width. I{(L{DataLine})} 5300 @param orientation: Orientation to compute the slope distribution in. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 5301 @param nstats: The number of samples to take on the distribution function. If 5302 nonpositive, a suitable resolution is determined automatically. I{(int)} 5303 """ 5304 pass
5305
5306 - def area_acf(target_line, col, row, width, height, orientation, interpolation, nstats):
5307 """ 5308 Calculates one-dimensional autocorrelation function of a rectangular part of 5309 a data field. 5310 5311 @param target_line: A data line to store the distribution to. It will be 5312 resampled to requested width. I{(L{DataLine})} 5313 @param col: Upper-left column coordinate. I{(int)} 5314 @param row: Upper-left row coordinate. I{(int)} 5315 @param width: Area width (number of columns). I{(int)} 5316 @param height: Area height (number of rows). I{(int)} 5317 @param orientation: Orientation of lines (ACF is simply averaged over the 5318 other orientation). Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 5319 @param interpolation: Interpolation to use when B{C{nstats}} is given and requires 5320 resampling. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 5321 @param nstats: The number of samples to take on the distribution function. If 5322 nonpositive, B{C{width}} (B{C{height}}) is used. I{(int)} 5323 """ 5324 pass
5325
5326 - def acf(target_line, orientation, interpolation, nstats):
5327 """ 5328 Calculates one-dimensional autocorrelation function of a data field. 5329 5330 @param target_line: A data line to store the distribution to. It will be 5331 resampled to requested width. I{(L{DataLine})} 5332 @param orientation: Orientation of lines (ACF is simply averaged over the 5333 other orientation). Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 5334 @param interpolation: Interpolation to use when B{C{nstats}} is given and requires 5335 resampling. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 5336 @param nstats: The number of samples to take on the distribution function. If 5337 nonpositive, data field width (height) is used. I{(int)} 5338 """ 5339 pass
5340
5341 - def area_hhcf(target_line, col, row, width, height, orientation, interpolation, nstats):
5342 """ 5343 Calculates one-dimensional autocorrelation function of a rectangular part of 5344 a data field. 5345 5346 @param target_line: A data line to store the distribution to. It will be 5347 resampled to requested width. I{(L{DataLine})} 5348 @param col: Upper-left column coordinate. I{(int)} 5349 @param row: Upper-left row coordinate. I{(int)} 5350 @param width: Area width (number of columns). I{(int)} 5351 @param height: Area height (number of rows). I{(int)} 5352 @param orientation: Orientation of lines (HHCF is simply averaged over the 5353 other orientation). Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 5354 @param interpolation: Interpolation to use when B{C{nstats}} is given and requires 5355 resampling. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 5356 @param nstats: The number of samples to take on the distribution function. If 5357 nonpositive, B{C{width}} (B{C{height}}) is used. I{(int)} 5358 """ 5359 pass
5360
5361 - def hhcf(target_line, orientation, interpolation, nstats):
5362 """ 5363 Calculates one-dimensional autocorrelation function of a data field. 5364 5365 @param target_line: A data line to store the distribution to. It will be 5366 resampled to requested width. I{(L{DataLine})} 5367 @param orientation: Orientation of lines (HHCF is simply averaged over the 5368 other orientation). Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 5369 @param interpolation: Interpolation to use when B{C{nstats}} is given and requires 5370 resampling. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 5371 @param nstats: The number of samples to take on the distribution function. If 5372 nonpositive, data field width (height) is used. I{(int)} 5373 """ 5374 pass
5375
5376 - def area_psdf(target_line, col, row, width, height, orientation, interpolation, windowing, nstats):
5377 """ 5378 Calculates one-dimensional power spectrum density function of a rectangular 5379 part of a data field. 5380 5381 @param target_line: A data line to store the distribution to. It will be 5382 resampled to requested width. I{(L{DataLine})} 5383 @param col: Upper-left column coordinate. I{(int)} 5384 @param row: Upper-left row coordinate. I{(int)} 5385 @param width: Area width (number of columns). I{(int)} 5386 @param height: Area height (number of rows). I{(int)} 5387 @param orientation: Orientation of lines (PSDF is simply averaged over the 5388 other orientation). Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 5389 @param interpolation: Interpolation to use when B{C{nstats}} is given and requires 5390 resampling. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 5391 @param windowing: Windowing type to use. Expected values: C{B{WINDOWING_NONE}}, C{B{WINDOWING_HANN}}, C{B{WINDOWING_HAMMING}}, C{B{WINDOWING_BLACKMANN}}, C{B{WINDOWING_LANCZOS}}, C{B{WINDOWING_WELCH}}, C{B{WINDOWING_RECT}}, C{B{WINDOWING_NUTTALL}}, C{B{WINDOWING_FLAT_TOP}}, C{B{WINDOWING_KAISER25}}. I{(L{WindowingType})} 5392 @param nstats: The number of samples to take on the distribution function. If 5393 nonpositive, data field width (height) is used. I{(int)} 5394 """ 5395 pass
5396
5397 - def psdf(target_line, orientation, interpolation, windowing, nstats):
5398 """ 5399 Calculates one-dimensional power spectrum density function of a data field. 5400 5401 @param target_line: A data line to store the distribution to. It will be 5402 resampled to requested width. I{(L{DataLine})} 5403 @param orientation: Orientation of lines (PSDF is simply averaged over the 5404 other orientation). Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 5405 @param interpolation: Interpolation to use when B{C{nstats}} is given and requires 5406 resampling. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 5407 @param windowing: Windowing type to use. Expected values: C{B{WINDOWING_NONE}}, C{B{WINDOWING_HANN}}, C{B{WINDOWING_HAMMING}}, C{B{WINDOWING_BLACKMANN}}, C{B{WINDOWING_LANCZOS}}, C{B{WINDOWING_WELCH}}, C{B{WINDOWING_RECT}}, C{B{WINDOWING_NUTTALL}}, C{B{WINDOWING_FLAT_TOP}}, C{B{WINDOWING_KAISER25}}. I{(L{WindowingType})} 5408 @param nstats: The number of samples to take on the distribution function. If 5409 nonpositive, data field width (height) is used. I{(int)} 5410 """ 5411 pass
5412
5413 - def area_rpsdf(target_line, col, row, width, height, interpolation, windowing, nstats):
5414 """ 5415 Calculates radial power spectrum density function of a rectangular 5416 part of a data field. 5417 5418 @since: 2.7 5419 5420 @param target_line: A data line to store the distribution to. It will be 5421 resampled to requested width. I{(L{DataLine})} 5422 @param col: Upper-left column coordinate. I{(int)} 5423 @param row: Upper-left row coordinate. I{(int)} 5424 @param width: Area width (number of columns). I{(int)} 5425 @param height: Area height (number of rows). I{(int)} 5426 @param interpolation: Interpolation to use when B{C{nstats}} is given and requires 5427 resampling. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 5428 @param windowing: Windowing type to use. Expected values: C{B{WINDOWING_NONE}}, C{B{WINDOWING_HANN}}, C{B{WINDOWING_HAMMING}}, C{B{WINDOWING_BLACKMANN}}, C{B{WINDOWING_LANCZOS}}, C{B{WINDOWING_WELCH}}, C{B{WINDOWING_RECT}}, C{B{WINDOWING_NUTTALL}}, C{B{WINDOWING_FLAT_TOP}}, C{B{WINDOWING_KAISER25}}. I{(L{WindowingType})} 5429 @param nstats: The number of samples to take on the distribution function. If 5430 nonpositive, data field width (height) is used. I{(int)} 5431 """ 5432 pass
5433
5434 - def rpsdf(target_line, interpolation, windowing, nstats):
5435 """ 5436 Calculates radial power spectrum density function of a data field. 5437 5438 @since: 2.7 5439 5440 @param target_line: A data line to store the distribution to. It will be 5441 resampled to requested width. I{(L{DataLine})} 5442 @param interpolation: Interpolation to use when B{C{nstats}} is given and requires 5443 resampling. Expected values: C{B{INTERPOLATION_NONE}}, C{B{INTERPOLATION_ROUND}}, C{B{INTERPOLATION_LINEAR}}, C{B{INTERPOLATION_BILINEAR}}, C{B{INTERPOLATION_KEY}}, C{B{INTERPOLATION_BSPLINE}}, C{B{INTERPOLATION_OMOMS}}, C{B{INTERPOLATION_NNA}}, C{B{INTERPOLATION_SCHAUM}}. I{(L{InterpolationType})} 5444 @param windowing: Windowing type to use. Expected values: C{B{WINDOWING_NONE}}, C{B{WINDOWING_HANN}}, C{B{WINDOWING_HAMMING}}, C{B{WINDOWING_BLACKMANN}}, C{B{WINDOWING_LANCZOS}}, C{B{WINDOWING_WELCH}}, C{B{WINDOWING_RECT}}, C{B{WINDOWING_NUTTALL}}, C{B{WINDOWING_FLAT_TOP}}, C{B{WINDOWING_KAISER25}}. I{(L{WindowingType})} 5445 @param nstats: The number of samples to take on the distribution function. If 5446 nonpositive, data field width (height) is used. I{(int)} 5447 """ 5448 pass
5449
5450 - def area_2dacf(target_field, col, row, width, height, xrange, yrange):
5451 """ 5452 Calculates two-dimensional autocorrelation function of a data field area. 5453 5454 The resulting data field has the correlation corresponding to (0,0) in the 5455 centre. 5456 5457 The maximum possible values of B{C{xrange}} and B{C{yrange}} are B{C{data_field}} 5458 width and height, respectively. However, as the values for longer 5459 distances are calculated from smaller number of data points they become 5460 increasingly bogus, therefore the default range is half of the size. 5461 5462 @since: 2.7 5463 5464 @param target_field: A data field to store the result to. It will be resampled 5465 to (2B{C{xrange}}-1)x(2B{C{yrange}}-1). I{(L{DataField})} 5466 @param col: Upper-left column coordinate. I{(int)} 5467 @param row: Upper-left row coordinate. I{(int)} 5468 @param width: Area width (number of columns). I{(int)} 5469 @param height: Area height (number of rows). I{(int)} 5470 @param xrange: Horizontal correlation range. Non-positive value means 5471 the default range of half of B{C{data_field}} width will be used. I{(int)} 5472 @param yrange: Vertical correlation range. Non-positive value means 5473 the default range of half of B{C{data_field}} height will be used. I{(int)} 5474 """ 5475 pass
5476
5477 - def acf2d(target_field):
5478 """ 5479 Calculates two-dimensional autocorrelation function of a data field. 5480 5481 See L{DataField.area_2dacf}() for details. Parameters missing (not 5482 adjustable) in this function are set to their default values. 5483 5484 @since: 2.7 5485 5486 @param target_field: A data field to store the result to. I{(L{DataField})} 5487 """ 5488 pass
5489
5490 - def area_racf(target_line, col, row, width, height, nstats):
5491 """ 5492 Calculates radially averaged autocorrelation function of a rectangular part 5493 of a data field. 5494 5495 @since: 2.22 5496 5497 @param target_line: A data line to store the autocorrelation function to. It 5498 will be resampled to requested width. I{(L{DataLine})} 5499 @param col: Upper-left column coordinate. I{(int)} 5500 @param row: Upper-left row coordinate. I{(int)} 5501 @param width: Area width (number of columns). I{(int)} 5502 @param height: Area height (number of rows). I{(int)} 5503 @param nstats: The number of samples to take on the autocorrelation function. If 5504 nonpositive, a suitable resolution is chosen automatically. I{(int)} 5505 """ 5506 pass
5507
5508 - def racf(target_line, nstats):
5509 """ 5510 Calculates radially averaged autocorrelation function of a data field. 5511 5512 @since: 2.22 5513 5514 @param target_line: A data line to store the autocorrelation function to. It 5515 will be resampled to requested width. I{(L{DataLine})} 5516 @param nstats: The number of samples to take on the autocorrelation function. If 5517 nonpositive, a suitable resolution is chosen automatically. I{(int)} 5518 """ 5519 pass
5520
5521 - def area_minkowski_volume(target_line, col, row, width, height, nstats):
5522 """ 5523 Calculates Minkowski volume functional of a rectangular part of a data 5524 field. 5525 5526 Volume functional is calculated as the number of values above each 5527 threshold value (,white pixels`) divided by the total number of samples 5528 in the area. Is it's equivalent to 1-CDH. 5529 5530 @param target_line: A data line to store the distribution to. It will be 5531 resampled to requested width. I{(L{DataLine})} 5532 @param col: Upper-left column coordinate. I{(int)} 5533 @param row: Upper-left row coordinate. I{(int)} 5534 @param width: Area width (number of columns). I{(int)} 5535 @param height: Area height (number of rows). I{(int)} 5536 @param nstats: The number of samples to take on the distribution function. If 5537 nonpositive, a suitable resolution is determined automatically. I{(int)} 5538 """ 5539 pass
5540
5541 - def minkowski_volume(target_line, nstats):