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 check_compatibility(brick2, check):
219 """ 220 Checks whether two data bricks are compatible. 221 222 Real dimensions are checked without regard to calibration. Calibrations are considered compatible if either both 223 exist and are identical or none exists. 224 225 @since: 2.51 226 227 @param brick2: Another data brick. I{(L{Brick})} 228 @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_AXISCAL}}, C{B{DATA_COMPATIBILITY_NCURVES}}, C{B{DATA_COMPATIBILITY_CURVELEN}}, C{B{DATA_COMPATIBILITY_ALL}}. I{(L{DataCompatibilityFlags})} 229 @return: Zero if all tested properties are compatible. Flags corresponding to failed tests if bricks are not 230 compatible. I{(DataCompatibilityFlags)} 231 """ 232 return None
233
234 - def new_alike(nullme):
235 """ 236 Creates a new data brick similar to an existing one. 237 238 Use L{Brick.duplicate}() if you want to copy a data brick including 239 data. 240 241 @since: 2.31 242 243 @param nullme: Whether the data brick should be initialized to zeroes. If B{C{False}}, 244 the data will not be initialized. I{(bool)} 245 @return: A newly created data brick. I{(L{Brick})} 246 """ 247 return None
248
249 - def new_part(xpos, ypos, zpos, xres, yres, zres, keep_offsets):
250 """ 251 Creates a new data brick as a part of existing one. 252 253 Use L{Brick.duplicate}() if you want to copy a whole data brick. 254 255 @since: 2.32 256 257 @param xpos: x position where to start from I{(int)} 258 @param ypos: y position where to start from I{(int)} 259 @param zpos: z position where to start from I{(int)} 260 @param xres: x resolution (width) to be extracted I{(int)} 261 @param yres: y resolution (height) to be extracted I{(int)} 262 @param zres: z resolution (depth) to be extracted I{(int)} 263 @param keep_offsets: keep offsets of data during extraction I{(bool)} 264 @return: A newly created data brick. I{(L{Brick})} 265 """ 266 return None
267
268 - def data_changed():
269 """ 270 Emits signal "data_changed" on a data brick. 271 272 @since: 2.31 273 274 """ 275 pass
276
277 - def copy(dest, nondata_too):
278 """ 279 Copies the contents of an already allocated brick to a brick 280 of the same size. 281 282 @param dest: Destination brick. I{(L{Brick})} 283 @param nondata_too: Whether non-data (units) should be copied too. I{(bool)} 284 """ 285 pass
286
287 - def resample(xres, yres, zres, interpolation):
288 """ 289 Resamples a data brick. 290 291 In other words changes the size of three dimensional field related with data 292 brick. The original values are used for resampling using a requested 293 interpolation alorithm. 294 295 @since: 2.31 296 297 @param xres: Desired x resolution. I{(int)} 298 @param yres: Desired y resolution. I{(int)} 299 @param zres: Desired z resolution. I{(int)} 300 @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})} 301 """ 302 pass
303
304 - def get_xres():
305 """ 306 Gets the x resolution of a data brick. 307 308 @since: 2.31 309 310 @return: Resolution (number of data points). I{(int)} 311 """ 312 return None
313
314 - def get_yres():
315 """ 316 Gets the y resolution of a data brick. 317 318 @since: 2.31 319 320 @return: Resolution (number of data points). I{(int)} 321 """ 322 return None
323
324 - def get_zres():
325 """ 326 Gets the z resolution of a data brick. 327 328 @since: 2.31 329 330 @return: Resolution (number of data points). I{(int)} 331 """ 332 return None
333
334 - def get_xreal():
335 """ 336 Gets the physical size of a data brick in the x direction. 337 338 @since: 2.31 339 340 @return: Real size of a data brick the x direction. I{(float)} 341 """ 342 return None
343
344 - def get_yreal():
345 """ 346 Gets the physical size of a data brick in the y direction. 347 348 @since: 2.31 349 350 @return: Real size of a data brick the y direction. I{(float)} 351 """ 352 return None
353
354 - def get_zreal():
355 """ 356 Gets the physical size of a data brick in the z direction. 357 358 @since: 2.31 359 360 @return: Real size of a data brick the z direction. I{(float)} 361 """ 362 return None
363
364 - def get_xoffset():
365 """ 366 Gets the offset of data brick origin in x direction. 367 368 @since: 2.31 369 370 @return: Offset value. I{(float)} 371 """ 372 return None
373
374 - def get_yoffset():
375 """ 376 Gets the offset of data brick origin in y direction. 377 378 @since: 2.31 379 380 @return: Offset value. I{(float)} 381 """ 382 return None
383
384 - def get_zoffset():
385 """ 386 Gets the offset of data brick origin in z direction. 387 388 @since: 2.31 389 390 @return: Offset value. I{(float)} 391 """ 392 return None
393
394 - def set_xreal(xreal):
395 """ 396 Sets the real x dimension of a brick. 397 398 @since: 2.31 399 400 @param xreal: New real x dimensions value I{(float)} 401 """ 402 pass
403
404 - def set_yreal(yreal):
405 """ 406 Sets the real y dimension of a brick. 407 408 @since: 2.31 409 410 @param yreal: New real y dimensions value I{(float)} 411 """ 412 pass
413
414 - def set_zreal(zreal):
415 """ 416 Sets the real z dimension of a brick. 417 418 @since: 2.31 419 420 @param zreal: New real z dimensions value I{(float)} 421 """ 422 pass
423
424 - def set_xoffset(xoffset):
425 """ 426 Sets the offset of a data brick origin in the x 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 xoffset: New offset value. I{(float)} 434 """ 435 pass
436
437 - def set_yoffset(yoffset):
438 """ 439 Sets the offset of a data brick origin in the y direction. 440 441 Note offsets don't affect any calculation, nor functions like 442 L{Brick.rtoi}(). 443 444 @since: 2.31 445 446 @param yoffset: New offset value. I{(float)} 447 """ 448 pass
449
450 - def set_zoffset(zoffset):
451 """ 452 Sets the offset of a data brick origin in the z direction. 453 454 Note offsets don't affect any calculation, nor functions like 455 L{Brick.rtoi}(). 456 457 @since: 2.31 458 459 @param zoffset: New offset value. I{(float)} 460 """ 461 pass
462
463 - def get_dx():
464 """ 465 Gets the horizontal (X) voxel size of a brick in real units. 466 467 The result is the same as 468 L{Brick.get_xreal}(brick)/L{Brick.get_xres}(brick). 469 470 @since: 2.52 471 472 @return: Horizontal voxel size. I{(float)} 473 """ 474 return None
475
476 - def get_dy():
477 """ 478 Gets the vertical (Y) voxel size of a brick in real units. 479 480 The result is the same as 481 L{Brick.get_yreal}(brick)/L{Brick.get_yres}(brick). 482 483 @since: 2.52 484 485 @return: Vertical voxel size. I{(float)} 486 """ 487 return None
488
489 - def get_dz():
490 """ 491 Gets the level-wise (Z) voxel size of a brick in real units. 492 493 The result is the same as 494 L{Brick.get_zreal}(brick)/L{Brick.get_zres}(brick). 495 496 Note that it cannot -- and hence does not -- take into account any attached 497 Z calibration. 498 499 @since: 2.52 500 501 @return: Level-wise voxel size. I{(float)} 502 """ 503 return None
504
505 - def get_si_unit_x():
506 """ 507 Returns x direction SI unit of a data brick. 508 509 @since: 2.31 510 511 @return: SI unit corresponding to the lateral (X) dimension of the data 512 brick. Its reference count is not incremented. I{(L{SIUnit})} 513 """ 514 return None
515
516 - def get_si_unit_y():
517 """ 518 Returns y direction SI unit of a data brick. 519 520 @since: 2.31 521 522 @return: SI unit corresponding to the lateral (Y) dimension of the data 523 brick. Its reference count is not incremented. I{(L{SIUnit})} 524 """ 525 return None
526
527 - def get_si_unit_z():
528 """ 529 Returns z direction SI unit of a data brick. 530 531 @since: 2.31 532 533 @return: SI unit corresponding to the "height" (Z) dimension of the data 534 brick. Its reference count is not incremented. I{(L{SIUnit})} 535 """ 536 return None
537
538 - def get_si_unit_w():
539 """ 540 Returns value SI unit of a data brick. 541 542 @since: 2.31 543 544 @return: SI unit corresponding to the "value" of the data 545 brick. Its reference count is not incremented. I{(L{SIUnit})} 546 """ 547 return None
548
549 - def set_si_unit_x(si_unit):
550 """ 551 Sets the SI unit corresponding to the lateral (X) dimension of a data 552 brick. 553 554 It does not assume a reference on B{C{si_unit}}, instead it adds its own 555 reference. 556 557 @since: 2.31 558 559 @param si_unit: SI unit to be set. I{(L{SIUnit})} 560 """ 561 pass
562
563 - def set_si_unit_y(si_unit):
564 """ 565 Sets the SI unit corresponding to the lateral (Y) dimension of a data 566 brick. 567 568 It does not assume a reference on B{C{si_unit}}, instead it adds its own 569 reference. 570 571 @since: 2.31 572 573 @param si_unit: SI unit to be set. I{(L{SIUnit})} 574 """ 575 pass
576
577 - def set_si_unit_z(si_unit):
578 """ 579 Sets the SI unit corresponding to the "height" (Z) dimension of a data 580 brick. 581 582 It does not assume a reference on B{C{si_unit}}, instead it adds its own 583 reference. 584 585 @since: 2.31 586 587 @param si_unit: SI unit to be set. I{(L{SIUnit})} 588 """ 589 pass
590
591 - def set_si_unit_w(si_unit):
592 """ 593 Sets the SI unit corresponding to the "value" of a data 594 brick. 595 596 It does not assume a reference on B{C{si_unit}}, instead it adds its own 597 reference. 598 599 @since: 2.31 600 601 @param si_unit: SI unit to be set. I{(L{SIUnit})} 602 """ 603 pass
604
605 - def get_min():
606 """ 607 Find the minimum value in a data brick. 608 609 @since: 2.31 610 611 @return: The minimum value within the brick. I{(float)} 612 """ 613 return None
614
615 - def get_max():
616 """ 617 Find the maximum value in a data brick. 618 619 @since: 2.31 620 621 @return: The maximum value within the brick. I{(float)} 622 """ 623 return None
624
625 - def copy_units(target):
626 """ 627 Sets lateral and value units of a data brick to match another data brick. 628 629 @since: 2.49 630 631 @param target: Target data brick. I{(L{Brick})} 632 """ 633 pass
634
635 - def get_value_format_x(style):
636 """ 637 Finds value format good for displaying coordinates of a data brick. 638 639 @since: 2.31 640 641 @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}}, C{B{SI_UNIT_FORMAT_VFTEX}}, C{B{SI_UNIT_FORMAT_UNICODE}}, C{B{SI_UNIT_FORMAT_VFUNICODE}}. I{(L{SIUnitFormatStyle})} 642 @return: Tuple consisting of 2 values (B{C{value}}, B{C{format}}). (I{(L{SIValueFormat})}, I{(SkipArg)}) 643 """ 644 return None, None
645
646 - def get_value_format_y(style):
647 """ 648 Finds value format good for displaying values of a data brick. 649 650 @since: 2.31 651 652 @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}}, C{B{SI_UNIT_FORMAT_VFTEX}}, C{B{SI_UNIT_FORMAT_UNICODE}}, C{B{SI_UNIT_FORMAT_VFUNICODE}}. I{(L{SIUnitFormatStyle})} 653 @return: Tuple consisting of 2 values (B{C{value}}, B{C{format}}). (I{(L{SIValueFormat})}, I{(SkipArg)}) 654 """ 655 return None, None
656
657 - def get_value_format_z(style):
658 """ 659 Finds value format good for displaying values of a data brick. 660 661 @since: 2.31 662 663 @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}}, C{B{SI_UNIT_FORMAT_VFTEX}}, C{B{SI_UNIT_FORMAT_UNICODE}}, C{B{SI_UNIT_FORMAT_VFUNICODE}}. I{(L{SIUnitFormatStyle})} 664 @return: Tuple consisting of 2 values (B{C{value}}, B{C{format}}). (I{(L{SIValueFormat})}, I{(SkipArg)}) 665 """ 666 return None, None
667
668 - def get_value_format_w(style):
669 """ 670 Finds value format good for displaying values of a data brick. 671 672 Note this functions searches for minimum and maximum value in B{C{brick}}, 673 therefore it's relatively slow. 674 675 @since: 2.31 676 677 @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}}, C{B{SI_UNIT_FORMAT_VFTEX}}, C{B{SI_UNIT_FORMAT_UNICODE}}, C{B{SI_UNIT_FORMAT_VFUNICODE}}. I{(L{SIUnitFormatStyle})} 678 @return: Tuple consisting of 2 values (B{C{value}}, B{C{format}}). (I{(L{SIValueFormat})}, I{(SkipArg)}) 679 """ 680 return None, None
681
682 - def itor(pixpos):
683 """ 684 Transforms pixel coordinate to real (physical) coordinate in x direction. 685 686 That is it maps range [0..x resolution] to range [0..x real-size]. It is not 687 suitable for conversion of matrix indices to physical coordinates, you 688 have to use L{Brick.itor}(B{C{brick}}, B{C{pixpos}} + 0.5) for that. 689 690 @since: 2.31 691 692 @param pixpos: Pixel coordinate. I{(float)} 693 @return: B{C{pixpos}} in real coordinates. I{(float)} 694 """ 695 return None
696
697 - def rtoi(realpos):
698 """ 699 Transforms real (physical) coordinate to pixel coordinate in x axis. 700 701 That is it maps range [0..x real-size] to range [0..x resolution]. 702 703 @since: 2.31 704 705 @param realpos: Real coordinate. I{(float)} 706 @return: B{C{realpos}} in pixel coordinates. I{(float)} 707 """ 708 return None
709
710 - def jtor(pixpos):
711 """ 712 Transforms pixel coordinate to real (physical) coordinate in y direction. 713 714 That is it maps range [0..y resolution] to range [0..y real-size]. It is not 715 suitable for conversion of matrix indices to physical coordinates, you 716 have to use L{Brick.itor}(B{C{brick}}, B{C{pixpos}} + 0.5) for that. 717 718 @since: 2.31 719 720 @param pixpos: Pixel coordinate. I{(float)} 721 @return: B{C{pixpos}} in real coordinates. I{(float)} 722 """ 723 return None
724
725 - def rtoj(realpos):
726 """ 727 Transforms real (physical) coordinate to pixel coordinate in y axis. 728 729 That is it maps range [0..y real-size] to range [0..y resolution]. 730 731 @since: 2.31 732 733 @param realpos: Real coordinate. I{(float)} 734 @return: B{C{realpos}} in pixel coordinates. I{(float)} 735 """ 736 return None
737
738 - def ktor(pixpos):
739 """ 740 Transforms pixel coordinate to real (physical) coordinate in z direction. 741 742 That is it maps range [0..z resolution] to range [0..z real-size]. It is not 743 suitable for conversion of matrix indices to physical coordinates, you 744 have to use L{Brick.itor}(B{C{brick}}, B{C{pixpos}} + 0.5) for that. 745 746 @since: 2.31 747 748 @param pixpos: Pixel coordinate. I{(float)} 749 @return: B{C{pixpos}} in real coordinates. I{(float)} 750 """ 751 return None
752
753 - def rtok(realpos):
754 """ 755 Transforms real (physical) coordinate to pixel coordinate in z axis. 756 757 That is it maps range [0..z real-size] to range [0..z resolution]. 758 759 @since: 2.31 760 761 @param realpos: Real coordinate. I{(float)} 762 @return: B{C{realpos}} in pixel coordinates. I{(float)} 763 """ 764 return None
765
766 - def ktor_cal(pixpos):
767 """ 768 Transforms pixel coordinate to real (physical) coordinate in z direction, 769 taking into account calibration. 770 771 Unlike L{Brick.ktor}(), this function takes into account the B{C{z}} 772 calibration and, if calibration is not present, the B{C{z}} axis offset. 773 Since the calibration is available only for discrete pixel coordinates, 774 the values are interpolated between and clamped if outside the range. 775 776 The values in the calibration are assumed to correspond to pixel centres. 777 This convention is also kept when no calibration is present. 778 779 @since: 2.42 780 781 @param pixpos: Pixel coordinate. I{(float)} 782 @return: B{C{pixpos}} in real coordinates. I{(float)} 783 """ 784 return None
785
786 - def rtok_cal(realpos):
787 """ 788 Transforms real (physical) coordinate to pixel coordinate in z axis, 789 taking into account calibration. 790 791 Unlike L{Brick.rtok}(), this function takes into account the B{C{z}} 792 calibration and, if calibration is not present, the B{C{z}} axis offset. 793 Since the calibration is available only for discrete pixel coordinates, 794 the values are interpolated between and clamped if outside the range. 795 796 The values in the calibration are assumed to correspond to pixel centres. 797 This convention is also kept when no calibration is present. 798 799 @since: 2.42 800 801 @param realpos: Real coordinate. I{(float)} 802 @return: B{C{realpos}} in pixel coordinates. I{(float)} 803 """ 804 return None
805
806 - def get_val(col, row, lev):
807 """ 808 Gets value at given position in a data brick. 809 810 Do not access data with this function inside inner loops, it's slow. 811 Get raw data buffer with L{Brick.get_data_const}() and access it 812 directly instead. 813 814 @since: 2.31 815 816 @param col: Position in the brick (column index). I{(int)} 817 @param row: Position in the brick (row index). I{(int)} 818 @param lev: Position in the brick (level index). I{(int)} 819 @return: Value at given index. I{(float)} 820 """ 821 return None
822
823 - def set_val(col, row, lev, value):
824 """ 825 Sets value at given position in a data brick. 826 827 Do not access data with this function inside inner loops, it's slow. 828 Get raw data buffer with L{Brick.get_data_const}() and access it 829 directly instead. 830 831 @since: 2.31 832 833 @param col: Position in the brick (column index). I{(int)} 834 @param row: Position in the brick (row index). I{(int)} 835 @param lev: Position in the brick (level index). I{(int)} 836 @param value: Value to be set. I{(float)} 837 """ 838 pass
839
840 - def get_val_real(x, y, z):
841 """ 842 Gets value at given position in a data brick, in real coordinates. 843 844 Do not access data with this function inside inner loops, it's slow. 845 Get raw data buffer with L{Brick.get_data_const}() and access it 846 directly instead. 847 848 @since: 2.31 849 850 @param x: Position in the brick (x direction). I{(float)} 851 @param y: Position in the brick (y direction). I{(float)} 852 @param z: Position in the brick (z direction). I{(float)} 853 @return: Value at given index. I{(float)} 854 """ 855 return None
856
857 - def set_val_real(x, y, z, value):
858 """ 859 Sets value at given position in a data brick. 860 861 Do not access data with this function inside inner loops, it's slow. 862 Get raw data buffer with L{Brick.get_data_const}() and access it 863 directly instead. 864 865 @since: 2.31 866 867 @param x: Position in the brick (x direction). I{(float)} 868 @param y: Position in the brick (y direction). I{(float)} 869 @param z: Position in the brick (z direction). I{(float)} 870 @param value: Value to be set. I{(float)} 871 """ 872 pass
873
874 - def get_dval(x, y, z, interpolation):
875 """ 876 Gets interpolated value at arbitrary data brick point indexed by pixel 877 coordinates. 878 879 Note pixel values are centered in intervals [B{C{i}}, B{C{i}}+1]. 880 See also L{Brick.get_dval_real}() that does the same, but takes 881 real coordinates. 882 883 @since: 2.31 884 885 @param x: Position in data brick in range [0, x resolution]. 886 If the value is outside 887 this range, the nearest border value is returned. I{(float)} 888 @param y: Position in data brick in range [0, y resolution]. 889 If the value is outside 890 this range, the nearest border value is returned. I{(float)} 891 @param z: Position in data brick in range [0, z resolution]. 892 If the value is outside 893 this range, the nearest border value is returned. I{(float)} 894 @param interpolation: Interpolation method to use. I{(int)} 895 @return: Value interpolated in the data brick. I{(float)} 896 """ 897 return None
898
899 - def get_dval_real(x, y, z, interpolation):
900 """ 901 Gets interpolated value at arbitrary data brick point indexed by pixel 902 coordinates. 903 904 Note pixel values are centered in intervals [B{C{j}}, B{C{j}}+1]. 905 See also L{Brick.get_dval}() that does the same, but takes 906 pixel coordinates. 907 908 @since: 2.31 909 910 @param x: Position in data brick in range [0, x resolution]. If the value is 911 outside this range, the nearest border value is returned. I{(float)} 912 @param y: Position in data brick in range [0, y resolution]. If the value is 913 outside this range, the nearest border value is returned. I{(float)} 914 @param z: Position in data brick in range [0, z resolution]. If the value is 915 outside this range, the nearest border value is returned. I{(float)} 916 @param interpolation: Interpolation method to use. I{(int)} 917 @return: Value interpolated in the data brick. I{(float)} 918 """ 919 return None
920
921 - def clear():
922 """ 923 Fills a data brick with zeroes. 924 925 @since: 2.31 926 927 """ 928 pass
929
930 - def fill(value):
931 """ 932 Fills a data brick with specified value. 933 934 @since: 2.31 935 936 @param value: Value to fill data brick with. I{(float)} 937 """ 938 pass
939
940 - def multiply(value):
941 """ 942 Multiplies all values in a data brick with a specified value. 943 944 @since: 2.31 945 946 @param value: Value to multiply data brick with. I{(float)} 947 """ 948 pass
949
950 - def add(value):
951 """ 952 Adds a specified value to all values in a data brick. 953 954 @since: 2.31 955 956 @param value: Value to be added. I{(float)} 957 """ 958 pass
959
960 - def extract_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets):
961 """ 962 Extracts a plane from a data brick. 963 964 One value of set (B{C{width}}, B{C{height}}, B{C{depth}}) needs to be -1, determining the 965 plane orientation. 966 967 Use L{Brick.extract_xy_plane}() to simply extract one entire XY plane. 968 969 @since: 2.31 970 971 @param target: Datafield to be filled by extracted plane. It will be resized if 972 necessary. I{(L{DataField})} 973 @param istart: Column where to start (pixel coordinates). I{(int)} 974 @param jstart: Row where to start (pixel coordinates). I{(int)} 975 @param kstart: Level where to start (pixel coordinates). I{(int)} 976 @param width: Pixel width of extracted plane. If B{C{width}} is -1, the yz plane will 977 be extracted. I{(int)} 978 @param height: Pixel height of extracted plane. If B{C{height}} is -1, the xz plane 979 will be extracted I{(int)} 980 @param depth: Pixel depth of extracted plane. If B{C{depth}} is -1, the xy plane will 981 be extracted I{(int)} 982 @param keep_offsets: Keep the physical offsets in extracted field. I{(bool)} 983 """ 984 pass
985
986 - def extract_xy_plane(target, lev):
987 """ 988 Extracts one full XY plane of a data brick to a data field. 989 990 @since: 2.52 991 992 @param target: Datafield to be filled by extracted plane. It will be resized if 993 necessary. I{(L{DataField})} 994 @param lev: Position in the brick (level index). I{(int)} 995 """ 996 pass
997
998 - def sum_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets):
999 """ 1000 Sums planes in certain direction 1001 1002 One value of set (B{C{width}}, B{C{height}}, B{C{depth}}) needs to be -1, determining the 1003 plane orientation. In contrast to L{Brick.extract_plane}, the appropriate 1004 start coordinate (e.g. B{C{istart}} if B{C{width}} = -1) is not used for single plane 1005 extraction, but the planes are accumulated in whole range (0..xres for given 1006 example). 1007 1008 @since: 2.31 1009 1010 @param target: Datafield to be filled by summed plane. It will be resized if 1011 necessary. I{(L{DataField})} 1012 @param istart: Column where to start (pixel coordinates). I{(int)} 1013 @param jstart: Row where to start (pixel coordinates). I{(int)} 1014 @param kstart: Level where to start (pixel coordinates). I{(int)} 1015 @param width: Pixel width of summed plane. If B{C{width}} is -1, the yz planes will be 1016 summed. I{(int)} 1017 @param height: Pixel height of summed plane. If B{C{height}} is -1, the xz planes will 1018 be summed I{(int)} 1019 @param depth: Pixel depth of summed plane. If B{C{depth}} is -1, the xy planes will 1020 be summed I{(int)} 1021 @param keep_offsets: Keep the physical offsets in extracted field. I{(bool)} 1022 """ 1023 pass
1024
1025 - def sum_xy_plane(target):
1026 """ 1027 Sums all z-profiles of a data brick to a data field. 1028 1029 The result is an xy plane and can be alternatively imagined as the sum of 1030 all xy planes. 1031 1032 @since: 2.52 1033 1034 @param target: Datafield to be filled by the summary data. It will be resized if 1035 necessary. I{(L{DataField})} 1036 """ 1037 pass
1038
1039 - def min_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets):
1040 """ 1041 Finds minima of profiles in certain direction. 1042 1043 One value of set (B{C{width}}, B{C{height}}, B{C{depth}}) needs to be -1, determining the 1044 plane orientation. In contrast to L{Brick.extract_plane}, the appropriate 1045 start coordinate (e.g. B{C{istart}} if B{C{width}} = -1) is not used for single plane 1046 extraction, but the planes are accumulated in whole range (0..xres for given 1047 example). 1048 1049 @since: 2.32 1050 1051 @param target: Datafield to be filled by the minima plane. It will be resized if 1052 necessary. I{(L{DataField})} 1053 @param istart: Column where to start (pixel coordinates). I{(int)} 1054 @param jstart: Row where to start (pixel coordinates). I{(int)} 1055 @param kstart: Level where to start (pixel coordinates). I{(int)} 1056 @param width: Pixel width of summarized plane. If B{C{width}} is -1, the yz planes will 1057 be summarized. I{(int)} 1058 @param height: Pixel height of summarized plane. If B{C{height}} is -1, the xz planes 1059 will be summarized. I{(int)} 1060 @param depth: Pixel depth of summarized plane. If B{C{depth}} is -1, the xy planes will 1061 be summarized I{(int)} 1062 @param keep_offsets: Keep the physical offsets in extracted field. I{(bool)} 1063 """ 1064 pass
1065
1066 - def min_xy_plane(target):
1067 """ 1068 Computes the minima along z-axis of a data brick to a data field. 1069 1070 The result is an xy plane. 1071 1072 @since: 2.52 1073 1074 @param target: Datafield to be filled by the summary data. It will be resized if 1075 necessary. I{(L{DataField})} 1076 """ 1077 pass
1078
1079 - def max_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets):
1080 """ 1081 Finds minima of profiles in certain direction. 1082 1083 One value of set (B{C{width}}, B{C{height}}, B{C{depth}}) needs to be -1, determining the 1084 plane orientation. In contrast to L{Brick.extract_plane}, the appropriate 1085 start coordinate (e.g. B{C{istart}} if B{C{width}} = -1) is not used for single plane 1086 extraction, but the planes are accumulated in whole range (0..xres for given 1087 example). 1088 1089 @since: 2.32 1090 1091 @param target: Datafield to be filled by the maxima plane. It will be resized if 1092 necessary. I{(L{DataField})} 1093 @param istart: Column where to start (pixel coordinates). I{(int)} 1094 @param jstart: Row where to start (pixel coordinates). I{(int)} 1095 @param kstart: Level where to start (pixel coordinates). I{(int)} 1096 @param width: Pixel width of summarized plane. If B{C{width}} is -1, the yz planes will 1097 be summarized. I{(int)} 1098 @param height: Pixel height of summarized plane. If B{C{height}} is -1, the xz planes 1099 will be summarized. I{(int)} 1100 @param depth: Pixel depth of extracted plane. If B{C{depth}} is -1, the xy planes will 1101 be summarized I{(int)} 1102 @param keep_offsets: Keep the physical offsets in extracted field. I{(bool)} 1103 """ 1104 pass
1105
1106 - def max_xy_plane(target):
1107 """ 1108 Computes the maxima along z-axis of a data brick to a data field. 1109 1110 The result is an xy plane. 1111 1112 @since: 2.52 1113 1114 @param target: Datafield to be filled by the summary data. It will be resized if 1115 necessary. I{(L{DataField})} 1116 """ 1117 pass
1118
1119 - def minpos_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets):
1120 """ 1121 Finds minima coordinates in profiles in certain direction. 1122 1123 One value of set (B{C{width}}, B{C{height}}, B{C{depth}}) needs to be -1, 1124 determining the plane orientation. In contrast to L{Brick.extract_plane}, 1125 the appropriate start coordinate (e.g. B{C{istart}} if B{C{width}} = -1) is not used 1126 for single plane extraction, but the planes are accumulated in whole range 1127 (0..xres for given example) 1128 1129 @since: 2.32 1130 1131 @param target: Datafield to be filled by the minima positions plane. 1132 It will be resized if necessary. I{(L{DataField})} 1133 @param istart: Column where to start (pixel coordinates). I{(int)} 1134 @param jstart: Row where to start (pixel coordinates). I{(int)} 1135 @param kstart: Level where to start (pixel coordinates). I{(int)} 1136 @param width: Pixel width of summarized plane. If B{C{width}} is -1, the yz planes will 1137 be summarized. I{(int)} 1138 @param height: Pixel height of summarized plane. If B{C{height}} is -1, the xz planes 1139 will be summarized. I{(int)} 1140 @param depth: Pixel depth of summarized plane. If B{C{depth}} is -1, the xy planes will 1141 be summarized I{(int)} 1142 @param keep_offsets: Keep the physical offsets in summarized field. I{(bool)} 1143 """ 1144 pass
1145
1146 - def minpos_xy_plane(target):
1147 """ 1148 Computes the location of minima along z-axis of a data brick to a data field. 1149 1150 The result is an xy plane. 1151 1152 @since: 2.52 1153 1154 @param target: Datafield to be filled by the summary data. It will be resized if 1155 necessary. I{(L{DataField})} 1156 """ 1157 pass
1158
1159 - def maxpos_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets):
1160 """ 1161 Finds maxima coordinates of profiles in certain direction. 1162 1163 One value of set (B{C{width}}, B{C{height}}, B{C{depth}}) needs to be -1, 1164 determining the plane orientation. In contrast to L{Brick.extract_plane}, 1165 the appropriate start coordinate (e.g. B{C{istart}} if B{C{width}} = -1) is not used 1166 for single plane extraction, but the planes are accumulated in whole range 1167 (0..xres for given example). 1168 1169 @since: 2.32 1170 1171 @param target: Datafield to be filled by the maxima positions plane. 1172 It will be resized if necessary. I{(L{DataField})} 1173 @param istart: Column where to start (pixel coordinates). I{(int)} 1174 @param jstart: Row where to start (pixel coordinates). I{(int)} 1175 @param kstart: Level where to start (pixel coordinates). I{(int)} 1176 @param width: Pixel width of summarized plane. If B{C{width}} is -1, the yz planes will 1177 be summarized. I{(int)} 1178 @param height: Pixel height of summarized plane. If B{C{height}} is -1, the xz planes 1179 will be summarized I{(int)} 1180 @param depth: Pixel depth of summarized plane. If B{C{depth}} is -1, the xy planes will 1181 be summarized I{(int)} 1182 @param keep_offsets: Keep the physical offsets in summarized field. Not 1183 implemented. I{(bool)} 1184 """ 1185 pass
1186
1187 - def maxpos_xy_plane(target):
1188 """ 1189 Computes the location of maxima along z-axis of a data brick to a data field. 1190 1191 The result is an xy plane. 1192 1193 @since: 2.52 1194 1195 @param target: Datafield to be filled by the summary data. It will be resized if 1196 necessary. I{(L{DataField})} 1197 """ 1198 pass
1199
1200 - def mean_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets):
1201 """ 1202 Finds mean of planes in certain direction. 1203 1204 One value of set (B{C{width}}, B{C{height}}, B{C{depth}}) needs to be -1, determining the 1205 plane orientation. In contrast to L{Brick.extract_plane}, the appropriate 1206 start coordinate (e.g. B{C{istart}} if B{C{width}} = -1) is not used for single plane 1207 extraction, but the planes are accumulated in whole range (0..xres for given 1208 example). 1209 1210 @since: 2.32 1211 1212 @param target: Datafield to be filled by the mean plane. It will be resized if 1213 necessary. I{(L{DataField})} 1214 @param istart: Column where to start (pixel coordinates). I{(int)} 1215 @param jstart: Row where to start (pixel coordinates). I{(int)} 1216 @param kstart: Level where to start (pixel coordinates). I{(int)} 1217 @param width: Pixel width of summarized plane. If B{C{width}} is -1, the yz planes will 1218 be summarized. I{(int)} 1219 @param height: Pixel height of summarized plane. If B{C{height}} is -1, the xz planes 1220 will be summarized. I{(int)} 1221 @param depth: Pixel depth of summarized plane. If B{C{depth}} is -1, the xy planes will 1222 be summarized. I{(int)} 1223 @param keep_offsets: Keep the physical offsets in summarized field. I{(bool)} 1224 """ 1225 pass
1226
1227 - def mean_xy_plane(target):
1228 """ 1229 Calculates mean values of all z-profiles of a data brick to a data field. 1230 1231 The result is an xy plane and can be alternatively imagined as the average 1232 of all xy planes. 1233 1234 @since: 2.52 1235 1236 @param target: Datafield to be filled by the summary data. It will be resized if 1237 necessary. I{(L{DataField})} 1238 """ 1239 pass
1240
1241 - def rms_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets):
1242 """ 1243 Finds rms of planes in certain direction and extract the result 1244 (DataField). One value of set (B{C{width}}, B{C{height}}, B{C{depth}}) needs to be -1, 1245 determining the plane orientation. In contrast to L{Brick.extract_plane}, 1246 the appropriate start coordinate (e.g. B{C{istart}} if B{C{width}} = -1) is not used 1247 for single plane extraction, but the planes are accumulated in whole range 1248 (0..xres for given example) 1249 1250 @since: 2.32 1251 1252 @param target: Datafield to be filled by the rms plane. It will be resized if 1253 necessary. I{(L{DataField})} 1254 @param istart: Column where to start (pixel coordinates). I{(int)} 1255 @param jstart: Row where to start (pixel coordinates). I{(int)} 1256 @param kstart: Level where to start (pixel coordinates). I{(int)} 1257 @param width: Pixel width of summarized plane. If B{C{width}} is -1, the yz planes will 1258 be summarized. I{(int)} 1259 @param height: Pixel height of summarized plane. If B{C{height}} is -1, the xz planes 1260 will be summarized. I{(int)} 1261 @param depth: Pixel depth of summarized plane. If B{C{depth}} is -1, the xy planes will 1262 be summarized. I{(int)} 1263 @param keep_offsets: Keep the physical offsets in extracted field. I{(bool)} 1264 """ 1265 pass
1266
1267 - def rms_xy_plane(target):
1268 """ 1269 Calculates rms values of all z-profiles of a data brick to a data field. 1270 1271 The result is an xy plane and can be alternatively imagined as the variation 1272 among xy planes. 1273 1274 @since: 2.52 1275 1276 @param target: Datafield to be filled by the summary data. It will be resized if 1277 necessary. I{(L{DataField})} 1278 """ 1279 pass
1280
1281 - def extract_line(target, istart, jstart, kstart, iend, jend, kend, keep_offsets):
1282 """ 1283 Extracts a line (DataLine) from the brick. 1284 1285 Only line orientations parallel to coordinate axes are supported now, i.e. 1286 two of the start coordinates need to be same as end ones. 1287 1288 @since: 2.31 1289 1290 @param target: Dataline to be filled by extracted line. It will be resized if 1291 necessary. I{(L{DataLine})} 1292 @param istart: Column where to start (pixel coordinates). I{(int)} 1293 @param jstart: Row where to start (pixel coordinates). I{(int)} 1294 @param kstart: Level where to start (pixel coordinates). I{(int)} 1295 @param iend: Column where to end, exclusive (pixel coordinates). I{(int)} 1296 @param jend: Row where to end, exclusive (pixel coordinates). I{(int)} 1297 @param kend: Level where to end, exclusive (pixel coordinates). I{(int)} 1298 @param keep_offsets: Keep physical offsets in extracted line. I{(bool)} 1299 """ 1300 pass
1301
1302 - def extract_z_line(target, i, j):
1303 """ 1304 Extracts one full Z profile of a data brick to a data line. 1305 1306 @since: 2.52 1307 1308 @param target: Dataline to be filled by extracted line. It will be resized if 1309 necessary. I{(L{DataLine})} 1310 @param i: Column index. I{(int)} 1311 @param j: Row index. I{(int)} 1312 """ 1313 pass
1314
1315 - def get_zcalibration():
1316 """ 1317 Gets the z-axis non-linear calibration of a data brick. 1318 1319 @since: 2.32 1320 1321 @return: Z Calibration (non-linear Z-axis values as ordinates). I{(L{DataLine})} 1322 """ 1323 return None
1324
1325 - def set_zcalibration(calibration):
1326 """ 1327 Sets the z-axis non-linear calibration of a data brick. 1328 1329 @since: 2.32 1330 1331 @param calibration: DataLine pointer with z-axis non-linear calibration 1332 of a data brick (values are stored as ordinates). It can also 1333 be B{C{None}} to unset the calibration. I{(L{DataLine})} 1334 """ 1335 pass
1336
1337 - def copy_zcalibration(target):
1338 """ 1339 Copies non-linear z-axis calibration between two data bricks. 1340 1341 Both bricks must have the same Z resolution. For a meaningful usage, they 1342 should also have the same Z real sizes and units (uncalibrated). 1343 1344 If B{C{brick}} has no z-axis calibration, existing B{C{targets}}' calibration is 1345 deleted. 1346 1347 @since: 2.52 1348 1349 @param target: Target data brick. I{(L{Brick})} 1350 """ 1351 pass
1352
1353 - def transpose(target, type, xflipped, yflipped, zflipped):
1354 """ 1355 Transposes a data brick, exchanging and/or flipping axes. 1356 1357 Real dimensions and units are updated. Since real sizes cannot go backward, 1358 flipping an axis results in the corresponding offset being reset (the 1359 real dimension stays positive). If the Z axis is preserved its calibration 1360 is copied to the target; otherwise the target will have no Z axis 1361 calibration. 1362 1363 @since: 2.51 1364 1365 @param target: Destination data brick. It will be resized as needed. I{(L{Brick})} 1366 @param type: Basic transposition type (which axes are swapped). Expected values: C{B{BRICK_TRANSPOSE_XYZ}}, C{B{BRICK_TRANSPOSE_XZY}}, C{B{BRICK_TRANSPOSE_YXZ}}, C{B{BRICK_TRANSPOSE_YZX}}, C{B{BRICK_TRANSPOSE_ZXY}}, C{B{BRICK_TRANSPOSE_ZYX}}. I{(L{BrickTransposeType})} 1367 @param xflipped: B{C{True}} to reflect X, i.e. rows within XY planes. I{(bool)} 1368 @param yflipped: B{C{True}} to reflect Y, i.e. columns within XY planes. I{(bool)} 1369 @param zflipped: B{C{True}} to reflect Z, i.e. the XY plane order. I{(bool)} 1370 """ 1371 pass
1372
1373 - def invert(xflipped, yflipped, zflipped, wflipped):
1374 """ 1375 Reflects and/or inverts a data brick in place. 1376 1377 In the case of value reflection, it's inverted about the mean value. 1378 1379 Since real sizes cannot go backward, flipping an axis results in the 1380 corresponding offset being reset (the real dimension stays positive). 1381 1382 Note that the axis parameter convention is different from the confusing one 1383 of L{DataField.invert}(). Here parameters simply correspond to directions 1384 that should be flipped. 1385 1386 @since: 2.59 1387 1388 @param xflipped: B{C{True}} to reflect X, i.e. rows within XY planes. I{(bool)} 1389 @param yflipped: B{C{True}} to reflect Y, i.e. columns within XY planes. I{(bool)} 1390 @param zflipped: B{C{True}} to reflect Z, i.e. the XY plane order. I{(bool)} 1391 @param wflipped: B{C{True}} to invert values. I{(bool)} 1392 """ 1393 pass
1394
1395 - def set_plane(plane, istart, jstart, kstart, width, height, depth):
1396 """ 1397 Fill a single plane in the brick by a two-dimensional data (DataField). 1398 1399 One value of set (B{C{width}}, B{C{height}}, B{C{depth}}) needs to be -1, determining the 1400 plane orientation. 1401 1402 @since: 2.51 1403 1404 @param plane: Datafield to be inserted into brick. It must have the appropriate 1405 size. I{(L{DataField})} 1406 @param istart: Column where to start (pixel coordinates). I{(int)} 1407 @param jstart: Row where to start (pixel coordinates). I{(int)} 1408 @param kstart: Level where to start (pixel coordinates). I{(int)} 1409 @param width: Pixel width of the inserted plane. 1410 If B{C{width}} is -1, the yz plane will be filled. I{(int)} 1411 @param height: Pixel height of insered plane. 1412 If B{C{height}} is -1, the xz plane will be filled. I{(int)} 1413 @param depth: Pixel depth of inserted plane. 1414 If B{C{depth}} is -1, the xy plane will be filled. I{(int)} 1415 """ 1416 pass
1417
1418 - def set_xy_plane(plane, lev):
1419 """ 1420 Sets one full single XY plane in a data brick from data field values. 1421 1422 @since: 2.52 1423 1424 @param plane: Datafield to be inserted into brick. It must have dimensions 1425 B{C{xres}} by B{C{yres}}. I{(L{DataField})} 1426 @param lev: Position in the brick (level index). I{(int)} 1427 """ 1428 pass
1429
1430 - def add_to_xy_planes(plane):
1431 """ 1432 Adds a data field to all brick XY planes. 1433 1434 @since: 2.55 1435 1436 @param plane: Datafield to be added to all brick XY planes. It must have 1437 dimensions B{C{xres}} by B{C{yres}}. I{(L{DataField})} 1438 """ 1439 pass
1440
1441 - def add_to_z_lines(line):
1442 """ 1443 Adds a data line to all brick Z lines. 1444 1445 @since: 2.55 1446 1447 @param line: Data line to add to each Z lines. It must have dimension B{C{zres}}. I{(L{DataLine})} 1448 """ 1449 pass
1450
1451 - def get_data():
1452 """ 1453 Extract the data of a data brick. 1454 1455 The returned list contains a copy of the data. Changing its contents does 1456 not change the data brick's data. 1457 1458 1459 @return: List containing extracted data brick data. I{(list)} 1460 """ 1461 return None
1462
1463 - def set_data(data):
1464 """ 1465 Sets the entire contents of a data brick. 1466 1467 The length of B{C{data}} must be equal to the number of elements of the data 1468 brick. 1469 1470 @param data: Sequence of floating point values. I{(list)} 1471 """ 1472 pass
1473
1474 - def duplicate():
1475 """ 1476 Convenience macro doing L{gwy_serializable_duplicate}() with all the necessary 1477 typecasting. 1478 1479 @since: 2.31 1480 1481 @return: I{(L{Brick})} 1482 """ 1483 return None
1484
1485 - def get_data_pointer():
1486 """ 1487 Gets pointer to data which the brick contains. 1488 1489 1490 @return: integer pointing to the raw data of the brick I{(long)} 1491 """ 1492 return None
1493 1494
1495 -class ColorAxis:
1496 - def __init__(orientation):
1497 """ 1498 Creates a new color axis. 1499 1500 1501 @param orientation: The orientation of the axis. I{(GtkOrientation)} 1502 @return: The newly created color axis as a B{C{GtkWidget}}. I{(L{gtk.Widget})} 1503 """ 1504 return None
1505
1506 - def get_range():
1507 """ 1508 Gets the range of a color axis. 1509 1510 @return: Tuple consisting of 2 values (B{C{min}}, B{C{max}}). (I{(float)}, I{(float)}) 1511 """ 1512 return None, None
1513
1514 - def set_range(min, max):
1515 """ 1516 Sets the range of a color axis. 1517 1518 @param min: The range minimum. I{(float)} 1519 @param max: The range maximum. I{(float)} 1520 """ 1521 pass
1522
1523 - def get_si_unit():
1524 """ 1525 Gets the SI unit a color axis displays. 1526 1527 1528 @return: The SI unit. I{(L{SIUnit})} 1529 """ 1530 return None
1531
1532 - def set_si_unit(unit):
1533 """ 1534 Sets the SI unit a color axis displays. 1535 1536 @param unit: A SI unit to display next to minimum and maximum value. I{(L{SIUnit})} 1537 """ 1538 pass
1539
1540 - def set_gradient(gradient):
1541 """ 1542 Sets the color gradient a color axis should use. 1543 1544 @param gradient: Name of gradient B{C{axis}} should use. It should exist. I{(string)} 1545 """ 1546 pass
1547
1548 - def get_gradient():
1549 """ 1550 Gets the color gradient a color axis uses. 1551 1552 1553 @return: The color gradient. I{(string)} 1554 """ 1555 return None
1556
1557 - def get_ticks_style():
1558 """ 1559 Gets ticks style of a color axis. 1560 1561 1562 @return: The ticks style. I{(TicksStyle)} 1563 """ 1564 return None
1565
1566 - def set_ticks_style(ticks_style):
1567 """ 1568 Sets the ticks style of a color axis. 1569 1570 @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})} 1571 """ 1572 pass
1573
1574 - def get_labels_visible():
1575 """ 1576 Gets the visibility of labels of a color axis. 1577 1578 1579 @return: B{C{True}} if labels are displayed, B{C{False}} if they are omitted. I{(bool)} 1580 """ 1581 return None
1582
1583 - def set_labels_visible(labels_visible):
1584 """ 1585 Sets the visibility of labels of a color axis. 1586 1587 @param labels_visible: B{C{True}} to display labels with minimum and maximum values, 1588 B{C{False}} to display no labels. I{(bool)} 1589 """ 1590 pass
1591 1592
1593 -class ColorButton:
1594 - def __init__():
1595 """ 1596 Creates a new color button. This returns a widget in the form of 1597 a small button containing a swatch representing the current selected 1598 color. When the button is clicked, a color-selection dialog will open, 1599 allowing the user to select a color. The swatch will be updated to reflect 1600 the new color when the user finishes. 1601 1602 1603 @return: a new color button. I{(L{gtk.Widget})} 1604 """ 1605 return None
1606
1607 - def set_color(color):
1608 """ 1609 Sets the current color to be B{C{color}}. 1610 1611 @param color: A B{C{RGBA}} to set the current color with. I{(const-RGBA*)} 1612 """ 1613 pass
1614
1615 - def get_color():
1616 """ 1617 Sets B{C{color}} to be the current color in the B{C{ColorButton}} widget. 1618 1619 @return: Value B{C{color}}. (I{(RGBAOutArg)}) 1620 """ 1621 return None
1622
1623 - def set_use_alpha(use_alpha):
1624 """ 1625 Sets whether or not the color button should use the alpha channel. 1626 1627 @param use_alpha: B{C{True}} if color button should use alpha channel, B{C{False}} if not. I{(bool)} 1628 """ 1629 pass
1630
1631 - def get_use_alpha():
1632 """ 1633 Does the color selection dialog use the alpha channel? 1634 1635 1636 @return: B{C{True}} if the color sample uses alpha channel, B{C{False}} if not. I{(bool)} 1637 """ 1638 return None
1639 1640
1641 -class Container:
1642 """ 1643 A container with items identified by a GQuark 1644 1645 1646 B{C{Container}} is a general-purpose container, it can hold atomic types, 1647 strings and objects. However, objects must implement the B{C{Serializable}} 1648 interface, because the container itself is serializable. 1649 1650 A new container can be created with L{Container.new}(), items can be stored 1651 with function like L{Container.set_double}(), read with 1652 L{Container.get_double}(), and removed with L{Container.remove}() or 1653 L{Container.remove_by_prefix}(). A presence of a value can be tested with 1654 L{Container.contains}(), convenience functions for reading (updating) a 1655 value only if it is present like L{Container.gis_double}(), are available 1656 too. 1657 1658 B{C{Container}} takes ownership of stored non-atomic items. For strings, this 1659 means you cannot store static strings (use g_strdup() to duplicate them), 1660 and must not free stored dynamic strings, as the container will free them 1661 itself when they are removed or when the container is finalized. For 1662 objects, this means it takes a reference on the object (released when the 1663 object is removed or the container is finalized), so you usually want to 1664 g_object_unref() objects after storing them to a container. 1665 1666 Items in a B{C{Container}} can be identified by a B{C{GQuark}} or the corresponding 1667 string. While B{C{GQuark}}'s are atomic values and allow faster acces, they are 1668 less convenient for casual usage -- each B{C{GQuark}} key function like 1669 L{Container.set_double}() thus has a string-key counterpart 1670 L{Container.set_double_by_name}(). 1671 1672 """
1673 - def __init__():
1674 """ 1675 Creates a new B{C{Container}}. 1676 1677 1678 @return: The container, as a B{C{GObject}}. I{(L{Container})} 1679 """ 1680 return None
1681
1682 - def get_n_items():
1683 """ 1684 Gets the number of items in a container. 1685 1686 1687 @return: The number of items. I{(int)} 1688 """ 1689 return None
1690
1691 - def value_type(key):
1692 """ 1693 Returns the type of value in B{C{container}} identified by B{C{key}}. 1694 1695 1696 @param key: A B{C{GQuark}} key. I{(int)} 1697 @return: The value type as B{C{GType}}; 0 if there is no such value. I{(GType)} 1698 """ 1699 return None
1700
1701 - def contains(key):
1702 """ 1703 Returns B{C{True}} if B{C{container}} contains a value identified by B{C{key}}. 1704 1705 1706 @param key: A B{C{GQuark}} key. I{(int)} 1707 @return: Whether B{C{container}} contains something identified by B{C{key}}. I{(bool)} 1708 """ 1709 return None
1710
1711 - def remove(key):
1712 """ 1713 Removes a value identified by B{C{key}} from a container. 1714 1715 1716 @param key: A B{C{GQuark}} key. I{(int)} 1717 @return: B{C{True}} if there was such a value and was removed. I{(bool)} 1718 """ 1719 return None
1720
1721 - def remove_by_prefix(prefix):
1722 """ 1723 Removes a values whose key start with B{C{prefix}} from container B{C{container}}. 1724 1725 B{C{prefix}} can be B{C{None}}, all values are then removed. 1726 1727 1728 @param prefix: A nul-terminated id prefix. I{(string)} 1729 @return: The number of values removed. I{(int)} 1730 """ 1731 return None
1732
1733 - def transfer(dest, source_prefix, dest_prefix, force):
1734 """ 1735 Copies a items from one place in container to another place. 1736 1737 The copies are shallow, objects are not physically duplicated, only 1738 referenced in B{C{dest}}. 1739 1740 1741 @param dest: Destination container. It may be the same container as B{C{source}}, but 1742 B{C{source_prefix}} and B{C{dest_prefix}} may not overlap then. I{(L{Container})} 1743 @param source_prefix: Prefix in B{C{source}} to take values from. I{(string)} 1744 @param dest_prefix: Prefix in B{C{dest}} to put values to. I{(string)} 1745 @param force: B{C{True}} to replace existing values in B{C{dest}}. I{(bool)} 1746 @return: The number of actually transferred items. I{(int)} 1747 """ 1748 return None
1749
1750 - def rename(key, newkey, force):
1751 """ 1752 Makes a value in B{C{container}} identified by B{C{key}} to be identified by B{C{newkey}}. 1753 1754 When B{C{force}} is B{C{True}} existing value at B{C{newkey}} is removed from B{C{container}}. 1755 When it's B{C{False}}, an existing value B{C{newkey}} inhibits the rename and B{C{False}} 1756 is returned. 1757 1758 1759 @param key: The current key. I{(int)} 1760 @param newkey: A new key for the value. I{(int)} 1761 @param force: Whether to replace existing value at B{C{newkey}}. I{(bool)} 1762 @return: Whether the rename succeeded. I{(bool)} 1763 """ 1764 return None
1765
1766 - def foreach(prefix, function, user_data):
1767 """ 1768 Calls B{C{function}} on each B{C{container}} item whose identifier starts with 1769 B{C{prefix}}. 1770 1771 The function is called B{C{function}}(B{C{GQuark}} key, B{C{GValue}} *value, user_data). 1772 1773 1774 @param prefix: A nul-terminated id prefix. I{(string)} 1775 @param function: The function called on the items. I{(GHFunc)} 1776 @param user_data: The user data passed to B{C{function}}. I{(gpointer)} 1777 @return: The number of items B{C{function}} was called on. I{(int)} 1778 """ 1779 return None
1780
1781 - def set_boolean(key, value):
1782 """ 1783 Stores a boolean into B{C{container}}, identified by B{C{key}}. 1784 1785 @param key: A B{C{GQuark}} key. I{(int)} 1786 @param value: A boolean. I{(bool)} 1787 """ 1788 pass
1789
1790 - def get_boolean(key):
1791 """ 1792 Returns the boolean in B{C{container}} identified by B{C{key}}. 1793 1794 1795 @param key: A B{C{GQuark}} key. I{(int)} 1796 @return: The boolean as B{C{gboolean}}. I{(bool)} 1797 """ 1798 return None
1799
1800 - def set_uchar(key, value):
1801 """ 1802 Stores an unsigned character into B{C{container}}, identified by B{C{key}}. 1803 1804 @param key: A B{C{GQuark}} key. I{(int)} 1805 @param value: An unsigned character. I{(guchar)} 1806 """ 1807 pass
1808
1809 - def get_uchar(key):
1810 """ 1811 Returns the unsigned character in B{C{container}} identified by B{C{key}}. 1812 1813 1814 @param key: A B{C{GQuark}} key. I{(int)} 1815 @return: The character as B{C{guchar}}. I{(guchar)} 1816 """ 1817 return None
1818
1819 - def set_int32(key, value):
1820 """ 1821 Stores a 32bit integer into B{C{container}}, identified by B{C{key}}. 1822 1823 @param key: A B{C{GQuark}} key. I{(int)} 1824 @param value: A 32bit integer. I{(int)} 1825 """ 1826 pass
1827
1828 - def get_int32(key):
1829 """ 1830 Returns the 32bit integer in B{C{container}} identified by B{C{key}}. 1831 1832 1833 @param key: A B{C{GQuark}} key. I{(int)} 1834 @return: The integer as B{C{guint32}}. I{(int)} 1835 """ 1836 return None
1837
1838 - def set_enum(key, value):
1839 """ 1840 Stores an enum into B{C{container}}, identified by B{C{key}}. 1841 1842 Note enums are treated as 32bit integers. 1843 1844 @param key: A B{C{GQuark}} key. I{(int)} 1845 @param value: An enum integer. I{(int)} 1846 """ 1847 pass
1848
1849 - def get_enum(key):
1850 """ 1851 Returns the enum in B{C{container}} identified by B{C{key}}. 1852 1853 Note enums are treated as 32bit integers. 1854 1855 1856 @param key: A B{C{GQuark}} key. I{(int)} 1857 @return: The enum as B{C{gint}}. I{(int)} 1858 """ 1859 return None
1860
1861 - def set_int64(key, value):
1862 """ 1863 Stores a 64bit integer into B{C{container}}, identified by B{C{key}}. 1864 1865 @param key: A B{C{GQuark}} key. I{(int)} 1866 @param value: A 64bit integer. I{(gint64)} 1867 """ 1868 pass
1869
1870 - def get_int64(key):
1871 """ 1872 Returns the 64bit integer in B{C{container}} identified by B{C{key}}. 1873 1874 1875 @param key: A B{C{GQuark}} key. I{(int)} 1876 @return: The 64bit integer as B{C{guint64}}. I{(gint64)} 1877 """ 1878 return None
1879
1880 - def set_double(key, value):
1881 """ 1882 Stores a double into B{C{container}}, identified by B{C{key}}. 1883 1884 @param key: A B{C{GQuark}} key. I{(int)} 1885 @param value: A double. I{(float)} 1886 """ 1887 pass
1888
1889 - def get_double(key):
1890 """ 1891 Returns the double in B{C{container}} identified by B{C{key}}. 1892 1893 1894 @param key: A B{C{GQuark}} key. I{(int)} 1895 @return: The double as B{C{gdouble}}. I{(float)} 1896 """ 1897 return None
1898
1899 - def get_string(key):
1900 """ 1901 Returns the string in B{C{container}} identified by B{C{key}}. 1902 1903 The returned string must be treated as constant and never freed or modified. 1904 1905 1906 @param key: A B{C{GQuark}} key. I{(int)} 1907 @return: The string. I{(string)} 1908 """ 1909 return None
1910
1911 - def set_object(key, value):
1912 """ 1913 Stores an object into B{C{container}}, identified by B{C{key}}. 1914 1915 The container claims ownership on the object, i.e. its reference count is 1916 incremented. 1917 1918 The object must implement B{C{Serializable}} interface to allow serialization 1919 of the container. 1920 1921 @param key: A B{C{GQuark}} key. I{(int)} 1922 @param value: An object to store into container. I{(L{gobject.GObject})} 1923 """ 1924 pass
1925
1926 - def get_object(key):
1927 """ 1928 Returns the object in B{C{container}} identified by B{C{key}}. 1929 1930 The returned object doesn't have its reference count increased, use 1931 g_object_ref() if you want to access it even when B{C{container}} may cease 1932 to exist. 1933 1934 1935 @param key: A B{C{GQuark}} key. I{(int)} 1936 @return: The object as B{C{gpointer}}. I{(L{gobject.GObject})} 1937 """ 1938 return None
1939
1940 - def keys():
1941 """ 1942 Gets all quark keys of a container. 1943 1944 @since: 2.7 1945 1946 @return: A newly allocated array with quark keys of all B{C{container}} items, 1947 in no particular order. The number of items can be obtained 1948 with L{Container.get_n_items}(). If there are no items, B{C{None}} 1949 is returned. I{(list)} 1950 """ 1951 return None
1952
1953 - def keys_by_name():
1954 """ 1955 Gets all string keys of a container. 1956 1957 @since: 2.7 1958 1959 @return: A newly allocated array with string keys of all B{C{container}} items, 1960 in no particular order. The number of items can be obtained 1961 with L{Container.get_n_items}(). If there are no items, B{C{None}} 1962 is returned. Unlike the array the strings are owned by GLib and 1963 must not be freed. I{(ConstStringArray*)} 1964 """ 1965 return None
1966
1967 - def duplicate_by_prefix(keys):
1968 """ 1969 Duplicates a container keeping only values under given prefixes. 1970 1971 Like L{Container.duplicate}(), this method creates a deep copy, that is 1972 contained object are physically duplicated too, not just referenced again. 1973 1974 1975 @param keys: I{(StringArray*)} 1976 @return: A newly created container. I{(L{Container})} 1977 """ 1978 return None
1979
1980 - def serialize_to_text():
1981 """ 1982 Creates a text representation of B{C{container}} contents. 1983 1984 Note only simple data types are supported as serialization of compound 1985 objects is not controllable. 1986 1987 1988 @return: A pointer array, each item containing string with one container 1989 item representation (name, type, value). The array is sorted by name. I{(StringArray*)} 1990 """ 1991 return None
1992
1993 - def contains_by_name(n):
1994 """ 1995 Expands to B{C{True}} if container B{C{c}} contains a value identified by name B{C{n}}. 1996 1997 @param n: A nul-terminated name (id). I{(string)} 1998 @return: I{(bool)} 1999 """ 2000 return None
2001
2002 - def remove_by_name(n):
2003 """ 2004 Removes a value identified by name B{C{n}} from container B{C{c}}. 2005 2006 Expands to B{C{True}} if there was such a value and was removed. 2007 2008 @param n: A nul-terminated name (id). I{(string)} 2009 @return: I{(bool)} 2010 """ 2011 return None
2012
2013 - def rename_by_name(n, new_name, force):
2014 """ 2015 Makes a value in container B{C{c}} identified by name B{C{n}} to be identified by 2016 new name B{C{nn}}. 2017 2018 See L{Container.rename}() for details. 2019 2020 @param n: A nul-terminated name (id). I{(string)} 2021 @param new_name: I{(string)} 2022 @param force: I{(bool)} 2023 @return: I{(bool)} 2024 """ 2025 return None
2026
2027 - def set_boolean_by_name(n, v):
2028 """ 2029 Stores a boolean into container B{C{c}}, identified by name B{C{n}}. 2030 2031 @param n: A nul-terminated name (id). I{(string)} 2032 @param v: A boolean. I{(bool)} 2033 """ 2034 pass
2035
2036 - def set_double_by_name(n, v):
2037 """ 2038 Stores a double into container B{C{c}}, identified by name B{C{n}}. 2039 2040 @param n: A nul-terminated name (id). I{(string)} 2041 @param v: A double integer. I{(float)} 2042 """ 2043 pass
2044
2045 - def set_enum_by_name(n, v):
2046 """ 2047 Stores an enum into container B{C{c}}, identified by name B{C{n}}. 2048 2049 Note enums are treated as 32bit integers. 2050 2051 @param n: A nul-terminated name (id). I{(string)} 2052 @param v: An enum. I{(int)} 2053 """ 2054 pass
2055
2056 - def set_int32_by_name(n, v):
2057 """ 2058 Stores a 32bit integer into container B{C{c}}, identified by name B{C{n}}. 2059 2060 @param n: A nul-terminated name (id). I{(string)} 2061 @param v: A 32bit integer. I{(int)} 2062 """ 2063 pass
2064
2065 - def set_int64_by_name(n, v):
2066 """ 2067 Stores a 64bit integer into container B{C{c}}, identified by name B{C{n}}. 2068 2069 @param n: A nul-terminated name (id). I{(string)} 2070 @param v: A 64bit integer. I{(gint64)} 2071 """ 2072 pass
2073
2074 - def set_object_by_name(n, v):
2075 """ 2076 Stores an object into container B{C{c}}, identified by name B{C{n}}. 2077 2078 See L{Container.set_object}() for details. 2079 2080 @param n: A nul-terminated name (id). I{(string)} 2081 @param v: An object to store into container. I{(L{gobject.GObject})} 2082 """ 2083 pass
2084
2085 - def set_uchar_by_name(n, v):
2086 """ 2087 Stores an unsigned character into container B{C{c}}, identified by name B{C{n}}. 2088 2089 @param n: A nul-terminated name (id). I{(string)} 2090 @param v: An unsigned character. I{(guchar)} 2091 """ 2092 pass
2093
2094 - def get_boolean_by_name(n):
2095 """ 2096 Gets the boolean in container B{C{c}} identified by name B{C{n}}. 2097 2098 @param n: A nul-terminated name (id). I{(string)} 2099 @return: I{(bool)} 2100 """ 2101 return None
2102
2103 - def get_double_by_name(n):
2104 """ 2105 Gets the double in container B{C{c}} identified by name B{C{n}}. 2106 2107 @param n: A nul-terminated name (id). I{(string)} 2108 @return: I{(float)} 2109 """ 2110 return None
2111
2112 - def get_enum_by_name(n):
2113 """ 2114 Gets the enum in container B{C{c}} identified by name B{C{n}}. 2115 2116 Note enums are treated as 32bit integers. 2117 2118 @param n: A nul-terminated name (id). I{(string)} 2119 @return: I{(int)} 2120 """ 2121 return None
2122
2123 - def get_int32_by_name(n):
2124 """ 2125 Gets the 32bit integer in container B{C{c}} identified by name B{C{n}}. 2126 2127 @param n: A nul-terminated name (id). I{(string)} 2128 @return: I{(int)} 2129 """ 2130 return None
2131
2132 - def get_int64_by_name(n):
2133 """ 2134 Gets the 64bit integer in container B{C{c}} identified by name B{C{n}}. 2135 2136 @param n: A nul-terminated name (id). I{(string)} 2137 @return: I{(gint64)} 2138 """ 2139 return None
2140
2141 - def get_uchar_by_name(n):
2142 """ 2143 Gets the unsigned character in container B{C{c}} identified by name B{C{n}}. 2144 2145 @param n: A nul-terminated name (id). I{(string)} 2146 @return: I{(guchar)} 2147 """ 2148 return None
2149
2150 - def get_object_by_name(n):
2151 """ 2152 Gets the object in container B{C{c}} identified by name B{C{n}}. 2153 2154 The returned object doesn't have its reference count increased, use 2155 g_object_ref() if you want to access it even when B{C{container}} may cease 2156 to exist. 2157 2158 @param n: A nul-terminated name (id). I{(string)} 2159 @return: I{(L{gobject.GObject})} 2160 """ 2161 return None
2162
2163 - def get_string_by_name(n):
2164 """ 2165 Gets the string in container B{C{c}} identified by name B{C{n}}. 2166 2167 The returned string must be treated as constant and never freed or modified. 2168 2169 @param n: A nul-terminated name (id). I{(string)} 2170 @return: I{(string)} 2171 """ 2172 return None
2173
2174 - def duplicate():
2175 """ 2176 Convenience macro doing L{gwy_serializable_duplicate}() with all the necessary 2177 typecasting. 2178 2179 @return: I{(L{Container})} 2180 """ 2181 return None
2182
2183 - def set_string_by_name(name, value):
2184 """ 2185 Stores a string into container B{C{c}}, identified by name B{C{n}}. 2186 2187 The container makes a copy of the string, so it can be used on static 2188 strings. 2189 2190 @since: 2.38 2191 2192 @param name: I{(string)} 2193 @param value: I{(string)} 2194 """ 2195 pass
2196
2197 - def set_string(key, value):
2198 """ 2199 Stores a string into B{C{container}}, identified by B{C{key}}. 2200 2201 The container makes a copy of the string, so it can be used on static 2202 strings. 2203 2204 @since: 2.38 2205 2206 @param key: A B{C{GQuark}} key. I{(int)} 2207 @param value: A nul-terminated string. I{(string)} 2208 """ 2209 pass
2210
2211 - def keys_by_name():
2212 """ 2213 Gets all string keys of a container. 2214 2215 @since: 2.7 2216 2217 @return: A newly allocated array with string keys of all B{C{container}} items, 2218 in no particular order. The number of items can be obtained 2219 with L{Container.get_n_items}(). If there are no items, B{C{None}} 2220 is returned. Unlike the array the strings are owned by GLib and 2221 must not be freed. I{(list)} 2222 """ 2223 return None
2224
2225 - def get_value_by_name(name):
2226 """ 2227 Gets the value in container B{C{c}} identified by name B{C{n}}. 2228 2229 @param name: I{(string)} 2230 @return: I{(any)} 2231 """ 2232 return None
2233
2234 - def get_value(key):
2235 """ 2236 Returns the value in B{C{container}} identified by B{C{key}}. 2237 2238 2239 @param key: A B{C{GQuark}} key. I{(int)} 2240 @return: The value as a B{C{GValue}}. I{(any)} 2241 """ 2242 return None
2243
2244 - def set_value_by_name(name, value):
2245 """ 2246 Inserts or updates several values in B{C{container}}. 2247 2248 @param name: I{(string)} 2249 @param value: I{(any)} 2250 """ 2251 pass
2252
2253 - def set_value(key, value):
2254 """ 2255 Inserts or updates several values in B{C{container}}. 2256 2257 @param key: I{(int)} 2258 @param value: I{(any)} 2259 """ 2260 pass
2261 2262
2263 -class Curve:
2264 - def __init__():
2265 """ 2266 Creates B{C{Curve}} widget. By default, the widget will have 3 curves. 2267 2268 2269 @return: new B{C{Curve}} widget. I{(L{gtk.Widget})} 2270 """ 2271 return None
2272
2273 - def reset():
2274 """ 2275 Removes all control points, resetting the curves to their initial state. 2276 2277 2278 """ 2279 pass
2280
2281 - def set_range(min_x, max_x, min_y, max_y):
2282 pass
2283
2284 - def set_curve_type(type):
2285 pass
2286
2287 - def set_channels(num_channels, colors):
2288 pass
2289 2290
2291 -class DataField:
2292 """ 2293 Two-dimensional data representation 2294 2295 2296 B{C{DataField}} is an object that is used for representation of all 2297 two-dimensional data matrices. Most of the basic data handling and 2298 processing functions in Gwyddion are declared here as they are connected 2299 with B{C{DataField}}. 2300 2301 """
2302 - def __init__(xres, yres, xreal, yreal, nullme):
2303 """ 2304 Creates a new data field. 2305 2306 2307 @param xres: X-resolution, i.e., the number of columns. I{(int)} 2308 @param yres: Y-resolution, i.e., the number of rows. I{(int)} 2309 @param xreal: Real horizontal physical dimension. I{(float)} 2310 @param yreal: Real vertical physical dimension. I{(float)} 2311 @param nullme: Whether the data field should be initialized to zeroes. If B{C{False}}, 2312 the data will not be initialized. I{(bool)} 2313 @return: A newly created data field. I{(L{DataField})} 2314 """ 2315 return None
2316
2317 - def sum_fields(operand1, operand2):
2318 """ 2319 Sums two data fields. 2320 2321 @param operand1: First data field operand. I{(L{DataField})} 2322 @param operand2: Second data field operand. I{(L{DataField})} 2323 """ 2324 pass
2325
2326 - def subtract_fields(operand1, operand2):
2327 """ 2328 Subtracts one data field from another. 2329 2330 @param operand1: First data field operand. I{(L{DataField})} 2331 @param operand2: Second data field operand. I{(L{DataField})} 2332 """ 2333 pass
2334
2335 - def divide_fields(operand1, operand2):
2336 """ 2337 Divides one data field with another. 2338 2339 @param operand1: First data field operand. I{(L{DataField})} 2340 @param operand2: Second data field operand. I{(L{DataField})} 2341 """ 2342 pass
2343
2344 - def multiply_fields(operand1, operand2):
2345 """ 2346 Multiplies two data fields. 2347 2348 @param operand1: First data field operand. I{(L{DataField})} 2349 @param operand2: Second data field operand. I{(L{DataField})} 2350 """ 2351 pass
2352
2353 - def min_of_fields(operand1, operand2):
2354 """ 2355 Finds point-wise maxima of two data fields. 2356 2357 @param operand1: First data field operand. I{(L{DataField})} 2358 @param operand2: Second data field operand. I{(L{DataField})} 2359 """ 2360 pass
2361
2362 - def max_of_fields(operand1, operand2):
2363 """ 2364 Finds point-wise minima of two data fields. 2365 2366 @param operand1: First data field operand. I{(L{DataField})} 2367 @param operand2: Second data field operand. I{(L{DataField})} 2368 """ 2369 pass
2370
2371 - def hypot_of_fields(operand1, operand2):
2372 """ 2373 Finds point-wise hypotenuse of two data fields. 2374 2375 @since: 2.31 2376 2377 @param operand1: First data field operand. I{(L{DataField})} 2378 @param operand2: Second data field operand. I{(L{DataField})} 2379 """ 2380 pass
2381
2382 - def linear_combination(coeff1, operand1, coeff2, operand2, constant):
2383 """ 2384 Computes point-wise general linear combination of two data fields. 2385 2386 @since: 2.59 2387 2388 @param coeff1: Factor to multiply the first operand with. I{(float)} 2389 @param operand1: First data field operand. I{(L{DataField})} 2390 @param coeff2: Factor to multiply the second operand with. I{(float)} 2391 @param operand2: Second data field operand. I{(L{DataField})} 2392 @param constant: Constant term to add to the result. I{(float)} 2393 """ 2394 pass
2395
2396 - def check_compatibility(data_field2, check):
2397 """ 2398 Checks whether two data fields are compatible. 2399 2400 2401 @param data_field2: Another data field. I{(L{DataField})} 2402 @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_AXISCAL}}, C{B{DATA_COMPATIBILITY_NCURVES}}, C{B{DATA_COMPATIBILITY_CURVELEN}}, C{B{DATA_COMPATIBILITY_ALL}}. I{(L{DataCompatibilityFlags})} 2403 @return: Zero if all tested properties are compatible. Flags corresponding to failed tests if data fields are not 2404 compatible. I{(DataCompatibilityFlags)} 2405 """ 2406 return None
2407
2408 - def check_compatibility_with_brick_xy(brick, check):
2409 """ 2410 Checks whether a data field is compatible with brick XY-planes. 2411 2412 @since: 2.51 2413 2414 @param brick: A three-dimensional data brick. I{(L{Brick})} 2415 @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_AXISCAL}}, C{B{DATA_COMPATIBILITY_NCURVES}}, C{B{DATA_COMPATIBILITY_CURVELEN}}, C{B{DATA_COMPATIBILITY_ALL}}. I{(L{DataCompatibilityFlags})} 2416 @return: Zero if all tested properties are compatible. Flags corresponding to failed tests if the data objects are 2417 not compatible. I{(DataCompatibilityFlags)} 2418 """ 2419 return None
2420
2421 - def check_compatibility_with_lawn(lawn, check):
2422 return None
2423
2424 - def extend(left, right, up, down, exterior, fill_value, keep_offsets):
2425 """ 2426 Creates a new data field by extending another data field using the specified method of exterior handling. 2427 2428 @since: 2.36 2429 2430 @param left: Number of pixels to extend to the left (towards lower column indices). I{(int)} 2431 @param right: Number of pixels to extend to the right (towards higher column indices). I{(int)} 2432 @param up: Number of pixels to extend up (towards lower row indices). I{(int)} 2433 @param down: Number of pixels to extend down (towards higher row indices). I{(int)} 2434 @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}}, C{B{EXTERIOR_LAPLACE}}. I{(L{ExteriorType})} 2435 @param fill_value: The value to use with B{C{EXTERIOR_FIXED_VALUE}} exterior. I{(float)} 2436 @param keep_offsets: B{C{True}} to set the X and Y offsets of the new field using B{C{field}} offsets. B{C{False}} to set offsets of 2437 the new field to zeroes. I{(bool)} 2438 @return: A newly created data field. I{(L{DataField})} 2439 """ 2440 return None
2441
2442 - def laplace_solve(mask, grain_id, qprec):
2443 """ 2444 Replaces masked areas by the solution of Laplace equation. 2445 2446 The boundary conditions on mask boundaries are Dirichlet with values given 2447 by pixels on the outer boundary of the masked area. Boundary conditions at 2448 field edges are Neumann conditions ∂z/∂n=0 where n denotes the normal to the 2449 edge. If entire area of B{C{field}} is to be replaced the problem is 2450 underspecified; B{C{field}} will be filled with zeros. 2451 2452 For the default value of B{C{qprec}} the the result should be good enough for any 2453 image processing purposes with the typical local error of order 10⁻⁵ for 2454 very large grains and possibly much smaller for small grains. You can lower 2455 B{C{qprec}} down to about 0.3 or even 0.2 if speed is crucial and some precision 2456 can be sacrificed. Below that the result just starts becoming somewhat 2457 worse for not much speed increase. Conversely, you may wish to increase 2458 B{C{qprec}} up to 3 or even 5 if accuracy is important and you can afford the 2459 increased computation time. 2460 2461 @since: 2.47 2462 2463 @param mask: A two-dimensional data field containing mask defining the areas to 2464 interpolate. I{(L{DataField})} 2465 @param grain_id: The id number of the grain to replace with the solution of 2466 Laplace equation, from 1 to B{C{ngrains}} (see 2467 L{DataField.grain_numbers}()). Passing 0 means to replace the 2468 entire empty space outside grains while passing a negative value 2469 means to replace the entire masked area. I{(int)} 2470 @param qprec: Speed-accuracy tuning parameter. Pass 1.0 for the default that is 2471 fast and sufficiently precise. I{(float)} 2472 """ 2473 pass
2474
2475 - def correct_laplace_iteration(mask_field, buffer_field, corrfactor):
2476 """ 2477 Performs one interation of Laplace data correction. 2478 2479 Tries to remove all the points in mask off the data by using 2480 iterative method similar to solving heat flux equation. 2481 2482 Use this function repeatedly until reasonable B{C{error}} is reached. 2483 2484 @warning:For almost all purposes this function was superseded by 2485 non-iterative L{DataField.laplace_solve}() which is simultaneously much 2486 faster and more accurate. 2487 2488 @param mask_field: Mask of places to be corrected. I{(L{DataField})} 2489 @param buffer_field: Initialized to same size as mask and data. I{(L{DataField})} 2490 @param corrfactor: Correction factor within step. I{(float)} 2491 @return: Value B{C{error}}. (I{(float)}) 2492 """ 2493 return None
2494
2495 - def correct_average(mask_field):
2496 """ 2497 Fills data under mask with the average value. 2498 2499 This function simply puts average value of all the B{C{data_field}} values (both 2500 masked and unmasked) into points in B{C{data_field}} lying under points where 2501 B{C{mask_field}} values are nonzero. 2502 2503 In most cases you probably want to use 2504 L{DataField.correct_average_unmasked}() instead. 2505 2506 @param mask_field: Mask of places to be corrected. I{(L{DataField})} 2507 """ 2508 pass
2509
2510 - def correct_average_unmasked(mask_field):
2511 """ 2512 Fills data under mask with the average value of unmasked data. 2513 2514 This function calculates the average value of all unmasked pixels in 2515 B{C{data_field}} and then fills all the masked pixels with this average value. 2516 It is useful as the first rough step of correction of data under the mask. 2517 2518 If all data are masked the field is filled with zeroes. 2519 2520 @since: 2.44 2521 2522 @param mask_field: Mask of places to be corrected. I{(L{DataField})} 2523 """ 2524 pass
2525
2526 - def mask_outliers(mask_field, thresh):
2527 """ 2528 Creates mask of data that are above or below B{C{thresh}}*sigma from average 2529 height. 2530 2531 Sigma denotes root-mean square deviation of heights. This criterium 2532 corresponds to the usual Gaussian distribution outliers detection if 2533 B{C{thresh}} is 3. 2534 2535 @param mask_field: A data field to be filled with mask. I{(L{DataField})} 2536 @param thresh: Threshold value. I{(float)} 2537 """ 2538 pass
2539
2540 - def mask_outliers2(mask_field, thresh_low, thresh_high):
2541 """ 2542 Creates mask of data that are above or below multiples of rms from average 2543 height. 2544 2545 Data that are below B{C{mean}}-B{C{thresh_low}}*B{C{sigma}} or above 2546 B{C{mean}}+B{C{thresh_high}}*B{C{sigma}} are marked as outliers, where B{C{sigma}} denotes the 2547 root-mean square deviation of heights. 2548 2549 @since: 2.26 2550 2551 @param mask_field: A data field to be filled with mask. I{(L{DataField})} 2552 @param thresh_low: Lower threshold value. I{(float)} 2553 @param thresh_high: Upper threshold value. I{(float)} 2554 """ 2555 pass
2556
2557 - def distort(dest, invtrans, user_data, interp, exterior, fill_value):
2558 """ 2559 Distorts a data field in the horizontal plane. 2560 2561 Note the transform function B{C{invtrans}} is the inverse transform, in other 2562 words it calculates the old coordinates from the new coordinates (the 2563 transform would not be uniquely defined the other way round). 2564 2565 The B{C{EXTERIOR_LAPLACE}} exterior type cannot be used with this function. 2566 2567 @since: 2.5 2568 2569 @param dest: Destination data field. I{(L{DataField})} 2570 @param invtrans: Inverse transform function, that is the transformation from 2571 new coordinates to old coordinates. It gets 2572 (B{C{j}}+0.5, B{C{i}}+0.5), where B{C{i}} and B{C{j}} are the new row and column 2573 indices, passed as the input coordinates. The output coordinates 2574 should follow the same convention. Unless a special exterior 2575 handling is required, the transform function does not need to 2576 concern itself with coordinates being outside of the data. I{(CoordTransform2DFunc)} 2577 @param user_data: Pointer passed as B{C{user_data}} to B{C{invtrans}}. I{(gpointer)} 2578 @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})} 2579 @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}}, C{B{EXTERIOR_LAPLACE}}. I{(L{ExteriorType})} 2580 @param fill_value: The value to use with B{C{EXTERIOR_FIXED_VALUE}}. I{(float)} 2581 """ 2582 pass
2583
2584 - def sample_distorted(dest, coords, interp, exterior, fill_value):
2585 """ 2586 Resamples a data field in an arbitrarily distorted manner. 2587 2588 Each item in B{C{coords}} corresponds to one pixel in B{C{dest}} and gives the 2589 coordinates in B{C{source}} defining the value to set in this pixel. 2590 2591 The B{C{EXTERIOR_LAPLACE}} exterior type cannot be used with this function. 2592 2593 @since: 2.45 2594 2595 @param dest: Destination data field. I{(L{DataField})} 2596 @param coords: Array of B{C{source}} coordinates with the same number of items as 2597 B{C{dest}}, ordered as data field data. 2598 See L{DataField.distort}() for coordinate convention discussion. I{(const-XY*)} 2599 @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})} 2600 @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}}, C{B{EXTERIOR_LAPLACE}}. I{(L{ExteriorType})} 2601 @param fill_value: The value to use with B{C{EXTERIOR_FIXED_VALUE}}. I{(float)} 2602 """ 2603 pass
2604
2605 - def mark_scars(result, threshold_high, threshold_low, min_scar_len, max_scar_width, negative):
2606 """ 2607 Find and marks scars in a data field. 2608 2609 Scars are linear horizontal defects, consisting of shifted values. 2610 Zero or negative values in B{C{result}} siginify normal data, positive 2611 values siginify samples that are part of a scar. 2612 2613 @since: 2.46 2614 2615 @param result: A data field to store the result to (it is resized to match 2616 B{C{data_field}}). I{(L{DataField})} 2617 @param threshold_high: Miminum relative step for scar marking, must be positive. I{(float)} 2618 @param threshold_low: Definite relative step for scar marking, must be at least 2619 equal to B{C{threshold_high}}. I{(float)} 2620 @param min_scar_len: Minimum length of a scar, shorter ones are discarded 2621 (must be at least one). I{(float)} 2622 @param max_scar_width: Maximum width of a scar, must be at least one. I{(float)} 2623 @param negative: B{C{True}} to detect negative scars, B{C{False}} to positive. I{(bool)} 2624 """ 2625 pass
2626
2627 - def subtract_row_shifts(shifts):
2628 """ 2629 Shifts entire data field rows as specified by given data line. 2630 2631 Data line B{C{shifts}} must have resolution corresponding to the number of 2632 B{C{data_field}} rows. Its values are subtracted from individual field rows. 2633 2634 @since: 2.52 2635 2636 @param shifts: Data line containing the row shifts. I{(L{DataLine})} 2637 """ 2638 pass
2639
2640 - def find_row_shifts_trimmed_mean(mask, masking, trimfrac, mincount):
2641 """ 2642 Finds row shifts to misaligned row correction using trimmed row means. 2643 2644 For zero B{C{trimfrac}} the function calculates row means. For B{C{trimfrac}} of 1/2 2645 or larger it calculates row medians. Values between correspond to trimmed 2646 means. 2647 2648 @since: 2.52 2649 2650 @param mask: Mask of values to take values into account/exclude, or B{C{None}} for full 2651 B{C{data_field}}. I{(L{DataField})} 2652 @param masking: Masking mode to use. See the introduction for description of 2653 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 2654 @param trimfrac: Fraction of lowest values and highest values to discard when 2655 trimming. I{(float)} 2656 @param mincount: Minimum number of values in a row necessary for per-row 2657 calculation. Rows which are essentially completely masked are 2658 not shifted with respect to a global value. Pass a non-positive 2659 number to use an automatic minimum count. I{(int)} 2660 @return: A newly created data line containing the row shifts, for instance 2661 row means, medians or trimmed means. I{(L{DataLine})} 2662 """ 2663 return None
2664
2665 - def find_row_shifts_trimmed_diff(mask, masking, trimfrac, mincount):
2666 """ 2667 Finds row shifts to misaligned row correction using trimmed means of row 2668 differences. 2669 2670 For zero B{C{trimfrac}} the function calculates row means. For B{C{trimfrac}} of 1/2 2671 or larger it calculates row medians. Values between correspond to trimmed 2672 means. 2673 2674 @since: 2.52 2675 2676 @param mask: Mask of values to take values into account/exclude, or B{C{None}} for full 2677 B{C{data_field}}. I{(L{DataField})} 2678 @param masking: Masking mode to use. See the introduction for description of 2679 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 2680 @param trimfrac: Fraction of lowest values and highest values to discard when 2681 trimming. I{(float)} 2682 @param mincount: Minimum number of values in a row necessary for per-row 2683 calculation. Rows which are essentially completely masked are 2684 not shifted with respect to a global value. Pass a non-positive 2685 number to use an automatic minimum count. I{(int)} 2686 @return: A newly created data line containing the row shifts, for instance 2687 row means, medians or trimmed means. I{(L{DataLine})} 2688 """ 2689 return None
2690
2691 - def get_correlation_score(kernel_field, col, row, kernel_col, kernel_row, kernel_width, kernel_height):
2692 """ 2693 Calculates a correlation score in one point. 2694 2695 Correlation window size is given by B{C{kernel_col}}, B{C{kernel_row}}, B{C{kernel_width}}, B{C{kernel_height}}, postion of the 2696 correlation window on data is given by B{C{col}}, B{C{row}}. 2697 2698 If anything fails (data too close to boundary, etc.), function returns -1.0 (none correlation).. 2699 2700 2701 @param kernel_field: Kernel to correlate data field with. I{(L{DataField})} 2702 @param col: Upper-left column position in the data field. I{(int)} 2703 @param row: Upper-left row position in the data field. I{(int)} 2704 @param kernel_col: Upper-left column position in kernel field. I{(int)} 2705 @param kernel_row: Upper-left row position in kernel field. I{(int)} 2706 @param kernel_width: Width of kernel field area. I{(int)} 2707 @param kernel_height: Heigh of kernel field area. I{(int)} 2708 @return: Correlation score (between -1.0 and 1.0). Value 1.0 denotes maximum correlation, -1.0 none correlation. I{(float)} 2709 """ 2710 return None
2711
2712 - def get_weighted_correlation_score(kernel_field, weight_field, col, row, kernel_col, kernel_row, kernel_width, kernel_height):
2713 """ 2714 Calculates a correlation score in one point using weights to center the used information to the center of kernel. 2715 2716 Correlation window size is given by B{C{kernel_col}}, B{C{kernel_row}}, B{C{kernel_width}}, B{C{kernel_height}}, postion of the 2717 correlation window on data is given by B{C{col}}, B{C{row}}. 2718 2719 If anything fails (data too close to boundary, etc.), function returns -1.0 (none correlation).. 2720 2721 2722 @param kernel_field: Kernel to correlate data field with. I{(L{DataField})} 2723 @param weight_field: data field of same size as kernel window size I{(L{DataField})} 2724 @param col: Upper-left column position in the data field. I{(int)} 2725 @param row: Upper-left row position in the data field. I{(int)} 2726 @param kernel_col: Upper-left column position in kernel field. I{(int)} 2727 @param kernel_row: Upper-left row position in kernel field. I{(int)} 2728 @param kernel_width: Width of kernel field area. I{(int)} 2729 @param kernel_height: Heigh of kernel field area. I{(int)} 2730 @return: Correlation score (between -1.0 and 1.0). Value 1.0 denotes maximum correlation, -1.0 none correlation. I{(float)} 2731 """ 2732 return None
2733
2734 - def crosscorrelate(data_field2, x_dist, y_dist, score, search_width, search_height, window_width, window_height):
2735 """ 2736 Algorithm for matching two different images of the same object under changes. 2737 2738 It does not use any special features for matching. It simply searches for all points (with their neighbourhood) of 2739 B{C{data_field1}} within B{C{data_field2}}. Parameters B{C{search_width}} and B{C{search_height}} determine maimum area where to search 2740 for points. The area is cenetered in the B{C{data_field2}} at former position of points at B{C{data_field1}}. 2741 2742 @param data_field2: A data field. I{(L{DataField})} 2743 @param x_dist: A data field to store x-distances to. I{(L{DataField})} 2744 @param y_dist: A data field to store y-distances to. I{(L{DataField})} 2745 @param score: Data field to store correlation scores to. I{(L{DataField})} 2746 @param search_width: Search area width. I{(int)} 2747 @param search_height: Search area height. I{(int)} 2748 @param window_width: Correlation window width. This parameter is not actually used. Pass zero. I{(int)} 2749 @param window_height: Correlation window height. This parameter is not actually used. Pass zero. I{(int)} 2750 """ 2751 pass
2752
2753 - def crosscorrelate_init(data_field2, x_dist, y_dist, score, search_width, search_height, window_width, window_height):
2754 """ 2755 Initializes a cross-correlation iterator. 2756 2757 This iterator reports its state as B{C{ComputationStateType}}. 2758 2759 2760 @param data_field2: A data field. I{(L{DataField})} 2761 @param x_dist: A data field to store x-distances to, or B{C{None}}. I{(L{DataField})} 2762 @param y_dist: A data field to store y-distances to, or B{C{None}}. I{(L{DataField})} 2763 @param score: Data field to store correlation scores to, or B{C{None}}. I{(L{DataField})} 2764 @param search_width: Search area width. I{(int)} 2765 @param search_height: Search area height. I{(int)} 2766 @param window_width: Correlation window width. I{(int)} 2767 @param window_height: Correlation window height. I{(int)} 2768 @return: A new cross-correlation iterator. I{(ComputationState*)} 2769 """ 2770 return None
2771
2772 - def correlate(kernel_field, score, method):
2773 """ 2774 Computes correlation score for all positions in a data field. 2775 2776 Correlation score is compute for all points in data field B{C{data_field}} and full size of correlation kernel 2777 B{C{kernel_field}}. 2778 2779 The points in B{C{score}} correspond to centers of kernel. More precisely, the point ((B{C{kxres}}-1)/2, (B{C{kyres}}-1)/2) in 2780 B{C{score}} corresponds to kernel field top left corner coincident with data field top left corner. Points outside the 2781 area where the kernel field fits into the data field completely are set to -1 for B{C{CORRELATION_NORMAL}}. 2782 2783 This function is mostly made obsolete by L{DataField.correlation_search}() which offers, beside the plain 2784 FFT-based correlation, a method equivalent to B{C{CORRELATION_NORMAL}} as well as several others, all computed 2785 efficiently using FFT. 2786 2787 @param kernel_field: Correlation kernel. I{(L{DataField})} 2788 @param score: Data field to store correlation scores to. I{(L{DataField})} 2789 @param method: Correlation score calculation method. Expected values: C{B{CORRELATION_NORMAL}}, C{B{CORRELATION_FFT}}, C{B{CORRELATION_POC}}. I{(L{CorrelationType})} 2790 """ 2791 pass
2792
2793 - def correlate_init(kernel_field, score):
2794 """ 2795 Creates a new correlation iterator. 2796 2797 This iterator reports its state as B{C{ComputationStateType}}. 2798 2799 This function is mostly made obsolete by L{DataField.correlation_search}() which offers, beside the plain 2800 FFT-based correlation, a method equivalent to B{C{CORRELATION_NORMAL}} as well as several others, all computed 2801 efficiently using FFT. 2802 2803 2804 @param kernel_field: Kernel to correlate data field with. I{(L{DataField})} 2805 @param score: Data field to store correlation scores to. I{(L{DataField})} 2806 @return: A new correlation iterator. I{(ComputationState*)} 2807 """ 2808 return None
2809
2810 - def correlation_search(kernel, kernel_weight, target, method, regcoeff, exterior, fill_value):
2811 """ 2812 Performs correlation search of a detail in a larger data field. 2813 2814 There are two basic classes of methods: Covariance (products of kernel and data values are summed) and height 2815 difference (squared differences between kernel and data values are summed). For the second class, the sign of the 2816 output is inverted. So in both cases higher values mean better match. All methods are implemented efficiently 2817 using FFT. 2818 2819 Usually you want to use B{C{CORR_SEARCH_COVARIANCE}} or B{C{CORR_SEARCH_HEIGHT_DIFF}}, in which the absolute data 2820 offsets play no role (only the differences). 2821 2822 If the detail can also occur with different height scales, use B{C{CORR_SEARCH_COVARIANCE_SCORE}} or 2823 B{C{CORR_SEARCH_HEIGHT_DIFF_SCORE}} in which the local data variance is normalised. In this case B{C{dfield}} regions 2824 with very small (or zero) variance can lead to odd results and spurious maxima. Use B{C{regcoeff}} to suppress them: 2825 Score of image details is suppressed if their variance is B{C{regcoeff}} times the mean local variance. 2826 2827 If B{C{kernel_weight}} is non-B{C{None}} is allows specify masking/weighting of kernel. The simplest use is masking when 2828 searching for a non-rectangular detail. Fill B{C{kernel_weight}} with 1s for important kernel pixels and with 0s for 2829 irrelevant pixels. However, you can use arbitrary non-negative weights. 2830 2831 @since: 2.50 2832 2833 @param kernel: Detail to find (kernel). I{(L{DataField})} 2834 @param kernel_weight: Kernel weight, or B{C{None}}. If given, its dimensions must match B{C{kernel}}. I{(L{DataField})} 2835 @param target: Data field to fill with the score. It will be resampled to match B{C{dfield}}. I{(L{DataField})} 2836 @param method: Method, determining the type of output to put into B{C{target}}. Expected values: C{B{CORR_SEARCH_COVARIANCE_RAW}}, C{B{CORR_SEARCH_COVARIANCE}}, C{B{CORR_SEARCH_COVARIANCE_SCORE}}, C{B{CORR_SEARCH_HEIGHT_DIFF_RAW}}, C{B{CORR_SEARCH_HEIGHT_DIFF}}, C{B{CORR_SEARCH_HEIGHT_DIFF_SCORE}}. I{(L{CorrSearchType})} 2837 @param regcoeff: Regularisation coefficient, any positive number. Pass something like 0.1 if unsure. You can also pass 2838 zero, it means the same as B{C{glib.MINDOUBLE}}. I{(float)} 2839 @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}}, C{B{EXTERIOR_LAPLACE}}. I{(L{ExteriorType})} 2840 @param fill_value: The value to use with B{C{EXTERIOR_FIXED_VALUE}} exterior. I{(float)} 2841 """ 2842 pass
2843
2844 - def invalidate():
2845 """ 2846 Invalidates cached data field stats. 2847 2848 User code should rarely need this macro, as all B{C{DataField}} methods do 2849 proper invalidation when they change data, as well as 2850 L{DataField.get_data}() does. 2851 2852 However, if you get raw data with L{DataField.get_data}() and then mix 2853 direct changes to it with calls to methods like L{DataField.get_max}(), 2854 you may need to explicitely invalidate cached values to let 2855 L{DataField.get_max}() know it has to recompute the maximum. 2856 2857 """ 2858 pass
2859
2860 - def new_alike(nullme):
2861 """ 2862 Creates a new data field similar to an existing one. 2863 2864 Use L{DataField.duplicate}() if you want to copy a data field including 2865 data. 2866 2867 2868 @param nullme: Whether the data field should be initialized to zeroes. If B{C{False}}, 2869 the data will not be initialized. I{(bool)} 2870 @return: A newly created data field. I{(L{DataField})} 2871 """ 2872 return None
2873
2874 - def data_changed():
2875 """ 2876 Emits signal "data-changed" on a data field. 2877 2878 """ 2879 pass
2880
2881 - def new_resampled(xres, yres, interpolation):
2882 """ 2883 Creates a new data field by resampling an existing one. 2884 2885 This method is equivalent to L{DataField.duplicate}() followed by 2886 L{DataField.resample}(), but it is more efficient. 2887 2888 2889 @param xres: Desired X resolution. I{(int)} 2890 @param yres: Desired Y resolution. I{(int)} 2891 @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})} 2892 @return: A newly created data field. I{(L{DataField})} 2893 """ 2894 return None
2895
2896 - def resample(xres, yres, interpolation):
2897 """ 2898 Resamples a data field using given interpolation method 2899 2900 This method may invalidate raw data buffer returned by 2901 L{DataField.get_data}(). 2902 2903 @param xres: Desired X resolution. I{(int)} 2904 @param yres: Desired Y resolution. I{(int)} 2905 @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})} 2906 """ 2907 pass
2908
2909 - def bin(target, binw, binh, xoff, yoff, trimlowest, trimhighest):
2910 """ 2911 Bins a data field into another data field. 2912 2913 See L{DataField.new_binned}() for a detailed description. 2914 2915 @since: 2.55 2916 2917 @param target: Target data field. It will be resized as necessary. I{(L{DataField})} 2918 @param binw: Bin height (in pixels). I{(int)} 2919 @param binh: Bin width (in pixels). I{(int)} 2920 @param xoff: Horizontal offset of bins (in pixels). I{(int)} 2921 @param yoff: Vertical offset of bins (in pixels). I{(int)} 2922 @param trimlowest: Number of lowest values to discard. I{(int)} 2923 @param trimhighest: Number of highest values to discard. I{(int)} 2924 """ 2925 pass
2926
2927 - def new_binned(binw, binh, xoff, yoff, trimlowest, trimhighest):
2928 """ 2929 Creates a new data field by binning an existing one. 2930 2931 The data field is divided into rectangles of dimensions B{C{binw}}×B{C{binh}}, offset 2932 by (B{C{xoff}}, B{C{yoff}}). The values in each complete rectangle are averaged and 2933 the average becomes the pixel value in the newly created, smaller data 2934 field. 2935 2936 Note that the result is the average – not sum – of the individual values. 2937 Multiply the returned data field with B{C{binw}}×B{C{binh}} if you want sum. 2938 2939 By giving non-zero B{C{trimlowest}} and B{C{trimhighest}} you can change the plain 2940 average to a trimmed one (even turning it to median in the extreme case). 2941 It must always hold that B{C{trimlowest}} + B{C{trimhighest}} is smaller than 2942 B{C{binw}}×B{C{binh}}. 2943 2944 @since: 2.50 2945 2946 @param binw: Bin height (in pixels). I{(int)} 2947 @param binh: Bin width (in pixels). I{(int)} 2948 @param xoff: Horizontal offset of bins (in pixels). I{(int)} 2949 @param yoff: Vertical offset of bins (in pixels). I{(int)} 2950 @param trimlowest: Number of lowest values to discard. I{(int)} 2951 @param trimhighest: Number of highest values to discard. I{(int)} 2952 @return: A newly created data field. I{(L{DataField})} 2953 """ 2954 return None
2955
2956 - def resize(ulcol, ulrow, brcol, brrow):
2957 """ 2958 Resizes (crops) a data field. 2959 2960 Crops a data field to a rectangle between upper-left and bottom-right 2961 points, recomputing real size. 2962 2963 This method may invalidate raw data buffer returned by 2964 L{DataField.get_data}(). 2965 2966 @param ulcol: Upper-left column coordinate. I{(int)} 2967 @param ulrow: Upper-left row coordinate. I{(int)} 2968 @param brcol: Bottom-right column coordinate + 1. I{(int)} 2969 @param brrow: Bottom-right row coordinate + 1. I{(int)} 2970 """ 2971 pass
2972
2973 - def area_extract(col, row, width, height):
2974 """ 2975 Extracts a rectangular part of a data field to a new data field. 2976 2977 2978 @param col: Upper-left column coordinate. I{(int)} 2979 @param row: Upper-left row coordinate. I{(int)} 2980 @param width: Area width (number of columns). I{(int)} 2981 @param height: Area height (number of rows). I{(int)} 2982 @return: The extracted area as a newly created data field. I{(L{DataField})} 2983 """ 2984 return None
2985
2986 - def copy(dest, nondata_too):
2987 """ 2988 Copies the contents of an already allocated data field to a data field 2989 of the same size. 2990 2991 @param dest: Destination data field. I{(L{DataField})} 2992 @param nondata_too: Whether non-data (units) should be copied too. I{(bool)} 2993 """ 2994 pass
2995
2996 - def area_copy(dest, col, row, width, height, destcol, destrow):
2997 """ 2998 Copies a rectangular area from one data field to another. 2999 3000 The area starts at (B{C{col}}, B{C{row}}) in B{C{src}} and its dimension is B{C{width}}*B{C{height}}. 3001 It is copied to B{C{dest}} starting from (B{C{destcol}}, B{C{destrow}}). 3002 3003 The source area has to be completely contained in B{C{src}}. No assumptions are 3004 made about destination position, however, parts of the source area sticking 3005 out the destination data field B{C{dest}} are cut off. 3006 3007 If B{C{src}} is equal to B{C{dest}}, the areas may not overlap. 3008 3009 @param dest: Destination data field. I{(L{DataField})} 3010 @param col: Area upper-left column coordinate in B{C{src}}. I{(int)} 3011 @param row: Area upper-left row coordinate B{C{src}}. I{(int)} 3012 @param width: Area width (number of columns), pass -1 for full B{C{src}} widdth. I{(int)} 3013 @param height: Area height (number of rows), pass -1 for full B{C{src}} height. I{(int)} 3014 @param destcol: Destination column in B{C{dest}}. I{(int)} 3015 @param destrow: Destination row in B{C{dest}}. I{(int)} 3016 """ 3017 pass
3018
3019 - def get_xres():
3020 """ 3021 Gets X resolution (number of columns) of a data field. 3022 3023 3024 @return: X resolution. I{(int)} 3025 """ 3026 return None
3027
3028 - def get_yres():
3029 """ 3030 Gets Y resolution (number of rows) of the field. 3031 3032 3033 @return: Y resolution. I{(int)} 3034 """ 3035 return None
3036
3037 - def get_xreal():
3038 """ 3039 Gets the X real (physical) size of a data field. 3040 3041 3042 @return: X real size value. I{(float)} 3043 """ 3044 return None
3045
3046 - def get_yreal():
3047 """ 3048 Gets the Y real (physical) size of a data field. 3049 3050 3051 @return: Y real size value. I{(float)} 3052 """ 3053 return None
3054
3055 - def set_xreal(xreal):
3056 """ 3057 Sets X real (physical) size value of a data field. 3058 3059 @param xreal: New X real size value. I{(float)} 3060 """ 3061 pass
3062
3063 - def set_yreal(yreal):
3064 """ 3065 Sets Y real (physical) size value of a data field. 3066 3067 @param yreal: New Y real size value. I{(float)} 3068 """ 3069 pass
3070
3071 - def get_dx():
3072 """ 3073 Gets the horizontal pixel size of a data field in real units. 3074 3075 The result is the same as 3076 L{DataField.get_xreal}(data_field)/L{DataField.get_xres}(data_field). 3077 3078 @since: 2.52 3079 3080 @return: Horizontal pixel size. I{(float)} 3081 """ 3082 return None
3083
3084 - def get_dy():
3085 """ 3086 Gets the vertical pixel size of a data field in real units. 3087 3088 The result is the same as 3089 L{DataField.get_yreal}(data_field)/L{DataField.get_yres}(data_field). 3090 3091 @since: 2.52 3092 3093 @return: Vertical pixel size. I{(float)} 3094 """ 3095 return None
3096
3097 - def get_xoffset():
3098 """ 3099 Gets the X offset of data field origin. 3100 3101 3102 @return: X offset value. I{(float)} 3103 """ 3104 return None
3105
3106 - def get_yoffset():
3107 """ 3108 Gets the Y offset of data field origin. 3109 3110 3111 @return: Y offset value. I{(float)} 3112 """ 3113 return None
3114
3115 - def set_xoffset(xoff):
3116 """ 3117 Sets the X offset of a data field origin. 3118 3119 Note offsets don't affect any calculation, nor functions like 3120 L{DataField.rtoj}(). 3121 3122 @param xoff: New X offset value. I{(float)} 3123 """ 3124 pass
3125
3126 - def set_yoffset(yoff):
3127 """ 3128 Sets the Y offset of a data field origin. 3129 3130 Note offsets don't affect any calculation, nor functions like 3131 L{DataField.rtoi}(). 3132 3133 @param yoff: New Y offset value. I{(float)} 3134 """ 3135 pass
3136
3137 - def get_si_unit_xy():
3138 """ 3139 Returns lateral SI unit of a data field. 3140 3141 3142 @return: SI unit corresponding to the lateral (XY) dimensions of the data 3143 field. Its reference count is not incremented. I{(L{SIUnit})} 3144 """ 3145 return None
3146
3147 - def get_si_unit_z():
3148 """ 3149 Returns value SI unit of a data field. 3150 3151 3152 @return: SI unit corresponding to the "height" (Z) dimension of the data 3153 field. Its reference count is not incremented. I{(L{SIUnit})} 3154 """ 3155 return None
3156
3157 - def set_si_unit_xy(si_unit):
3158 """ 3159 Sets the SI unit corresponding to the lateral (XY) dimensions of a data 3160 field. 3161 3162 It does not assume a reference on B{C{si_unit}}, instead it adds its own 3163 reference. 3164 3165 @param si_unit: SI unit to be set. I{(L{SIUnit})} 3166 """ 3167 pass
3168
3169 - def set_si_unit_z(si_unit):
3170 """ 3171 Sets the SI unit corresponding to the "height" (Z) dimension of a data 3172 field. 3173 3174 It does not assume a reference on B{C{si_unit}}, instead it adds its own 3175 reference. 3176 3177 @param si_unit: SI unit to be set. I{(L{SIUnit})} 3178 """ 3179 pass
3180
3181 - def get_value_format_xy(style):
3182 """ 3183 Finds value format good for displaying coordinates of a data field. 3184 3185 3186 @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}}, C{B{SI_UNIT_FORMAT_VFTEX}}, C{B{SI_UNIT_FORMAT_UNICODE}}, C{B{SI_UNIT_FORMAT_VFUNICODE}}. I{(L{SIUnitFormatStyle})} 3187 @return: Tuple consisting of 2 values (B{C{value}}, B{C{format}}). (I{(L{SIValueFormat})}, I{(SkipArg)}) 3188 """ 3189 return None, None
3190
3191 - def get_value_format_z(style):
3192 """ 3193 Finds value format good for displaying values of a data field. 3194 3195 3196 @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}}, C{B{SI_UNIT_FORMAT_VFTEX}}, C{B{SI_UNIT_FORMAT_UNICODE}}, C{B{SI_UNIT_FORMAT_VFUNICODE}}. I{(L{SIUnitFormatStyle})} 3197 @return: Tuple consisting of 2 values (B{C{value}}, B{C{format}}). (I{(L{SIValueFormat})}, I{(SkipArg)}) 3198 """ 3199 return None, None
3200
3201 - def copy_units(target):
3202 """ 3203 Sets lateral and value units of a data field to match another data field. 3204 3205 @since: 2.49 3206 3207 @param target: Target data field. I{(L{DataField})} 3208 """ 3209 pass
3210
3211 - def copy_units_to_data_line(data_line):
3212 """ 3213 Sets lateral and value units of a data line to match a data field. 3214 3215 @param data_line: A data line to set units of. I{(L{DataLine})} 3216 """ 3217 pass
3218
3219 - def itor(row):
3220 """ 3221 Transforms vertical pixel coordinate to real (physical) Y coordinate. 3222 3223 That is it maps range [0..y-resolution] to range [0..real-y-size]. 3224 It is not suitable for conversion of matrix indices to physical coordinates, 3225 you have to use L{DataField.itor}(B{C{data_field}}, B{C{row}} + 0.5) for that. 3226 3227 3228 @param row: Vertical pixel coordinate. I{(float)} 3229 @return: Real Y coordinate. I{(float)} 3230 """ 3231 return None
3232
3233 - def jtor(col):
3234 """ 3235 Transforms horizontal pixel coordinate to real (physical) X coordinate. 3236 3237 That is it maps range [0..x-resolution] to range [0..real-x-size]. 3238 It is not suitable for conversion of matrix indices to physical coordinates, 3239 you have to use L{DataField.jtor}(B{C{data_field}}, B{C{col}} + 0.5) for that. 3240 3241 3242 @param col: Horizontal pixel coordinate. I{(float)} 3243 @return: Real X coordinate. I{(float)} 3244 """ 3245 return None
3246
3247 - def rtoi(realy):
3248 """ 3249 Transforms real (physical) Y coordinate to row. 3250 3251 That is it maps range [0..real-y-size] to range [0..y-resolution]. 3252 3253 3254 @param realy: Real (physical) Y coordinate. I{(float)} 3255 @return: Vertical pixel coodinate. I{(float)} 3256 """ 3257 return None
3258
3259 - def rtoj(realx):
3260 """ 3261 Transforms real (physical) X coordinate to column. 3262 3263 That is it maps range [0..real-x-size] to range [0..x-resolution]. 3264 3265 3266 @param realx: Real (physical) X coodinate. I{(float)} 3267 @return: Horizontal pixel coordinate. I{(float)} 3268 """ 3269 return None
3270
3271 - def get_val(col, row):
3272 """ 3273 Gets value at given position in a data field. 3274 3275 Do not access data with this function inside inner loops, it's slow. 3276 Get the raw data buffer with L{DataField.get_data_const}() and access it 3277 directly instead. 3278 3279 3280 @param col: Column index. I{(int)} 3281 @param row: Row index. I{(int)} 3282 @return: Value at (B{C{col}}, B{C{row}}). I{(float)} 3283 """ 3284 return None
3285
3286 - def set_val(col, row, value):
3287 """ 3288 Sets value at given position in a data field. 3289 3290 Do not set data with this function inside inner loops, it's slow. Get the 3291 raw data buffer with L{DataField.get_data}() and write to it directly 3292 instead. 3293 3294 @param col: Column index. I{(int)} 3295 @param row: Row index. I{(int)} 3296 @param value: Value to set. I{(float)} 3297 """ 3298 pass
3299
3300 - def get_dval(x, y, interpolation):
3301 """ 3302 Gets interpolated value at arbitrary data field point indexed by pixel 3303 coordinates. 3304 3305 Note pixel values are centered in pixels, so to get the same 3306 value as L{DataField.get_val}(B{C{data_field}}, B{C{j}}, B{C{i}}) returns, 3307 it's necessary to add 0.5: 3308 L{DataField.get_dval}(B{C{data_field}}, B{C{j}}+0.5, B{C{i}}+0.5, B{C{interpolation}}). 3309 3310 See also L{DataField.get_dval_real}() that does the same, but takes 3311 real coordinates. 3312 3313 3314 @param x: Horizontal position in pixel units, in range [0, x-resolution]. I{(float)} 3315 @param y: Vertical postition in pixel units, in range [0, y-resolution]. I{(float)} 3316 @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})} 3317 @return: Interpolated value at position (B{C{x}},B{C{y}}). I{(float)} 3318 """ 3319 return None
3320
3321 - def get_dval_real(x, y, interpolation):
3322 """ 3323 Gets interpolated value at arbitrary data field point indexed by real 3324 coordinates. 3325 3326 See also L{DataField.get_dval}() that does the same, but takes pixel 3327 coordinates. 3328 3329 3330 @param x: X postion in real coordinates. I{(float)} 3331 @param y: Y postition in real coordinates. I{(float)} 3332 @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})} 3333 @return: Value at position (B{C{x}},B{C{y}}). I{(float)} 3334 """ 3335 return None
3336
3337 - def rotate(angle, interpolation):
3338 """ 3339 Rotates a data field by a given angle. 3340 3341 This function is mostly obsolete. See L{DataField.new_rotated}() 3342 and L{DataField.new_rotated_90}(). 3343 3344 Values that get outside of data field by the rotation are lost. 3345 Undefined values from outside of data field that get inside are set to 3346 data field minimum value. 3347 3348 The rotation is performed in pixel space, i.e. it can be in fact a more 3349 general affine transform in the real coordinates when pixels are not square. 3350 3351 @param angle: Rotation angle (in radians). I{(float)} 3352 @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})} 3353 """ 3354 pass
3355
3356 - def new_rotated(exterior_mask, angle, interp, resize):
3357 """ 3358 Creates a new data field by rotating a data field by an atribtrary angle. 3359 3360 The returned data field can have pixel corresponding to exterior in B{C{dfield}} 3361 (unless B{C{resize}} is B{C{ROTATE_RESIZE_CUT}}). They are filled with a neutral 3362 value; pass B{C{exterior_mask}} and replace them as you wish if you need more 3363 control. 3364 3365 The rotation is performed in real space, i.e. it is a more general affine 3366 transform in the pixel space for data field with non-square pixels. 3367 See L{DataField.rotate}() which rotates in the pixel space. 3368 3369 The returned data field has always square pixels. If you want to rotate 3370 by a multiple of B{C{glib.PI}}/2 while preserving non-square pixels, you must use 3371 explicitly a function such as L{DataField.new_rotated_90}(). 3372 3373 @since: 2.46 3374 3375 @param exterior_mask: Optional data field where pixels corresponding to exterior 3376 will be set to 1. It will be resized to match the returned 3377 field. I{(L{DataField})} 3378 @param angle: Rotation angle (in radians). I{(float)} 3379 @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})} 3380 @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})} 3381 @return: A newly created data field. I{(L{DataField})} 3382 """ 3383 return None
3384
3385 - def new_rotated_90(clockwise):
3386 """ 3387 Creates a new data field by rotating a data field by 90 degrees. 3388 3389 @since: 2.46 3390 3391 @param clockwise: B{C{True}} to rotate clocwise, B{C{False}} to rotate anti-clockwise. I{(bool)} 3392 @return: A newly created data field. I{(L{DataField})} 3393 """ 3394 return None
3395
3396 - def invert(x, y, z):
3397 """ 3398 Reflects and/or inverts a data field. 3399 3400 In the case of value reflection, it's inverted about the mean value. 3401 3402 Note that the axis parameter convention is confusing and different from 3403 L{Brick.invert}() and L{DataLine.invert}(). Parameters B{C{x}} an B{C{y}} 3404 correspond the axes around which to flip (which themselves stay unchanged). 3405 You may need to swap B{C{x}} and B{C{y}} arguments compared what you would pass 3406 naturally. 3407 3408 @param x: B{C{True}} to reflect Y, i.e. rows within the XY plane. I{(bool)} 3409 @param y: B{C{True}} to reflect X, i.e. columns within the XY plane. I{(bool)} 3410 @param z: B{C{True}} to invert values. I{(bool)} 3411 """ 3412 pass
3413
3414 - def flip_xy(dest, minor):
3415 """ 3416 Copies data from one data field to another with transposition. 3417 3418 The destination data field is resized as necessary, its real dimensions set 3419 to transposed B{C{src}} dimensions and its offsets are reset. Units are not 3420 updated. 3421 3422 @since: 2.49 3423 3424 @param dest: Destination data field. I{(L{DataField})} 3425 @param minor: B{C{True}} to mirror about the minor diagonal; B{C{False}} to mirror about 3426 major diagonal. I{(bool)} 3427 """ 3428 pass
3429
3430 - def area_flip_xy(col, row, width, height, dest, minor):
3431 """ 3432 Copies data from a rectangular part of one data field to another with 3433 transposition. 3434 3435 The destination data field is resized as necessary, its real dimensions set 3436 to transposed B{C{src}} area dimensions and its offsets are reset. Units are not 3437 updated. 3438 3439 @since: 2.49 3440 3441 @param col: Upper-left column coordinate in B{C{src}}. I{(int)} 3442 @param row: Upper-left row coordinate in B{C{src}}. I{(int)} 3443 @param width: Area width (number of columns) in B{C{src}}. I{(int)} 3444 @param height: Area height (number of rows) in B{C{src}}. I{(int)} 3445 @param dest: Destination data field. I{(L{DataField})} 3446 @param minor: B{C{True}} to mirror about the minor diagonal; B{C{False}} to mirror about 3447 major diagonal. I{(bool)} 3448 """ 3449 pass
3450
3451 - def fill(value):
3452 """ 3453 Fills a data field with given value. 3454 3455 @param value: Value to be entered. I{(float)} 3456 """ 3457 pass
3458
3459 - def clear():
3460 """ 3461 Fills a data field with zeroes. 3462 3463 """ 3464 pass
3465
3466 - def multiply(value):
3467 """ 3468 Multiplies all values in a data field by given value. 3469 3470 @param value: Value to multiply B{C{data_field}} with. I{(float)} 3471 """ 3472 pass
3473
3474 - def add(value):
3475 """ 3476 Adds given value to all values in a data field. 3477 3478 @param value: Value to be added to data field values. I{(float)} 3479 """ 3480 pass
3481
3482 - def abs():
3483 """ 3484 Takes absolute value of all values in a data field. 3485 3486 @since: 2.52 3487 3488 """ 3489 pass
3490
3491 - def area_fill(col, row, width, height, value):
3492 """ 3493 Fills a rectangular part of a data field with given value. 3494 3495 @param col: Upper-left column coordinate. I{(int)} 3496 @param row: Upper-left row coordinate. I{(int)} 3497 @param width: Area width (number of columns). I{(int)} 3498 @param height: Area height (number of rows). I{(int)} 3499 @param value: Value to be entered I{(float)} 3500 """ 3501 pass
3502
3503 - def area_fill_mask(mask, mode, col, row, width, height, value):
3504 """ 3505 Fills a masked rectangular part of a data field with given value. 3506 3507 @since: 2.44 3508 3509 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 3510 @param mode: Masking mode to use. See the introduction for description of 3511 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 3512 @param col: Upper-left column coordinate. I{(int)} 3513 @param row: Upper-left row coordinate. I{(int)} 3514 @param width: Area width (number of columns). I{(int)} 3515 @param height: Area height (number of rows). I{(int)} 3516 @param value: Value to be entered I{(float)} 3517 """ 3518 pass
3519
3520 - def area_clear(col, row, width, height):
3521 """ 3522 Fills a rectangular part of a data field with zeroes. 3523 3524 @param col: Upper-left column coordinate. I{(int)} 3525 @param row: Upper-left row coordinate. I{(int)} 3526 @param width: Area width (number of columns). I{(int)} 3527 @param height: Area height (number of rows). I{(int)} 3528 """ 3529 pass
3530
3531 - def area_multiply(col, row, width, height, value):
3532 """ 3533 Multiplies values in a rectangular part of a data field by given value 3534 3535 @param col: Upper-left column coordinate. I{(int)} 3536 @param row: Upper-left row coordinate. I{(int)} 3537 @param width: Area width (number of columns). I{(int)} 3538 @param height: Area height (number of rows). I{(int)} 3539 @param value: Value to multiply area with. I{(float)} 3540 """ 3541 pass
3542
3543 - def area_add(col, row, width, height, value):
3544 """ 3545 Adds given value to all values in a rectangular part of a data field. 3546 3547 @param col: Upper-left column coordinate. I{(int)} 3548 @param row: Upper-left row coordinate. I{(int)} 3549 @param width: Area width (number of columns). I{(int)} 3550 @param height: Area height (number of rows). I{(int)} 3551 @param value: Value to be added to area values. I{(float)} 3552 """ 3553 pass
3554
3555 - def area_abs(col, row, width, height):
3556 """ 3557 Takes absolute value of values in a rectangular part of a data field. 3558 3559 @since: 2.52 3560 3561 @param col: Upper-left column coordinate. I{(int)} 3562 @param row: Upper-left row coordinate. I{(int)} 3563 @param width: Area width (number of columns). I{(int)} 3564 @param height: Area height (number of rows). I{(int)} 3565 """ 3566 pass
3567
3568 - def get_profile(scol, srow, ecol, erow, res, thickness, interpolation):
3569 """ 3570 Extracts a possibly averaged profile from data field to a data line. 3571 3572 3573 @param scol: The column the line starts at (inclusive). I{(int)} 3574 @param srow: The row the line starts at (inclusive). I{(int)} 3575 @param ecol: The column the line ends at (inclusive). I{(int)} 3576 @param erow: The row the line ends at (inclusive). I{(int)} 3577 @param res: Requested resolution of data line (the number of samples to take). 3578 If nonpositive, data line resolution is chosen to match B{C{data_field}}'s. I{(int)} 3579 @param thickness: Thickness of line to be averaged. I{(int)} 3580 @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})} 3581 @return: Tuple consisting of 2 values (B{C{value}}, B{C{data_line}}). (I{(L{DataLine})}, I{(SkipArg)}) 3582 """ 3583 return None, None
3584
3585 - def get_row(data_line, row):
3586 """ 3587 Extracts a data field row into a data line. 3588 3589 @param data_line: A data line. It will be resized to width ot B{C{data_field}}. I{(L{DataLine})} 3590 @param row: Row index. I{(int)} 3591 """ 3592 pass
3593
3594 - def get_column(data_line, col):
3595 """ 3596 Extracts a data field column into a data line. 3597 3598 @param data_line: A data line. It will be resized to height of B{C{data_field}}. I{(L{DataLine})} 3599 @param col: Column index. I{(int)} 3600 """ 3601 pass
3602
3603 - def set_row(data_line, row):
3604 """ 3605 Sets a row in the data field to values of a data line. 3606 3607 Data line length must be equal to width of data field. 3608 3609 @param data_line: A data line. I{(L{DataLine})} 3610 @param row: Row index. I{(int)} 3611 """ 3612 pass
3613
3614 - def set_column(data_line, col):
3615 """ 3616 Sets a column in the data field to values of a data line. 3617 3618 Data line length must be equal to height of data field. 3619 3620 @param data_line: A data line. I{(L{DataLine})} 3621 @param col: Column index. I{(int)} 3622 """ 3623 pass
3624
3625 - def get_row_part(data_line, row, from_, to):
3626 """ 3627 Extracts part of a data field row into a data line. 3628 3629 @param data_line: A data line. It will be resized to the row part width. I{(L{DataLine})} 3630 @param row: Row index. I{(int)} 3631 @param from_: I{(int)} 3632 @param to: End column index + 1. I{(int)} 3633 """ 3634 pass
3635
3636 - def get_column_part(data_line, col, from_, to):
3637 """ 3638 Extracts part of a data field column into a data line. 3639 3640 @param data_line: A data line. It will be resized to the column part height. I{(L{DataLine})} 3641 @param col: Column index. I{(int)} 3642 @param from_: I{(int)} 3643 @param to: End row index + 1. I{(int)} 3644 """ 3645 pass
3646
3647 - def set_row_part(data_line, row, from_, to):
3648 """ 3649 Puts a data line into a data field row. 3650 3651 If data line length differs from B{C{to}}-B{C{from}}, it is resampled to this length. 3652 3653 @param data_line: A data line. I{(L{DataLine})} 3654 @param row: Row index. I{(int)} 3655 @param from_: I{(int)} 3656 @param to: End row index + 1. I{(int)} 3657 """ 3658 pass
3659
3660 - def set_column_part(data_line, col, from_, to):
3661 """ 3662 Puts a data line into data field column. 3663 3664 If data line length differs from B{C{to}}-B{C{from}}, it is resampled to this length. 3665 3666 @param data_line: A data line. I{(L{DataLine})} 3667 @param col: Column index. I{(int)} 3668 @param from_: I{(int)} 3669 @param to: End row index + 1. I{(int)} 3670 """ 3671 pass
3672
3673 - def get_xder(col, row):
3674 """ 3675 Computes central derivative in X direction. 3676 3677 On border points, one-side derivative is returned. 3678 3679 3680 @param col: Column index. I{(int)} 3681 @param row: Row index. I{(int)} 3682 @return: Derivative in X direction. I{(float)} 3683 """ 3684 return None
3685
3686 - def get_yder(col, row):
3687 """ 3688 Computes central derivative in Y direction. 3689 3690 On border points, one-side derivative is returned. 3691 3692 Note the derivative is for legacy reasons calulcated for the opposite 3693 y direction than is usual elsewhere in Gwyddion, i.e. if values increase 3694 with increasing row number, the returned value is negative. 3695 3696 3697 @param col: Column index. I{(int)} 3698 @param row: Row index. I{(int)} 3699 @return: Derivative in Y direction I{(float)} 3700 """ 3701 return None
3702
3703 - def get_angder(col, row, theta):
3704 """ 3705 Computes derivative in direction specified by given angle. 3706 3707 3708 @param col: Column index. I{(int)} 3709 @param row: Row index. I{(int)} 3710 @param theta: Angle defining the direction (in radians, counterclockwise). I{(float)} 3711 @return: Derivative in direction given by angle B{C{theta}}. I{(float)} 3712 """ 3713 return None
3714
3715 - def average_xyz(density_map, points, npoints):
3716 """ 3717 Fills a data field with regularised XYZ data using a simple method. 3718 3719 The real dimensions and offsets of B{C{field}} determine the rectangle in the XY 3720 plane that will be regularised. The regularisation method is fast but 3721 simple and there are no absolute guarantees of quality, even though the 3722 result will be usually quite acceptable. 3723 3724 This especially applies to reasonable views of the XYZ data. Unreasonable 3725 views can be rendered unreasonably. In particular if the rectangle does not 3726 contain any point from B{C{points}} (either due to high zoom to an empty region 3727 or by just being completely off) B{C{data_field}} will be filled entirely with 3728 the value of the closest point or something similar. 3729 3730 @since: 2.44 3731 3732 @param density_map: Optional data field to fill with XYZ point density map. It can 3733 be B{C{None}}. I{(L{DataField})} 3734 @param points: Array of XYZ points. Coordinates X and Y represent positions in 3735 the plane; the Z-coordinate represents values. I{(const-XYZ*)} 3736 @param npoints: Number of points. I{(int)} 3737 """ 3738 pass
3739
3740 - def xdwt(wt_coefs, direction, minsize):
3741 """ 3742 Performs steps of the X-direction image wavelet decomposition. 3743 3744 The smallest low pass coefficients block is equal to B{C{minsize}}. Run with 3745 B{C{minsize}} = B{C{dfield}}->xres/2 to perform one step of decomposition 3746 or B{C{minsize}} = 4 to perform full decomposition (or anything between). 3747 3748 3749 @param wt_coefs: Data line where the wavelet transform coefficients are stored. I{(L{DataLine})} 3750 @param direction: Transform direction. Expected values: C{B{TRANSFORM_DIRECTION_BACKWARD}}, C{B{TRANSFORM_DIRECTION_FORWARD}}. I{(L{TransformDirection})} 3751 @param minsize: size of minimal transform result block I{(int)} 3752 """ 3753 pass
3754
3755 - def ydwt(wt_coefs, direction, minsize):
3756 """ 3757 Performs steps of the Y-direction image wavelet decomposition. 3758 3759 The smallest low pass coefficients block is equal to B{C{minsize}}. Run with 3760 B{C{minsize}} = B{C{dfield}}->yres/2 to perform one step of decomposition 3761 or B{C{minsize}} = 4 to perform full decomposition (or anything between). 3762 3763 3764 @param wt_coefs: Data line where the wavelet transform coefficients are stored. I{(L{DataLine})} 3765 @param direction: Transform direction. Expected values: C{B{TRANSFORM_DIRECTION_BACKWARD}}, C{B{TRANSFORM_DIRECTION_FORWARD}}. I{(L{TransformDirection})} 3766 @param minsize: size of minimal transform result block I{(int)} 3767 """ 3768 pass
3769
3770 - def dwt(wt_coefs, direction, minsize):
3771 """ 3772 Performs steps of the 2D image wavelet decomposition. 3773 3774 The smallest low pass coefficients block is equal to B{C{minsize}}. Run with 3775 B{C{minsize}} = B{C{dfield}}->xres/2 to perform one step of decomposition 3776 or B{C{minsize}} = 4 to perform full decomposition (or anything between). 3777 3778 3779 @param wt_coefs: Data line where the wavelet transform coefficients are stored. I{(L{DataLine})} 3780 @param direction: Transform direction. Expected values: C{B{TRANSFORM_DIRECTION_BACKWARD}}, C{B{TRANSFORM_DIRECTION_FORWARD}}. I{(L{TransformDirection})} 3781 @param minsize: size of minimal transform result block I{(int)} 3782 """ 3783 pass
3784
3785 - def dwt_mark_anisotropy(mask, wt_coefs, ratio, lowlimit):
3786 """ 3787 Performs steps of the 2D image wavelet decomposition. 3788 3789 The smallest low pass coefficients block is equal to B{C{minsize}}. Run with 3790 B{C{minsize}} = B{C{dfield}}->xres/2 to perform one step of decomposition 3791 or B{C{minsize}} = 4 to perform full decomposition (or anything between). 3792 3793 3794 @param mask: I{(L{DataField})} 3795 @param wt_coefs: Data line to store wavelet transform coefficients to. I{(L{DataLine})} 3796 @param ratio: I{(float)} 3797 @param lowlimit: I{(int)} 3798 """ 3799 pass
3800
3801 - def elliptic_area_fill(col, row, width, height, value):
3802 """ 3803 Fills an elliptic region of a data field with given value. 3804 3805 The elliptic region is defined by its bounding box. In versions prior to 2.59 the bounding box must be completely 3806 contained in the data field. Since version 2.59 the ellipse can intersect the data field in any manner. 3807 3808 3809 @param col: Upper-left bounding box column coordinate. I{(int)} 3810 @param row: Upper-left bounding box row coordinate. I{(int)} 3811 @param width: Bounding box width (number of columns). I{(int)} 3812 @param height: Bounding box height (number of rows). I{(int)} 3813 @param value: Value to be entered. I{(float)} 3814 @return: The number of filled values. I{(int)} 3815 """ 3816 return None
3817
3818 - def get_elliptic_intersection(col, row, width, height):
3819 """ 3820 Calculates an upper bound of the number of samples in an elliptic region intersecting a data field. 3821 3822 @since: 2.59 3823 3824 @param col: Upper-left bounding box column coordinate. I{(int)} 3825 @param row: Upper-left bounding box row coordinate. I{(int)} 3826 @param width: Bounding box width. I{(int)} 3827 @param height: Bounding box height. I{(int)} 3828 @return: The number of pixels in an elliptic region with given rectangular bounds (or its upper bound). I{(int)} 3829 """ 3830 return None
3831
3832 - def circular_area_fill(col, row, radius, value):
3833 """ 3834 Fills an elliptic region of a data field with given value. 3835 3836 3837 @param col: Row index of circular area centre. I{(int)} 3838 @param row: Column index of circular area centre. I{(int)} 3839 @param radius: Circular area radius (in pixels). Any value is allowed, although to get areas that do not deviate from 3840 true circles after pixelization too much, half-integer values are recommended, integer values are NOT 3841 recommended. I{(float)} 3842 @param value: Value to be entered. I{(float)} 3843 @return: The number of filled values. I{(int)} 3844 """ 3845 return None
3846
3847 - def normalize():
3848 """ 3849 Normalizes data in a data field to range 0.0 to 1.0. 3850 3851 It is equivalent to L{DataField.renormalize}(B{C{data_field}}, 1.0, 0.0); 3852 3853 If B{C{data_field}} is filled with only one value, it is changed to 0.0. 3854 3855 """ 3856 pass
3857
3858 - def renormalize(range, offset):
3859 """ 3860 Transforms data in a data field with linear function to given range. 3861 3862 When B{C{range}} is positive, the new data range is (B{C{offset}}, B{C{offset}}+B{C{range}}); when B{C{range}} is negative, the new data 3863 range is (B{C{offset}}-B{C{range}}, B{C{offset}}). In neither case the data are flipped, negative range only means different 3864 selection of boundaries. 3865 3866 When B{C{range}} is zero, this method is equivalent to L{DataField.fill}(B{C{data_field}}, B{C{offset}}). 3867 3868 @param range: New data interval size. I{(float)} 3869 @param offset: New data interval offset. I{(float)} 3870 """ 3871 pass
3872
3873 - def area_renormalize(col, row, width, height, range, offset):
3874 """ 3875 Transforms data in a part of a data field with linear function to given range. 3876 3877 When B{C{range}} is positive, the new data range is (B{C{offset}}, B{C{offset}}+B{C{range}}); when B{C{range}} is negative, the new data 3878 range is (B{C{offset}}-B{C{range}}, B{C{offset}}). In neither case the data are flipped, negative range only means different 3879 selection of boundaries. 3880 3881 When B{C{range}} is zero, this method is equivalent to L{DataField.fill}(B{C{data_field}}, B{C{offset}}). 3882 3883 @since: 2.45 3884 3885 @param col: Upper-left column coordinate. I{(int)} 3886 @param row: Upper-left row coordinate. I{(int)} 3887 @param width: Area width (number of columns). I{(int)} 3888 @param height: Area height (number of rows). I{(int)} 3889 @param range: New data interval size. I{(float)} 3890 @param offset: New data interval offset. I{(float)} 3891 """ 3892 pass
3893
3894 - def threshold(threshval, bottom, top):
3895 """ 3896 Tresholds values of a data field. 3897 3898 Values smaller than B{C{threshold}} are set to value B{C{bottom}}, values higher than B{C{threshold}} or equal to it are set to 3899 value B{C{top}} 3900 3901 3902 @param threshval: Threshold value. I{(float)} 3903 @param bottom: Lower replacement value. I{(float)} 3904 @param top: Upper replacement value. I{(float)} 3905 @return: The total number of values above threshold. I{(int)} 3906 """ 3907 return None
3908
3909 - def area_threshold(col, row, width, height, threshval, bottom, top):
3910 """ 3911 Tresholds values of a rectangular part of a data field. 3912 3913 Values smaller than B{C{threshold}} are set to value B{C{bottom}}, values higher than B{C{threshold}} or equal to it are set to 3914 value B{C{top}} 3915 3916 3917 @param col: Upper-left column coordinate. I{(int)} 3918 @param row: Upper-left row coordinate. I{(int)} 3919 @param width: Area width (number of columns). I{(int)} 3920 @param height: Area height (number of rows). I{(int)} 3921 @param threshval: Threshold value. I{(float)} 3922 @param bottom: Lower replacement value. I{(float)} 3923 @param top: Upper replacement value. I{(float)} 3924 @return: The total number of values above threshold. I{(int)} 3925 """ 3926 return None
3927
3928 - def clamp(bottom, top):
3929 """ 3930 Limits data field values to a range. 3931 3932 3933 @param bottom: Lower limit value. I{(float)} 3934 @param top: Upper limit value. I{(float)} 3935 @return: The number of changed values, i.e., values that were outside [B{C{bottom}}, B{C{top}}]. I{(int)} 3936 """ 3937 return None
3938
3939 - def area_clamp(col, row, width, height, bottom, top):
3940 """ 3941 Limits values in a rectangular part of a data field to a range. 3942 3943 3944 @param col: Upper-left column coordinate. I{(int)} 3945 @param row: Upper-left row coordinate. I{(int)} 3946 @param width: Area width (number of columns). I{(int)} 3947 @param height: Area height (number of rows). I{(int)} 3948 @param bottom: Lower limit value. I{(float)} 3949 @param top: Upper limit value. I{(float)} 3950 @return: The number of changed values, i.e., values that were outside [B{C{bottom}}, B{C{top}}]. I{(int)} 3951 """ 3952 return None
3953
3954 - def area_gather(result, buffer, hsize, vsize, average, col, row, width, height):
3955 """ 3956 Sums or averages values in reactangular areas around each sample in a data field. 3957 3958 When the gathered area extends out of calculation area, only samples from their intersection are taken into the 3959 local sum (or average). 3960 3961 There are no restrictions on values of B{C{hsize}} and B{C{vsize}} with regard to B{C{width}} and B{C{height}}, but they have to be 3962 positive. 3963 3964 The result is calculated by the means of two-dimensional rolling sums. One one hand it means the calculation time 3965 depends linearly on (B{C{width}} + B{C{hsize}})*(B{C{height}} + B{C{vsize}}) instead of B{C{width}}*B{C{hsize}}*B{C{height}}*B{C{vsize}}. On the other 3966 hand it means absolute rounding errors of all output values are given by the largest input values, that is relative 3967 precision of results small in absolute value may be poor. 3968 3969 @param result: A data field to put the result to, it may be B{C{data_field}} itself. I{(L{DataField})} 3970 @param buffer: A data field to use as a scratch area, its size must be at least B{C{width}}*B{C{height}}. May be B{C{None}} to allocate 3971 a private temporary buffer. I{(L{DataField})} 3972 @param hsize: Horizontal size of gathered area. The area is centered around each sample if B{C{hsize}} is odd, it extends one 3973 pixel more to the right if B{C{hsize}} is even. I{(int)} 3974 @param vsize: Vertical size of gathered area. The area is centered around each sample if B{C{vsize}} is odd, it extends one 3975 pixel more down if B{C{vsize}} is even. I{(int)} 3976 @param average: B{C{True}} to divide resulting sums by the number of involved samples to get averages instead of sums. I{(bool)} 3977 @param col: Upper-left column coordinate. I{(int)} 3978 @param row: Upper-left row coordinate. I{(int)} 3979 @param width: Area width (number of columns). I{(int)} 3980 @param height: Area height (number of rows). I{(int)} 3981 """ 3982 pass
3983
3984 - def convolve(kernel_field):
3985 """ 3986 Convolves a data field with given kernel. 3987 3988 Note that the convolution is done by summation and can be slow for large kernels. 3989 3990 @param kernel_field: Kenrel field to convolve B{C{data_field}} with. I{(L{DataField})} 3991 """ 3992 pass
3993
3994 - def area_convolve(kernel_field, col, row, width, height):
3995 """ 3996 Convolves a rectangular part of a data field with given kernel. 3997 3998 Note that the convolution is done by summation and can be slow for large kernels. 3999 4000 @param kernel_field: Kenrel field to convolve B{C{data_field}} with. I{(L{DataField})} 4001 @param col: Upper-left column coordinate. I{(int)} 4002 @param row: Upper-left row coordinate. I{(int)} 4003 @param width: Area width (number of columns). I{(int)} 4004 @param height: Area height (number of rows). I{(int)} 4005 """ 4006 pass
4007
4008 - def fft_convolve(kernel_field):
4009 """ 4010 Convolves a data field with given kernel of the same size using FFT. 4011 4012 This is a simple FFT-based convolution done by multiplication in the frequency domain. 4013 4014 This is a somewhat low-level function. There is no padding or boundary treatment; images are considered periodic. 4015 The result is normalised as if the convolution was done by summation and the physical units of B{C{data_field}} are 4016 unchanged. 4017 4018 Also note that in order to obtain unshifted result, the kernel needs to be centered around the top left corner. 4019 You can use L{DataField.fft2d_dehumanize}() to transform a centered kernel. 4020 4021 @since: 2.54 4022 4023 @param kernel_field: Kenrel field to convolve B{C{data_field}} with. It must have the same size as B{C{data_field}}. I{(L{DataField})} 4024 """ 4025 pass
4026
4027 - def area_ext_convolve(col, row, width, height, target, kernel, exterior, fill_value, as_integral):
4028 """ 4029 Convolve a field with a two-dimensional kernel. 4030 4031 Pixel dimensions of B{C{target}} may match either B{C{field}} or just the rectangular area. In the former case the result is 4032 written in the same rectangular area; in the latter case the result fills the entire B{C{target}}. 4033 4034 The convolution is performed with the kernel centred on the respective field pixels. For directions in which the 4035 kernel has an odd size this holds precisely. For an even-sized kernel this means the kernel centre is placed 0.5 4036 pixel left or up (towards lower indices) from the respective field pixel. 4037 4038 See L{DataField.extend}() for what constitutes the exterior and how it is handled. 4039 4040 If B{C{as_integral}} is B{C{False}} the function performs a simple discrete convolution sum and the value units of B{C{target}} 4041 are set to product of B{C{field}} and B{C{kernel}} units. 4042 4043 If B{C{as_integral}} is B{C{True}} the function approximates a convolution integral. In this case B{C{kernel}} should be a sampled 4044 continuous transfer function. The units of value B{C{target}} are set to product of B{C{field}} and B{C{kernel}} value units and 4045 B{C{field}} lateral units squared. Furthermore, the discrete sum is multiplied by the pixel size (i.e. dB{C{x}} dB{C{y}} in the 4046 integral). 4047 4048 In either case, the lateral units and pixel size of B{C{kernel}} are assumed to be the same as for B{C{field}} (albeit not 4049 checked), because the convolution does not make sense otherwise. 4050 4051 @since: 2.49 4052 4053 @param col: Upper-left column coordinate. I{(int)} 4054 @param row: Upper-left row coordinate. I{(int)} 4055 @param width: Area width (number of columns). I{(int)} 4056 @param height: Area height (number of rows). I{(int)} 4057 @param target: A two-dimensional data field where the result will be placed. It may be B{C{field}} for an in-place 4058 modification. I{(L{DataField})} 4059 @param kernel: Kernel to convolve B{C{field}} with. I{(L{DataField})} 4060 @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}}, C{B{EXTERIOR_LAPLACE}}. I{(L{ExteriorType})} 4061 @param fill_value: The value to use with B{C{EXTERIOR_FIXED_VALUE}} exterior. I{(float)} 4062 @param as_integral: B{C{True}} for normalisation and units as a convolution integral, B{C{False}} as a sum. I{(bool)} 4063 """ 4064 pass
4065
4066 - def convolve_1d(kernel_line, orientation):
4067 """ 4068 Convolves a data field with given linear kernel. 4069 4070 @since: 2.4 4071 4072 @param kernel_line: Kenrel line to convolve B{C{data_field}} with. I{(L{DataLine})} 4073 @param orientation: Filter orientation (see L{DataField.area_convolve_1d}()). Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 4074 """ 4075 pass
4076
4077 - def area_convolve_1d(kernel_line, orientation, col, row, width, height):
4078 """ 4079 Convolves a rectangular part of a data field with given linear kernel. 4080 4081 For large separable kernels it can be more efficient to use a sequence of horizontal and vertical convolutions 4082 instead one 2D convolution. 4083 4084 @since: 2.4 4085 4086 @param kernel_line: Kernel line to convolve B{C{data_field}} with. I{(L{DataLine})} 4087 @param orientation: Filter orientation (B{C{ORIENTATION_HORIZONTAL}} for row-wise convolution, B{C{ORIENTATION_VERTICAL}} 4088 for column-wise convolution). Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 4089 @param col: Upper-left column coordinate. I{(int)} 4090 @param row: Upper-left row coordinate. I{(int)} 4091 @param width: Area width (number of columns). I{(int)} 4092 @param height: Area height (number of rows). I{(int)} 4093 """ 4094 pass
4095
4096 - def area_ext_row_convolve(col, row, width, height, target, kernel, exterior, fill_value, as_integral):
4097 """ 4098 Convolve a field row-wise with a one-dimensional kernel. 4099 4100 Pixel dimensions of B{C{target}} may match either B{C{field}} or just the rectangular area. In the former case the result is 4101 written in the same rectangular area; in the latter case the result fills the entire B{C{target}}. 4102 4103 The convolution is performed with the kernel centred on the respective field pixels. For an odd-sized kernel this 4104 holds precisely. For an even-sized kernel this means the kernel centre is placed 0.5 pixel to the left (towards 4105 lower column indices) from the respective field pixel. 4106 4107 See L{DataField.extend}() for what constitutes the exterior and how it is handled. 4108 4109 If B{C{as_integral}} is B{C{False}} the function performs a simple discrete convolution sum and the value units of B{C{target}} 4110 are set to product of B{C{field}} and B{C{kernel}} units. 4111 4112 If B{C{as_integral}} is B{C{True}} the function approximates a convolution integral. In this case B{C{kernel}} should be a sampled 4113 continuous transfer function. The units of value B{C{target}} are set to product of B{C{field}} and B{C{kernel}} value units and 4114 B{C{field}} lateral units. Furthermore, the discrete sum is multiplied by the pixel size (i.e. dB{C{x}} in the integral). 4115 4116 In either case, the lateral units and pixel size of B{C{kernel}} are assumed to be the same as for a B{C{field}}'s row 4117 (albeit not checked), because the convolution does not make sense otherwise. 4118 4119 @since: 2.49 4120 4121 @param col: Upper-left column coordinate. I{(int)} 4122 @param row: Upper-left row coordinate. I{(int)} 4123 @param width: Area width (number of columns). I{(int)} 4124 @param height: Area height (number of rows). I{(int)} 4125 @param target: A two-dimensional data field where the result will be placed. It may be B{C{field}} for an in-place 4126 modification. I{(L{DataField})} 4127 @param kernel: Kernel to convolve B{C{field}} with. I{(L{DataLine})} 4128 @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}}, C{B{EXTERIOR_LAPLACE}}. I{(L{ExteriorType})} 4129 @param fill_value: The value to use with B{C{EXTERIOR_FIXED_VALUE}} exterior. I{(float)} 4130 @param as_integral: B{C{True}} for normalisation and units as a convolution integral, B{C{False}} as a sum. I{(bool)} 4131 """ 4132 pass
4133
4134 - def filter_median(size):
4135 """ 4136 Filters a data field with median filter. 4137 4138 This method uses a simple square kernel. Use the general function L{DataField.area_filter_kth_rank}() to perform 4139 filtering with a different kernel, for instance circular. 4140 4141 @param size: Size of area to take median of. I{(int)} 4142 """ 4143 pass
4144
4145 - def area_filter_median(size, col, row, width, height):
4146 """ 4147 Filters a rectangular part of a data field with median filter. 4148 4149 This method uses a simple square kernel. Use the general function L{DataField.area_filter_kth_rank}() to perform 4150 filtering with a different kernel, for instance circular. 4151 4152 @param size: Size of area to take median of. I{(int)} 4153 @param col: Upper-left column coordinate. I{(int)} 4154 @param row: Upper-left row coordinate. I{(int)} 4155 @param width: Area width (number of columns). I{(int)} 4156 @param height: Area height (number of rows). I{(int)} 4157 """ 4158 pass
4159
4160 - def filter_mean(size):
4161 """ 4162 Filters a data field with mean filter of size B{C{size}}. 4163 4164 This method is a simple L{DataField.area_gather}() wrapper, so the kernel is square. Use convolution 4165 L{DataField.area_ext_convolve}() to perform a mean filter with different, for instance circular, kernel. 4166 4167 @param size: Averaged area size. I{(int)} 4168 """ 4169 pass
4170
4171 - def area_filter_mean(size, col, row, width, height):
4172 """ 4173 Filters a rectangular part of a data field with mean filter of size B{C{size}}. 4174 4175 This method is a simple L{DataField.area_gather}() wrapper, so the kernel is square. Use convolution 4176 L{DataField.area_ext_convolve}() to perform a mean filter with different, for instance circular, kernel. 4177 4178 @param size: Averaged area size. I{(int)} 4179 @param col: Upper-left column coordinate. I{(int)} 4180 @param row: Upper-left row coordinate. I{(int)} 4181 @param width: Area width (number of columns). I{(int)} 4182 @param height: Area height (number of rows). I{(int)} 4183 """ 4184 pass
4185
4186 - def filter_conservative(size):
4187 """ 4188 Filters a data field with conservative denoise filter. 4189 4190 @param size: Filtered area size. I{(int)} 4191 """ 4192 pass
4193
4194 - def area_filter_conservative(size, col, row, width, height):
4195 """ 4196 Filters a rectangular part of a data field with conservative denoise filter. 4197 4198 @param size: Filtered area size. I{(int)} 4199 @param col: Upper-left column coordinate. I{(int)} 4200 @param row: Upper-left row coordinate. I{(int)} 4201 @param width: Area width (number of columns). I{(int)} 4202 @param height: Area height (number of rows). I{(int)} 4203 """ 4204 pass
4205
4206 - def filter_laplacian():
4207 """ 4208 Filters a data field with Laplacian filter. 4209 4210 """ 4211 pass
4212
4213 - def area_filter_laplacian(col, row, width, height):
4214 """ 4215 Filters a rectangular part of a data field with Laplacian filter. 4216 4217 @param col: Upper-left column coordinate. I{(int)} 4218 @param row: Upper-left row coordinate. I{(int)} 4219 @param width: Area width (number of columns). I{(int)} 4220 @param height: Area height (number of rows). I{(int)} 4221 """ 4222 pass
4223
4225 """ 4226 Filters a data field with Laplacian of Gaussians filter. 4227 4228 @since: 2.23 4229 4230 """ 4231 pass
4232
4233 - def area_filter_laplacian_of_gaussians(col, row, width, height):
4234 """ 4235 Filters a rectangular part of a data field with Laplacian of Gaussians filter. 4236 4237 @since: 2.23 4238 4239 @param col: Upper-left column coordinate. I{(int)} 4240 @param row: Upper-left row coordinate. I{(int)} 4241 @param width: Area width (number of columns). I{(int)} 4242 @param height: Area height (number of rows). I{(int)} 4243 """ 4244 pass
4245
4246 - def filter_sobel(orientation):
4247 """ 4248 Filters a data field with a directional Sobel filter. 4249 4250 @param orientation: Filter orientation. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 4251 """ 4252 pass
4253
4254 - def area_filter_sobel(orientation, col, row, width, height):
4255 """ 4256 Filters a rectangular part of a data field with a directional Sobel filter. 4257 4258 @param orientation: Filter orientation. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 4259 @param col: Upper-left column coordinate. I{(int)} 4260 @param row: Upper-left row coordinate. I{(int)} 4261 @param width: Area width (number of columns). I{(int)} 4262 @param height: Area height (number of rows). I{(int)} 4263 """ 4264 pass
4265
4266 - def filter_sobel_total():
4267 """ 4268 Filters a data field with total Sobel filter. 4269 4270 @since: 2.31 4271 4272 """ 4273 pass
4274
4275 - def filter_prewitt(orientation):
4276 """ 4277 Filters a data field with Prewitt filter. 4278 4279 @param orientation: Filter orientation. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 4280 """ 4281 pass
4282
4283 - def area_filter_prewitt(orientation, col, row, width, height):
4284 """ 4285 Filters a rectangular part of a data field with a directional Prewitt filter. 4286 4287 @param orientation: Filter orientation. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 4288 @param col: Upper-left column coordinate. I{(int)} 4289 @param row: Upper-left row coordinate. I{(int)} 4290 @param width: Area width (number of columns). I{(int)} 4291 @param height: Area height (number of rows). I{(int)} 4292 """ 4293 pass
4294
4295 - def filter_prewitt_total():
4296 """ 4297 Filters a data field with total Prewitt filter. 4298 4299 @since: 2.31 4300 4301 """ 4302 pass
4303
4304 - def filter_slope(xder, yder):
4305 """ 4306 Calculates x and y derivaties for an entire field. 4307 4308 The derivatives are calculated as the simple symmetrical differences (in physical units, not pixel-wise), except at 4309 the edges where the differences are one-sided. 4310 4311 @since: 2.37 4312 4313 @param xder: Data field where the x-derivarive is to be stored, or B{C{None}} if you are only interested in the y-derivarive. I{(L{DataField})} 4314 @param yder: Data field where the y-derivarive is to be stored, or B{C{None}} if you are only interested in the x-derivarive. I{(L{DataField})} 4315 """ 4316 pass
4317
4318 - def filter_gauss_step(sigma):
4319 """ 4320 Processes a data field with Gaussian step detection filter. 4321 4322 The filter is a multi-directional combination of convolutions with Gaussian multiplied by a signed step function. 4323 4324 The resulting values correspond roughly to the step height around the pixel. 4325 4326 @since: 2.54 4327 4328 @param sigma: Gaussian filter width (in pixels). I{(float)} 4329 """ 4330 pass
4331
4332 - def filter_dechecker():
4333 """ 4334 Filters a data field with 5x5 checker pattern removal filter. 4335 4336 @since: 2.1 4337 4338 """ 4339 pass
4340
4341 - def area_filter_dechecker(col, row, width, height):
4342 """ 4343 Filters a rectangular part of a data field with 5x5 checker pattern removal 4344 filter. 4345 4346 @since: 2.1 4347 4348 @param col: Upper-left column coordinate. I{(int)} 4349 @param row: Upper-left row coordinate. I{(int)} 4350 @param width: Area width (number of columns). I{(int)} 4351 @param height: Area height (number of rows). I{(int)} 4352 """ 4353 pass
4354
4355 - def filter_gaussian(sigma):
4356 """ 4357 Filters a data field with a Gaussian filter. 4358 4359 @since: 2.4 4360 4361 @param sigma: The sigma parameter of the Gaussian. I{(float)} 4362 """ 4363 pass
4364
4365 - def area_filter_gaussian(sigma, col, row, width, height):
4366 """ 4367 Filters a rectangular part of a data field with a Gaussian filter. 4368 4369 The Gausian is normalized, i.e. it is sum-preserving. 4370 4371 @since: 2.4 4372 4373 @param sigma: The sigma parameter of the Gaussian. I{(float)} 4374 @param col: Upper-left column coordinate. I{(int)} 4375 @param row: Upper-left row coordinate. I{(int)} 4376 @param width: Area width (number of columns). I{(int)} 4377 @param height: Area height (number of rows). I{(int)} 4378 """ 4379 pass
4380
4381 - def row_gaussian(sigma):
4382 """ 4383 Filters a data field with a Gaussian filter in horizontal direction. 4384 4385 The Gausian is normalized, i.e. it is sum-preserving. 4386 4387 @since: 2.54 4388 4389 @param sigma: The sigma parameter of the Gaussian. I{(float)} 4390 """ 4391 pass
4392
4393 - def column_gaussian(sigma):
4394 """ 4395 Filters a data field with a Gaussian filter in vertical direction. 4396 4397 The Gausian is normalized, i.e. it is sum-preserving. 4398 4399 @since: 2.54 4400 4401 @param sigma: The sigma parameter of the Gaussian. I{(float)} 4402 """ 4403 pass
4404
4405 - def filter_minimum(size):
4406 """ 4407 Filters a data field with minimum filter. 4408 4409 This method uses a simple square kernel. Use the general function L{DataField.area_filter_min_max}() to perform 4410 filtering with a different kernel, for instance circular. 4411 4412 @param size: Neighbourhood size for minimum search. I{(int)} 4413 """ 4414 pass
4415
4416 - def area_filter_minimum(size, col, row, width, height):
4417 """ 4418 Filters a rectangular part of a data field with minimum filter. 4419 4420 This operation is often called erosion filter. 4421 4422 This method uses a simple square kernel. Use the general function L{DataField.area_filter_min_max}() to perform 4423 filtering with a different kernel, for instance circular. 4424 4425 @param size: Neighbourhood size for minimum search. I{(int)} 4426 @param col: Upper-left column coordinate. I{(int)} 4427 @param row: Upper-left row coordinate. I{(int)} 4428 @param width: Area width (number of columns). I{(int)} 4429 @param height: Area height (number of rows). I{(int)} 4430 """ 4431 pass
4432
4433 - def filter_maximum(size):
4434 """ 4435 Filters a data field with maximum filter. 4436 4437 This method uses a simple square kernel. Use the general function L{DataField.area_filter_min_max}() to perform 4438 filtering with a different kernel, for instance circular. 4439 4440 @param size: Neighbourhood size for maximum search. I{(int)} 4441 """ 4442 pass
4443
4444 - def area_filter_maximum(size, col, row, width, height):
4445 """ 4446 Filters a rectangular part of a data field with maximum filter. 4447 4448 This operation is often called dilation filter. 4449 4450 This method uses a simple square kernel. Use the general function L{DataField.area_filter_min_max}() to perform 4451 filtering with a different kernel, for instance circular. 4452 4453 @param size: Neighbourhood size for maximum search. I{(int)} 4454 @param col: Upper-left column coordinate. I{(int)} 4455 @param row: Upper-left row coordinate. I{(int)} 4456 @param width: Area width (number of columns). I{(int)} 4457 @param height: Area height (number of rows). I{(int)} 4458 """ 4459 pass
4460
4461 - def area_filter_min_max(kernel, filtertype, col, row, width, height):
4462 """ 4463 Applies a morphological operation with a flat structuring element to a part of a data field. 4464 4465 Morphological operations with flat structuring elements can be expressed using minimum (erosion) and maximum 4466 (dilation) filters that are the basic operations this function can perform. 4467 4468 The kernel field is a mask that defines the shape of the flat structuring element. It is reflected for all maximum 4469 operations (dilation). For symmetrical kernels this does not matter. You can use 4470 L{DataField.elliptic_area_fill}() to create a true circular (or elliptical) kernel. 4471 4472 The kernel is implicitly centered, i.e. it will be applied symmetrically to avoid unexpected data movement. 4473 Even-sized kernels (generally not recommended) will extend farther towards the top left image corner for minimum 4474 (erosion) and towards the bottom right corner for maximum (dilation) operations due to the reflection. If you need 4475 off-center structuring elements you can add empty rows or columns to one side of the kernel to counteract the 4476 symmetrisation. 4477 4478 The operation is linear-time in kernel size for any convex kernel. Note L{DataField.area_filter_minimum}() and 4479 L{DataField.area_filter_maximum}(), which are limited to square structuring elements, are much faster for large 4480 sizes of the squares. 4481 4482 The exterior is always handled as B{C{EXTERIOR_BORDER_EXTEND}}. 4483 4484 @since: 2.43 4485 4486 @param kernel: Data field defining the flat structuring element. I{(L{DataField})} 4487 @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})} 4488 @param col: Upper-left column coordinate. I{(int)} 4489 @param row: Upper-left row coordinate. I{(int)} 4490 @param width: Area width (number of columns). I{(int)} 4491 @param height: Area height (number of rows). I{(int)} 4492 """ 4493 pass
4494
4495 - def area_filter_disc_asf(radius, closing, col, row, width, height):
4496 """ 4497 Applies an alternating sequential morphological filter with a flat disc structuring element to a part of a data 4498 field. 4499 4500 Alternating sequential filter is a filter consisting of repeated opening and closing (or closing and opening) with 4501 progressively larger structuring elements. This function performs such filtering for sequence of structuring 4502 elements consisting of true Euclidean discs with increasing radii. The largest disc in the sequence fits into 4503 a (2B{C{size}} + 1) × (2B{C{size}} + 1) square. 4504 4505 @since: 2.43 4506 4507 @param radius: Maximum radius of the circular structuring element, in pixels. For radius 0 and smaller the filter is 4508 no-op. I{(int)} 4509 @param closing: B{C{True}} requests an opening-closing filter (i.e. ending with closing), B{C{False}} requests a closing-opening 4510 filter (i.e. ending with opening). I{(bool)} 4511 @param col: Upper-left column coordinate. I{(int)} 4512 @param row: Upper-left row coordinate. I{(int)} 4513 @param width: Area width (number of columns). I{(int)} 4514 @param height: Area height (number of rows). I{(int)} 4515 """ 4516 pass
4517
4518 - def area_filter_kth_rank(kernel, col, row, width, height, k):
4519 """ 4520 Applies a B{C{k}}-th rank filter to a part of a data field. 4521 4522 Pass half the number of non-zero values in B{C{kernel}} as B{C{k}} for a median filter. 4523 4524 The kernel field is a mask that defines the shape of the kernel. You can use L{DataField.elliptic_area_fill}() 4525 to create a true circular (or elliptical) kernel. The kernel must be non-empty. 4526 4527 The kernel is implicitly centered, i.e. it will be applied symmetrically to avoid unexpected data movement. 4528 Even-sized kernels (generally not recommended) will extend farther towards the top left image corner for minimum 4529 (erosion) and towards the bottom right corner for maximum (dilation) operations due to the reflection. If you need 4530 off-center structuring elements you can add empty rows or columns to one side of the kernel to counteract the 4531 symmetrisation. 4532 4533 The exterior is always handled as B{C{EXTERIOR_BORDER_EXTEND}}. 4534 4535 If the operation is aborted the contents of B{C{data_field}} is untouched. 4536 4537 @since: 2.51 4538 4539 @param kernel: Data field defining the kernel shape. I{(L{DataField})} 4540 @param col: Upper-left column coordinate. I{(int)} 4541 @param row: Upper-left row coordinate. I{(int)} 4542 @param width: Area width (number of columns). I{(int)} 4543 @param height: Area height (number of rows). I{(int)} 4544 @param k: Rank of the value to store as the output (from lowest to highest). I{(int)} 4545 @return: Tuple consisting of 2 values (B{C{value}}, B{C{set_fraction}}). (I{(bool)}, I{(SkipArg)}) 4546 """ 4547 return None, None
4548
4549 - def area_filter_trimmed_mean(kernel, col, row, width, height, nlowest, nhighest):
4550 """ 4551 Applies a trimmed mean filter to a part of a data field. 4552 4553 At least one value must remain after the trimming, i.e. B{C{nlowest}} + B{C{nhighest}} must be smaller than the number of 4554 non-zero values in B{C{kernel}}. Usually one passes the same number as both B{C{nlowest}} and B{C{nhighest}}, but it is not 4555 a requirement. 4556 4557 The kernel field is a mask that defines the shape of the kernel. You can use L{DataField.elliptic_area_fill}() 4558 to create a true circular (or elliptical) kernel. The kernel must be non-empty. 4559 4560 The kernel is implicitly centered, i.e. it will be applied symmetrically to avoid unexpected data movement. 4561 Even-sized kernels (generally not recommended) will extend farther towards the top left image corner for minimum 4562 (erosion) and towards the bottom right corner for maximum (dilation) operations due to the reflection. If you need 4563 off-center structuring elements you can add empty rows or columns to one side of the kernel to counteract the 4564 symmetrisation. 4565 4566 The exterior is always handled as B{C{EXTERIOR_BORDER_EXTEND}}. 4567 4568 If the operation is aborted the contents of B{C{data_field}} is untouched. 4569 4570 @since: 2.53 4571 4572 @param kernel: Data field defining the kernel shape. I{(L{DataField})} 4573 @param col: Upper-left column coordinate. I{(int)} 4574 @param row: Upper-left row coordinate. I{(int)} 4575 @param width: Area width (number of columns). I{(int)} 4576 @param height: Area height (number of rows). I{(int)} 4577 @param nlowest: The number of lowest values to discard. I{(int)} 4578 @param nhighest: The number of highest values to discard. I{(int)} 4579 @return: Tuple consisting of 2 values (B{C{value}}, B{C{set_fraction}}). (I{(bool)}, I{(SkipArg)}) 4580 """ 4581 return None, None
4582
4583 - def filter_rms(size):
4584 """ 4585 Filters a data field with RMS filter. 4586 4587 @param size: Area size. I{(int)} 4588 """ 4589 pass
4590
4591 - def area_filter_rms(size, col, row, width, height):
4592 """ 4593 Filters a rectangular part of a data field with RMS filter of size B{C{size}}. 4594 4595 RMS filter computes root mean square in given area. 4596 4597 @param size: Area size. I{(int)} 4598 @param col: Upper-left column coordinate. I{(int)} 4599 @param row: Upper-left row coordinate. I{(int)} 4600 @param width: Area width (number of columns). I{(int)} 4601 @param height: Area height (number of rows). I{(int)} 4602 """ 4603 pass
4604
4605 - def filter_kuwahara():
4606 """ 4607 Filters a data field with Kuwahara filter. 4608 4609 """ 4610 pass
4611
4612 - def area_filter_kuwahara(col, row, width, height):
4613 """ 4614 Filters a rectangular part of a data field with a Kuwahara (edge-preserving smoothing) filter. 4615 4616 @param col: Upper-left column coordinate. I{(int)} 4617 @param row: Upper-left row coordinate. I{(int)} 4618 @param width: Area width (number of columns). I{(int)} 4619 @param height: Area height (number of rows). I{(int)} 4620 """ 4621 pass
4622
4623 - def filter_canny(threshold):
4624 """ 4625 Filters a rectangular part of a data field with canny edge detector filter. 4626 4627 @param threshold: Slope detection threshold (range 0..1). I{(float)} 4628 """ 4629 pass
4630
4631 - def shade(target_field, theta, phi):
4632 """ 4633 Shades a data field. 4634 4635 @param target_field: A data field to put the shade to. It will be resized to 4636 match B{C{data_field}}. I{(L{DataField})} 4637 @param theta: Shading angle (in radians, from north pole). I{(float)} 4638 @param phi: Shade orientation in xy plane (in radians, counterclockwise). I{(float)} 4639 """ 4640 pass
4641
4642 - def filter_harris(y_gradient, result, neighbourhood, alpha):
4643 """ 4644 Applies Harris corner detection filter to a pair of gradient data fields. 4645 4646 All passed data field must have the same size. 4647 4648 @param y_gradient: Data field with pre-calculated vertical derivative. I{(L{DataField})} 4649 @param result: Data field for the result. I{(L{DataField})} 4650 @param neighbourhood: Neighbourhood size. I{(int)} 4651 @param alpha: Sensitivity paramter (the squared trace is multiplied by it). I{(float)} 4652 """ 4653 pass
4654
4655 - def deconvolve_regularized(operand, out, sigma):
4656 """ 4657 Performs deconvolution of a data field using a simple regularization. 4658 4659 The operation can be used to deblur an image or conversely recover the point spread function from ideal response 4660 image. 4661 4662 Convolving the result with the operand using L{DataField.area_ext_convolve}() with B{C{as_integral}}=B{C{True}} will 4663 recover (approximately) the image. This means the deconvolution assumes continous convolution, not discrete sums. 4664 Note that for the latter case this means the point spread function will be centered in B{C{out}}. 4665 4666 For recovery of transfer function, B{C{dfield}} and B{C{operand}} should be windowed beforehand if they are not periodic. 4667 4668 @since: 2.51 4669 4670 @param operand: One of the factors entering the convolution resulting in B{C{dfield}}. It must have the same dimensions as 4671 B{C{dfield}} and it is assumed it has also the same physical size. I{(L{DataField})} 4672 @param out: Data field where to put the result into. It will be resized to match B{C{dfield}}. It can also be B{C{dfield}} 4673 itself. I{(L{DataField})} 4674 @param sigma: Regularization parameter. I{(float)} 4675 """ 4676 pass
4677
4678 - def deconvolve_psf_leastsq(operand, out, sigma, border):
4679 """ 4680 Performs reconstruction of transfer function from convolved and ideal sharp images. 4681 4682 The transfer function is reconstructed by solving the corresponding least squares problem. This method is suitable 4683 when the dimensions of B{C{out}} are much smaller than the images. 4684 4685 Since the method accumulates errors close to edges, they can be removed within the procedure by reconstructing 4686 a slightly larger transfer function and then cutting the result. The extension is given by B{C{border}}, typical 4687 suitable values are 2 or 3. 4688 4689 Convolving the result with the operand using L{DataField.area_ext_convolve}() with B{C{as_integral}}=B{C{True}} will 4690 recover (approximately) the image. This means the deconvolution assumes continous convolution, not discrete sums. 4691 Note that for the latter case this means the point spread function will be centered in B{C{out}}. 4692 4693 Fields B{C{dfield}} and B{C{operand}} should be windowed beforehand if they are not periodic. 4694 4695 @since: 2.52 4696 4697 @param operand: Ideal sharp measurement (before convolution). It must have the same dimensions as B{C{dfield}} and it is 4698 assumed it has also the same physical size. I{(L{DataField})} 4699 @param out: Output field for the transfer function. Its dimensions are preserved and determine the transfer function 4700 support. It must be smaller than half of B{C{dfield}}. I{(L{DataField})} 4701 @param sigma: Regularization parameter. I{(float)} 4702 @param border: Number of pixel to extend and cut off the transfer function. I{(int)} 4703 """ 4704 pass
4705
4707 """ 4708 Finds regularization parameter for point spread function calculation using regularized deconvolution. 4709 4710 The estimated value should be suitable for reconstruction of the point spread function using 4711 L{DataField.deconvolve_regularized}(). The estimate is only suitable for PSF, it does not work for image 4712 sharpening using a known PSF. 4713 4714 @since: 2.51 4715 4716 @param ideal: A data field with ideal sharp data. I{(L{DataField})} 4717 @return: Estimated regularization parameter. I{(float)} 4718 """ 4719 return None
4720
4721 - def find_regularization_sigma_leastsq(ideal, width, height, border):
4722 """ 4723 Finds regularization parameter for point spread function calculation using least squares method. 4724 4725 The estimated value should be suitable for reconstruction of the point spread function using 4726 L{DataField.deconvolve_psf_leastsq}(). 4727 4728 @since: 2.52 4729 4730 @param ideal: A data field with ideal sharp data. I{(L{DataField})} 4731 @param width: Horizontal size of transfer function support. I{(int)} 4732 @param height: Vertical size of transfer function support. I{(int)} 4733 @param border: Number of pixel to extend and cut off the transfer function. I{(int)} 4734 @return: Estimated regularization parameter. I{(float)} 4735 """ 4736 return None
4737
4738 - def fractal_partitioning(xresult, yresult, interpolation):
4739 """ 4740 Computes data for log-log plot by partitioning. 4741 4742 Data lines B{C{xresult}} and B{C{yresult}} will be resized to the output size and they will contain corresponding values at 4743 each position. 4744 4745 @param xresult: Data line to store x-values for log-log plot to. I{(L{DataLine})} 4746 @param yresult: Data line to store y-values for log-log plot to. I{(L{DataLine})} 4747 @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})} 4748 """ 4749 pass
4750
4751 - def fractal_cubecounting(xresult, yresult, interpolation):
4752 """ 4753 Computes data for log-log plot by cube counting. 4754 4755 Data lines B{C{xresult}} and B{C{yresult}} will be resized to the output size and they will contain corresponding values at 4756 each position. 4757 4758 @param xresult: Data line to store x-values for log-log plot to. I{(L{DataLine})} 4759 @param yresult: Data line to store y-values for log-log plot to. I{(L{DataLine})} 4760 @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})} 4761 """ 4762 pass
4763
4764 - def fractal_triangulation(xresult, yresult, interpolation):
4765 """ 4766 Computes data for log-log plot by triangulation. 4767 4768 Data lines B{C{xresult}} and B{C{yresult}} will be resized to the output size and they will contain corresponding values at 4769 each position. 4770 4771 @param xresult: Data line to store x-values for log-log plot to. I{(L{DataLine})} 4772 @param yresult: Data line to store y-values for log-log plot to. I{(L{DataLine})} 4773 @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})} 4774 """ 4775 pass
4776
4777 - def fractal_psdf(xresult, yresult, interpolation):
4778 """ 4779 Computes data for log-log plot by spectral density method. 4780 4781 Data lines B{C{xresult}} and B{C{yresult}} will be resized to the output size and they will contain corresponding values at 4782 each position. 4783 4784 @param xresult: Data line to store x-values for log-log plot to. I{(L{DataLine})} 4785 @param yresult: Data line to store y-values for log-log plot to. I{(L{DataLine})} 4786 @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})} 4787 """ 4788 pass
4789
4790 - def fractal_correction(mask_field, interpolation):
4791 """ 4792 Replaces data under mask with interpolated values using fractal interpolation. 4793 4794 @param mask_field: Mask of places to be corrected. I{(L{DataField})} 4795 @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})} 4796 """ 4797 pass
4798
4799 - def grains_mark_curvature(grain_field, threshval, below):
4800 """ 4801 Marks data that are above/below curvature threshold. 4802 4803 @param grain_field: Data field to store the resulting mask to. I{(L{DataField})} 4804 @param threshval: Relative curvature threshold, in percents. I{(float)} 4805 @param below: If B{C{True}}, data below threshold are marked, otherwise data above threshold are marked. I{(bool)} 4806 """ 4807 pass
4808
4809 - def grains_mark_watershed(grain_field, locate_steps, locate_thresh, locate_dropsize, wshed_steps, wshed_dropsize, prefilter, below):
4810 """ 4811 Performs watershed algorithm. 4812 4813 @param grain_field: Result of marking (mask). I{(L{DataField})} 4814 @param locate_steps: Locating algorithm steps. I{(int)} 4815 @param locate_thresh: Locating algorithm threshold. I{(int)} 4816 @param locate_dropsize: Locating drop size. I{(float)} 4817 @param wshed_steps: Watershed steps. I{(int)} 4818 @param wshed_dropsize: Watershed drop size. I{(float)} 4819 @param prefilter: Use prefiltering. I{(bool)} 4820 @param below: If B{C{True}}, valleys are marked, otherwise mountains are marked. I{(bool)} 4821 """ 4822 pass
4823
4824 - def grains_remove_grain(col, row):
4825 """ 4826 Removes one grain at given position. 4827 4828 4829 @param col: Column inside a grain. I{(int)} 4830 @param row: Row inside a grain. I{(int)} 4831 @return: B{C{True}} if a grain was actually removed, i.e. (B{C{col}},B{C{row}}) was inside a grain. I{(bool)} 4832 """ 4833 return None
4834
4835 - def grains_extract_grain(col, row):
4836 """ 4837 Removes all grains except that one at given position. 4838 4839 If there is no grain at (B{C{col}}, B{C{row}}), all grains are removed. 4840 4841 4842 @param col: Column inside a grain. I{(int)} 4843 @param row: Row inside a grain. I{(int)} 4844 @return: B{C{True}} if a grain remained (i.e., (B{C{col}},B{C{row}}) was inside a grain). I{(bool)} 4845 """ 4846 return None
4847
4848 - def grains_remove_by_number(number):
4849 """ 4850 Removes grain identified by B{C{number}}. 4851 4852 @since: 2.35 4853 4854 @param number: Grain number was filled by L{DataField.number_grains}(). I{(int)} 4855 """ 4856 pass
4857
4858 - def grains_remove_by_size(size):
4859 """ 4860 Removes all grains below specified area. 4861 4862 @param size: Grain area threshold, in square pixels. I{(int)} 4863 """ 4864 pass
4865
4866 - def grains_remove_by_height(grain_field, threshval, below):
4867 """ 4868 Removes grains that are higher/lower than given threshold value. 4869 4870 @param grain_field: Field of marked grains (mask) I{(L{DataField})} 4871 @param threshval: Relative height threshold, in percents. I{(float)} 4872 @param below: If B{C{True}}, grains below threshold are removed, otherwise grains above threshold are removed. I{(bool)} 4873 """ 4874 pass
4875
4877 """ 4878 Removes all grains that touch field borders. 4879 4880 @since: 2.30 4881 4882 """ 4883 pass
4884
4885 - def grains_watershed_init(grain_field, locate_steps, locate_thresh, locate_dropsize, wshed_steps, wshed_dropsize, prefilter, below):
4886 """ 4887 Initializes the watershed algorithm. 4888 4889 This iterator reports its state as B{C{WatershedStateType}}. 4890 4891 4892 @param grain_field: Result of marking (mask). I{(L{DataField})} 4893 @param locate_steps: Locating algorithm steps. I{(int)} 4894 @param locate_thresh: Locating algorithm threshold. I{(int)} 4895 @param locate_dropsize: Locating drop size. I{(float)} 4896 @param wshed_steps: Watershed steps. I{(int)} 4897 @param wshed_dropsize: Watershed drop size. I{(float)} 4898 @param prefilter: Use prefiltering. I{(bool)} 4899 @param below: If B{C{True}}, valleys are marked, otherwise mountains are marked. I{(bool)} 4900 @return: A new watershed iterator. I{(ComputationState*)} 4901 """ 4902 return None
4903
4904 - def grains_mark_height(grain_field, threshval, below):
4905 """ 4906 Marks data that are above/below height threshold. 4907 4908 @param grain_field: Data field to store the resulting mask to. I{(L{DataField})} 4909 @param threshval: Relative height threshold, in percents. I{(float)} 4910 @param below: If B{C{True}}, data below threshold are marked, otherwise data above threshold are marked. I{(bool)} 4911 """ 4912 pass
4913
4914 - def grains_mark_slope(grain_field, threshval, below):
4915 """ 4916 Marks data that are above/below slope threshold. 4917 4918 @param grain_field: Data field to store the resulting mask to. I{(L{DataField})} 4919 @param threshval: Relative slope threshold, in percents. I{(float)} 4920 @param below: If B{C{True}}, data below threshold are marked, otherwise data above threshold are marked. I{(bool)} 4921 """ 4922 pass
4923
4924 - def otsu_threshold():
4925 """ 4926 Finds Otsu's height threshold for a data field. 4927 4928 The Otsu's threshold is optimal in the sense that it minimises the inter-class variances of two classes of pixels: 4929 above and below theshold. 4930 4931 @since: 2.37 4932 4933 @return: I{(float)} 4934 """ 4935 return None
4936
4937 - def grains_add(add_field):
4938 """ 4939 Adds B{C{add_field}} grains to B{C{grain_field}}. 4940 4941 Note: This function is equivalent to 4942 |[ 4943 L{DataField.max_of_fields}(grain_field, grain_field, add_field); 4944 ]| 4945 4946 @param add_field: Field of marked grains (mask) to be added. I{(L{DataField})} 4947 """ 4948 pass
4949
4950 - def grains_intersect(intersect_field):
4951 """ 4952 Performs intersection betweet two grain fields, result is stored in B{C{grain_field}}. 4953 4954 Note: This function is equivalent to 4955 |[ 4956 L{DataField.min_of_fields}(grain_field, grain_field, intersect_field); 4957 ]| 4958 4959 @param intersect_field: Field of marked grains (mask). I{(L{DataField})} 4960 """ 4961 pass
4962
4963 - def grains_invert():
4964 """ 4965 Inverts a data field representing a mask. 4966 4967 All non-positive values are transformed to 1.0. All positive values are transformed to 0.0. 4968 4969 @since: 2.43 4970 4971 """ 4972 pass
4973
4974 - def grains_autocrop(symmetrically):
4975 """ 4976 Removes empty border rows and columns from a data field representing a mask. 4977 4978 If there are border rows and columns filled completely with non-positive values the size of the data field is 4979 reduced, removing these rows. The parameter B{C{symmetrically}} controls whether the size reduction is maximum possible 4980 or symmetrical. 4981 4982 When there is no positive value in the field the field size is reduced to the smallest possible. This means 1x1 4983 for B{C{symmetrical}} being B{C{False}} and even original dimensions to 2 for B{C{symmetrical}} being B{C{True}}. 4984 4985 @since: 2.43 4986 4987 @param symmetrically: B{C{True}} to remove borders symmetrically, i.e the same number of pixels from left and right, and also 4988 top and bottom. B{C{False}} to remove as many empty rows and columns as possible. I{(bool)} 4989 @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)}) 4990 """ 4991 return None, None, None, None, None
4992
4993 - def area_grains_tgnd(target_line, col, row, width, height, below, nstats):
4994 """ 4995 Calculates threshold grain number distribution. 4996 4997 This function is a simple L{DataField.area_grains_tgnd_range}() that calculates the distribution in the full 4998 range. 4999 5000 @param target_line: A data line to store the distribution to. It will be resampled to the requested width. I{(L{DataLine})} 5001 @param col: Upper-left column coordinate. I{(int)} 5002 @param row: Upper-left row coordinate. I{(int)} 5003 @param width: Area width (number of columns). I{(int)} 5004 @param height: Area height (number of rows). I{(int)} 5005 @param below: If B{C{True}}, valleys are marked, otherwise mountains are marked. I{(bool)} 5006 @param nstats: The number of samples to take on the distribution function. If nonpositive, a suitable resolution is 5007 determined automatically. I{(int)} 5008 """ 5009 pass
5010
5011 - def area_grains_tgnd_range(target_line, col, row, width, height, min, max, below, nstats):
5012 """ 5013 Calculates threshold grain number distribution in given height range. 5014 5015 This is the number of grains for each of B{C{nstats}} equidistant height threshold levels. For large B{C{nstats}} this 5016 function is much faster than the equivalent number of L{DataField.grains_mark_height}() calls. 5017 5018 @param target_line: A data line to store the distribution to. It will be resampled to the requested width. I{(L{DataLine})} 5019 @param col: Upper-left column coordinate. I{(int)} 5020 @param row: Upper-left row coordinate. I{(int)} 5021 @param width: Area width (number of columns). I{(int)} 5022 @param height: Area height (number of rows). I{(int)} 5023 @param min: Minimum threshold value. I{(float)} 5024 @param max: Maximum threshold value. I{(float)} 5025 @param below: If B{C{True}}, valleys are marked, otherwise mountains are marked. I{(bool)} 5026 @param nstats: The number of samples to take on the distribution function. If nonpositive, a suitable resolution is 5027 determined automatically. I{(int)} 5028 """ 5029 pass
5030
5031 - def grains_splash_water(minima, locate_steps, locate_dropsize):
5032 pass
5033
5035 """ 5036 Performs Euclidean distance transform of a data field with grains. 5037 5038 Each non-zero value will be replaced with Euclidean distance to the grain 5039 boundary, measured in pixels. 5040 5041 See also L{DataField.grain_simple_dist_trans}() for simple distance 5042 transforms such as city-block or chessboard. 5043 5044 @since: 2.36 5045 5046 """ 5047 pass
5048
5049 - def grain_simple_dist_trans(dtype, from_border):
5050 """ 5051 Performs a distance transform of a data field with grains. 5052 5053 Each non-zero value will be replaced with a distance to the grain boundary, 5054 measured in pixels. 5055 5056 Note this function can calculate the true Euclidean distance transform 5057 only since 2.43. Use L{DataField.grain_distance_transform}() for the EDT 5058 if you need compatibility with older versions. 5059 5060 @since: 2.41 5061 5062 @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})} 5063 @param from_border: B{C{True}} to consider image edges to be grain boundaries. I{(bool)} 5064 """ 5065 pass
5066
5067 - def grains_shrink(amount, dtype, from_border):
5068 """ 5069 Erodes a data field containing mask by specified amount using a distance 5070 measure. 5071 5072 Non-zero pixels in B{C{data_field}} will be replaced with zeroes if they are not 5073 farther than B{C{amount}} from the grain boundary as defined by B{C{dtype}}. 5074 5075 @since: 2.43 5076 5077 @param amount: How much the grains should be reduced, in pixels. It is inclusive, 5078 i.e. pixels that are B{C{amount}} far from the border will be removed. I{(float)} 5079 @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})} 5080 @param from_border: B{C{True}} to consider image edges to be grain boundaries. 5081 B{C{False}} to reduce grains touching field boundaries only along 5082 the boundaries. I{(bool)} 5083 """ 5084 pass
5085
5086 - def grains_grow(amount, dtype, prevent_merging):
5087 """ 5088 Dilates a data field containing mask by specified amount using a distance 5089 measure. 5090 5091 Non-positive pixels in B{C{data_field}} will be replaced with ones if they are 5092 not farther than B{C{amount}} from the grain boundary as defined by B{C{dtype}}. 5093 5094 @since: 2.43 5095 5096 @param amount: How much the grains should be expanded, in pixels. It is 5097 inclusive, i.e. exterior pixels that are B{C{amount}} far from the 5098 border will be filled. I{(float)} 5099 @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})} 5100 @param prevent_merging: B{C{True}} to prevent grain merging, i.e. the growth stops 5101 where two grains would merge. B{C{False}} to simply expand the 5102 grains, without regard to grain connectivity. I{(bool)} 5103 """ 5104 pass
5105
5106 - def grains_thin():
5107 """ 5108 Performs thinning of a data field containing mask. 5109 5110 The result of thinning is a ‘skeleton’ mask consisting of single-pixel thin 5111 lines. 5112 5113 @since: 2.48 5114 5115 """ 5116 pass
5117
5118 - def fill_voids(nonsimple):
5119 """ 5120 Fills voids in grains in a data field representing a mask. 5121 5122 Voids in grains are zero pixels in B{C{data_field}} from which no path exists through other zero pixels to the field 5123 boundary. The paths are considered in 8-connectivity because grains themselves are considered in 4-connectivity. 5124 5125 @since: 2.37 5126 5127 @param nonsimple: Pass B{C{True}} to fill also voids that are not simple-connected (e.g. ring-like). This can result in grain 5128 merging if a small grain is contained within a void. Pass B{C{False}} to fill only simple-connected grains. I{(bool)} 5129 @return: B{C{True}} if any voids were filled at all, B{C{False}} if no change was made. I{(bool)} 5130 """ 5131 return None
5132
5133 - def mark_extrema(extrema, maxima):
5134 """ 5135 Marks local maxima or minima in a two-dimensional field. 5136 5137 Local (or regional) maximum is a contiguous set of pixels that have the same 5138 value and this value is sharply greater than the value of any pixel touching 5139 the set. A minimum is defined analogously. A field filled with a single 5140 value is considered to have neither minimum nor maximum. 5141 5142 @since: 2.37 5143 5144 @param extrema: Target field for the extrema mask. I{(L{DataField})} 5145 @param maxima: B{C{True}} to mark maxima, B{C{False}} to mark minima. I{(bool)} 5146 """ 5147 pass
5148
5149 - def hough_line(x_gradient, y_gradient, result, hwidth, overlapping):
5150 pass
5151
5152 - def hough_circle(x_gradient, y_gradient, result, radius):
5153 pass
5154
5155 - def hough_line_strenghten(x_gradient, y_gradient, hwidth, threshold):
5156 pass
5157
5158 - def hough_circle_strenghten(x_gradient, y_gradient, radius, threshold):
5159 pass
5160
5161 - def hough_polar_line_to_datafield(rho, theta):
5162 return None, None, None, None
5163
5164 - def zoom_fft(isrc, rdest, idest, mx, my, fx0, fy0, fx1, fy1):
5165 """ 5166 Computes Zoom FFT of a data field. 5167 5168 The output is DFTs, but computed for an arbitrary 2D Cartesian grid of frequencies along B{C{x}} and B{C{y}}. The frequencies 5169 do not have to be in any relation to the data sampling step. 5170 5171 The top-left pixel of output corresponds exactly to (B{C{fx0}},B{C{fy0}}) and the bottom right exactly to (B{C{fx1}},B{C{fy1}}). So 5172 the frequency sampling steps will be (B{C{fx1}} − B{C{fx0}})/(B{C{mx}} − 1) and (B{C{fy1}} − B{C{fy0}})/(B{C{my}} − 1), instead of the more usual 5173 division by B{C{mx}} and B{C{my}}. To follow the usual Gwyddion conventions, the output data field real size will be (B{C{fx1}} 5174 − B{C{fx0}})/(B{C{mx}} − 1)*B{C{mx}} along B{C{x}}, and similarly along B{C{y}}. If it seems confusing, just take the output as indexed by 5175 integers and work with that. 5176 5177 Frequency step of one corresponds to the normal DFT frequency step. Therefore, passing B{C{fx0}}=0, B{C{fx1}}=B{C{xres}}–1, 5178 B{C{fy0}}=0, B{C{fy1}}=B{C{yres}}–1 (where B{C{rsrc}} has B{C{xres}} × B{C{yres}} points), B{C{mx}}=B{C{xres}} and B{C{my}}=B{C{yres}} reproduces the usual DFT, 5179 except more slowly. The result is normalised as raw FFT and the units of the output data fields are unchanged. 5180 5181 The transform direction is always forward. Windowing or other preprocessing need to be done separately beforehand. 5182 They would be usually once, but followed by any number of (Zoom) FFTs. 5183 5184 @since: 2.62 5185 5186 @param isrc: Imaginary input data field. It can be B{C{None}} for real-to-complex transform. I{(L{DataField})} 5187 @param rdest: Real output data field. It will be resized to B{C{mx}} × B{C{my}} samples. I{(L{DataField})} 5188 @param idest: Imaginary output data field. It will be resized to B{C{mx}} × B{C{my}} samples. I{(L{DataField})} 5189 @param mx: The number of horizontal frequencies to compute. It must be at least 2. I{(int)} 5190 @param my: The number of vertical frequencies to compute. It must be at least 2. I{(int)} 5191 @param fx0: The first horizontal spatial frequency, measured in DFT frequency steps. I{(float)} 5192 @param fy0: The first vertical spatial frequency, measured in DFT frequency steps. I{(float)} 5193 @param fx1: The last horizontal spatial frequency, measured in DFT frequency steps. I{(float)} 5194 @param fy1: The last vetical spatial frequency, measured in DFT frequency steps. I{(float)} 5195 """ 5196 pass
5197
5198 - def fft1d(iin, rout, iout, orientation, windowing, direction, interpolation, preserverms, level):
5199 """ 5200 Transforms all rows or columns in a data field with Fast Fourier Transform. 5201 5202 If requested a windowing and/or leveling is applied to preprocess data to obtain reasonable results. 5203 5204 @param iin: Imaginary input data field. It can be B{C{None}} for real-to-complex transform which can be somewhat faster than 5205 complex-to-complex transform. I{(L{DataField})} 5206 @param rout: Real output data field, it will be resized to area size. I{(L{DataField})} 5207 @param iout: Imaginary output data field, it will be resized to area size. I{(L{DataField})} 5208 @param orientation: Orientation: pass B{C{ORIENTATION_HORIZONTAL}} to transform rows, B{C{ORIENTATION_VERTICAL}} to 5209 transform columns. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 5210 @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})} 5211 @param direction: FFT direction. Expected values: C{B{TRANSFORM_DIRECTION_BACKWARD}}, C{B{TRANSFORM_DIRECTION_FORWARD}}. I{(L{TransformDirection})} 5212 @param interpolation: Interpolation type. 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})} 5213 @param preserverms: B{C{True}} to preserve RMS while windowing. I{(bool)} 5214 @param level: 0 to perform no leveling, 1 to subtract mean value, 2 to subtract line (the number can be interpreted as 5215 the first polynomial degree to keep, but only the enumerated three values are available). I{(int)} 5216 """ 5217 pass
5218
5219 - def area_1dfft(iin, rout, iout, col, row, width, height, orientation, windowing, direction, interpolation, preserverms, level):
5220 """ 5221 Transforms all rows or columns in a rectangular part of a data field with Fast Fourier Transform. 5222 5223 If requested a windowing and/or leveling is applied to preprocess data to obtain reasonable results. 5224 5225 @param iin: Imaginary input data field. It can be B{C{None}} for real-to-complex transform which can be somewhat faster than 5226 complex-to-complex transform. I{(L{DataField})} 5227 @param rout: Real output data field, it will be resized to area size. I{(L{DataField})} 5228 @param iout: Imaginary output data field, it will be resized to area size. I{(L{DataField})} 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), must be at least 2 for horizontal transforms. I{(int)} 5232 @param height: Area height (number of rows), must be at least 2 for vertical transforms. I{(int)} 5233 @param orientation: Orientation: pass B{C{ORIENTATION_HORIZONTAL}} to transform rows, B{C{ORIENTATION_VERTICAL}} to 5234 transform columns. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 5235 @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})} 5236 @param direction: FFT direction. Expected values: C{B{TRANSFORM_DIRECTION_BACKWARD}}, C{B{TRANSFORM_DIRECTION_FORWARD}}. I{(L{TransformDirection})} 5237 @param interpolation: Interpolation type. 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})} 5238 @param preserverms: B{C{True}} to preserve RMS while windowing. I{(bool)} 5239 @param level: 0 to perform no leveling, 1 to subtract mean value, 2 to subtract lines (the number can be interpreted as 5240 the first polynomial degree to keep, but only the enumerated three values are available). I{(int)} 5241 """ 5242 pass
5243
5244 - def fft1d_raw(iin, rout, iout, orientation, direction):
5245 """ 5246 Transforms all rows or columns in a data field with Fast Fourier Transform. 5247 5248 No leveling, windowing nor scaling is performed. 5249 5250 The normalisation of FFT is symmetrical, so transformations in both directions are unitary. 5251 5252 Since 2.8 the dimensions need not to be from the set of sizes returned by L{gwy_fft_find_nice_size}(). 5253 5254 @since: 2.1 5255 5256 @param iin: Imaginary input data field. It can be B{C{None}} for real-to-complex transform. I{(L{DataField})} 5257 @param rout: Real output data field, it will be resized to B{C{rin}} size. I{(L{DataField})} 5258 @param iout: Imaginary output data field, it will be resized to B{C{rin}} size. I{(L{DataField})} 5259 @param orientation: Orientation: pass B{C{ORIENTATION_HORIZONTAL}} to transform rows, B{C{ORIENTATION_VERTICAL}} to 5260 transform columns. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 5261 @param direction: FFT direction. Expected values: C{B{TRANSFORM_DIRECTION_BACKWARD}}, C{B{TRANSFORM_DIRECTION_FORWARD}}. I{(L{TransformDirection})} 5262 """ 5263 pass
5264
5265 - def fft2d(iin, rout, iout, windowing, direction, interpolation, preserverms, level):
5266 """ 5267 Calculates 2D Fast Fourier Transform of a rectangular a data field. 5268 5269 If requested a windowing and/or leveling is applied to preprocess data to obtain reasonable results. 5270 5271 Lateral dimensions, offsets and units are unchanged. See L{DataField.fft_postprocess}() for that. 5272 5273 @param iin: Imaginary input data field. It can be B{C{None}} for real-to-complex transform which can be somewhat faster than 5274 complex-to-complex transform. I{(L{DataField})} 5275 @param rout: Real output data field, it will be resized to area size. I{(L{DataField})} 5276 @param iout: Imaginary output data field, it will be resized to area size. I{(L{DataField})} 5277 @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})} 5278 @param direction: FFT direction. Expected values: C{B{TRANSFORM_DIRECTION_BACKWARD}}, C{B{TRANSFORM_DIRECTION_FORWARD}}. I{(L{TransformDirection})} 5279 @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})} 5280 @param preserverms: B{C{True}} to preserve RMS while windowing. I{(bool)} 5281 @param level: 0 to perform no leveling, 1 to subtract mean value, 2 to subtract plane (the number can be interpreted as 5282 the first polynomial degree to keep, but only the enumerated three values are available). I{(int)} 5283 """ 5284 pass
5285
5286 - def area_2dfft(iin, rout, iout, col, row, width, height, windowing, direction, interpolation, preserverms, level):
5287 """ 5288 Calculates 2D Fast Fourier Transform of a rectangular area of a data field. 5289 5290 If requested a windowing and/or leveling is applied to preprocess data to 5291 obtain reasonable results. 5292 5293 @param iin: Imaginary input data field. It can be B{C{None}} for real-to-complex transform which can be somewhat faster than 5294 complex-to-complex transform. I{(L{DataField})} 5295 @param rout: Real output data field, it will be resized to area size. I{(L{DataField})} 5296 @param iout: Imaginary output data field, it will be resized to area size. I{(L{DataField})} 5297 @param col: Upper-left column coordinate. I{(int)} 5298 @param row: Upper-left row coordinate. I{(int)} 5299 @param width: Area width (number of columns), must be at least 2. I{(int)} 5300 @param height: Area height (number of rows), must be at least 2. I{(int)} 5301 @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})} 5302 @param direction: FFT direction. Expected values: C{B{TRANSFORM_DIRECTION_BACKWARD}}, C{B{TRANSFORM_DIRECTION_FORWARD}}. I{(L{TransformDirection})} 5303 @param interpolation: Interpolation type. 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})} 5304 @param preserverms: B{C{True}} to preserve RMS while windowing. I{(bool)} 5305 @param level: 0 to perform no leveling, 1 to subtract mean value, 2 to subtract plane (the number can be interpreted as 5306 the first polynomial degree to keep, but only the enumerated three values are available). I{(int)} 5307 """ 5308 pass
5309
5310 - def fft2d_raw(iin, rout, iout, direction):
5311 """ 5312 Calculates 2D Fast Fourier Transform of a data field. 5313 5314 No leveling, windowing nor scaling is performed. 5315 5316 The normalisation of FFT is symmetrical, so transformations in both directions are unitary. 5317 5318 Since 2.8 the dimensions need not to be from the set of sizes returned by L{gwy_fft_find_nice_size}(). 5319 5320 Lateral dimensions, offsets and units are unchanged. See L{DataField.fft_postprocess}() for that. 5321 5322 Since 2.53 B{C{iout}} can be B{C{None}} for complex-to-real transforms. Note that this means Hermitean symmetry of the input 5323 data is assumed, i.e. about half of the input is ignored. If you want to extract the real part of a complex 5324 transform, you must pass a non-B{C{None}} B{C{iout}}. 5325 5326 @since: 2.1 5327 5328 @param iin: Imaginary input data field. It can be B{C{None}} for real-to-complex transform. I{(L{DataField})} 5329 @param rout: Real output data field, it will be resized to B{C{rin}} size. I{(L{DataField})} 5330 @param iout: Imaginary output data field, it will be resized to B{C{rin}} size. I{(L{DataField})} 5331 @param direction: FFT direction. It should be B{C{TRANSFORM_DIRECTION_FORWARD}} for real-to-complex transforms and 5332 B{C{TRANSFORM_DIRECTION_BACKWARD}} for complex-to-real transforms. Expected values: C{B{TRANSFORM_DIRECTION_BACKWARD}}, C{B{TRANSFORM_DIRECTION_FORWARD}}. I{(L{TransformDirection})} 5333 """ 5334 pass
5335
5336 - def fft2d_humanize():
5337 """ 5338 Rearranges 2D FFT output to a human-friendly form. 5339 5340 Top-left, top-right, bottom-left and bottom-right sub-rectangles are swapped to obtain a humanized 2D FFT output 5341 with (0,0) in the centre. 5342 5343 More precisely, for even field dimensions the equally-sized blocks starting with the Nyquist frequency and with the 5344 zero frequency (constant component) will exchange places. For odd field dimensions, the block containing the zero 5345 frequency is one item larger and the constant component will actually end up in the exact centre. 5346 5347 Also note if both dimensions are even, this function is involutory and identical to 5348 L{DataField.fft2d_dehumanize}(). However, if any dimension is odd, L{DataField.fft2d_humanize}() and 5349 L{DataField.fft2d_dehumanize}() are different, therefore they must be paired properly. 5350 5351 """ 5352 pass
5353
5354 - def fft2d_dehumanize():
5355 """ 5356 Rearranges 2D FFT output back from the human-friendly form. 5357 5358 Top-left, top-right, bottom-left and bottom-right sub-rectangles are swapped to reshuffle a humanized 2D FFT output 5359 back into the natural positions. 5360 5361 See L{DataField.fft2d_humanize}() for discussion. 5362 5363 @since: 2.8 5364 5365 """ 5366 pass
5367
5368 - def fft_postprocess(humanize):
5369 """ 5370 Updates units, dimensions and offsets for a 2D FFT-processed field. 5371 5372 The field is expected to have dimensions and units of the original direct-space data. The lateral units and 5373 resolutions are updated to correspond to its Fourier transform. 5374 5375 The real dimensions are set for spatial frequencies, not wavevectors. For wavevector lateral coordinates, mutiply 5376 all real dimensions and offsets by 2*B{C{glib.PI}}. 5377 5378 If B{C{humanize}} is B{C{True}} L{DataField.fft2d_humanize}() is applied to the field data and the lateral offsets are set 5379 accordingly. Otherwise the offsets are cleared. 5380 5381 Value units are kept intact. 5382 5383 @since: 2.38 5384 5385 @param humanize: B{C{True}} to rearrange data to have the frequency origin in the centre. I{(bool)} 5386 """ 5387 pass
5388
5389 - def fft_filter_1d(result_field, weights, orientation, interpolation):
5390 """ 5391 Performs 1D FFT filtering of a data field. 5392 5393 @param result_field: A data field to store the result to. It will be resampled to B{C{data_field}}'s size. I{(L{DataField})} 5394 @param weights: Filter weights for the lower half of the spectrum (the other half is symmetric). Its size can be 5395 arbitrary, it will be interpolated. I{(L{DataLine})} 5396 @param orientation: Filter direction. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 5397 @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})} 5398 """ 5399 pass
5400
5401 - def fft_window(windowing):
5402 """ 5403 Performs two-dimensional windowing of a data field in preparation for 2D FFT. 5404 5405 The same windowing function is used row-wise and column-wise. 5406 5407 @since: 2.62 5408 5409 @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})} 5410 """ 5411 pass
5412
5413 - def fft_window_1d(orientation, windowing):
5414 """ 5415 Performs row-wise or column-wise windowing of a data field in preparation for 1D FFT. 5416 5417 @since: 2.62 5418 5419 @param orientation: Windowing orientation (the same as corresponding FFT orientation). Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 5420 @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})} 5421 """ 5422 pass
5423
5424 - def cwt(interpolation, scale, wtype):
5425 """ 5426 Computes a continuous wavelet transform (CWT) at given scale and using given wavelet. 5427 5428 @param interpolation: Interpolation type. 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})} 5429 @param scale: Wavelet scale. I{(float)} 5430 @param wtype: Wavelet type. Expected values: C{B{2DCWT_GAUSS}}, C{B{2DCWT_HAT}}. I{(L{2DCWTWaveletType})} 5431 """ 5432 pass
5433
5434 - def area_fit_plane(mask, col, row, width, height):
5435 """ 5436 Fits a plane through a rectangular part of a data field. 5437 5438 The coefficients can be used for plane leveling using the same relation 5439 as in L{DataField.fit_plane}(), counting indices from area top left 5440 corner. 5441 5442 @param mask: Mask of values to take values into account, or B{C{None}} for full 5443 B{C{data_field}}. Values equal to 0.0 and below cause corresponding 5444 B{C{data_field}} samples to be ignored, values equal to 1.0 and above 5445 cause inclusion of corresponding B{C{data_field}} samples. The behaviour 5446 for values inside (0.0, 1.0) is undefined (it may be specified 5447 in the future). I{(L{DataField})} 5448 @param col: Upper-left column coordinate. I{(int)} 5449 @param row: Upper-left row coordinate. I{(int)} 5450 @param width: Area width (number of columns). I{(int)} 5451 @param height: Area height (number of rows). I{(int)} 5452 @return: Tuple consisting of 3 values (B{C{pa}}, B{C{pbx}}, B{C{pby}}). (I{(float)}, I{(float)}, I{(float)}) 5453 """ 5454 return None, None, None
5455
5456 - def fit_plane():
5457 """ 5458 Fits a plane through a data field. 5459 5460 The coefficients can be used for plane leveling using relation 5461 data[i] := data[i] - (pa + pby*i + pbx*j); 5462 5463 @return: Tuple consisting of 3 values (B{C{pa}}, B{C{pbx}}, B{C{pby}}). (I{(float)}, I{(float)}, I{(float)}) 5464 """ 5465 return None, None, None
5466
5467 - def fit_facet_plane(mfield, masking):
5468 """ 5469 Calculates the inclination of a plane close to the dominant plane in a data 5470 field. 5471 5472 The dominant plane is determined by taking into account larger local slopes 5473 with exponentially smaller weight. 5474 5475 This is the basis of so-called facet levelling algorithm. Usually, the 5476 plane found by this method is subtracted using L{DataField.plane_level}() 5477 and the entire process is repeated until it converges. A convergence 5478 criterion may be sufficiently small values of the x and y plane 5479 coefficients. Note that since L{DataField.plane_level}() uses pixel-based 5480 lateral coordinates, the coefficients must be divided by 5481 L{DataField.get_dx}(data_field) and 5482 L{DataField.get_dy}(data_field) to obtain physical plane 5483 coefficients. 5484 5485 @since: 2.37 5486 5487 @param mfield: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 5488 @param masking: Masking mode to use. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 5489 @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)}) 5490 """ 5491 return None, None, None, None
5492
5493 - def plane_level(a, bx, by):
5494 """ 5495 Subtracts plane from a data field. 5496 5497 See L{DataField.fit_plane}() for details. 5498 5499 @param a: Constant coefficient. I{(float)} 5500 @param bx: X plane coefficient. I{(float)} 5501 @param by: Y plane coefficient. I{(float)} 5502 """ 5503 pass
5504
5505 - def plane_rotate(xangle, yangle, interpolation):
5506 """ 5507 Performs rotation of plane along x and y axis. 5508 5509 @param xangle: Rotation angle in x direction (rotation along y axis, in radians). I{(float)} 5510 @param yangle: Rotation angle in y direction (rotation along x axis, in radians). I{(float)} 5511 @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})} 5512 """ 5513 pass
5514
5515 - def fit_lines(col, row, width, height, degree, exclude, orientation):
5516 """ 5517 Independently levels profiles on each row/column in a data field. 5518 5519 Lines that have no intersection with area selected by B{C{ulcol}}, B{C{ulrow}}, 5520 B{C{brcol}}, B{C{brrow}} are always leveled as a whole. Lines that have intersection 5521 with selected area, are leveled using polynomial coefficients computed only 5522 from data inside (or outside for B{C{exclude}} = B{C{True}}) the area. 5523 5524 @param col: Upper-left column coordinate. I{(int)} 5525 @param row: Upper-left row coordinate. I{(int)} 5526 @param width: Area width (number of columns). I{(int)} 5527 @param height: Area height (number of rows). I{(int)} 5528 @param degree: Fitted polynomial degree. I{(int)} 5529 @param exclude: If B{C{True}}, outside of area selected by B{C{ulcol}}, B{C{ulrow}}, B{C{brcol}}, 5530 B{C{brrow}} will be used for polynomial coefficients computation, 5531 instead of inside. I{(bool)} 5532 @param orientation: Line orientation. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 5533 """ 5534 pass
5535
5536 - def area_local_plane_quantity(size, col, row, width, height, type, result):
5537 """ 5538 Convenience function to get just one quantity from 5539 L{DataField.area_fit_local_planes}(). 5540 5541 5542 @param size: Neighbourhood size. I{(int)} 5543 @param col: Upper-left column coordinate. I{(int)} 5544 @param row: Upper-left row coordinate. I{(int)} 5545 @param width: Area width (number of columns). I{(int)} 5546 @param height: Area height (number of rows). I{(int)} 5547 @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})} 5548 @param result: A data field to store result to, or B{C{None}} to allocate a new one. I{(L{DataField})} 5549 @return: B{C{result}} if it isn't B{C{None}}, otherwise a newly allocated data field. I{(L{DataField})} 5550 """ 5551 return None
5552
5553 - def local_plane_quantity(size, type, result):
5554 """ 5555 Convenience function to get just one quantity from 5556 L{DataField.fit_local_planes}(). 5557 5558 5559 @param size: Neighbourhood size. I{(int)} 5560 @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})} 5561 @param result: A data field to store result to, or B{C{None}} to allocate a new one. I{(L{DataField})} 5562 @return: B{C{result}} if it isn't B{C{None}}, otherwise a newly allocated data field. I{(L{DataField})} 5563 """ 5564 return None
5565
5566 - def mfm_perpendicular_stray_field(out, height, thickness, sigma, walls, wall_delta):
5567 """ 5568 Calculates stray field for perpendicular media, based on a mask showing the 5569 magnetisation orientation. 5570 5571 @since: 2.51 5572 5573 @param out: Target data field to put the result to. It will be resized to match 5574 B{C{mfield}}. I{(L{DataField})} 5575 @param height: Height above the surface. I{(float)} 5576 @param thickness: Film thickness. I{(float)} 5577 @param sigma: Magnetic charge. I{(float)} 5578 @param walls: Include domain walls. I{(bool)} 5579 @param wall_delta: Domain wall thickness I{(float)} 5580 """ 5581 pass
5582
5583 - def mfm_perpendicular_stray_field_angle_correction(angle, orientation):
5584 """ 5585 Performs correction of magnetic data for cantilever tilt. 5586 5587 @since: 2.54 5588 5589 @param angle: I{(float)} 5590 @param orientation: Cantilever orientation with respect of the data. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 5591 """ 5592 pass
5593
5594 - def mfm_perpendicular_medium_force(fz, type, mtip, bx, by, length):
5595 """ 5596 Calculates force as evaluated from z-component of the magnetic field for a given probe type. 5597 5598 @since: 2.51 5599 5600 @param fz: Target data field to put the result to. It will be resized to match 5601 B{C{hz}}. I{(L{DataField})} 5602 @param type: Probe type. Expected values: C{B{MFM_PROBE_CHARGE}}, C{B{MFM_PROBE_BAR}}. I{(L{MFMProbeType})} 5603 @param mtip: Probe magnetic moment. I{(float)} 5604 @param bx: x size for parallelpiped probe. I{(float)} 5605 @param by: y size for parallelpiped probe. I{(float)} 5606 @param length: length (z size) for parallelpiped probe. I{(float)} 5607 """ 5608 pass
5609
5610 - def mfm_shift_z(out, zdiff):
5611 """ 5612 Shifts magnetic field to a different lift height above the surface. 5613 5614 Positive B{C{zdiff}} means away from the measured surface and blurring the data. 5615 Negative B{C{zdiff}} means shifting towards (or within) the measured surface 5616 and sharpening the data. For negative B{C{zdiff}} the result grows exponentially 5617 and is generally not very useful. 5618 5619 @since: 2.51 5620 5621 @param out: Target data field to put the result to. I{(L{DataField})} 5622 @param zdiff: The shift distance in physical units. I{(float)} 5623 """ 5624 pass
5625
5626 - def mfm_find_shift_z(shifted, zdiffmin, zdiffmax):
5627 """ 5628 Estimates the height difference between two magnetic field images. 5629 5630 See L{DataField.mfm_shift_z}() for the sign convention. It is generally 5631 only meaningful to estimate the shift whe B{C{shifted}} was measured at larger 5632 lift height than B{C{dfield}}. 5633 5634 @since: 2.51 5635 5636 @param shifted: Data field containing magnetic field component measured at 5637 a different lift height. I{(L{DataField})} 5638 @param zdiffmin: Start of shift scan range. I{(float)} 5639 @param zdiffmax: Start of shift scan range. I{(float)} 5640 @return: The estimated shift between B{C{shifted}} and B{C{dfield}}. I{(float)} 5641 """ 5642 return None
5643
5644 - def mfm_parallel_medium(height, size_a, size_b, size_c, magnetisation, thickness, component):
5645 """ 5646 Calculates magnetic field or its derivatives above a simple medium 5647 consisting of stripes of left and right direction magnetisation. 5648 Results are added to the B{C{hfield}} array, so it should be cleared if 5649 function is run only once. 5650 5651 @since: 2.51 5652 5653 @param height: Height above surface. I{(float)} 5654 @param size_a: Left direction oriented area width. I{(float)} 5655 @param size_b: Right direction orientated area width. I{(float)} 5656 @param size_c: Gap size. I{(float)} 5657 @param magnetisation: Remanent magnetisation. I{(float)} 5658 @param thickness: Film thickness. I{(float)} 5659 @param component: Component to output. Expected values: C{B{MFM_COMPONENT_HX}}, C{B{MFM_COMPONENT_HY}}, C{B{MFM_COMPONENT_HZ}}, C{B{MFM_COMPONENT_DHZ_DZ}}, C{B{MFM_COMPONENT_D2HZ_DZ2}}. I{(L{MFMComponentType})} 5660 """ 5661 pass
5662
5663 - def mfm_current_line(height, width, position, current, component):
5664 """ 5665 Calculates magnetic field or its derivatives above a flat current line (stripe). 5666 Results are added to the B{C{hfield}} array, so it should be cleared if 5667 function is run only once. 5668 5669 @since: 2.51 5670 5671 @param height: Height above surface. I{(float)} 5672 @param width: Current line width. I{(float)} 5673 @param position: Current line x position in the resulting array. I{(float)} 5674 @param current: Curent passing through the line. I{(float)} 5675 @param component: Component to output. Expected values: C{B{MFM_COMPONENT_HX}}, C{B{MFM_COMPONENT_HY}}, C{B{MFM_COMPONENT_HZ}}, C{B{MFM_COMPONENT_DHZ_DZ}}, C{B{MFM_COMPONENT_D2HZ_DZ2}}. I{(L{MFMComponentType})} 5676 """ 5677 pass
5678
5679 - def get_max():
5680 """ 5681 Finds the maximum value of a data field. 5682 5683 This quantity is cached. 5684 5685 5686 @return: The maximum value. I{(float)} 5687 """ 5688 return None
5689
5690 - def get_min():
5691 """ 5692 Finds the minimum value of a data field. 5693 5694 This quantity is cached. 5695 5696 5697 @return: The minimum value. I{(float)} 5698 """ 5699 return None
5700
5701 - def get_min_max():
5702 """ 5703 Finds minimum and maximum values of a data field. 5704 5705 @return: Tuple consisting of 2 values (B{C{min}}, B{C{max}}). (I{(float)}, I{(float)}) 5706 """ 5707 return None, None
5708
5709 - def get_avg():
5710 """ 5711 Computes average value of a data field. 5712 5713 This quantity is cached. 5714 5715 5716 @return: The average value. I{(float)} 5717 """ 5718 return None
5719
5720 - def get_rms():
5721 """ 5722 Computes root mean square value of a data field. 5723 5724 The root mean square value is calculated with respect to the mean value. 5725 See L{DataField.get_mean_square}() for a similar function which does not 5726 subtract the mean value. 5727 5728 This quantity is cached. 5729 5730 5731 @return: The root mean square value. I{(float)} 5732 """ 5733 return None
5734
5735 - def get_mean_square():
5736 """ 5737 Computes mean square value of a data field. 5738 5739 See L{DataField.area_get_mean_square}() for remarks. 5740 5741 @since: 2.52 5742 5743 @return: The mean square value. I{(float)} 5744 """ 5745 return None
5746
5747 - def get_sum():
5748 """ 5749 Sums all values in a data field. 5750 5751 This quantity is cached. 5752 5753 5754 @return: The sum of all values. I{(float)} 5755 """ 5756 return None
5757
5758 - def get_median():
5759 """ 5760 Computes median value of a data field. 5761 5762 This quantity is cached. 5763 5764 5765 @return: The median value. I{(float)} 5766 """ 5767 return None
5768
5769 - def get_surface_area():
5770 """ 5771 Computes surface area of a data field. 5772 5773 This quantity is cached. 5774 5775 5776 @return: The surface area. I{(float)} 5777 """ 5778 return None
5779
5780 - def get_surface_slope():
5781 """ 5782 Computes root mean square surface slope (Sdq) of a data field. 5783 5784 @since: 2.58 5785 5786 @return: The root mean square surface slope. I{(float)} 5787 """ 5788 return None
5789
5790 - def get_variation():
5791 """ 5792 Computes the total variation of a data field. 5793 5794 See L{DataField.area_get_variation}() for the definition. 5795 5796 This quantity is cached. 5797 5798 @since: 2.38 5799 5800 @return: The variation. I{(float)} 5801 """ 5802 return None
5803
5804 - def get_entropy():
5805 """ 5806 Computes the entropy of a data field. 5807 5808 See L{DataField.area_get_entropy}() for the definition. 5809 5810 This quantity is cached. 5811 5812 @since: 2.42 5813 5814 @return: The value distribution entropy. I{(float)} 5815 """ 5816 return None
5817
5818 - def get_entropy_2d(yfield):
5819 """ 5820 Computes the entropy of a two-dimensional point cloud. 5821 5822 Each pair of corresponding B{C{xfield}} and B{C{yfield}} pixels is assumed to 5823 represent the coordinates (B{C{x}},B{C{y}}) of a point in plane. Hence they must have 5824 the same dimensions. 5825 5826 @since: 2.44 5827 5828 @param yfield: A data field containing the B{C{y}}-coordinates. I{(L{DataField})} 5829 @return: The two-dimensional distribution entropy. I{(float)} 5830 """ 5831 return None
5832
5833 - def area_get_max(mask, col, row, width, height):
5834 """ 5835 Finds the maximum value in a rectangular part of a data field. 5836 5837 5838 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 5839 @param col: Upper-left column coordinate. I{(int)} 5840 @param row: Upper-left row coordinate. I{(int)} 5841 @param width: Area width (number of columns). I{(int)} 5842 @param height: Area height (number of rows). I{(int)} 5843 @return: The maximum value. When the number of samples to calculate 5844 maximum of is zero, -B{C{glib.MAXDOUBLE}} is returned. I{(float)} 5845 """ 5846 return None
5847
5848 - def area_get_min(mask, col, row, width, height):
5849 """ 5850 Finds the minimum value in a rectangular part of a data field. 5851 5852 5853 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 5854 @param col: Upper-left column coordinate. I{(int)} 5855 @param row: Upper-left row coordinate. I{(int)} 5856 @param width: Area width (number of columns). I{(int)} 5857 @param height: Area height (number of rows). I{(int)} 5858 @return: The minimum value. When the number of samples to calculate 5859 minimum of is zero, -B{C{glib.MAXDOUBLE}} is returned. I{(float)} 5860 """ 5861 return None
5862
5863 - def area_get_min_max(mask, col, row, width, height):
5864 """ 5865 Finds minimum and maximum values in a rectangular part of a data field. 5866 5867 This function is equivalent to calling 5868 B{C{L{DataField.area_get_min_max_mask}}}() 5869 with masking mode B{C{MASK_INCLUDE}}. 5870 5871 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 5872 @param col: Upper-left column coordinate. I{(int)} 5873 @param row: Upper-left row coordinate. I{(int)} 5874 @param width: Area width (number of columns). I{(int)} 5875 @param height: Area height (number of rows). I{(int)} 5876 @return: Tuple consisting of 2 values (B{C{min}}, B{C{max}}). (I{(float)}, I{(float)}) 5877 """ 5878 return None, None
5879
5880 - def area_get_min_max_mask(mask, mode, col, row, width, height):
5881 """ 5882 Finds minimum and maximum values in a rectangular part of a data field. 5883 5884 @since: 2.18 5885 5886 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 5887 @param mode: Masking mode to use. See the introduction for description of 5888 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 5889 @param col: Upper-left column coordinate. I{(int)} 5890 @param row: Upper-left row coordinate. I{(int)} 5891 @param width: Area width (number of columns). I{(int)} 5892 @param height: Area height (number of rows). I{(int)} 5893 @return: Tuple consisting of 2 values (B{C{min}}, B{C{max}}). (I{(float)}, I{(float)}) 5894 """ 5895 return None, None
5896
5897 - def area_get_avg(mask, col, row, width, height):
5898 """ 5899 Computes average value of a rectangular part of a data field. 5900 5901 This function is equivalent to calling B{C{L{DataField.area_get_avg_mask}}}() 5902 with masking mode B{C{MASK_INCLUDE}}. 5903 5904 5905 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 5906 @param col: Upper-left column coordinate. I{(int)} 5907 @param row: Upper-left row coordinate. I{(int)} 5908 @param width: Area width (number of columns). I{(int)} 5909 @param height: Area height (number of rows). I{(int)} 5910 @return: The average value. I{(float)} 5911 """ 5912 return None
5913
5914 - def area_get_avg_mask(mask, mode, col, row, width, height):
5915 """ 5916 Computes average value of a rectangular part of a data field. 5917 5918 @since: 2.18 5919 5920 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 5921 @param mode: Masking mode to use. See the introduction for description of 5922 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 5923 @param col: Upper-left column coordinate. I{(int)} 5924 @param row: Upper-left row coordinate. I{(int)} 5925 @param width: Area width (number of columns). I{(int)} 5926 @param height: Area height (number of rows). I{(int)} 5927 @return: The average value. I{(float)} 5928 """ 5929 return None
5930
5931 - def area_get_rms(mask, col, row, width, height):
5932 """ 5933 Computes root mean square value of a rectangular part of a data field. 5934 5935 The root mean square value is calculated with respect to the mean value. 5936 5937 This function is equivalent to calling B{C{L{DataField.area_get_rms_mask}}}() 5938 with masking mode B{C{MASK_INCLUDE}}. 5939 5940 5941 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 5942 @param col: Upper-left column coordinate. I{(int)} 5943 @param row: Upper-left row coordinate. I{(int)} 5944 @param width: Area width (number of columns). I{(int)} 5945 @param height: Area height (number of rows). I{(int)} 5946 @return: The root mean square value. I{(float)} 5947 """ 5948 return None
5949
5950 - def area_get_rms_mask(mask, mode, col, row, width, height):
5951 """ 5952 Computes root mean square value of deviations of a rectangular part of a 5953 data field. 5954 5955 The root mean square value is calculated with respect to the mean value. 5956 5957 @since: 2.18 5958 5959 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 5960 @param mode: Masking mode to use. See the introduction for description of 5961 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 5962 @param col: Upper-left column coordinate. I{(int)} 5963 @param row: Upper-left row coordinate. I{(int)} 5964 @param width: Area width (number of columns). I{(int)} 5965 @param height: Area height (number of rows). I{(int)} 5966 @return: The root mean square value of deviations from the mean value. I{(float)} 5967 """ 5968 return None
5969
5970 - def area_get_grainwise_rms(mask, mode, col, row, width, height):
5971 """ 5972 Computes grain-wise root mean square value of deviations of a rectangular 5973 part of a data field. 5974 5975 Grain-wise means that the mean value is determined for each grain (i.e. 5976 cotinguous part of the mask or inverted mask) separately and the deviations 5977 are calculated from these mean values. 5978 5979 @since: 2.29 5980 5981 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 5982 @param mode: Masking mode to use. See the introduction for description of 5983 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 5984 @param col: Upper-left column coordinate. I{(int)} 5985 @param row: Upper-left row coordinate. I{(int)} 5986 @param width: Area width (number of columns). I{(int)} 5987 @param height: Area height (number of rows). I{(int)} 5988 @return: The root mean square value of deviations from the mean value. I{(float)} 5989 """ 5990 return None
5991
5992 - def area_get_sum(mask, col, row, width, height):
5993 """ 5994 Sums values of a rectangular part of a data field. 5995 5996 This function is equivalent to calling B{C{L{DataField.area_get_sum_mask}}}() 5997 with masking mode B{C{MASK_INCLUDE}}. 5998 5999 6000 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 6001 @param col: Upper-left column coordinate. I{(int)} 6002 @param row: Upper-left row coordinate. I{(int)} 6003 @param width: Area width (number of columns). I{(int)} 6004 @param height: Area height (number of rows). I{(int)} 6005 @return: The sum of all values inside area. I{(float)} 6006 """ 6007 return None
6008
6009 - def area_get_sum_mask(mask, mode, col, row, width, height):
6010 """ 6011 Sums values of a rectangular part of a data field. 6012 6013 @since: 2.18 6014 6015 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 6016 @param mode: Masking mode to use. See the introduction for description of 6017 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 6018 @param col: Upper-left column coordinate. I{(int)} 6019 @param row: Upper-left row coordinate. I{(int)} 6020 @param width: Area width (number of columns). I{(int)} 6021 @param height: Area height (number of rows). I{(int)} 6022 @return: The sum of all values inside area. I{(float)} 6023 """ 6024 return None
6025
6026 - def area_get_median(mask, col, row, width, height):
6027 """ 6028 Computes median value of a data field area. 6029 6030 This function is equivalent to calling 6031 B{C{L{DataField.area_get_median_mask}}}() 6032 with masking mode B{C{MASK_INCLUDE}}. 6033 6034 6035 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 6036 @param col: Upper-left column coordinate. I{(int)} 6037 @param row: Upper-left row coordinate. I{(int)} 6038 @param width: Area width (number of columns). I{(int)} 6039 @param height: Area height (number of rows). I{(int)} 6040 @return: The median value. I{(float)} 6041 """ 6042 return None
6043
6044 - def area_get_median_mask(mask, mode, col, row, width, height):
6045 """ 6046 Computes median value of a data field area. 6047 6048 @since: 2.18 6049 6050 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 6051 @param mode: Masking mode to use. See the introduction for description of 6052 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 6053 @param col: Upper-left column coordinate. I{(int)} 6054 @param row: Upper-left row coordinate. I{(int)} 6055 @param width: Area width (number of columns). I{(int)} 6056 @param height: Area height (number of rows). I{(int)} 6057 @return: The median value. I{(float)} 6058 """ 6059 return None
6060
6061 - def area_get_surface_area(mask, col, row, width, height):
6062 """ 6063 Computes surface area of a rectangular part of a data field. 6064 6065 This function is equivalent to calling 6066 B{C{L{DataField.area_get_surface_area_mask}}}() with masking mode 6067 B{C{MASK_INCLUDE}}. 6068 6069 6070 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 6071 @param col: Upper-left column coordinate. I{(int)} 6072 @param row: Upper-left row coordinate. I{(int)} 6073 @param width: Area width (number of columns). I{(int)} 6074 @param height: Area height (number of rows). I{(int)} 6075 @return: The surface area. I{(float)} 6076 """ 6077 return None
6078
6079 - def area_get_surface_area_mask(mask, mode, col, row, width, height):
6080 """ 6081 Computes surface area of a rectangular part of a data field. 6082 6083 This quantity makes sense only if the lateral dimensions and values of 6084 B{C{data_field}} are the same physical quantities. 6085 6086 @since: 2.18 6087 6088 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 6089 @param mode: Masking mode to use. See the introduction for description of 6090 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 6091 @param col: Upper-left column coordinate. I{(int)} 6092 @param row: Upper-left row coordinate. I{(int)} 6093 @param width: Area width (number of columns). I{(int)} 6094 @param height: Area height (number of rows). I{(int)} 6095 @return: The surface area. I{(float)} 6096 """ 6097 return None
6098
6099 - def area_get_surface_slope_mask(mask, mode, col, row, width, height):
6100 """ 6101 Computes root mean square surface slope (Sdq) of a rectangular part of 6102 a data field. 6103 6104 @since: 2.58 6105 6106 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 6107 @param mode: Masking mode to use. See the introduction for description of 6108 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 6109 @param col: Upper-left column coordinate. I{(int)} 6110 @param row: Upper-left row coordinate. I{(int)} 6111 @param width: Area width (number of columns). I{(int)} 6112 @param height: Area height (number of rows). I{(int)} 6113 @return: The root mean square surface slope. I{(float)} 6114 """ 6115 return None
6116
6117 - def area_get_mean_square(mask, mode, col, row, width, height):
6118 """ 6119 Computes mean square value of a rectangular part of a data field. 6120 6121 Unlike L{DataField.get_rms}(), this function does I{not} 6122 subtract the mean value beforehand. Therefore, it is useful to sum the 6123 squared values of data fields which can have the zero level set differently, 6124 for instance when the field contains a distribution. 6125 6126 @since: 2.52 6127 6128 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 6129 @param mode: Masking mode to use. See the introduction for description of 6130 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 6131 @param col: Upper-left column coordinate. I{(int)} 6132 @param row: Upper-left row coordinate. I{(int)} 6133 @param width: Area width (number of columns). I{(int)} 6134 @param height: Area height (number of rows). I{(int)} 6135 @return: The mean square value. I{(float)} 6136 """ 6137 return None
6138
6139 - def area_get_entropy_at_scales(target_line, mask, mode, col, row, width, height, maxdiv):
6140 """ 6141 Calculates estimates of value distribution entropy at various scales. 6142 6143 @since: 2.44 6144 6145 @param target_line: A data line to store the result to. It will be resampled to 6146 B{C{maxdiv}}+1 items. I{(L{DataLine})} 6147 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 6148 @param mode: Masking mode to use. See the introduction for description of 6149 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 6150 @param col: Upper-left column coordinate. I{(int)} 6151 @param row: Upper-left row coordinate. I{(int)} 6152 @param width: Area width (number of columns). I{(int)} 6153 @param height: Area height (number of rows). I{(int)} 6154 @param maxdiv: Maximum number of divisions of the value range. Pass zero to 6155 choose it automatically. I{(int)} 6156 @return: The best estimate, as L{DataField.area_get_entropy}(). I{(float)} 6157 """ 6158 return None
6159
6160 - def get_entropy_2d_at_scales(yfield, target_line, maxdiv):
6161 """ 6162 Calculates estimates of entropy of two-dimensional point cloud at various 6163 scales. 6164 6165 @since: 2.44 6166 6167 @param yfield: A data field containing the B{C{y}}-coordinates. I{(L{DataField})} 6168 @param target_line: A data line to store the result to. It will be resampled to 6169 B{C{maxdiv}}+1 items. I{(L{DataLine})} 6170 @param maxdiv: Maximum number of divisions of the value range. Pass zero to 6171 choose it automatically. I{(int)} 6172 @return: The best estimate, as L{DataField.get_entropy_2d}(). I{(float)} 6173 """ 6174 return None
6175
6176 - def area_get_variation(mask, mode, col, row, width, height):
6177 """ 6178 Computes the total variation of a rectangular part of a data field. 6179 6180 The total variation is estimated as the integral of the absolute value of 6181 local gradient. 6182 6183 This quantity has the somewhat odd units of value unit times lateral unit. 6184 It can be envisioned as follows. If the surface has just two height levels 6185 (upper and lower planes) then the quantity is the length of the boundary 6186 between the upper and lower part, multiplied by the step height. If the 6187 surface is piece-wise constant, then the variation is the step height 6188 integrated along the boundaries between the constant parts. Therefore, for 6189 non-fractal surfaces it scales with the linear dimension of the image, not 6190 with its area, despite being an area integral. 6191 6192 @since: 2.38 6193 6194 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 6195 @param mode: Masking mode to use. See the introduction for description of 6196 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 6197 @param col: Upper-left column coordinate. I{(int)} 6198 @param row: Upper-left row coordinate. I{(int)} 6199 @param width: Area width (number of columns). I{(int)} 6200 @param height: Area height (number of rows). I{(int)} 6201 @return: The variation. I{(float)} 6202 """ 6203 return None
6204
6205 - def area_get_entropy(mask, mode, col, row, width, height):
6206 """ 6207 Estimates the entropy of field data distribution. 6208 6209 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 6210 B{C{n}} is the number of pixels considered, Δ the bin size and B{C{n_i}} the count in 6211 the B{C{i}}-th bin. If B{C{S}} is plotted as a function of the bin size Δ, it is, 6212 generally, a growing function with a plateau for ‘reasonable’ bin sizes. 6213 The estimate is taken at the plateau. If no plateau is found, which means 6214 the distribution is effectively a sum of δ-functions, -B{C{glib.MAXDOUBLE}} is 6215 returned. 6216 6217 It should be noted that this estimate may be biased. 6218 6219 @since: 2.42 6220 6221 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 6222 @param mode: Masking mode to use. See the introduction for description of 6223 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 6224 @param col: Upper-left column coordinate. I{(int)} 6225 @param row: Upper-left row coordinate. I{(int)} 6226 @param width: Area width (number of columns). I{(int)} 6227 @param height: Area height (number of rows). I{(int)} 6228 @return: The estimated entropy of the data values. The entropy of no data 6229 or a single single is returned as -B{C{glib.MAXDOUBLE}}. I{(float)} 6230 """ 6231 return None
6232
6233 - def area_get_volume(basis, mask, col, row, width, height):
6234 """ 6235 Computes volume of a rectangular part of a data field. 6236 6237 @since: 2.3 6238 6239 @param basis: The basis or background for volume calculation if not B{C{None}}. 6240 The height of each vertex is then the difference between 6241 B{C{data_field}} value and B{C{basis}} value. Value B{C{None}} is the same 6242 as passing all zeroes for the basis. I{(L{DataField})} 6243 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 6244 @param col: Upper-left column coordinate. I{(int)} 6245 @param row: Upper-left row coordinate. I{(int)} 6246 @param width: Area width (number of columns). I{(int)} 6247 @param height: Area height (number of rows). I{(int)} 6248 @return: The volume. I{(float)} 6249 """ 6250 return None
6251
6252 - def get_autorange():
6253 """ 6254 Computes data field value range with outliers cut-off. 6255 6256 The purpose of this function is to find a range is suitable for false color 6257 mapping. The precise method how it is calculated is unspecified and may be 6258 subject to changes. 6259 6260 However, it is guaranteed minimum <= B{C{from}} <= B{C{to}} <= maximum. 6261 6262 This quantity is cached. 6263 6264 @return: Tuple consisting of 2 values (B{C{from_}}, B{C{to}}). (I{(float)}, I{(float)}) 6265 """ 6266 return None, None
6267
6268 - def get_stats():
6269 """ 6270 Computes basic statistical quantities of a data field. 6271 6272 Note the kurtosis returned by this function returns is the excess kurtosis 6273 which is zero for the Gaussian distribution (not 3). 6274 6275 @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)}) 6276 """ 6277 return None, None, None, None, None
6278
6279 - def area_get_stats(mask, col, row, width, height):
6280 """ 6281 Computes basic statistical quantities of a rectangular part of a data field. 6282 6283 This function is equivalent to calling B{C{L{DataField.area_get_stats_mask}}}() 6284 with masking mode B{C{MASK_INCLUDE}}. 6285 6286 Note the kurtosis returned by this function returns is the excess kurtosis 6287 which is zero for the Gaussian distribution (not 3). 6288 6289 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 6290 @param col: Upper-left column coordinate. I{(int)} 6291 @param row: Upper-left row coordinate. I{(int)} 6292 @param width: Area width (number of columns). I{(int)} 6293 @param height: Area height (number of rows). I{(int)} 6294 @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)}) 6295 """ 6296 return None, None, None, None, None
6297
6298 - def area_get_stats_mask(mask, mode, col, row, width, height):
6299 """ 6300 Computes basic statistical quantities of a rectangular part of a data field. 6301 6302 Note the kurtosis returned by this function returns is the excess kurtosis 6303 which is zero for the Gaussian distribution (not 3). 6304 6305 @since: 2.18 6306 6307 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 6308 @param mode: Masking mode to use. See the introduction for description of 6309 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 6310 @param col: Upper-left column coordinate. I{(int)} 6311 @param row: Upper-left row coordinate. I{(int)} 6312 @param width: Area width (number of columns). I{(int)} 6313 @param height: Area height (number of rows). I{(int)} 6314 @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)}) 6315 """ 6316 return None, None, None, None, None
6317
6318 - def area_count_in_range(mask, col, row, width, height, below, above):
6319 """ 6320 Counts data samples in given range. 6321 6322 No assertion is made about the values of B{C{above}} and B{C{below}}, in other words 6323 B{C{above}} may be larger than B{C{below}}. To count samples in an open interval 6324 instead of a closed interval, exchange B{C{below}} and B{C{above}} and then subtract 6325 the B{C{nabove}} and B{C{nbelow}} from B{C{width}}*B{C{height}} to get the complementary counts. 6326 6327 With this trick the common task of counting positive values can be 6328 realized: 6329 <informalexample><programlisting> 6330 L{DataField.area_count_in_range}(data_field, None, 6331 col, row, width, height, 6332 0.0, 0.0, &amp;count, None); 6333 count = width*height - count; 6334 </programlisting></informalexample> 6335 6336 @param mask: Mask specifying which values to take into account, or B{C{None}}. I{(L{DataField})} 6337 @param col: Upper-left column coordinate. I{(int)} 6338 @param row: Upper-left row coordinate. I{(int)} 6339 @param width: Area width (number of columns). I{(int)} 6340 @param height: Area height (number of rows). I{(int)} 6341 @param below: Upper bound to compare data to. The number of samples less 6342 than or equal to B{C{below}} is stored in B{C{nbelow}}. I{(float)} 6343 @param above: Lower bound to compare data to. The number of samples greater 6344 than or equal to B{C{above}} is stored in B{C{nabove}}. I{(float)} 6345 @return: Tuple consisting of 2 values (B{C{nbelow}}, B{C{nabove}}). (I{(int)}, I{(int)}) 6346 """ 6347 return None, None
6348
6349 - def area_dh(mask, target_line, col, row, width, height, nstats):
6350 """ 6351 Calculates distribution of heights in a rectangular part of data field. 6352 6353 @param mask: Mask specifying which values to take into account, or B{C{None}}. I{(L{DataField})} 6354 @param target_line: A data line to store the distribution to. It will be 6355 resampled to requested width. I{(L{DataLine})} 6356 @param col: Upper-left column coordinate. I{(int)} 6357 @param row: Upper-left row coordinate. I{(int)} 6358 @param width: Area width (number of columns). I{(int)} 6359 @param height: Area height (number of rows). I{(int)} 6360 @param nstats: The number of samples to take on the distribution function. If 6361 nonpositive, a suitable resolution is determined automatically. I{(int)} 6362 """ 6363 pass
6364
6365 - def dh(target_line, nstats):
6366 """ 6367 Calculates distribution of heights in a data field. 6368 6369 @param target_line: A data line to store the distribution to. It will be 6370 resampled to requested width. I{(L{DataLine})} 6371 @param nstats: The number of samples to take on the distribution function. If 6372 nonpositive, a suitable resolution is determined automatically. I{(int)} 6373 """ 6374 pass
6375
6376 - def area_cdh(mask, target_line, col, row, width, height, nstats):
6377 """ 6378 Calculates cumulative distribution of heights in a rectangular part of data 6379 field. 6380 6381 @param mask: Mask specifying which values to take into account, or B{C{None}}. I{(L{DataField})} 6382 @param target_line: A data line to store the distribution to. It will be 6383 resampled to requested width. I{(L{DataLine})} 6384 @param col: Upper-left column coordinate. I{(int)} 6385 @param row: Upper-left row coordinate. I{(int)} 6386 @param width: Area width (number of columns). I{(int)} 6387 @param height: Area height (number of rows). I{(int)} 6388 @param nstats: The number of samples to take on the distribution function. If 6389 nonpositive, a suitable resolution is determined automatically. I{(int)} 6390 """ 6391 pass
6392
6393 - def cdh(target_line, nstats):
6394 """ 6395 Calculates cumulative distribution of heights in a data field. 6396 6397 @param target_line: A data line to store the distribution to. It will be 6398 resampled to requested width. I{(L{DataLine})} 6399 @param nstats: The number of samples to take on the distribution function. If 6400 nonpositive, a suitable resolution is determined automatically. I{(int)} 6401 """ 6402 pass
6403
6404 - def area_da(target_line, col, row, width, height, orientation, nstats):
6405 """ 6406 Calculates distribution of slopes in a rectangular part of data field. 6407 6408 @param target_line: A data line to store the distribution to. It will be 6409 resampled to requested width. I{(L{DataLine})} 6410 @param col: Upper-left column coordinate. I{(int)} 6411 @param row: Upper-left row coordinate. I{(int)} 6412 @param width: Area width (number of columns). I{(int)} 6413 @param height: Area height (number of rows). I{(int)} 6414 @param orientation: Orientation to compute the slope distribution in. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 6415 @param nstats: The number of samples to take on the distribution function. If 6416 nonpositive, a suitable resolution is determined automatically. I{(int)} 6417 """ 6418 pass
6419
6420 - def area_da_mask(mask, target_line, col, row, width, height, orientation, nstats):
6421 """ 6422 Calculates distribution of slopes in a rectangular part of data field, with 6423 masking. 6424 6425 @since: 2.49 6426 6427 @param mask: Mask specifying which values to take into account, or B{C{None}}. I{(L{DataField})} 6428 @param target_line: A data line to store the distribution to. It will be 6429 resampled to requested width. I{(L{DataLine})} 6430 @param col: Upper-left column coordinate. I{(int)} 6431 @param row: Upper-left row coordinate. I{(int)} 6432 @param width: Area width (number of columns). I{(int)} 6433 @param height: Area height (number of rows). I{(int)} 6434 @param orientation: Orientation to compute the slope distribution in. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 6435 @param nstats: The number of samples to take on the distribution function. If 6436 nonpositive, a suitable resolution is determined automatically. I{(int)} 6437 """ 6438 pass
6439
6440 - def da(target_line, orientation, nstats):
6441 """ 6442 Calculates distribution of slopes in a data field. 6443 6444 @param target_line: A data line to store the distribution to. It will be 6445 resampled to requested width. I{(L{DataLine})} 6446 @param orientation: Orientation to compute the slope distribution in. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 6447 @param nstats: The number of samples to take on the distribution function. If 6448 nonpositive, a suitable resolution is determined automatically. I{(int)} 6449 """ 6450 pass
6451
6452 - def area_cda(target_line, col, row, width, height, orientation, nstats):
6453 """ 6454 Calculates cumulative distribution of slopes in a rectangular part of data 6455 field. 6456 6457 @param target_line: A data line to store the distribution to. It will be 6458 resampled to requested width. I{(L{DataLine})} 6459 @param col: Upper-left column coordinate. I{(int)} 6460 @param row: Upper-left row coordinate. I{(int)} 6461 @param width: Area width (number of columns). I{(int)} 6462 @param height: Area height (number of rows). I{(int)} 6463 @param orientation: Orientation to compute the slope distribution in. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 6464 @param nstats: The number of samples to take on the distribution function. If 6465 nonpositive, a suitable resolution is determined automatically. I{(int)} 6466 """ 6467 pass
6468
6469 - def area_cda_mask(mask, target_line, col, row, width, height, orientation, nstats):
6470 """ 6471 Calculates cumulative distribution of slopes in a rectangular part of data 6472 field, with masking. 6473 6474 @since: 2.49 6475 6476 @param mask: Mask specifying which values to take into account, or B{C{None}}. I{(L{DataField})} 6477 @param target_line: A data line to store the distribution to. It will be 6478 resampled to requested width. I{(L{DataLine})} 6479 @param col: Upper-left column coordinate. I{(int)} 6480 @param row: Upper-left row coordinate. I{(int)} 6481 @param width: Area width (number of columns). I{(int)} 6482 @param height: Area height (number of rows). I{(int)} 6483 @param orientation: Orientation to compute the slope distribution in. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 6484 @param nstats: The number of samples to take on the distribution function. If 6485 nonpositive, a suitable resolution is determined automatically. I{(int)} 6486 """ 6487 pass
6488
6489 - def cda(target_line, orientation, nstats):
6490 """ 6491 Calculates cumulative distribution of slopes in a data field. 6492 6493 @param target_line: A data line to store the distribution to. It will be 6494 resampled to requested width. I{(L{DataLine})} 6495 @param orientation: Orientation to compute the slope distribution in. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 6496 @param nstats: The number of samples to take on the distribution function. If 6497 nonpositive, a suitable resolution is determined automatically. I{(int)} 6498 """ 6499 pass
6500
6501 - def area_acf(target_line, col, row, width, height, orientation, interpolation, nstats):
6502 """ 6503 Calculates one-dimensional autocorrelation function of a rectangular part of a data field. 6504 6505 @param target_line: A data line to store the distribution to. It will be resampled to requested width. I{(L{DataLine})} 6506 @param col: Upper-left column coordinate. I{(int)} 6507 @param row: Upper-left row coordinate. I{(int)} 6508 @param width: Area width (number of columns). I{(int)} 6509 @param height: Area height (number of rows). I{(int)} 6510 @param orientation: Orientation of lines (ACF is simply averaged over the other orientation). Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 6511 @param interpolation: Interpolation to use when B{C{nstats}} is given and requires 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})} 6512 @param nstats: The number of samples to take on the distribution function. If nonpositive, B{C{width}} (B{C{height}}) is used. I{(int)} 6513 """ 6514 pass
6515
6516 - def acf(target_line, orientation, interpolation, nstats):
6517 """ 6518 Calculates one-dimensional autocorrelation function of a data field. 6519 6520 @param target_line: A data line to store the distribution to. It will be resampled to requested width. I{(L{DataLine})} 6521 @param orientation: Orientation of lines (ACF is simply averaged over the other orientation). Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 6522 @param interpolation: Interpolation to use when B{C{nstats}} is given and requires 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})} 6523 @param nstats: The number of samples to take on the distribution function. If nonpositive, data field width (height) is 6524 used. I{(int)} 6525 """ 6526 pass
6527
6528 - def area_row_acf(mask, masking, col, row, width, height, level, weights):
6529 """ 6530 Calculates the row-wise autocorrelation function (ACF) of a field. 6531 6532 The calculated ACF has the natural number of points, i.e. B{C{width}}. 6533 6534 Masking is performed by omitting all terms that contain excluded pixels. Since different rows contain different 6535 numbers of pixels, the resulting ACF values are calculated as a weighted sums where weight of each row's 6536 contribution is proportional to the number of contributing terms. In other words, the weighting is fair: each 6537 contributing pixel has the same influence on the result. 6538 6539 Only B{C{level}} values 0 (no levelling) and 1 (subtract the mean value) used to be available. For SPM data, you usually 6540 wish to pass 1. Since 2.56 you can also pass 2 for mean line subtraction. 6541 6542 6543 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 6544 @param masking: Masking mode to use (has any effect only with non-B{C{None}} B{C{mask}}). Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 6545 @param col: Upper-left column coordinate. I{(int)} 6546 @param row: Upper-left row coordinate. I{(int)} 6547 @param width: Area width (number of columns). I{(int)} 6548 @param height: Area height (number of rows). I{(int)} 6549 @param level: The first polynomial degree to keep in the rows, lower degrees than B{C{level}} are subtracted. I{(int)} 6550 @param weights: Line to store the denominators to (or B{C{None}}). It will be resized to match the returned line. The 6551 denominators are integers equal to the number of terms that contributed to each value. They are suitable 6552 as fitting weights if the ACF is fitted. I{(L{DataLine})} 6553 @return: A new one-dimensional data line with the ACF. I{(L{DataLine})} 6554 """ 6555 return None
6556
6557 - def area_hhcf(target_line, col, row, width, height, orientation, interpolation, nstats):
6558 """ 6559 Calculates one-dimensional autocorrelation function of a rectangular part of a data field. 6560 6561 @param target_line: A data line to store the distribution to. It will be resampled to requested width. I{(L{DataLine})} 6562 @param col: Upper-left column coordinate. I{(int)} 6563 @param row: Upper-left row coordinate. I{(int)} 6564 @param width: Area width (number of columns). I{(int)} 6565 @param height: Area height (number of rows). I{(int)} 6566 @param orientation: Orientation of lines (HHCF is simply averaged over the other orientation). Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 6567 @param interpolation: Interpolation to use when B{C{nstats}} is given and requires 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})} 6568 @param nstats: The number of samples to take on the distribution function. If nonpositive, B{C{width}} (B{C{height}}) is used. I{(int)} 6569 """ 6570 pass
6571
6572 - def hhcf(target_line, orientation, interpolation, nstats):
6573 """ 6574 Calculates one-dimensional autocorrelation function of a data field. 6575 6576 @param target_line: A data line to store the distribution to. It will be resampled to requested width. I{(L{DataLine})} 6577 @param orientation: Orientation of lines (HHCF is simply averaged over the other orientation). Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 6578 @param interpolation: Interpolation to use when B{C{nstats}} is given and requires 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})} 6579 @param nstats: The number of samples to take on the distribution function. If nonpositive, data field width (height) is 6580 used. I{(int)} 6581 """ 6582 pass
6583
6584 - def area_row_hhcf(mask, masking, col, row, width, height, level, weights):
6585 """ 6586 Calculates the row-wise height-height correlation function (HHCF) of a rectangular part of a field. 6587 6588 The calculated HHCF has the natural number of points, i.e. B{C{width}}. 6589 6590 Masking is performed by omitting all terms that contain excluded pixels. Since different rows contain different 6591 numbers of pixels, the resulting HHCF values are calculated as a weighted sums where weight of each row's 6592 contribution is proportional to the number of contributing terms. In other words, the weighting is fair: each 6593 contributing pixel has the same influence on the result. 6594 6595 Only B{C{level}} values 0 (no levelling) and 1 (subtract the mean value) used to be available. There is no difference 6596 between them for HHCF. Since 2.56 you can also pass 2 for mean line subtraction. 6597 6598 6599 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 6600 @param masking: Masking mode to use (has any effect only with non-B{C{None}} B{C{mask}}). Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 6601 @param col: Upper-left column coordinate. I{(int)} 6602 @param row: Upper-left row coordinate. I{(int)} 6603 @param width: Area width (number of columns). I{(int)} 6604 @param height: Area height (number of rows). I{(int)} 6605 @param level: The first polynomial degree to keep in the rows, lower degrees than B{C{level}} are subtracted. I{(int)} 6606 @param weights: Line to store the denominators to (or B{C{None}}). It will be resized to match the returned line. The 6607 denominators are integers equal to the number of terms that contributed to each value. They are suitable 6608 as fitting weights if the HHCF is fitted. I{(L{DataLine})} 6609 @return: A new one-dimensional data line with the HHCF. I{(L{DataLine})} 6610 """ 6611 return None
6612
6613 - def area_psdf(target_line, col, row, width, height, orientation, interpolation, windowing, nstats):
6614 """ 6615 Calculates one-dimensional power spectrum density function of a rectangular part of a data field. 6616 6617 @param target_line: A data line to store the distribution to. It will be resampled to requested width. I{(L{DataLine})} 6618 @param col: Upper-left column coordinate. I{(int)} 6619 @param row: Upper-left row coordinate. I{(int)} 6620 @param width: Area width (number of columns). I{(int)} 6621 @param height: Area height (number of rows). I{(int)} 6622 @param orientation: Orientation of lines (PSDF is simply averaged over the other orientation). Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 6623 @param interpolation: Interpolation to use when B{C{nstats}} is given and requires 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})} 6624 @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})} 6625 @param nstats: The number of samples to take on the distribution function. If nonpositive, data field width (height) is 6626 used. I{(int)} 6627 """ 6628 pass
6629
6630 - def psdf(target_line, orientation, interpolation, windowing, nstats):
6631 """ 6632 Calculates one-dimensional power spectrum density function of a data field. 6633 6634 @param target_line: A data line to store the distribution to. It will be resampled to requested width. I{(L{DataLine})} 6635 @param orientation: Orientation of lines (PSDF is simply averaged over the other orientation). Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 6636 @param interpolation: Interpolation to use when B{C{nstats}} is given and requires 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})} 6637 @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})} 6638 @param nstats: The number of samples to take on the distribution function. If nonpositive, data field width (height) is 6639 used. I{(int)} 6640 """ 6641 pass
6642
6643 - def area_row_psdf(mask, masking, col, row, width, height, windowing, level):
6644 """ 6645 Calculates the row-wise power spectrum density function (PSDF) of a rectangular part of a field. 6646 6647 The calculated PSDF has the natural number of points that follows from DFT, i.e. B{C{width}}/2+1. 6648 6649 The reduction of the total energy by windowing is compensated by multiplying the PSDF to make its sum of squares 6650 equal to the input data sum of squares. 6651 6652 Masking is performed by omitting all terms that contain excluded pixels. Since different rows contain different 6653 numbers of pixels, the resulting PSDF is calculated as a weighted sum where each row's weight is proportional to 6654 the number of contributing pixels. In other words, the weighting is fair: each contributing pixel has the same 6655 influence on the result. 6656 6657 Only B{C{level}} values 0 (no levelling) and 1 (subtract the mean value) used to be available. For SPM data, you usually 6658 wish to pass 1. Since 2.56 you can also pass 2 for mean line subtraction. 6659 6660 Do not assume the PSDF values are all positive, when masking is in effect. The PSDF should still have the correct 6661 integral, but it will be contaminated with noise, both positive and negative. 6662 6663 6664 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 6665 @param masking: Masking mode to use (has any effect only with non-B{C{None}} B{C{mask}}). Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 6666 @param col: Upper-left column coordinate. I{(int)} 6667 @param row: Upper-left row coordinate. I{(int)} 6668 @param width: Area width (number of columns). I{(int)} 6669 @param height: Area height (number of rows). I{(int)} 6670 @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})} 6671 @param level: The first polynomial degree to keep in the rows; lower degrees than B{C{level}} are subtracted. I{(int)} 6672 @return: A new one-dimensional data line with the PSDF. I{(L{DataLine})} 6673 """ 6674 return None
6675
6676 - def area_rpsdf(target_line, col, row, width, height, interpolation, windowing, nstats):
6677 """ 6678 Calculates radial power spectrum density function of a rectangular part of a data field. 6679 6680 @since: 2.7 6681 6682 @param target_line: A data line to store the distribution to. It will be resampled to requested width. I{(L{DataLine})} 6683 @param col: Upper-left column coordinate. I{(int)} 6684 @param row: Upper-left row coordinate. I{(int)} 6685 @param width: Area width (number of columns). I{(int)} 6686 @param height: Area height (number of rows). I{(int)} 6687 @param interpolation: Interpolation to use when B{C{nstats}} is given and requires 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})} 6688 @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})} 6689 @param nstats: The number of samples to take on the distribution function. If nonpositive, data field width (height) is 6690 used. I{(int)} 6691 """ 6692 pass
6693
6694 - def rpsdf(target_line, interpolation, windowing, nstats):
6695 """ 6696 Calculates radial power spectrum density function of a data field. 6697 6698 @since: 2.7 6699 6700 @param target_line: A data line to store the distribution to. It will be resampled to requested width. I{(L{DataLine})} 6701 @param interpolation: Interpolation to use when B{C{nstats}} is given and requires 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})} 6702 @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})} 6703 @param nstats: The number of samples to take on the distribution function. If nonpositive, data field width (height) is 6704 used. I{(int)} 6705 """ 6706 pass
6707
6708 - def area_row_asg(mask, masking, col, row, width, height, level):
6709 """ 6710 Calculates the row-wise area scale graph (ASG) of a rectangular part of a field. 6711 6712 The calculated ASG has the natural number of points, i.e. B{C{width}}-1. 6713 6714 The ASG represents the apparent area excess (ratio of surface and projected area minus one) observed at given 6715 length scale. The quantity calculated by this function serves a similar purpose as ASME B46.1 area scale graph but 6716 is defined differently, based on the HHCF. See L{DataField.area_row_hhcf}() for details of its calculation. 6717 6718 Only B{C{level}} values 0 (no levelling) and 1 (subtract the mean value) used to be available. There is no difference 6719 between them for HHCF. Since 2.56 you can also pass 2 for mean line subtraction. 6720 6721 6722 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 6723 @param masking: Masking mode to use (has any effect only with non-B{C{None}} B{C{mask}}). Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 6724 @param col: Upper-left column coordinate. I{(int)} 6725 @param row: Upper-left row coordinate. I{(int)} 6726 @param width: Area width (number of columns). I{(int)} 6727 @param height: Area height (number of rows). I{(int)} 6728 @param level: The first polynomial degree to keep in the rows, lower degrees than B{C{level}} are subtracted. I{(int)} 6729 @return: A new one-dimensional data line with the ASG. I{(L{DataLine})} 6730 """ 6731 return None
6732
6733 - def area_2dacf(target_field, col, row, width, height, xrange, yrange):
6734 """ 6735 Calculates two-dimensional autocorrelation function of a data field area. 6736 6737 The resulting data field has the correlation corresponding to (0,0) in the centre. 6738 6739 The maximum possible values of B{C{xrange}} and B{C{yrange}} are B{C{data_field}} width and height, respectively. However, as the 6740 values for longer distances are calculated from smaller number of data points they become increasingly bogus, 6741 therefore the default range is half of the size. 6742 6743 @since: 2.7 6744 6745 @param target_field: A data field to store the result to. It will be resampled to (2B{C{xrange}}-1)×(2B{C{yrange}}-1). I{(L{DataField})} 6746 @param col: Upper-left column coordinate. I{(int)} 6747 @param row: Upper-left row coordinate. I{(int)} 6748 @param width: Area width (number of columns). I{(int)} 6749 @param height: Area height (number of rows). I{(int)} 6750 @param xrange: Horizontal correlation range. Non-positive value means the default range of half of B{C{data_field}} width 6751 will be used. I{(int)} 6752 @param yrange: Vertical correlation range. Non-positive value means the default range of half of B{C{data_field}} height will 6753 be used. I{(int)} 6754 """ 6755 pass
6756
6757 - def area_2dacf_mask(target_field, mask, masking, col, row, width, height, xrange, yrange, weights):
6758 """ 6759 Calculates two-dimensional autocorrelation function of a data field area. 6760 6761 The resulting data field has the correlation corresponding to (0,0) in the centre. 6762 6763 The maximum possible values of B{C{xrange}} and B{C{yrange}} are B{C{data_field}} width and height, respectively. However, as the 6764 values for longer distances are calculated from smaller number of data points they become increasingly bogus, 6765 therefore the default range is half of the size. 6766 6767 @since: 2.50 6768 6769 @param target_field: A data field to store the result to. It will be resampled to (2B{C{xrange}}-1)×(2B{C{yrange}}-1). I{(L{DataField})} 6770 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 6771 @param masking: Masking mode to use (has any effect only with non-B{C{None}} B{C{mask}}). Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 6772 @param col: Upper-left column coordinate. I{(int)} 6773 @param row: Upper-left row coordinate. I{(int)} 6774 @param width: Area width (number of columns). I{(int)} 6775 @param height: Area height (number of rows). I{(int)} 6776 @param xrange: Horizontal correlation range. Non-positive value means the default range of half of B{C{data_field}} width 6777 will be used. I{(int)} 6778 @param yrange: Vertical correlation range. Non-positive value means the default range of half of B{C{data_field}} height will 6779 be used. I{(int)} 6780 @param weights: Field to store the denominators to (or B{C{None}}). It will be resized like B{C{target_field}}. The denominators 6781 are integers equal to the number of terms that contributed to each value. They are suitable as fitting 6782 weights if the ACF is fitted. I{(L{DataField})} 6783 """ 6784 pass
6785
6786 - def acf2d(target_field):
6787 """ 6788 Calculates two-dimensional autocorrelation function of a data field. 6789 6790 See L{DataField.area_2dacf}() for details. Parameters missing (not adjustable) in this function are set to their 6791 default values. 6792 6793 @since: 2.7 6794 6795 @param target_field: A data field to store the result to. I{(L{DataField})} 6796 """ 6797 pass
6798
6799 - def area_2dpsdf_mask(target_field, mask, masking, col, row, width, height, windowing, level):
6800 """ 6801 Calculates two-dimensional power spectrum density function of a data field area. 6802 6803 The resulting data field has the spectrum density corresponding zero frequency (0,0) in the centre. 6804 6805 Only B{C{level}} values 0 (no levelling) and 1 (subtract the mean value) used to be available. For SPM data, you usually 6806 wish to pass 1. Since 2.56 you can also pass 2 for mean plane subtraction. 6807 6808 The reduction of the total energy by windowing is compensated by multiplying the PSDF to make its sum of squares 6809 equal to the input data sum of squares. 6810 6811 Do not assume the PSDF values are all positive, when masking is in effect. The PSDF should still have the correct 6812 integral, but it will be contaminated with noise, both positive and negative. 6813 6814 @since: 2.51 6815 6816 @param target_field: A data field to store the result to. It will be resampled to B{C{width}}×B{C{height}}. I{(L{DataField})} 6817 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 6818 @param masking: Masking mode to use (has any effect only with non-B{C{None}} B{C{mask}}). Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 6819 @param col: Upper-left column coordinate. I{(int)} 6820 @param row: Upper-left row coordinate. I{(int)} 6821 @param width: Area width (number of columns). I{(int)} 6822 @param height: Area height (number of rows). I{(int)} 6823 @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})} 6824 @param level: The first polynomial degree to keep in the area; lower degrees than B{C{level}} are subtracted. I{(int)} 6825 """ 6826 pass
6827
6828 - def psdf2d(target_field, windowing, level):
6829 """ 6830 Calculates two-dimensional power spectrum density function of a data field. 6831 6832 See L{DataField.area_2dpsdf_mask}() for details and discussion. 6833 6834 @since: 2.51 6835 6836 @param target_field: A data field to store the result to. It will be resampled to the same size as B{C{data_field}}. I{(L{DataField})} 6837 @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})} 6838 @param level: The first polynomial degree to keep in the area; lower degrees than B{C{level}} are subtracted. Note only 6839 values 0, 1, and 2 are available at present. For SPM data, you usually wish to pass 1. I{(int)} 6840 """ 6841 pass
6842
6843 - def area_racf(target_line, col, row, width, height, nstats):
6844 """ 6845 Calculates radially averaged autocorrelation function of a rectangular part of a data field. 6846 6847 @since: 2.22 6848 6849 @param target_line: A data line to store the autocorrelation function to. It will be resampled to requested width. I{(L{DataLine})} 6850 @param col: Upper-left column coordinate. I{(int)} 6851 @param row: Upper-left row coordinate. I{(int)} 6852 @param width: Area width (number of columns). I{(int)} 6853 @param height: Area height (number of rows). I{(int)} 6854 @param nstats: The number of samples to take on the autocorrelation function. If nonpositive, a suitable resolution is 6855 chosen automatically. I{(int)} 6856 """ 6857 pass
6858
6859 - def racf(target_line, nstats):
6860 """ 6861 Calculates radially averaged autocorrelation function of a data field. 6862 6863 @since: 2.22 6864 6865 @param target_line: A data line to store the autocorrelation function to. It will be resampled to requested width. I{(L{DataLine})} 6866 @param nstats: The number of samples to take on the autocorrelation function. If nonpositive, a suitable resolution is 6867 chosen automatically. I{(int)} 6868 """ 6869 pass
6870
6871 - def area_minkowski_volume(target_line, col, row, width, height, nstats):
6872 """ 6873 Calculates Minkowski volume functional of a rectangular part of a data 6874 field. 6875 6876 Volume functional is calculated as the number of values above each 6877 threshold value (,white pixels`) divided by the total number of samples 6878 in the area. Is it's equivalent to 1-CDH. 6879 6880 @param target_line: A data line to store the distribution to. It will be 6881 resampled to requested width. I{(L{DataLine})} 6882 @param col: Upper-left column coordinate. I{(int)} 6883 @param row: Upper-left row coordinate. I{(int)} 6884 @param width: Area width (number of columns). I{(int)} 6885 @param height: Area height (number of rows). I{(int)} 6886 @param nstats: The number of samples to take on the distribution function. If 6887 nonpositive, a suitable resolution is determined automatically. I{(int)} 6888 """ 6889 pass
6890
6891 - def minkowski_volume(target_line, nstats):
6892 """ 6893 Calculates Minkowski volume functional of a data field. 6894 6895 See L{DataField.area_minkowski_volume}() for details. 6896 6897 @param target_line: A data line to store the distribution to. It will be 6898 resampled to requested width. I{(L{DataLine})} 6899 @param nstats: The number of samples to take on the distribution function. If 6900 nonpositive, a suitable resolution is determined automatically. I{(int)} 6901 """ 6902 pass
6903
6904 - def area_minkowski_boundary(target_line, col, row, width, height, nstats):
6905 """ 6906 Calculates Minkowski boundary functional of a rectangular part of a data 6907 field. 6908 6909 Boundary functional is calculated as the number of boundaries for each 6910 threshold value (the number of pixel sides where of neighouring pixels is 6911 ,white` and the other ,black`) divided by the total number of samples 6912 in the area. 6913 6914 @param target_line: A data line to store the distribution to. It will be 6915 resampled to requested width. I{(L{DataLine})} 6916 @param col: Upper-left column coordinate. I{(int)} 6917 @param row: Upper-left row coordinate. I{(int)} 6918 @param width: Area width (number of columns). I{(int)} 6919 @param height: Area height (number of rows). I{(int)} 6920 @param nstats: The number of samples to take on the distribution function. If 6921 nonpositive, a suitable resolution is determined automatically. I{(int)} 6922 """ 6923 pass
6924
6925 - def minkowski_boundary(target_line, nstats):
6926 """ 6927 Calculates Minkowski boundary functional of a data field. 6928 6929 See L{DataField.area_minkowski_boundary}() for details. 6930 6931 @param target_line: A data line to store the distribution to. It will be 6932 resampled to requested width. I{(L{DataLine})} 6933 @param nstats: The number of samples to take on the distribution function. If 6934 nonpositive, a suitable resolution is determined automatically. I{(int)} 6935 """ 6936 pass
6937
6938 - def area_minkowski_euler(target_line, col, row, width, height, nstats):
6939 """ 6940 Calculates Minkowski connectivity functional (Euler characteristics) of 6941 a rectangular part of a data field. 6942 6943 Connectivity functional is calculated as the number connected areas of 6944 pixels above threhsold (,white`) minus the number of connected areas of 6945 pixels below threhsold (,black`) for each threshold value, divided by the 6946 total number of samples in the area. 6947 6948 @param target_line: A data line to store the distribution to. It will be 6949 resampled to requested width. I{(L{DataLine})} 6950 @param col: Upper-left column coordinate. I{(int)} 6951 @param row: Upper-left row coordinate. I{(int)} 6952 @param width: Area width (number of columns). I{(int)} 6953 @param height: Area height (number of rows). I{(int)} 6954 @param nstats: The number of samples to take on the distribution function. If 6955 nonpositive, a suitable resolution is determined automatically. I{(int)} 6956 """ 6957 pass
6958
6959 - def minkowski_euler(target_line, nstats):
6960 """ 6961 Calculates Minkowski connectivity functional (Euler characteristics) of 6962 a data field. 6963 6964 See L{DataField.area_minkowski_euler}() for details. 6965 6966 @param target_line: A data line to store the distribution to. It will be 6967 resampled to requested width. I{(L{DataLine})} 6968 @param nstats: The number of samples to take on the distribution function. If 6969 nonpositive, a suitable resolution is determined automatically. I{(int)} 6970 """ 6971 pass
6972
6973 - def area_get_dispersion(mask, masking, col, row, width, height):
6974 """ 6975 Calculates the dispersion of a data field area, taking it as a distribution. 6976 6977 The function takes B{C{data_field}} as a distribution, finds the centre of mass 6978 in the area and then calculates the mean squared distance from this centre, 6979 weighted by B{C{data_field}} values. Normally B{C{data_field}} should contain only 6980 non-negative data. 6981 6982 The dispersion is measured in real coordinates, so horizontal and vertical 6983 pixel sizes play a role and the units are squared lateral units of 6984 B{C{data_field}}. Note, however, that B{C{xcenter}} and B{C{ycenter}} is returned in pixel 6985 coordinates since it is usually more convenient. 6986 6987 @since: 2.52 6988 6989 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 6990 @param masking: Masking mode to use (has any effect only with non-B{C{None}} B{C{mask}}). Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 6991 @param col: Upper-left column coordinate. I{(int)} 6992 @param row: Upper-left row coordinate. I{(int)} 6993 @param width: Area width (number of columns). I{(int)} 6994 @param height: Area height (number of rows). I{(int)} 6995 @return: Tuple consisting of 3 values (B{C{value}}, B{C{xcenter}}, B{C{ycenter}}). (I{(float)}, I{(float)}, I{(float)}) 6996 """ 6997 return None, None, None
6998
6999 - def get_dispersion():
7000 """ 7001 Calculates the dispersion of a data field, taking it as a distribution. 7002 7003 See L{DataField.area_get_dispersion}() for discussion. 7004 7005 @since: 2.52 7006 7007 @return: Tuple consisting of 3 values (B{C{value}}, B{C{xcenter}}, B{C{ycenter}}). (I{(float)}, I{(float)}, I{(float)}) 7008 """ 7009 return None, None, None
7010
7011 - def slope_distribution(derdist, kernel_size):
7012 """ 7013 Computes angular slope distribution. 7014 7015 @param derdist: A data line to fill with angular slope distribution. Its 7016 resolution determines resolution of the distribution. I{(L{DataLine})} 7017 @param kernel_size: If positive, local plane fitting will be used for slope 7018 computation; if nonpositive, plain central derivations 7019 will be used. I{(int)} 7020 """ 7021 pass
7022
7023 - def get_normal_coeffs(normalize1):
7024 """ 7025 Computes average normal vector of a data field. 7026 7027 @param normalize1: true to normalize the normal vector to 1, false to normalize 7028 the vector so that z-component is 1. I{(bool)} 7029 @return: Tuple consisting of 3 values (B{C{nx}}, B{C{ny}}, B{C{nz}}). (I{(float)}, I{(float)}, I{(float)}) 7030 """ 7031 return None, None, None
7032
7033 - def area_get_normal_coeffs(col, row, width, height, normalize1):
7034 """ 7035 Computes average normal vector of an area of a data field. 7036 7037 @param col: Upper-left column coordinate. I{(int)} 7038 @param row: Upper-left row coordinate. I{(int)} 7039 @param width: Area width (number of columns). I{(int)} 7040 @param height: Area height (number of rows). I{(int)} 7041 @param normalize1: true to normalize the normal vector to 1, false to normalize 7042 the vector so that z-component is 1. I{(bool)} 7043 @return: Tuple consisting of 3 values (B{C{nx}}, B{C{ny}}, B{C{nz}}). (I{(float)}, I{(float)}, I{(float)}) 7044 """ 7045 return None, None, None
7046
7047 - def area_get_inclination(col, row, width, height):
7048 """ 7049 Calculates the inclination of the image (polar and azimuth angle). 7050 7051 @param col: Upper-left column coordinate. I{(int)} 7052 @param row: Upper-left row coordinate. I{(int)} 7053 @param width: Area width (number of columns). I{(int)} 7054 @param height: Area height (number of rows). I{(int)} 7055 @return: Tuple consisting of 2 values (B{C{theta}}, B{C{phi}}). (I{(float)}, I{(float)}) 7056 """ 7057 return None, None
7058
7059 - def get_inclination():
7060 """ 7061 Calculates the inclination of the image (polar and azimuth angle). 7062 7063 @return: Tuple consisting of 2 values (B{C{theta}}, B{C{phi}}). (I{(float)}, I{(float)}) 7064 """ 7065 return None, None
7066
7067 - def area_get_line_stats(mask, target_line, col, row, width, height, quantity, orientation):
7068 """ 7069 Calculates a line quantity for each row or column in a data field area. 7070 7071 Use L{DataField.get_line_stats_mask}() for full masking type options. 7072 7073 @since: 2.2 7074 7075 @param mask: Mask of values to take values into account, or B{C{None}} for full 7076 B{C{data_field}}. I{(L{DataField})} 7077 @param target_line: A data line to store the distribution to. It will be 7078 resampled to the number of rows (columns). I{(L{DataLine})} 7079 @param col: Upper-left column coordinate. I{(int)} 7080 @param row: Upper-left row coordinate. I{(int)} 7081 @param width: Area width (number of columns). I{(int)} 7082 @param height: Area height (number of rows). I{(int)} 7083 @param quantity: The line quantity to calulate for each row (column). Expected values: C{B{LINE_STAT_MEAN}}, C{B{LINE_STAT_MEDIAN}}, C{B{LINE_STAT_MINIMUM}}, C{B{LINE_STAT_MAXIMUM}}, C{B{LINE_STAT_RMS}}, C{B{LINE_STAT_LENGTH}}, C{B{LINE_STAT_SLOPE}}, C{B{LINE_STAT_TAN_BETA0}}, C{B{LINE_STAT_RA}}, C{B{LINE_STAT_RZ}}, C{B{LINE_STAT_RT}}, C{B{LINE_STAT_SKEW}}, C{B{LINE_STAT_KURTOSIS}}, C{B{LINE_STAT_RANGE}}, C{B{LINE_STAT_VARIATION}}, C{B{LINE_STAT_MINPOS}}, C{B{LINE_STAT_MAXPOS}}. I{(L{LineStatQuantity})} 7084 @param orientation: Line orientation. For B{C{ORIENTATION_HORIZONTAL}} each 7085 B{C{target_line}} point corresponds to a row of the area, 7086 for B{C{ORIENTATION_VERTICAL}} each B{C{target_line}} point 7087 corresponds to a column of the area. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 7088 """ 7089 pass
7090
7091 - def get_line_stats_mask(mask, masking, target_line, weights, col, row, width, height, quantity, orientation):
7092 """ 7093 Calculates a line quantity for each row or column in a data field area. 7094 7095 @since: 2.46 7096 7097 @param mask: Mask of values to take values into account, or B{C{None}} for full 7098 B{C{data_field}}. I{(L{DataField})} 7099 @param masking: Masking mode to use. See the introduction for description of 7100 masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 7101 @param target_line: A data line to store the distribution to. It will be 7102 resampled to the number of rows (columns). I{(L{DataLine})} 7103 @param weights: A data line to store number of data points contributing to each 7104 value in B{C{target_line}}, or B{C{None}}. It is useful when masking is 7105 used to possibly exclude values calculated from too few data 7106 points. I{(L{DataLine})} 7107 @param col: Upper-left column coordinate. I{(int)} 7108 @param row: Upper-left row coordinate. I{(int)} 7109 @param width: Area width (number of columns). I{(int)} 7110 @param height: Area height (number of rows). I{(int)} 7111 @param quantity: The line quantity to calulate for each row (column). Expected values: C{B{LINE_STAT_MEAN}}, C{B{LINE_STAT_MEDIAN}}, C{B{LINE_STAT_MINIMUM}}, C{B{LINE_STAT_MAXIMUM}}, C{B{LINE_STAT_RMS}}, C{B{LINE_STAT_LENGTH}}, C{B{LINE_STAT_SLOPE}}, C{B{LINE_STAT_TAN_BETA0}}, C{B{LINE_STAT_RA}}, C{B{LINE_STAT_RZ}}, C{B{LINE_STAT_RT}}, C{B{LINE_STAT_SKEW}}, C{B{LINE_STAT_KURTOSIS}}, C{B{LINE_STAT_RANGE}}, C{B{LINE_STAT_VARIATION}}, C{B{LINE_STAT_MINPOS}}, C{B{LINE_STAT_MAXPOS}}. I{(L{LineStatQuantity})} 7112 @param orientation: Line orientation. For B{C{ORIENTATION_HORIZONTAL}} each 7113 B{C{target_line}} point corresponds to a row of the area, 7114 for B{C{ORIENTATION_VERTICAL}} each B{C{target_line}} point 7115 corresponds to a column of the area. Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 7116 """ 7117 pass
7118
7119 - def get_line_stats(target_line, quantity, orientation):
7120 """ 7121 Calculates a line quantity for each row or column of a data field. 7122 7123 @since: 2.2 7124 7125 @param target_line: A data line to store the distribution to. It will be 7126 resampled to B{C{data_field}} height (width). I{(L{DataLine})} 7127 @param quantity: The line quantity to calulate for each row (column). Expected values: C{B{LINE_STAT_MEAN}}, C{B{LINE_STAT_MEDIAN}}, C{B{LINE_STAT_MINIMUM}}, C{B{LINE_STAT_MAXIMUM}}, C{B{LINE_STAT_RMS}}, C{B{LINE_STAT_LENGTH}}, C{B{LINE_STAT_SLOPE}}, C{B{LINE_STAT_TAN_BETA0}}, C{B{LINE_STAT_RA}}, C{B{LINE_STAT_RZ}}, C{B{LINE_STAT_RT}}, C{B{LINE_STAT_SKEW}}, C{B{LINE_STAT_KURTOSIS}}, C{B{LINE_STAT_RANGE}}, C{B{LINE_STAT_VARIATION}}, C{B{LINE_STAT_MINPOS}}, C{B{LINE_STAT_MAXPOS}}. I{(L{LineStatQuantity})} 7128 @param orientation: Line orientation. See L{DataField.area_get_line_stats}(). Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 7129 """ 7130 pass
7131
7132 - def count_maxima():
7133 """ 7134 Counts the number of regional maxima in a data field. 7135 7136 See L{DataField.mark_extrema}() for the definition of a regional maximum. 7137 7138 @since: 2.38 7139 7140 @return: The number of regional maxima. I{(int)} 7141 """ 7142 return None
7143
7144 - def count_minima():
7145 """ 7146 Counts the number of regional minima in a data field. 7147 7148 See L{DataField.mark_extrema}() for the definition of a regional minimum. 7149 7150 @since: 2.38 7151 7152 @return: The number of regional minima. I{(int)} 7153 """ 7154 return None
7155
7156 - def psdf_to_angular_spectrum(nstats):
7157 """ 7158 Transforms 2D power spectral density to an angular spectrum. 7159 7160 @since: 2.56 7161 7162 @param nstats: The number of samples to take on the distribution function. If nonpositive, a suitable number is chosen 7163 automatically. I{(int)} 7164 @return: A new one-dimensional data line with the angular spectrum. I{(L{DataLine})} 7165 """ 7166 return None
7167
7168 - def angular_average(target_line, mask, masking, x, y, r, nstats):
7169 """ 7170 Performs angular averaging of a part of a data field. 7171 7172 The result of such averaging is an radial profile, starting from the disc centre. 7173 7174 The function does not guarantee that B{C{target_line}} will have exactly B{C{nstats}} samples upon return. A smaller number 7175 of samples than requested may be calculated for instance if either central or outer part of the disc is excluded by 7176 masking. 7177 7178 @since: 2.42 7179 7180 @param target_line: A data line to store the distribution to. It will be resampled to B{C{nstats}} size. I{(L{DataLine})} 7181 @param mask: Mask of pixels to include from/exclude in the averaging, or B{C{None}} for full B{C{data_field}}. I{(L{DataField})} 7182 @param masking: Masking mode to use. See the introduction for description of masking modes. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 7183 @param x: X-coordinate of the averaging disc origin, in real coordinates including offsets. I{(float)} 7184 @param y: Y-coordinate of the averaging disc origin, in real coordinates including offsets. I{(float)} 7185 @param r: Radius, in real coordinates. It determines the real length of the resulting line. I{(float)} 7186 @param nstats: The number of samples the resulting line should have. A non-positive value means the sampling will be 7187 determined automatically. I{(int)} 7188 """ 7189 pass
7190
7191 - def copy_units_to_surface(surface):
7192 """ 7193 Sets lateral and value units of a surface to match a data field. 7194 7195 @since: 2.46 7196 7197 @param surface: A surface. I{(L{Surface})} 7198 """ 7199 pass
7200
7201 - def get_data():
7202 """ 7203 Extract the data of a data field. 7204 7205 The returned list contains a copy of the data. Changing its contents does 7206 not change the data field's data. 7207 7208 7209 @return: List containing extracted data field data. I{(list)} 7210 """ 7211 return None
7212
7213 - def set_data(data):
7214 """ 7215 Sets the entire contents of a data field. 7216 7217 The length of B{C{data}} must be equal to the number of elements of the data 7218 field. 7219 7220 @param data: Sequence of floating point values. I{(list)} 7221 """ 7222 pass
7223
7224 - def fit_polynom(col_degree, row_degree):
7225 """ 7226 Fits a two-dimensional polynomial to a data field. 7227 7228 7229 @param col_degree: Degree of polynomial to fit column-wise (x-coordinate). I{(int)} 7230 @param row_degree: Degree of polynomial to fit row-wise (y-coordinate). I{(int)} 7231 @return: a newly allocated array with coefficients. I{(list)} 7232 """ 7233 return None
7234
7235 - def area_fit_polynom(col, row, width, height, col_degree, row_degree):
7236 """ 7237 Fits a two-dimensional polynomial to a rectangular part of a data field. 7238 7239 The coefficients are stored by row into B{C{coeffs}}, like data in a datafield. 7240 Row index is y-degree, column index is x-degree. 7241 7242 Note naive x^n y^m polynomial fitting is numerically unstable, therefore 7243 this method works only up to B{C{col_degree}} = B{C{row_degree}} = 6. 7244 7245 7246 @param col: Upper-left column coordinate. I{(int)} 7247 @param row: Upper-left row coordinate. I{(int)} 7248 @param width: Area width (number of columns). I{(int)} 7249 @param height: Area height (number of rows). I{(int)} 7250 @param col_degree: Degree of polynomial to fit column-wise (x-coordinate). I{(int)} 7251 @param row_degree: Degree of polynomial to fit row-wise (y-coordinate). I{(int)} 7252 @return: a newly allocated array with coefficients. I{(list)} 7253 """ 7254 return None
7255
7256 - def subtract_polynom(col_degree, row_degree, coeffs):
7257 """ 7258 Subtracts a two-dimensional polynomial from a data field. 7259 7260 @param col_degree: Degree of polynomial to subtract column-wise (x-coordinate). I{(int)} 7261 @param row_degree: Degree of polynomial to subtract row-wise (y-coordinate). I{(int)} 7262 @param coeffs: An array of size (B{C{row_degree}}+1)*(B{C{col_degree}}+1) with coefficients, 7263 see L{DataField.area_fit_polynom}() for details. I{(list)} 7264 """ 7265 pass
7266
7267 - def area_subtract_polynom(col, row, width, height, col_degree, row_degree, coeffs):
7268 """ 7269 Subtracts a two-dimensional polynomial from a rectangular part of a data 7270 field. 7271 7272 @param col: Upper-left column coordinate. I{(int)} 7273 @param row: Upper-left row coordinate. I{(int)} 7274 @param width: Area width (number of columns). I{(int)} 7275 @param height: Area height (number of rows). I{(int)} 7276 @param col_degree: Degree of polynomial to subtract column-wise (x-coordinate). I{(int)} 7277 @param row_degree: Degree of polynomial to subtract row-wise (y-coordinate). I{(int)} 7278 @param coeffs: An array of size (B{C{row_degree}}+1)*(B{C{col_degree}}+1) with coefficients, 7279 see L{DataField.area_fit_polynom}() for details. I{(list)} 7280 """ 7281 pass
7282
7283 - def fit_legendre(col_degree, row_degree):
7284 """ 7285 Fits two-dimensional Legendre polynomial to a data field. 7286 7287 See L{DataField.area_fit_legendre}() for details. 7288 7289 7290 @param col_degree: Degree of polynomial to fit column-wise (x-coordinate). I{(int)} 7291 @param row_degree: Degree of polynomial to fit row-wise (y-coordinate). I{(int)} 7292 @return: Either B{C{coeffs}} if it was not B{C{None}}, or a newly allocated array 7293 with coefficients. I{(list)} 7294 """ 7295 return None
7296
7297 - def area_fit_legendre(col, row, width, height, col_degree, row_degree):
7298 """ 7299 Fits two-dimensional Legendre polynomial to a rectangular part of a data 7300 field. 7301 7302 The B{C{col_degree}} and B{C{row_degree}} parameters limit the maximum powers of x and 7303 y exactly as if simple powers were fitted, therefore if you do not intend to 7304 interpret contents of B{C{coeffs}} youself, the only difference is that this 7305 method is much more numerically stable. 7306 7307 The coefficients are organized exactly like in 7308 L{DataField.area_fit_polynom}(), but they are not coefficients of 7309 x^n y^m, instead they are coefficients of P_n(x) P_m(x), where P are 7310 Legendre polynomials. The polynomials are evaluated in coordinates where 7311 first row (column) corresponds to -1.0, and the last row (column) to 1.0. 7312 7313 Note the polynomials are normal Legendre polynomials that are not exactly 7314 orthogonal on a discrete point set (if their degrees are equal mod 2). 7315 7316 7317 @param col: Upper-left column coordinate. I{(int)} 7318 @param row: Upper-left row coordinate. I{(int)} 7319 @param width: Area width (number of columns). I{(int)} 7320 @param height: Area height (number of rows). I{(int)} 7321 @param col_degree: Degree of polynomial to fit column-wise (x-coordinate). I{(int)} 7322 @param row_degree: Degree of polynomial to fit row-wise (y-coordinate). I{(int)} 7323 @return: Either B{C{coeffs}} if it was not B{C{None}}, or a newly allocated array 7324 with coefficients. I{(list)} 7325 """ 7326 return None
7327
7328 - def subtract_legendre(col_degree, row_degree, coeffs):
7329 """ 7330 Subtracts a two-dimensional Legendre polynomial fit from a data field. 7331 7332 @param col_degree: Degree of polynomial to subtract column-wise (x-coordinate). I{(int)} 7333 @param row_degree: Degree of polynomial to subtract row-wise (y-coordinate). I{(int)} 7334 @param coeffs: An array of size (B{C{row_degree}}+1)*(B{C{col_degree}}+1) with coefficients, 7335 see L{DataField.area_fit_legendre}() for details. I{(list)} 7336 """ 7337 pass
7338
7339 - def area_subtract_legendre(col, row, width, height, col_degree, row_degree, coeffs):
7340 """ 7341 Subtracts a two-dimensional Legendre polynomial fit from a rectangular part 7342 of a data field. 7343 7344 Due to the transform of coordinates to [-1,1] x [-1,1], this method can be 7345 used on an area of dimensions different than the area the coefficients were 7346 calculated for. 7347 7348 @param col: Upper-left column coordinate. I{(int)} 7349 @param row: Upper-left row coordinate. I{(int)} 7350 @param width: Area width (number of columns). I{(int)} 7351 @param height: Area height (number of rows). I{(int)} 7352 @param col_degree: Degree of polynomial to subtract column-wise (x-coordinate). I{(int)} 7353 @param row_degree: Degree of polynomial to subtract row-wise (y-coordinate). I{(int)} 7354 @param coeffs: An array of size (B{C{row_degree}}+1)*(B{C{col_degree}}+1) with coefficients, 7355 see L{DataField.area_fit_legendre}() for details. I{(list)} 7356 """ 7357 pass
7358
7359 - def fit_poly_max(max_degree):
7360 """ 7361 Fits two-dimensional polynomial with limited total degree to a data field. 7362 7363 See L{DataField.area_fit_poly_max}() for details. 7364 7365 7366 @param max_degree: Maximum total polynomial degree, that is the maximum of m+n 7367 in x^n y^m terms. I{(int)} 7368 @return: Either B{C{coeffs}} if it was not B{C{None}}, or a newly allocated array 7369 with coefficients. I{(list)} 7370 """ 7371 return None
7372
7373 - def area_fit_poly_max(col, row, width, height, max_degree):
7374 """ 7375 Fits two-dimensional polynomial with limited total degree to a rectangular 7376 part of a data field. 7377 7378 See L{DataField.area_fit_legendre}() for description. This function 7379 differs by limiting the total maximum degree, while 7380 L{DataField.area_fit_legendre}() limits the maximum degrees in horizontal 7381 and vertical directions independently. 7382 7383 7384 @param col: Upper-left column coordinate. I{(int)} 7385 @param row: Upper-left row coordinate. I{(int)} 7386 @param width: Area width (number of columns). I{(int)} 7387 @param height: Area height (number of rows). I{(int)} 7388 @param max_degree: Maximum total polynomial degree, that is the maximum of m+n 7389 in x^n y^m terms. I{(int)} 7390 @return: Either B{C{coeffs}} if it was not B{C{None}}, or a newly allocated array 7391 with coefficients. I{(list)} 7392 """ 7393 return None
7394
7395 - def subtract_poly_max(max_degree, coeffs):
7396 """ 7397 Subtracts a two-dimensional polynomial with limited total degree from 7398 a data field. 7399 7400 @param max_degree: Maximum total polynomial degree, that is the maximum of m+n 7401 in x^n y^m terms. I{(int)} 7402 @param coeffs: An array of size (B{C{row_degree}}+1)*(B{C{col_degree}}+2)/2 with 7403 coefficients, see L{DataField.area_fit_poly_max}() for details. I{(list)} 7404 """ 7405 pass
7406
7407 - def area_subtract_poly_max(col, row, width, height, max_degree, coeffs):
7408 """ 7409 Subtracts a two-dimensional polynomial with limited total degree from a 7410 rectangular part of a data field. 7411 7412 Due to the transform of coordinates to [-1,1] x [-1,1], this method can be 7413 used on an area of dimensions different than the area the coefficients were 7414 calculated for. 7415 7416 @param col: Upper-left column coordinate. I{(int)} 7417 @param row: Upper-left row coordinate. I{(int)} 7418 @param width: Area width (number of columns). I{(int)} 7419 @param height: Area height (number of rows). I{(int)} 7420 @param max_degree: Maximum total polynomial degree, that is the maximum of m+n 7421 in x^n y^m terms. I{(int)} 7422 @param coeffs: An array of size (B{C{row_degree}}+1)*(B{C{col_degree}}+2)/2 with 7423 coefficients, see L{DataField.area_fit_poly_max}() for details. I{(list)} 7424 """ 7425 pass
7426
7427 - def fit_poly(mask_field, term_powers, exclude):
7428 """ 7429 Fit a given set of polynomial terms to a data field. 7430 7431 @since: 2.11 7432 7433 @param mask_field: Mask of values to take values into account, or B{C{None}} for full 7434 B{C{data_field}}. Values equal to 0.0 and below cause corresponding 7435 B{C{data_field}} samples to be ignored, values equal to 1.0 and above 7436 cause inclusion of corresponding B{C{data_field}} samples. The behaviour 7437 for values inside (0.0, 1.0) is undefined (it may be specified 7438 in the future). I{(L{DataField})} 7439 @param term_powers: Array of size 2*B{C{nterms}} describing the terms to fit. Each 7440 terms is described by a couple of powers (powerx, powery). I{(list)} 7441 @param exclude: Interpret values B{C{w}} in the mask as 1.0-B{C{w}}. I{(bool)} 7442 @return: Value B{C{coeffs}}. (I{(list)}) 7443 """ 7444 return None
7445
7446 - def area_fit_poly(mask_field, col, row, width, height, term_powers, exclude):
7447 """ 7448 Fit a given set of polynomial terms to a rectangular part of a data field. 7449 7450 The polynomial coefficients correspond to normalized coordinates that 7451 are always from the interval [-1,1] where -1 corresponds to the left/topmost 7452 pixel and 1 corresponds to the bottom/rightmost pixel of the area. 7453 7454 @since: 2.11 7455 7456 @param mask_field: Mask of values to take values into account, or B{C{None}} for full 7457 B{C{data_field}}. Values equal to 0.0 and below cause corresponding 7458 B{C{data_field}} samples to be ignored, values equal to 1.0 and above 7459 cause inclusion of corresponding B{C{data_field}} samples. The behaviour 7460 for values inside (0.0, 1.0) is undefined (it may be specified 7461 in the future). I{(L{DataField})} 7462 @param col: Upper-left column coordinate. I{(int)} 7463 @param row: Upper-left row coordinate. I{(int)} 7464 @param width: Area width (number of columns). I{(int)} 7465 @param height: Area height (number of rows). I{(int)} 7466 @param term_powers: Array of size 2*B{C{nterms}} describing the terms to fit. Each 7467 terms is described by a couple of powers (powerx, powery). I{(list)} 7468 @param exclude: Interpret values B{C{w}} in the mask as 1.0-B{C{w}}. I{(bool)} 7469 @return: Value B{C{coeffs}}. (I{(list)}) 7470 """ 7471 return None
7472
7473 - def subtract_poly(term_powers, coeffs):
7474 """ 7475 Subtract a given set of polynomial terms from a data field. 7476 7477 @since: 2.11 7478 7479 @param term_powers: Array of size 2*B{C{nterms}} describing the fitter terms. Each 7480 terms is described by a couple of powers (powerx, powery). I{(list)} 7481 @param coeffs: Array of size B{C{nterms}} to store with the coefficients. I{(list)} 7482 """ 7483 pass
7484
7485 - def area_subtract_poly(col, row, width, height, term_powers, coeffs):
7486 """ 7487 Subtract a given set of polynomial terms from a rectangular part of a data 7488 field. 7489 7490 @since: 2.11 7491 7492 @param col: Upper-left column coordinate. I{(int)} 7493 @param row: Upper-left row coordinate. I{(int)} 7494 @param width: Area width (number of columns). I{(int)} 7495 @param height: Area height (number of rows). I{(int)} 7496 @param term_powers: Array of size 2*B{C{nterms}} describing the fitted terms. Each 7497 terms is described by a couple of powers (powerx, powery). I{(list)} 7498 @param coeffs: Array of size B{C{nterms}} to store with the coefficients. I{(list)} 7499 """ 7500 pass
7501
7502 - def area_fit_local_planes(size, col, row, width, height, types):
7503 """ 7504 Fits a plane through neighbourhood of each sample in a rectangular part 7505 of a data field. 7506 7507 The sample is always in the origin of its local (x,y) coordinate system, 7508 even if the neighbourhood is not centered about it (e.g. because sample 7509 is on the edge of data field). Z-coordinate is however not centered, 7510 that is B{C{PLANE_FIT_A}} is normal mean value. 7511 7512 7513 @param size: Neighbourhood size (must be at least 2). It is centered around 7514 each pixel, unless B{C{size}} is even when it sticks to the right. I{(int)} 7515 @param col: Upper-left column coordinate. I{(int)} 7516 @param row: Upper-left row coordinate. I{(int)} 7517 @param width: Area width (number of columns). I{(int)} 7518 @param height: Area height (number of rows). I{(int)} 7519 @param types: The types of requested quantities. I{(list)} 7520 @return: An array of data fields with requested quantities, that is 7521 B{C{results}} unless it was B{C{None}} and a new array was allocated. I{(list)} 7522 """ 7523 return None
7524
7525 - def fit_local_planes(size, types):
7526 """ 7527 Fits a plane through neighbourhood of each sample in a data field. 7528 7529 See L{DataField.area_fit_local_planes}() for details. 7530 7531 7532 @param size: Neighbourhood size. I{(int)} 7533 @param types: The types of requested quantities. I{(list)} 7534 @return: An array of data fields with requested quantities. I{(list)} 7535 """ 7536 return None
7537
7538 - def elliptic_area_extract(col, row, width, height):
7539 """ 7540 Extracts values from an elliptic region of a data field. 7541 7542 The elliptic region is defined by its bounding box which must be completely 7543 contained in the data field. 7544 7545 7546 @param col: Upper-left bounding box column coordinate. I{(int)} 7547 @param row: Upper-left bounding box row coordinate. I{(int)} 7548 @param width: Bounding box width (number of columns). I{(int)} 7549 @param height: Bounding box height (number of rows). I{(int)} 7550 @return: The number of extracted values. I{(list)} 7551 """ 7552 return None
7553
7554 - def elliptic_area_unextract(col, row, width, height, data):
7555 """ 7556 Puts values back to an elliptic region of a data field. 7557 7558 The elliptic region is defined by its bounding box. In versions prior to 2.59 the bounding box must be completely 7559 contained in the data field. Since version 2.59 the ellipse can intersect the data field in any manner. 7560 7561 This method does the reverse of L{DataField.elliptic_area_extract}() allowing to implement pixel-wise filters on 7562 elliptic areas. Values from B{C{data}} are put back to the same positions L{DataField.elliptic_area_extract}() took 7563 them from. 7564 7565 @param col: Upper-left bounding box column coordinate. I{(int)} 7566 @param row: Upper-left bounding box row coordinate. I{(int)} 7567 @param width: Bounding box width (number of columns). I{(int)} 7568 @param height: Bounding box height (number of rows). I{(int)} 7569 @param data: The values to put back. It must be the same array as in previous L{DataField.elliptic_area_extract}(). I{(list)} 7570 """ 7571 pass
7572
7573 - def circular_area_extract(col, row, radius):
7574 """ 7575 Extracts values from a circular region of a data field. 7576 7577 7578 @param col: Row index of circular area centre. I{(int)} 7579 @param row: Column index of circular area centre. I{(int)} 7580 @param radius: Circular area radius (in pixels). See 7581 L{DataField.circular_area_extract_with_pos}() for caveats. I{(float)} 7582 @return: Array of values. I{(list)} 7583 """ 7584 return None
7585
7586 - def circular_area_unextract(col, row, radius, data):
7587 """ 7588 Puts values back to a circular region of a data field. 7589 7590 This method does the reverse of L{DataField.circular_area_extract}() allowing to implement pixel-wise filters on 7591 circular areas. Values from B{C{data}} are put back to the same positions L{DataField.circular_area_extract}() took 7592 them from. 7593 7594 @param col: Row index of circular area centre. I{(int)} 7595 @param row: Column index of circular area centre. I{(int)} 7596 @param radius: Circular area radius (in pixels). I{(float)} 7597 @param data: The values to put back. It must be the same array as in previous L{DataField.circular_area_unextract}(). I{(list)} 7598 """ 7599 pass
7600
7601 - def circular_area_extract_with_pos(col, row, radius):
7602 """ 7603 Extracts values with positions from a circular region of a data field. 7604 7605 The row and column indices stored to B{C{xpos}} and B{C{ypos}} are relative to the area centre, i.e. to (B{C{col}}, B{C{row}}). The 7606 central pixel will therefore have 0 at the corresponding position in both B{C{xpos}} and B{C{ypos}}. 7607 7608 @since: 2.2 7609 7610 @param col: Row index of circular area centre. I{(int)} 7611 @param row: Column index of circular area centre. I{(int)} 7612 @param radius: Circular area radius (in pixels). Any value is allowed, although to get areas that do not deviate from 7613 true circles after pixelization too much, half-integer values are recommended, integer radii are NOT 7614 recommended. I{(float)} 7615 @return: Tuple consisting of 3 values (B{C{value}}, B{C{xpos}}, B{C{ypos}}). (I{(list)}, I{(list)}, I{(list)}) 7616 """ 7617 return None, None, None
7618
7619 - def local_maximum(x, y, ax, ay):
7620 """ 7621 Searches an elliptical area in a data field for local maximum. 7622 7623 The area may stick outside the data field. 7624 7625 The function first finds the maximum within the ellipse, intersected with the data field and then tries subpixel 7626 refinement. The maximum is considered successfully located if it is inside the data field, i.e. not on edge, there 7627 is no higher value in its 8-neighbourhood, and the subpixel refinement of its position succeeds (which usually 7628 happens when the first two conditions are met, but not always). 7629 7630 Even if the function returns B{C{False}} the values of B{C{x}} and B{C{y}} are reasonable, but they may not correspond to an 7631 actual maximum. 7632 7633 The radii can be zero. A single pixel is then examined, but if it is indeed a local maximum, its position is 7634 refined. 7635 7636 @since: 2.49 7637 7638 @param x: Approximate maximum B{C{x}}-location to be improved (in pixels). I{(float)} 7639 @param y: Approximate maximum B{C{y}}-location to be improved (in pixels). I{(float)} 7640 @param ax: Horizontal search radius. I{(int)} 7641 @param ay: Vertical search radius. I{(int)} 7642 @return: Tuple consisting of 3 values (B{C{value}}, B{C{x_out}}, B{C{y_out}}). (I{(bool)}, I{(float)}, I{(float)}) 7643 """ 7644 return None, None, None
7645
7646 - def affine(dest, affine, interp, exterior, fill_value):
7647 """ 7648 Performs an affine transformation of a data field in the horizontal plane. 7649 7650 Note the transform B{C{invtrans}} is the inverse transform, in other 7651 words it calculates the old coordinates from the new coordinates. This 7652 way even degenerate (non-invertible) transforms can be meaningfully used. 7653 Also note that the (column, row) coordinate system is left-handed. 7654 7655 The B{C{EXTERIOR_LAPLACE}} exterior type cannot be used with this function. 7656 7657 @since: 2.34 7658 7659 @param dest: Destination data field. I{(L{DataField})} 7660 @param affine: I{(list)} 7661 @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})} 7662 @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}}, C{B{EXTERIOR_LAPLACE}}. I{(L{ExteriorType})} 7663 @param fill_value: The value to use with B{C{EXTERIOR_FIXED_VALUE}}. I{(float)} 7664 """ 7665 pass
7666
7667 - def affine_prepare(dest, a1a2, a1a2_corr, scaling, prevent_rotation, oversampling):
7668 """ 7669 Resolves an affine transformation of a data field in the horizontal plane. 7670 7671 This function calculates suitable arguments for L{DataField.affine}() 7672 from given images and lattice vectors (in real coordinates). 7673 7674 Data field B{C{dest}} will be resized and its real dimensions and units set in 7675 anticipation of L{DataField.affine}(). Its contents will be destroyed. 7676 7677 Note that B{C{a1a2_corr}} is an input-output parameter. In general, the vectors 7678 will be modified according to B{C{scaling}} and B{C{prevent_rotation}} to the actual 7679 vectors in B{C{dest}} after the transformation. Only if B{C{prevent_rotation}} is 7680 B{C{False}} and B{C{scaling}} is B{C{AFFINE_SCALING_AS_GIVEN}} the vectors are 7681 preserved. 7682 7683 @since: 2.49 7684 7685 @param dest: Destination data field. I{(L{DataField})} 7686 @param a1a2: Lattice vectors (or generally base vectors) in B{C{source}}, as an array 7687 of four components: B{C{x1}}, B{C{y1}}, B{C{x2}} and B{C{y2}}. I{(list)} 7688 @param a1a2_corr: Correct lattice vectors (or generally base vectors) B{C{dest}} should 7689 have after the affine transform, in the same form as B{C{a1a2}}. I{(list)} 7690 @param scaling: How (or if) to scale the correct lattice vectors. Expected values: C{B{AFFINE_SCALING_AS_GIVEN}}, C{B{AFFINE_SCALING_PRESERVE_AREA}}, C{B{AFFINE_SCALING_PRESERVE_X}}. I{(L{AffineScalingType})} 7691 @param prevent_rotation: B{C{True}} to prevent rotation of the data by rotating 7692 B{C{a1a2_corr}} as a whole to a direction preserving the 7693 data orientation. B{C{False}} to take B{C{a1a2_corr}} as given. I{(bool)} 7694 @param oversampling: Oversampling factor. Values larger than 1 mean smaller 7695 pixels (and more of them) in B{C{dest}}, values smaller than 1 7696 the opposite. Pass 1.0 for the default pixel size choice. I{(float)} 7697 @return: Tuple consisting of 2 values (B{C{a1a2_corr_out}}, B{C{invtrans}}). (I{(list)}, I{(list)}) 7698 """ 7699 return None, None
7700
7701 - def waterpour(result):
7702 """ 7703 Performs the classical Vincent watershed segmentation of a data field. 7704 7705 The segmentation always results in the entire field being masked with the 7706 exception of thin (8-connectivity) lines separating the segments (grains). 7707 7708 Compared to L{DataField.grains_mark_watershed}(), this algorithm is very 7709 fast. However, when used alone, it typically results in a serious 7710 oversegmentation as each local minimum gives raise to a grain. Furthermore, 7711 the full segmentation means that also pixels which would be considered 7712 outside any grain in the topographical sense will be assigned to some 7713 catchment basin. Therefore, pre- or postprocessing is usually necessary, 7714 using the gradient image or a more sophisticated method. 7715 7716 The function does not assign pixels with value B{C{HUGE_VAL}} or larger to any 7717 segment. This can be used to pre-mark certain areas explicitly as 7718 boundaries. 7719 7720 Since the algorithm numbers the grains as a side effect, you can pass a 7721 B{C{grains}} array and get the grain numbers immediatelly, avoiding the 7722 relatively (although not drastically) expensive 7723 L{DataField.number_grains}() call. 7724 7725 @since: 2.37 7726 7727 @param result: Data field that will be filled with the resulting mask. It will be 7728 resized to the dimensions of B{C{data_field}} and its properties set 7729 accordingly. I{(L{DataField})} 7730 @return: Tuple consisting of 2 values (B{C{value}}, B{C{grains}}). (I{(int)}, I{(list)}) 7731 """ 7732 return None, None
7733
7734 - def measure_lattice_acf(a1a2):
7735 """ 7736 Estimates or improves estimate of lattice vectors from a 2D ACF field. 7737 7738 Note that the 2D ACF of a data field has to be passed, not the data field 7739 itself. The correlation function can be for instance calculated by 7740 L{DataField.acf2d}(). However, you can calculate and/or process the 7741 correlation function in any way you see fit. 7742 7743 When the vectors in B{C{a1a2}} are zero the function attempts to estimate the 7744 lattice from scratch. But if B{C{a1a2}} contains two non-zero vectors it takes 7745 them as approximate lattice vectors to improve. 7746 7747 If the function return B{C{False}} the array B{C{a1a2}} is filled with useless values 7748 and must be ignored. 7749 7750 @since: 2.49 7751 7752 @param a1a2: Lattice vectors as an array of four components: B{C{x1}}, B{C{y1}}, B{C{x2}} and 7753 B{C{y2}} (in real coordinates). I{(list)} 7754 @return: Tuple consisting of 2 values (B{C{a1a2_out}}, B{C{succeeded}}). (I{(list)}, I{(BooleanOutArg)}) 7755 """ 7756 return None, None
7757
7758 - def measure_lattice_psdf(a1a2):
7759 """ 7760 Estimates or improves estimate of lattice vectors from a 2D PSDF field. 7761 7762 Note that the 2D PSDF of a data field has to be passed, not the data field 7763 itself. The spectral density can be for instance calculated by 7764 L{DataField.fft2d}() and summing the squares of real and imaginary parts 7765 However, you can calculate and/or process the spectral density in any way 7766 you see fit. 7767 7768 When the vectors in B{C{a1a2}} are zero the function attempts to estimate the 7769 lattice from scratch. But if B{C{a1a2}} contains two non-zero vectors it takes 7770 them as approximate lattice vectors to improve. 7771 7772 If the function return B{C{False}} the array B{C{a1a2}} is filled with useless values 7773 and must be ignored. 7774 7775 @since: 2.49 7776 7777 @param a1a2: Lattice vectors as an array of four components: B{C{x1}}, B{C{y1}}, B{C{x2}} and 7778 B{C{y2}} (in real coordinates). I{(list)} 7779 @return: Tuple consisting of 2 values (B{C{a1a2_out}}, B{C{succeeded}}). (I{(list)}, I{(BooleanOutArg)}) 7780 """ 7781 return None, None
7782
7783 - def get_local_maxima_list(ndata, skip, threshold, subpixel):
7784 """ 7785 Locates local maxima in a data field. 7786 7787 At most B{C{ndata}} maxima are located (with the largest values). 7788 7789 7790 @param ndata: Number of items in B{C{xdata}}, B{C{ydata}} and B{C{zdata}}. I{(int)} 7791 @param skip: Minimum pixel distance between maxima. I{(int)} 7792 @param threshold: Minimum value to be considered a maximum. I{(float)} 7793 @param subpixel: B{C{True}} for subpixel refinement. I{(bool)} 7794 @return: Tuple consisting of 3 values (B{C{xdata}}, B{C{ydata}}, B{C{zdata}}). (I{(list)}, I{(list)}, I{(list)}) 7795 """ 7796 return None, None, None
7797
7798 - def get_profile_mask(mask, masking, xfrom, yfrom, xto, yto, res, thickness, interpolation):
7799 """ 7800 Extracts a possibly averaged profile from data field, with masking. 7801 7802 The extracted profile can contain holes due to masking. It can also contain 7803 no points at all if the all data values along the profile were excluded due 7804 to masking – in this case B{C{None}} is returned. 7805 7806 Unlike L{DataField.get_profile}(), this function takes real coordinates 7807 (without offsets), not row and column indices. 7808 7809 @since: 2.49 7810 7811 @param mask: Mask specifying which values to take into account/exclude, or B{C{None}}. I{(L{DataField})} 7812 @param masking: Masking mode to use. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 7813 @param xfrom: The real B{C{x}}-coordinate where the line starts. I{(float)} 7814 @param yfrom: The real B{C{y}}-coordinate where line starts. I{(float)} 7815 @param xto: The real B{C{x}}-coordinate where the line ends. I{(float)} 7816 @param yto: The real B{C{y}}-coordinate where line ends. I{(float)} 7817 @param res: Requested resolution, i.e. the number of samples to take. 7818 If nonpositive, sampling is chosen to match B{C{data_field}}'s. I{(int)} 7819 @param thickness: Thickness of line to be averaged. I{(int)} 7820 @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})} 7821 @return: A newly allocated array of B{C{XY}} coordinare pairs, or B{C{None}}. 7822 The caller must free the returned array with g_free(). I{(list)} 7823 """ 7824 return None
7825
7826 - def number_grains():
7827 """ 7828 Constructs an array with grain numbers from a mask data field. 7829 7830 7831 @return: A list of integers, containing 0 outside grains and the grain 7832 number inside a grain. I{(list)} 7833 """ 7834 return None
7835
7837 """ 7838 Constructs an array with grain numbers from a mask data field treated as 7839 periodic. 7840 7841 7842 @return: A list of integers, containing 0 outside grains and the grain 7843 number inside a grain. I{(list)} 7844 """ 7845 return None
7846
7847 - def get_grain_sizes(grains):
7848 """ 7849 Find sizes of all grains in a mask data field. 7850 7851 Size is the number of pixels in the grain. 7852 7853 The zeroth element of B{C{sizes}} is filled with the number of pixels not covered by the mask. 7854 7855 @since: 2.47 7856 7857 @param grains: Grain numbers filled with L{DataField.number_grains}(). I{(list)} 7858 @return: Value B{C{sizes}}. (I{(list)}) 7859 """ 7860 return None
7861
7862 - def get_grain_bounding_boxes(grains):
7863 """ 7864 Finds bounding boxes of all grains in a mask data field. 7865 7866 The array B{C{grains}} must have the same number of elements as B{C{mask_field}}. 7867 Normally it is obtained from a function such as 7868 L{DataField.number_grains}(). 7869 7870 7871 @param grains: Array of grain numbers. I{(list)} 7872 @return: Value B{C{bboxes}}. (I{(list)}) 7873 """ 7874 return None
7875
7877 """ 7878 Finds bounding boxes of all grains in a mask data field, assuming periodic 7879 boundary condition. 7880 7881 The array B{C{grains}} must have the same number of elements as B{C{mask_field}}. 7882 Normally it is obtained from a function such as 7883 L{DataField.number_grains}(). 7884 7885 7886 @param grains: Array of grain numbers. I{(list)} 7887 @return: Value B{C{bboxes}}. (I{(list)}) 7888 """ 7889 return None
7890
7891 - def get_grain_inscribed_boxes(grains):
7892 """ 7893 Finds maximum-area inscribed boxes of all grains in a mask data field. 7894 7895 The array B{C{grains}} must have the same number of elements as B{C{mask_field}}. 7896 Normally it is obtained from a function such as 7897 L{DataField.number_grains}(). 7898 7899 7900 @param grains: Array of grain numbers. I{(list)} 7901 @return: Value B{C{bboxes}}. (I{(list)}) 7902 """ 7903 return None
7904
7905 - def grains_get_values(grains, quantity):
7906 """ 7907 Finds a speficied quantity for all grains in a data field. 7908 7909 The array B{C{grains}} must have the same number of elements as B{C{data_field}}. 7910 Normally it is obtained from a function such as 7911 L{DataField.number_grains}() for the corresponding mask. 7912 7913 7914 @param grains: Array of grain numbers. I{(list)} 7915 @param quantity: The quantity to calculate, identified by GrainQuantity. Expected values: C{B{GRAIN_VALUE_PROJECTED_AREA}}, C{B{GRAIN_VALUE_EQUIV_SQUARE_SIDE}}, C{B{GRAIN_VALUE_EQUIV_DISC_RADIUS}}, C{B{GRAIN_VALUE_SURFACE_AREA}}, C{B{GRAIN_VALUE_MAXIMUM}}, C{B{GRAIN_VALUE_MINIMUM}}, C{B{GRAIN_VALUE_MEAN}}, C{B{GRAIN_VALUE_MEDIAN}}, C{B{GRAIN_VALUE_PIXEL_AREA}}, C{B{GRAIN_VALUE_HALF_HEIGHT_AREA}}, C{B{GRAIN_VALUE_FLAT_BOUNDARY_LENGTH}}, C{B{GRAIN_VALUE_RMS}}, C{B{GRAIN_VALUE_MINIMUM_BOUND_SIZE}}, C{B{GRAIN_VALUE_MINIMUM_BOUND_ANGLE}}, C{B{GRAIN_VALUE_MAXIMUM_BOUND_SIZE}}, C{B{GRAIN_VALUE_MAXIMUM_BOUND_ANGLE}}, C{B{GRAIN_VALUE_CENTER_X}}, C{B{GRAIN_VALUE_CENTER_Y}}, C{B{GRAIN_VALUE_VOLUME_0}}, C{B{GRAIN_VALUE_VOLUME_MIN}}, C{B{GRAIN_VALUE_VOLUME_LAPLACE}}, C{B{GRAIN_VALUE_SLOPE_THETA}}, C{B{GRAIN_VALUE_SLOPE_PHI}}, C{B{GRAIN_VALUE_BOUNDARY_MAXIMUM}}, C{B{GRAIN_VALUE_BOUNDARY_MINIMUM}}, C{B{GRAIN_VALUE_CURVATURE_CENTER_X}}, C{B{GRAIN_VALUE_CURVATURE_CENTER_Y}}, C{B{GRAIN_VALUE_CURVATURE_CENTER_Z}}, C{B{GRAIN_VALUE_CURVATURE1}}, C{B{GRAIN_VALUE_CURVATURE2}}, C{B{GRAIN_VALUE_CURVATURE_ANGLE1}}, C{B{GRAIN_VALUE_CURVATURE_ANGLE2}}, C{B{GRAIN_VALUE_INSCRIBED_DISC_R}}, C{B{GRAIN_VALUE_INSCRIBED_DISC_X}}, C{B{GRAIN_VALUE_INSCRIBED_DISC_Y}}, C{B{GRAIN_VALUE_CONVEX_HULL_AREA}}, C{B{GRAIN_VALUE_CIRCUMCIRCLE_R}}, C{B{GRAIN_VALUE_CIRCUMCIRCLE_X}}, C{B{GRAIN_VALUE_CIRCUMCIRCLE_Y}}, C{B{GRAIN_VALUE_MEAN_RADIUS}}, C{B{GRAIN_VALUE_EQUIV_ELLIPSE_MAJOR}}, C{B{GRAIN_VALUE_EQUIV_ELLIPSE_MINOR}}, C{B{GRAIN_VALUE_EQUIV_ELLIPSE_ANGLE}}, C{B{GRAIN_VALUE_MINIMUM_MARTIN_DIAMETER}}, C{B{GRAIN_VALUE_MINIMUM_MARTIN_ANGLE}}, C{B{GRAIN_VALUE_MAXIMUM_MARTIN_DIAMETER}}, C{B{GRAIN_VALUE_MAXIMUM_MARTIN_ANGLE}}. I{(L{GrainQuantity})} 7916 @return: Value B{C{values}}. (I{(list)}) 7917 """ 7918 return None
7919
7920 - def grains_get_distribution(grain_field, grains, quantity, nstats):
7921 """ 7922 Calculates the distribution of a speficied grain quantity. 7923 7924 The array B{C{grains}} must have the same number of elements as B{C{data_field}}. 7925 Normally it is obtained from a function such as 7926 L{DataField.number_grains}() for the corresponding mask. 7927 7928 7929 @param grain_field: A data field representing the mask. It must have the same 7930 dimensions as the data field. I{(L{DataField})} 7931 @param grains: Array of grain numbers. I{(list)} 7932 @param quantity: The quantity to calculate, identified by GrainQuantity. Expected values: C{B{GRAIN_VALUE_PROJECTED_AREA}}, C{B{GRAIN_VALUE_EQUIV_SQUARE_SIDE}}, C{B{GRAIN_VALUE_EQUIV_DISC_RADIUS}}, C{B{GRAIN_VALUE_SURFACE_AREA}}, C{B{GRAIN_VALUE_MAXIMUM}}, C{B{GRAIN_VALUE_MINIMUM}}, C{B{GRAIN_VALUE_MEAN}}, C{B{GRAIN_VALUE_MEDIAN}}, C{B{GRAIN_VALUE_PIXEL_AREA}}, C{B{GRAIN_VALUE_HALF_HEIGHT_AREA}}, C{B{GRAIN_VALUE_FLAT_BOUNDARY_LENGTH}}, C{B{GRAIN_VALUE_RMS}}, C{B{GRAIN_VALUE_MINIMUM_BOUND_SIZE}}, C{B{GRAIN_VALUE_MINIMUM_BOUND_ANGLE}}, C{B{GRAIN_VALUE_MAXIMUM_BOUND_SIZE}}, C{B{GRAIN_VALUE_MAXIMUM_BOUND_ANGLE}}, C{B{GRAIN_VALUE_CENTER_X}}, C{B{GRAIN_VALUE_CENTER_Y}}, C{B{GRAIN_VALUE_VOLUME_0}}, C{B{GRAIN_VALUE_VOLUME_MIN}}, C{B{GRAIN_VALUE_VOLUME_LAPLACE}}, C{B{GRAIN_VALUE_SLOPE_THETA}}, C{B{GRAIN_VALUE_SLOPE_PHI}}, C{B{GRAIN_VALUE_BOUNDARY_MAXIMUM}}, C{B{GRAIN_VALUE_BOUNDARY_MINIMUM}}, C{B{GRAIN_VALUE_CURVATURE_CENTER_X}}, C{B{GRAIN_VALUE_CURVATURE_CENTER_Y}}, C{B{GRAIN_VALUE_CURVATURE_CENTER_Z}}, C{B{GRAIN_VALUE_CURVATURE1}}, C{B{GRAIN_VALUE_CURVATURE2}}, C{B{GRAIN_VALUE_CURVATURE_ANGLE1}}, C{B{GRAIN_VALUE_CURVATURE_ANGLE2}}, C{B{GRAIN_VALUE_INSCRIBED_DISC_R}}, C{B{GRAIN_VALUE_INSCRIBED_DISC_X}}, C{B{GRAIN_VALUE_INSCRIBED_DISC_Y}}, C{B{GRAIN_VALUE_CONVEX_HULL_AREA}}, C{B{GRAIN_VALUE_CIRCUMCIRCLE_R}}, C{B{GRAIN_VALUE_CIRCUMCIRCLE_X}}, C{B{GRAIN_VALUE_CIRCUMCIRCLE_Y}}, C{B{GRAIN_VALUE_MEAN_RADIUS}}, C{B{GRAIN_VALUE_EQUIV_ELLIPSE_MAJOR}}, C{B{GRAIN_VALUE_EQUIV_ELLIPSE_MINOR}}, C{B{GRAIN_VALUE_EQUIV_ELLIPSE_ANGLE}}, C{B{GRAIN_VALUE_MINIMUM_MARTIN_DIAMETER}}, C{B{GRAIN_VALUE_MINIMUM_MARTIN_ANGLE}}, C{B{GRAIN_VALUE_MAXIMUM_MARTIN_DIAMETER}}, C{B{GRAIN_VALUE_MAXIMUM_MARTIN_ANGLE}}. I{(L{GrainQuantity})} 7933 @param nstats: The number of bins in the histogram. Pass a non-positive value to 7934 determine the number of bins automatically. I{(int)} 7935 @return: The distribution as a data line. I{(L{DataLine})} 7936 """ 7937 return None
7938
7939 - def create_full_mask():
7940 return None
7941
7942 - def duplicate():
7943 """ 7944 Convenience macro doing L{gwy_serializable_duplicate}() with all the necessary 7945 typecasting. 7946 7947 Use L{DataField.new_alike}() if you don't want to copy data, only 7948 resolutions and units. 7949 7950 @return: I{(L{DataField})} 7951 """ 7952 return None
7953
7954 - def get_xmeasure():
7955 """ 7956 Alias for L{DataField.get_dx}(). 7957 7958 @return: I{(float)} 7959 """ 7960 return None
7961
7962 - def get_ymeasure():
7963 """ 7964 Alias for L{DataField.get_dy}(). 7965 7966 @return: I{(float)} 7967 """ 7968 return None
7969
7970 - def get_data_pointer():
7971 """ 7972 Gets pointer to data which the data field contains. 7973 7974 7975 @return: integer pointing to the raw data of the data field I{(long)} 7976 """ 7977 return None
7978 7979
7980 -class DataLine:
7981 """ 7982 One-dimensional data representation 7983 7984 7985 B{C{DataLine}} represents 1D data arrays in Gwyddion. It is used for most of 7986 the data processing functions connected with 1D data, graphs, etc. 7987 7988 """
7989 - def __init__(res, real, nullme):
7990 """ 7991 Creates a new data line. 7992 7993 7994 @param res: Resolution, i.e., the number of samples. I{(int)} 7995 @param real: Real physical dimension. I{(float)} 7996 @param nullme: Whether the data line should be initialized to zeroes. If B{C{False}}, 7997 the data will not be initialized. I{(bool)} 7998 @return: A newly created data line. I{(L{DataLine})} 7999 """ 8000 return None
8001
8002 - def check_compatibility(data_line2, check):
8003 """ 8004 Checks whether two data lines are compatible. 8005 8006 8007 @param data_line2: Another data line. I{(L{DataLine})} 8008 @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_AXISCAL}}, C{B{DATA_COMPATIBILITY_NCURVES}}, C{B{DATA_COMPATIBILITY_CURVELEN}}, C{B{DATA_COMPATIBILITY_ALL}}. I{(L{DataCompatibilityFlags})} 8009 @return: Zero if all tested properties are compatible. Flags corresponding to failed tests if data lines are not 8010 compatible. I{(DataCompatibilityFlags)} 8011 """ 8012 return None
8013
8014 - def check_compatibility_with_brick_z(brick, check):
8015 """ 8016 Checks whether a data line is compatible with brick Z-profiles. 8017 8018 If B{C{check}} includes B{C{DATA_COMPATIBILITY_REAL}} or B{C{DATA_COMPATIBILITY_LATERAL}} but not 8019 B{C{DATA_COMPATIBILITY_AXISCAL}}, B{C{data_line}} is simply compared to B{C{brick}} in the Z direction. 8020 8021 If you include B{C{DATA_COMPATIBILITY_AXISCAL}} and B{C{brick}} has a Z-calibration data line, then the value range and 8022 units of this data line are compared to B{C{data_line}}. This may not be very useful. 8023 8024 @since: 2.51 8025 8026 @param brick: A three-dimensional data brick. I{(L{Brick})} 8027 @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_AXISCAL}}, C{B{DATA_COMPATIBILITY_NCURVES}}, C{B{DATA_COMPATIBILITY_CURVELEN}}, C{B{DATA_COMPATIBILITY_ALL}}. I{(L{DataCompatibilityFlags})} 8028 @return: Zero if all tested properties are compatible. Flags corresponding to failed tests if the data objects are 8029 not compatible. I{(DataCompatibilityFlags)} 8030 """ 8031 return None
8032
8033 - def correct_laplace(mask_line):
8034 """ 8035 Fills missing values in a data line using Laplace data correction. 8036 8037 Both data lines must have the same number of values. 8038 8039 For one-dimensional data the missing data interpolation is explicit. 8040 Interior missing segments are filled with linear dependence between the edge 8041 points. Missing segments with one end open are filled with the edge value. 8042 8043 @since: 2.45 8044 8045 @param mask_line: Mask of places to be corrected. I{(L{DataLine})} 8046 @return: B{C{True}} if the line contained any data at all. If there are no data 8047 the B{C{False}} is returned and B{C{data_line}} is filled with zeros. I{(bool)} 8048 """ 8049 return None
8050
8051 - def copy_units_to_data_field(data_field):
8052 """ 8053 Sets lateral and value units of a data field to match a data line. 8054 8055 @param data_field: A data field to set units of. I{(L{DataField})} 8056 """ 8057 pass
8058
8059 - def new_alike(nullme):
8060 """ 8061 Creates a new data line similar to an existing one. 8062 8063 Use L{DataLine.duplicate}() if you want to copy a data line including 8064 data. 8065 8066 8067 @param nullme: Whether the data line should be initialized to zeroes. If B{C{False}}, 8068 the data will not be initialized. I{(bool)} 8069 @return: A newly created data line. I{(L{DataLine})} 8070 """ 8071 return None
8072
8073 - def data_changed():
8074 """ 8075 Emits signal "data_changed" on a data line. 8076 8077 """ 8078 pass
8079
8080 - def new_resampled(res, interpolation):
8081 """ 8082 Creates a new data line by resampling an existing one. 8083 8084 This method is equivalent to L{DataLine.duplicate}() followed by 8085 L{DataLine.resample}(), but it is more efficient. 8086 8087 @since: 2.1 8088 8089 @param res: Desired resolution. I{(int)} 8090 @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})} 8091 @return: A newly created data line. I{(L{DataLine})} 8092 """ 8093 return None
8094
8095 - def resample(res, interpolation):
8096 """ 8097 Resamples a data line. 8098 8099 In other words changes the size of one dimensional field related with data 8100 line. The original values are used for resampling using a requested 8101 interpolation alorithm. 8102 8103 @param res: Desired resolution. I{(int)} 8104 @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})} 8105 """ 8106 pass
8107
8108 - def resize(from_, to):
8109 """ 8110 Resizes (crops) a data line. 8111 8112 Extracts a part of data line in range B{C{from}}..(B{C{to}}-1), recomputing real 8113 sizes. 8114 8115 @param from_: I{(int)} 8116 @param to: Where to finish + 1. I{(int)} 8117 """ 8118 pass
8119
8120 - def part_extract(from_, len):
8121 """ 8122 Extracts a part of a data line to a new data line. 8123 8124 8125 @param from_: I{(int)} 8126 @param len: Length of extracted segment. I{(int)} 8127 @return: The extracted area as a newly created data line. I{(L{DataLine})} 8128 """ 8129 return None
8130
8131 - def copy(target):
8132 """ 8133 Copies the contents of a data line to another already allocated data line 8134 of the same size. 8135 8136 @warning:Semantic of method differs from L{DataField.copy}(), it copies 8137 only data. It will be probably changed. 8138 8139 @param target: Destination data line. I{(L{DataLine})} 8140 """ 8141 pass
8142
8143 - def get_res():
8144 """ 8145 Gets the number of data points in a data line. 8146 8147 8148 @return: Resolution (number of data points). I{(int)} 8149 """ 8150 return None
8151
8152 - def get_real():
8153 """ 8154 Gets the physical size of a data line. 8155 8156 8157 @return: Real size of data line. I{(float)} 8158 """ 8159 return None
8160
8161 - def set_real(real):
8162 """ 8163 Sets the real data line size. 8164 8165 @param real: value to be set I{(float)} 8166 """ 8167 pass
8168
8169 - def get_offset():
8170 """ 8171 Gets the offset of data line origin. 8172 8173 8174 @return: Offset value. I{(float)} 8175 """ 8176 return None
8177
8178 - def set_offset(offset):
8179 """ 8180 Sets the offset of a data line origin. 8181 8182 Note offsets don't affect any calculation, nor functions like 8183 L{DataLine.rtoi}(). 8184 8185 @param offset: New offset value. I{(float)} 8186 """ 8187 pass
8188
8189 - def get_dx():
8190 """ 8191 Gets the sample distance (pixel size) of a data line in real units. 8192 8193 The result is the same as 8194 L{DataLine.get_real}(data_line)/L{DataLine.get_res}(data_line). 8195 8196 @since: 2.52 8197 8198 @return: Sampling step size. I{(float)} 8199 """ 8200 return None
8201
8202 - def get_si_unit_x():
8203 """ 8204 Returns lateral SI unit of a data line. 8205 8206 8207 @return: SI unit corresponding to the lateral (X) dimension of the data 8208 line. Its reference count is not incremented. I{(L{SIUnit})} 8209 """ 8210 return None
8211
8212 - def get_si_unit_y():
8213 """ 8214 Returns value SI unit of a data line. 8215 8216 8217 @return: SI unit corresponding to the "height" (Z) dimension of the data 8218 line. Its reference count is not incremented. I{(L{SIUnit})} 8219 """ 8220 return None
8221
8222 - def set_si_unit_x(si_unit):
8223 """ 8224 Sets the SI unit corresponding to the lateral (X) dimension of a data 8225 line. 8226 8227 It does not assume a reference on B{C{si_unit}}, instead it adds its own 8228 reference. 8229 8230 @param si_unit: SI unit to be set. I{(L{SIUnit})} 8231 """ 8232 pass
8233
8234 - def set_si_unit_y(si_unit):
8235 """ 8236 Sets the SI unit corresponding to the "height" (Y) dimension of a data 8237 line. 8238 8239 It does not assume a reference on B{C{si_unit}}, instead it adds its own 8240 reference. 8241 8242 @param si_unit: SI unit to be set. I{(L{SIUnit})} 8243 """ 8244 pass
8245
8246 - def get_value_format_x(style):
8247 """ 8248 Finds value format good for displaying coordinates of a data line. 8249 8250 8251 @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}}, C{B{SI_UNIT_FORMAT_VFTEX}}, C{B{SI_UNIT_FORMAT_UNICODE}}, C{B{SI_UNIT_FORMAT_VFUNICODE}}. I{(L{SIUnitFormatStyle})} 8252 @return: Tuple consisting of 2 values (B{C{value}}, B{C{format}}). (I{(L{SIValueFormat})}, I{(SkipArg)}) 8253 """ 8254 return None, None
8255
8256 - def get_value_format_y(style):
8257 """ 8258 Finds value format good for displaying values of a data line. 8259 8260 Note this functions searches for minimum and maximum value in B{C{data_line}}, 8261 therefore it's relatively slow. 8262 8263 8264 @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}}, C{B{SI_UNIT_FORMAT_VFTEX}}, C{B{SI_UNIT_FORMAT_UNICODE}}, C{B{SI_UNIT_FORMAT_VFUNICODE}}. I{(L{SIUnitFormatStyle})} 8265 @return: Tuple consisting of 2 values (B{C{value}}, B{C{format}}). (I{(L{SIValueFormat})}, I{(SkipArg)}) 8266 """ 8267 return None, None
8268
8269 - def copy_units(target):
8270 """ 8271 Sets lateral and value units of a data line to match another data line. 8272 8273 @since: 2.49 8274 8275 @param target: Destination data line. I{(L{DataLine})} 8276 """ 8277 pass
8278
8279 - def itor(pixpos):
8280 """ 8281 Transforms pixel coordinate to real (physical) coordinate. 8282 8283 That is it maps range [0..resolution] to range [0..real-size]. It is not 8284 suitable for conversion of matrix indices to physical coordinates, you 8285 have to use L{DataLine.itor}(B{C{data_line}}, B{C{pixpos}} + 0.5) for that. 8286 8287 8288 @param pixpos: Pixel coordinate. I{(float)} 8289 @return: B{C{pixpos}} in real coordinates. I{(float)} 8290 """ 8291 return None
8292
8293 - def rtoi(realpos):
8294 """ 8295 Transforms real (physical) coordinate to pixel coordinate. 8296 8297 That is it maps range [0..real-size] to range [0..resolution]. 8298 8299 8300 @param realpos: Real coordinate. I{(float)} 8301 @return: B{C{realpos}} in pixel coordinates. I{(float)} 8302 """ 8303 return None
8304
8305 - def get_val(i):
8306 """ 8307 Gets value at given position in a data line. 8308 8309 Do not access data with this function inside inner loops, it's slow. 8310 Get raw data buffer with L{DataLine.get_data_const}() and access it 8311 directly instead. 8312 8313 8314 @param i: Position in the line (index). I{(int)} 8315 @return: Value at given index. I{(float)} 8316 """ 8317 return None
8318
8319 - def set_val(i, value):
8320 """ 8321 Sets the value at given position in a data line. 8322 8323 Do not set data with this function inside inner loops, it's slow. Get raw 8324 data buffer with L{DataLine.get_data}() and write to it directly instead. 8325 8326 @param i: Position in the line (index). I{(int)} 8327 @param value: Value to set. I{(float)} 8328 """ 8329 pass
8330
8331 - def get_dval(x, interpolation):
8332 """ 8333 Gets interpolated value at arbitrary data line point indexed by pixel 8334 coordinates. 8335 8336 Note pixel values are centered in intervals [B{C{j}}, B{C{j}}+1], so to get the same 8337 value as L{DataLine.get_val}(B{C{data_line}}, B{C{j}}) returns, 8338 it's necessary to add 0.5: 8339 L{DataLine.get_dval}(B{C{data_line}}, B{C{j}}+0.5, B{C{interpolation}}). 8340 8341 See also L{DataLine.get_dval_real}() that does the same, but takes 8342 real coordinates. 8343 8344 8345 @param x: Position in data line in range [0, resolution]. If the value is outside 8346 this range, the nearest border value is returned. I{(float)} 8347 @param interpolation: Interpolation method to use. I{(int)} 8348 @return: Value interpolated in the data line. I{(float)} 8349 """ 8350 return None
8351
8352 - def get_dval_real(x, interpolation):
8353 """ 8354 Gets interpolated value at arbitrary data line point indexed by real 8355 coordinates. 8356 8357 See also L{DataLine.get_dval}() for interpolation explanation. 8358 8359 8360 @param x: real coordinates position I{(float)} 8361 @param interpolation: interpolation method used I{(int)} 8362 @return: Value interpolated in the data line. I{(float)} 8363 """ 8364 return None
8365
8366 - def invert(x, z):
8367 """ 8368 Reflects and/or inverts a data line. 8369 8370 In the case of value reflection, it's inverted about mean value. 8371 8372 @param x: Whether to invert data point order. I{(bool)} 8373 @param z: Whether to invert in Z direction (i.e., invert values). I{(bool)} 8374 """ 8375 pass
8376
8377 - def clear():
8378 """ 8379 Fills a data line with zeroes. 8380 8381 """ 8382 pass
8383
8384 - def fill(value):
8385 """ 8386 Fills a data line with specified value. 8387 8388 @param value: Value to fill data line with. I{(float)} 8389 """ 8390 pass
8391
8392 - def multiply(value):
8393 """ 8394 Multiplies all values in a data line with a specified value. 8395 8396 @param value: Value to multiply data line with. I{(float)} 8397 """ 8398 pass
8399
8400 - def add(value):
8401 """ 8402 Adds a specified value to all values in a data line. 8403 8404 @param value: Value to be added. I{(float)} 8405 """ 8406 pass
8407
8408 - def part_clear(from_, to):
8409 """ 8410 Fills a data line part with zeroes. 8411 8412 @param from_: I{(int)} 8413 @param to: Index the line part ends at + 1. I{(int)} 8414 """ 8415 pass
8416
8417 - def part_fill(from_, to, value):
8418 """ 8419 Fills specified part of data line with specified number 8420 8421 @param from_: I{(int)} 8422 @param to: Index the line part ends at + 1. I{(int)} 8423 @param value: Value to fill data line part with. I{(float)} 8424 """ 8425 pass
8426
8427 - def part_multiply(from_, to, value):
8428 """ 8429 Multiplies all values in a part of data line by specified value. 8430 8431 @param from_: I{(int)} 8432 @param to: Index the line part ends at + 1. I{(int)} 8433 @param value: Value multiply data line part with. I{(float)} 8434 """ 8435 pass
8436
8437 - def part_add(from_, to, value):
8438 """ 8439 Adds specified value to all values in a part of a data line. 8440 8441 @param from_: I{(int)} 8442 @param to: Index the line part ends at + 1. I{(int)} 8443 @param value: Value to be added I{(float)} 8444 """ 8445 pass
8446
8447 - def sum_lines(operand1, operand2):
8448 """ 8449 Sums two data lines. 8450 8451 @since: 2.56 8452 8453 @param operand1: First data line operand. I{(L{DataLine})} 8454 @param operand2: Second data line operand. I{(L{DataLine})} 8455 """ 8456 pass
8457
8458 - def subtract_lines(operand1, operand2):
8459 """ 8460 Subtracts two data lines. 8461 8462 @since: 2.56 8463 8464 @param operand1: First data line operand. I{(L{DataLine})} 8465 @param operand2: Second data line operand. I{(L{DataLine})} 8466 """ 8467 pass
8468
8469 - def multiply_lines(operand1, operand2):
8470 """ 8471 Multiplies two data lines. 8472 8473 @since: 2.56 8474 8475 @param operand1: First data line operand. I{(L{DataLine})} 8476 @param operand2: Second data line operand. I{(L{DataLine})} 8477 """ 8478 pass
8479
8480 - def linear_combination(coeff1, operand1, coeff2, operand2, constant):
8481 """ 8482 Computes point-wise general linear combination of two data lines. 8483 8484 @since: 2.61 8485 8486 @param coeff1: Factor to multiply the first operand with. I{(float)} 8487 @param operand1: First data line operand. I{(L{DataLine})} 8488 @param coeff2: Factor to multiply the second operand with. I{(float)} 8489 @param operand2: Second data line operand. I{(L{DataLine})} 8490 @param constant: Constant term to add to the result. I{(float)} 8491 """ 8492 pass
8493
8494 - def threshold(threshval, bottom, top):
8495 """ 8496 Sets all the values to B{C{bottom}} or B{C{top}} value 8497 depending on whether the original values are 8498 below or above B{C{threshold}} value 8499 8500 8501 @param threshval: Threshold value. I{(float)} 8502 @param bottom: Lower replacement value. I{(float)} 8503 @param top: Upper replacement value. I{(float)} 8504 @return: total number of values above threshold I{(int)} 8505 """ 8506 return None
8507
8508 - def part_threshold(from_, to, threshval, bottom, top):
8509 """ 8510 Sets all the values within interval to B{C{bottom}} or B{C{top}} value 8511 depending on whether the original values are 8512 below or above B{C{threshold}} value. 8513 8514 8515 @param from_: I{(int)} 8516 @param to: Index the line part ends at + 1. I{(int)} 8517 @param threshval: Threshold value. I{(float)} 8518 @param bottom: Lower replacement value. I{(float)} 8519 @param top: Upper replacement value. I{(float)} 8520 @return: total number of values above threshold within interval I{(int)} 8521 """ 8522 return None
8523
8524 - def get_line_coeffs():
8525 """ 8526 Finds line leveling coefficients. 8527 8528 The coefficients can be used for line leveling using relation 8529 data[i] := data[i] - (av + bv*i); 8530 8531 @return: Tuple consisting of 2 values (B{C{av}}, B{C{bv}}). (I{(float)}, I{(float)}) 8532 """ 8533 return None, None
8534
8535 - def line_level(av, bv):
8536 """ 8537 Performs line leveling. 8538 8539 See L{DataLine.get_line_coeffs}() for deails. 8540 8541 @param av: Height coefficient. I{(float)} 8542 @param bv: Slope coefficient. I{(float)} 8543 """ 8544 pass
8545
8546 - def rotate(angle, interpolation):
8547 """ 8548 Performs line rotation. 8549 8550 This is operation similar to leveling, but it does not change the angles 8551 between line segments (on the other hand it introduces other deformations 8552 due to discretization). 8553 8554 @since: 2.7 8555 8556 @param angle: Angle of rotation (in radians), counterclockwise. I{(float)} 8557 @param interpolation: Interpolation method to use (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})} 8558 """ 8559 pass
8560
8561 - def line_rotate(angle, interpolation):
8562 """ 8563 Performs line rotation. 8564 8565 Use L{DataLine.rotate}() instead. 8566 8567 @param angle: Angle of rotation (in radians), counterclockwise. I{(float)} 8568 @param interpolation: Interpolation method to use (can be only of two-point type). I{(int)} 8569 """ 8570 pass
8571
8572 - def get_der(i):
8573 """ 8574 Computes central derivaltion at given index in a data line. 8575 8576 8577 @param i: Pixel coordinate. I{(int)} 8578 @return: Derivation at given position. I{(float)} 8579 """ 8580 return None
8581
8582 - def cumulate():
8583 """ 8584 Transforms a distribution in a data line to cummulative distribution. 8585 8586 Each element becomes sum of all previous elements in the line, including 8587 self. 8588 8589 """ 8590 pass
8591
8592 - def sqrt():
8593 """ 8594 Applies sqrt() to each element in a data line. 8595 8596 """ 8597 pass
8598
8599 - def dwt(wt_coefs, direction, minsize):
8600 """ 8601 Performs steps of the wavelet decomposition. 8602 8603 The smallest low pass coefficients block is equal to B{C{minsize}}. Run with 8604 B{C{minsize}} = B{C{dline}}->res/2 to perform one step of decomposition 8605 or B{C{minsize}} = 4 to perform full decomposition (or anything between). 8606 8607 8608 @param wt_coefs: Data line where the wavelet transform coefficients are stored. I{(L{DataLine})} 8609 @param direction: Transform direction. Expected values: C{B{TRANSFORM_DIRECTION_BACKWARD}}, C{B{TRANSFORM_DIRECTION_FORWARD}}. I{(L{TransformDirection})} 8610 @param minsize: size of minimal transform result block I{(int)} 8611 """ 8612 pass
8613
8614 - def fft(isrc, rdest, idest, windowing, direction, interpolation, preserverms, level):
8615 """ 8616 Calculates Fast Fourier Transform of a data line. 8617 8618 A windowing or data leveling can be applied if requested. 8619 8620 @param isrc: Imaginary input data line. I{(L{DataLine})} 8621 @param rdest: Real output data line. It will be resized to the size of the input data line. I{(L{DataLine})} 8622 @param idest: Imaginary output data line. It will be resized to the size of the input data line. I{(L{DataLine})} 8623 @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})} 8624 @param direction: FFT direction. Expected values: C{B{TRANSFORM_DIRECTION_BACKWARD}}, C{B{TRANSFORM_DIRECTION_FORWARD}}. I{(L{TransformDirection})} 8625 @param interpolation: Interpolation type. 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})} 8626 @param preserverms: B{C{True}} to preserve RMS value while windowing. I{(bool)} 8627 @param level: 0 to perform no leveling, 1 to subtract mean value, 2 to subtract line (the number can be interpreted as 8628 the first polynomial degree to keep, but only the enumerated three values are available). I{(int)} 8629 """ 8630 pass
8631
8632 - def part_fft(isrc, rdest, idest, from_, len, windowing, direction, interpolation, preserverms, level):
8633 """ 8634 Calculates Fast Fourier Transform of a part of a data line. 8635 8636 A windowing or data leveling can be applied if requested. 8637 8638 @param isrc: Imaginary input data line. Since 2.7 it can be B{C{None}} for real-to-complex transforms. I{(L{DataLine})} 8639 @param rdest: Real output data line, it will be resized to B{C{len}}. I{(L{DataLine})} 8640 @param idest: Imaginary output data line, it will be resized to B{C{len}}. I{(L{DataLine})} 8641 @param from_: I{(int)} 8642 @param len: Lenght of data line part, it must be at least 2. I{(int)} 8643 @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})} 8644 @param direction: FFT direction. Expected values: C{B{TRANSFORM_DIRECTION_BACKWARD}}, C{B{TRANSFORM_DIRECTION_FORWARD}}. I{(L{TransformDirection})} 8645 @param interpolation: Interpolation type. 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})} 8646 @param preserverms: B{C{True}} to preserve RMS value while windowing. I{(bool)} 8647 @param level: 0 to perform no leveling, 1 to subtract mean value, 2 to subtract line (the number can be interpreted as 8648 the first polynomial degree to keep, but only the enumerated three values are available). I{(int)} 8649 """ 8650 pass
8651
8652 - def fft_raw(isrc, rdest, idest, direction):
8653 """ 8654 Calculates Fast Fourier Transform of a data line. 8655 8656 No leveling, windowing nor scaling is performed. 8657 8658 The normalisation of FFT is symmetrical, so transformations in both directions are unitary. 8659 8660 Since 2.8 the dimensions need not to be from the set of sizes returned by L{gwy_fft_find_nice_size}(). 8661 8662 @since: 2.1 8663 8664 @param isrc: Imaginary input data line. Since 2.7 it can be B{C{None}} for real-to-complex transform. I{(L{DataLine})} 8665 @param rdest: Real output data line. It will be resized to the size of the input data line. I{(L{DataLine})} 8666 @param idest: Imaginary output data line. It will be resized to the size of the input data line. I{(L{DataLine})} 8667 @param direction: FFT direction. Expected values: C{B{TRANSFORM_DIRECTION_BACKWARD}}, C{B{TRANSFORM_DIRECTION_FORWARD}}. I{(L{TransformDirection})} 8668 """ 8669 pass
8670
8671 - def zoom_fft(isrc, rdest, idest, m, f0, f1):
8672 """ 8673 Computes Zoom FFT of a data line. 8674 8675 The output is DFTs, but computed for an arbitrary linear sequence of frequencies. The frequencies do not have to 8676 be in any relation to the data sampling step. 8677 8678 The first item of output corresponds exactly to B{C{f0}} and the last exactly to B{C{f1}}. So the frequency sampling step 8679 will be (B{C{f1}} − B{C{f0}})/(B{C{m}} − 1), instead of the more usual division by B{C{m}}. To follow the usual Gwyddion conventions, 8680 the output data line real size will be (B{C{f1}} − B{C{f0}})/(B{C{m}} − 1)*B{C{m}}. If it seems confusing, just take the output as 8681 indexed by integers and work with that. 8682 8683 Frequency step of one corresponds to the normal DFT frequency step. Therefore, passing B{C{f0}}=0, B{C{f1}}=B{C{n}}-1 (where B{C{rsrc}} 8684 has B{C{n}} points) and B{C{m}}=B{C{n}} reproduces the usual DFT, except more slowly. The result is normalised as raw FFT and the 8685 units of the output data lines are unchanged. 8686 8687 The transform direction is always forward. Windowing or other preprocessing need to be done separately beforehand. 8688 They would be usually once, but followed by any number of (Zoom) FFTs. 8689 8690 @since: 2.61 8691 8692 @param isrc: Imaginary input data line. It can be B{C{None}} for real-to-complex transform. I{(L{DataLine})} 8693 @param rdest: Real output data line. It will be resized to B{C{m}} samples. I{(L{DataLine})} 8694 @param idest: Imaginary output data line. It will be resized to B{C{m}} samples. I{(L{DataLine})} 8695 @param m: The number of frequencies to compute. It must be at least 2. I{(int)} 8696 @param f0: The first spatial frequency, measured in DFT frequency steps. I{(float)} 8697 @param f1: The last spatial frequency, measured in DFT frequency steps. I{(float)} 8698 """ 8699 pass
8700
8701 - def fft_window(windowing):
8702 """ 8703 Performs windowing of a data line in preparation for FFT. 8704 8705 @since: 2.62 8706 8707 @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})} 8708 """ 8709 pass
8710
8711 - def get_max():
8712 """ 8713 Finds the maximum value of a data line. 8714 8715 8716 @return: The maximum value. I{(float)} 8717 """ 8718 return None
8719
8720 - def get_min():
8721 """ 8722 Finds the minimum value of a data line. 8723 8724 8725 @return: The minimum value. I{(float)} 8726 """ 8727 return None
8728
8729 - def get_min_max():
8730 """ 8731 Finds the minimum and maximum values of a data line. 8732 8733 Since 2.42 8734 8735 @return: Tuple consisting of 2 values (B{C{min}}, B{C{max}}). (I{(float)}, I{(float)}) 8736 """ 8737 return None, None
8738
8739 - def min_pos_i():
8740 """ 8741 Finds the minimum pixel position of a data line. 8742 8743 For historical reasons the value is returned as double, but it is always 8744 an integer. 8745 8746 8747 @return: The minimum pixel position. 8748 8749 Since 2.48 I{(float)} 8750 """ 8751 return None
8752
8753 - def max_pos_i():
8754 """ 8755 Finds the maximum pixel position of a data line. 8756 8757 For historical reasons the value is returned as double, but it is always 8758 an integer. 8759 8760 8761 @return: The maximum pixel position. 8762 8763 Since 2.48 I{(float)} 8764 """ 8765 return None
8766
8767 - def min_pos_r():
8768 """ 8769 Finds the real minimum position in a data line. 8770 8771 8772 @return: Real position for the minimum. 8773 8774 Since 2.48 I{(float)} 8775 """ 8776 return None
8777
8778 - def max_pos_r():
8779 """ 8780 Finds the real maximum position in a data line. 8781 8782 8783 @return: Real position for the maximum. 8784 8785 Since 2.48 I{(float)} 8786 """ 8787 return None
8788
8789 - def get_avg():
8790 """ 8791 Computes average value of a data line. 8792 8793 8794 @return: Average value I{(float)} 8795 """ 8796 return None
8797
8798 - def get_rms():
8799 """ 8800 Computes root mean square value of a data line. 8801 8802 8803 @return: Root mean square deviation of values. I{(float)} 8804 """ 8805 return None
8806
8807 - def get_tan_beta0():
8808 """ 8809 Computes root mean square slope in a data line. 8810 8811 @since: 2.2 8812 8813 @return: Root mean square slope within a given interval. I{(float)} 8814 """ 8815 return None
8816
8817 - def get_variation():
8818 """ 8819 Computes the total variation of a data line. 8820 8821 See L{DataLine.part_get_variation}() for definition and discussion. 8822 8823 @since: 2.42 8824 8825 @return: The total variation. I{(float)} 8826 """ 8827 return None
8828
8829 - def get_sum():
8830 """ 8831 Computes sum of all values in a data line. 8832 8833 8834 @return: sum of all the values. I{(float)} 8835 """ 8836 return None
8837
8838 - def get_ra():
8839 """ 8840 Computes the mean absolute deviation of a data line. 8841 8842 @since: 2.42 8843 8844 @return: The mean absolute deviation of height values. I{(float)} 8845 """ 8846 return None
8847
8848 - def get_skew():
8849 """ 8850 Computes the skew of a data line. 8851 8852 @since: 2.42 8853 8854 @return: The skew of height values. I{(float)} 8855 """ 8856 return None
8857
8858 - def get_kurtosis():
8859 """ 8860 Computes the kurtosis of a data line. 8861 8862 @since: 2.42 8863 8864 @return: The kurtosis of height values. 8865 8866 Note the kurtosis returned by this function returns is the excess kurtosis 8867 which is zero for the Gaussian distribution (not 3). I{(float)} 8868 """ 8869 return None
8870
8871 - def part_get_max(from_, to):
8872 """ 8873 Finds the maximum value of a part of a data line. 8874 8875 8876 @param from_: I{(int)} 8877 @param to: Index the line part ends at + 1. I{(int)} 8878 @return: Maximum within given interval. I{(float)} 8879 """ 8880 return None
8881
8882 - def part_get_min(from_, to):
8883 """ 8884 Finds the minimum value of a part of a data line. 8885 8886 8887 @param from_: I{(int)} 8888 @param to: Index the line part ends at + 1. I{(int)} 8889 @return: Minimum within given interval. I{(float)} 8890 """ 8891 return None
8892
8893 - def part_get_min_max(from_, to):
8894 """ 8895 Finds the minimum and maximum values of a part of a data line. 8896 8897 Since 2.42 8898 8899 @param from_: I{(int)} 8900 @param to: Index the line part ends at + 1. I{(int)} 8901 @return: Tuple consisting of 2 values (B{C{min}}, B{C{max}}). (I{(float)}, I{(float)}) 8902 """ 8903 return None, None
8904
8905 - def part_get_avg(from_, to):
8906 """ 8907 Computes mean value of all values in a part of a data line. 8908 8909 8910 @param from_: I{(int)} 8911 @param to: Index the line part ends at + 1. I{(int)} 8912 @return: Average value within given interval. I{(float)} 8913 """ 8914 return None
8915
8916 - def part_get_rms(from_, to):
8917 """ 8918 Computes root mean square value of a part of a data line. 8919 8920 8921 @param from_: I{(int)} 8922 @param to: Index the line part ends at + 1. I{(int)} 8923 @return: Root mean square deviation of heights within a given interval I{(float)} 8924 """ 8925 return None
8926
8927 - def part_get_tan_beta0(from_, to):
8928 """ 8929 Computes root mean square slope in a part of a data line. 8930 8931 This is the root mean square of value derivatives, it is also proportional 8932 to the second derivative of both HHCF and ACF at zero. 8933 8934 This roughness quantity is also known as Dq. 8935 8936 @since: 2.2 8937 8938 @param from_: I{(int)} 8939 @param to: Index the line part ends at + 1. I{(int)} 8940 @return: Root mean square slope within a given interval. I{(float)} 8941 """ 8942 return None
8943
8944 - def part_get_variation(from_, to):
8945 """ 8946 Computes the total variation of a part of a data line. 8947 8948 The total variation is estimated as the integral of the absolute value of 8949 local gradient. For one dimensional data, the variation reduces to the 8950 integral of absolute value of the derivative. Its units are thus the same 8951 as the value units of the line. See also 8952 L{DataField.area_get_variation}() for some more discussion. 8953 8954 @since: 2.42 8955 8956 @param from_: I{(int)} 8957 @param to: Index the line part ends at + 1. I{(int)} 8958 @return: The total variation within a given interval. I{(float)} 8959 """ 8960 return None
8961
8962 - def part_get_sum(from_, to):
8963 """ 8964 Computes sum of all values in a part of a data line. 8965 8966 8967 @param from_: I{(int)} 8968 @param to: Index the line part ends at + 1. I{(int)} 8969 @return: Sum of all values within the interval. I{(float)} 8970 """ 8971 return None
8972
8973 - def part_get_ra(from_, to):
8974 """ 8975 Computes mean absolute deviation value of a part of a data line. 8976 8977 8978 @param from_: I{(int)} 8979 @param to: Index the line part ends at + 1. I{(int)} 8980 @return: Mean absolute deviation of heights within a given interval. I{(float)} 8981 """ 8982 return None
8983
8984 - def part_get_skew(from_, to):
8985 """ 8986 Computes skew value of a part of a data line. 8987 8988 8989 @param from_: I{(int)} 8990 @param to: Index the line part ends at + 1. I{(int)} 8991 @return: Skew of heights within a given interval. I{(float)} 8992 """ 8993 return None
8994
8995 - def part_get_kurtosis(from_, to):
8996 """ 8997 Computes kurtosis value of a part of a data line. 8998 8999 Note the kurtosis returned by this function returns is the excess kurtosis 9000 which is zero for the Gaussian distribution (not 3). 9001 9002 9003 @param from_: I{(int)} 9004 @param to: Index the line part ends at + 1. I{(int)} 9005 @return: Kurtosis of heights within a given interval. I{(float)} 9006 """ 9007 return None
9008
9009 - def get_modus(histogram_steps):
9010 """ 9011 Finds approximate modus of a data line. 9012 9013 See L{DataLine.part_get_modus}() for details and caveats. 9014 9015 9016 @param histogram_steps: Number of histogram steps used for modus searching, 9017 pass a nonpositive number to autosize. I{(int)} 9018 @return: The modus. I{(float)} 9019 """ 9020 return None
9021
9022 - def part_get_modus(from_, to, histogram_steps):
9023 """ 9024 Finds approximate modus of a data line part. 9025 9026 As each number in the data line is usually unique, this function does not 9027 return modus of the data itself, but modus of a histogram. 9028 9029 9030 @param from_: I{(int)} 9031 @param to: The index in B{C{data_line}} to stop (noninclusive). I{(int)} 9032 @param histogram_steps: Number of histogram steps used for modus searching, 9033 pass a nonpositive number to autosize. I{(int)} 9034 @return: The modus. I{(float)} 9035 """ 9036 return None
9037
9038 - def get_median():
9039 """ 9040 Finds median of a data line. 9041 9042 @since: 2.1 9043 9044 @return: The median. I{(float)} 9045 """ 9046 return None
9047
9048 - def part_get_median(from_, to):
9049 """ 9050 Finds median of a data line part. 9051 9052 @since: 2.1 9053 9054 @param from_: I{(int)} 9055 @param to: The index in B{C{data_line}} to stop (noninclusive). I{(int)} 9056 @return: The median. I{(float)} 9057 """ 9058 return None
9059
9060 - def get_length():
9061 """ 9062 Calculates physical length of a data line. 9063 9064 The length is calculated from approximation by straight segments between 9065 values. 9066 9067 9068 @return: The line length. I{(float)} 9069 """ 9070 return None
9071
9072 - def get_xpm(m, k):
9073 """ 9074 Calculates a peak roughness quantity for a data line. 9075 9076 Depending on B{C{m}} and B{C{k}}, the function can calculate 9077 Average Maximum Profile Peak Height B{C{Rpm}} 9078 or Maximum Profile Peak Height B{C{Rp}}, B{C{Pp}}, B{C{Wp}}. 9079 9080 @since: 2.42 9081 9082 @param m: Number of sampling lengths. I{(int)} 9083 @param k: Number of peaks to consider. I{(int)} 9084 @return: The peak roughness quantity defined by B{C{m}} and B{C{k}}. I{(float)} 9085 """ 9086 return None
9087
9088 - def get_xvm(m, k):
9089 """ 9090 Calculates a valley roughness quantity for a data line. 9091 9092 Depending on B{C{m}} and B{C{k}}, the function can calculate 9093 Average Maximum Profile Valley Depth B{C{Rvm}} 9094 or Maximum Profile Peak Depth B{C{Rv}}, B{C{Pv}}, B{C{Wv}}. 9095 9096 @since: 2.42 9097 9098 @param m: Number of sampling lengths. I{(int)} 9099 @param k: Number of valleys to consider. I{(int)} 9100 @return: The valley roughness quantity defined by B{C{m}} and B{C{k}}. I{(float)} 9101 """ 9102 return None
9103
9104 - def get_xtm(m, k):
9105 """ 9106 Calculates a total roughness quantity for a data line. 9107 9108 The total quantity is just the sum of the corresponding quantities obtained 9109 by L{DataLine.get_xpm}() and L{DataLine.get_xvm}(). 9110 9111 @since: 2.42 9112 9113 @param m: Number of sampling lengths. I{(int)} 9114 @param k: Number of peaks and valleys to consider. I{(int)} 9115 @return: The total roughness quantity defined by B{C{m}} and B{C{k}}. I{(float)} 9116 """ 9117 return None
9118
9119 - def count_peaks(peaks, pthreshold, vthreshold):
9120 """ 9121 Counts peaks or valleys defined by thresholds in a data line. 9122 9123 Peak is defined as a part of the profile that extends above the peak 9124 threshold and is separarted by valleys that extend below the valley 9125 threshold. For non-zero thresholds there may be parts between that are 9126 neither peaks not valleys because the local maxima in them are 9127 insignificant. 9128 9129 In either case, values of B{C{pthreshold}} and B{C{vthreshold}} must be non-negative. 9130 Usually one passes the same value for both. 9131 9132 @since: 2.50 9133 9134 @param peaks: B{C{True}} for peaks, B{C{False}} for valleys. If you pass B{C{False}}, swap 9135 the meanings of peaks and valleys in the description. Valley 9136 depths are positive. I{(bool)} 9137 @param pthreshold: Peak height threshold. Peaks must stick above this threshold. I{(float)} 9138 @param vthreshold: Valley depth threshold. Valleys must fall below this 9139 threshold. I{(float)} 9140 @return: The number of peaks found. I{(int)} 9141 """ 9142 return None
9143
9144 - def distribution(distribution, ymin, ymax, normalize_to_unity, nstats):
9145 """ 9146 Calculates the distribution of data line values. 9147 9148 This function is quite similar to L{DataLine.dh}(), the differences are: 9149 output normalization (chosen to make the integral unity), output units 9150 (again set to make the integral unity), automated binning. 9151 9152 Note the B{C{i}}-th bin is [B{C{i}}*B{C{dx}}+B{C{off}},(B{C{i}}+1)*B{C{dx}}+B{C{off}}] so the central value 9153 you probably want to use for plotting is (B{C{i}}+0.5)*B{C{dx}}+B{C{off}} (where B{C{dx}} is 9154 the B{C{distribution}} data line pixel size, B{C{off}} is its offset). 9155 9156 If all values are equal and B{C{ymin}}, B{C{ymax}} are not explictly specified, the 9157 range is chosen as [B{C{v}}-|B{C{v}}|/2,B{C{v}}+|B{C{v}}/2] where B{C{v}} is the unique value, 9158 except when B{C{v}}=0, in which case the range is set to [-1,1]. 9159 9160 @since: 2.8 9161 9162 @param distribution: Data line to put the distribution of B{C{data_line}} values to. 9163 It will be resampled to B{C{nstats}} samples (or the automatically 9164 chosen number of bins). I{(L{DataLine})} 9165 @param ymin: Start of value range, pass B{C{ymin}} = B{C{ymax}} = 0.0 for the full range. I{(float)} 9166 @param ymax: End of value range. I{(float)} 9167 @param normalize_to_unity: B{C{True}} to normalize the integral to unity (including 9168 setting y-units of output to the inverse of x-units), 9169 B{C{False}} to keep plain counts in the output (and set 9170 y-units to none). I{(bool)} 9171 @param nstats: The requested number of histogram bins, pass a non-positive number 9172 to automatically choose a suitable number of bins. I{(int)} 9173 """ 9174 pass
9175
9176 - def dh(target_line, ymin, ymax, nsteps):
9177 """ 9178 Computes distribution of heights in interval [B{C{ymin}}, B{C{ymax}}). 9179 9180 If the interval is (0, 0) it computes the distribution from 9181 real data minimum and maximum value. 9182 9183 @param target_line: Data line to store height distribution function to. 9184 It will be resized to B{C{nsteps}}. I{(L{DataLine})} 9185 @param ymin: Height distribution minimum value. I{(float)} 9186 @param ymax: Height distribution maximum value. I{(float)} 9187 @param nsteps: Number of histogram steps. I{(int)} 9188 """ 9189 pass
9190
9191 - def cdh(target_line, ymin, ymax, nsteps):
9192 """ 9193 Computes cumulative distribution of heighs in interval [B{C{ymin}}, B{C{ymax}}). 9194 9195 If the interval is (0, 0) it computes the distribution from 9196 real data minimum and maximum value. 9197 9198 @param target_line: Data line to store height distribution function to. 9199 It will be resized to B{C{nsteps}}. I{(L{DataLine})} 9200 @param ymin: Height distribution minimum value. I{(float)} 9201 @param ymax: Height distribution maximum value. I{(float)} 9202 @param nsteps: Number of histogram steps. I{(int)} 9203 """ 9204 pass
9205
9206 - def da(target_line, ymin, ymax, nsteps):
9207 """ 9208 Computes distribution of angles in interval [B{C{ymin}}, B{C{ymax}}). 9209 9210 If the interval is (0, 0) it computes the distribution from 9211 real data minimum and maximum angle value. 9212 9213 @param target_line: Data line to store angle distribution function to. I{(L{DataLine})} 9214 @param ymin: Angle distribution minimum value. I{(float)} 9215 @param ymax: Angle distribution maximum value. I{(float)} 9216 @param nsteps: Mumber of angular histogram steps. I{(int)} 9217 """ 9218 pass
9219
9220 - def cda(target_line, ymin, ymax, nsteps):
9221 """ 9222 Computes cumulative distribution of angles in interval [B{C{ymin}}, B{C{ymax}}). 9223 9224 If the interval is (0, 0) it computes the distribution from 9225 real data minimum and maximum angle value. 9226 9227 @param target_line: Data line to store angle distribution function to. 9228 It will be resized to B{C{nsteps}}. I{(L{DataLine})} 9229 @param ymin: Angle distribution minimum value. I{(float)} 9230 @param ymax: Angle distribution maximum value. I{(float)} 9231 @param nsteps: Number of angular histogram steps. I{(int)} 9232 """ 9233 pass
9234
9235 - def acf(target_line):
9236 """ 9237 Coputes autocorrelation function and stores the values in 9238 B{C{target_line}} 9239 9240 Up to version 2.53 it did not set the output units properly. 9241 9242 @param target_line: Data line to store autocorrelation function to. It will be 9243 resized to B{C{data_line}} size. I{(L{DataLine})} 9244 """ 9245 pass
9246
9247 - def hhcf(target_line):
9248 """ 9249 Computes height-height correlation function and stores results in 9250 B{C{target_line}}. 9251 9252 Up to version 2.53 it did not set the output units properly. 9253 9254 @param target_line: Data line to store height-height function to. It will be 9255 resized to B{C{data_line}} size. I{(L{DataLine})} 9256 """ 9257 pass
9258
9259 - def psdf(target_line, windowing, interpolation):
9260 """ 9261 Calculates the power spectral density function of a data line. 9262 9263 Up to version 2.45 it destroyed the input data and did not set the output 9264 units properly. 9265 9266 @param target_line: Data line to store power spectral density function to. 9267 It will be resized to B{C{data_line}} size. I{(L{DataLine})} 9268 @param windowing: Windowing method to use. I{(int)} 9269 @param interpolation: Interpolation type. 9270 Ignored since 2.8 as no resampling is performed. I{(int)} 9271 """ 9272 pass
9273
9274 - def get_data():
9275 """ 9276 Extract the data of a data line. 9277 9278 The returned list contains a copy of the data. Changing its contents does 9279 not change the data line's data. 9280 9281 9282 @return: List containing extracted data line data. I{(list)} 9283 """ 9284 return None
9285
9286 - def set_data(data):
9287 """ 9288 Sets the entire contents of a data line. 9289 9290 The length of B{C{data}} must be equal to the number of elements of the data 9291 line. 9292 9293 @param data: Sequence of floating point values. I{(list)} 9294 """ 9295 pass
9296
9297 - def part_fit_polynom(n, from_, to):
9298 """ 9299 Fits a polynomial through a part of a data line. 9300 9301 Please see L{DataLine.fit_polynom}() for more details. 9302 9303 9304 @param n: Polynom degree. I{(int)} 9305 @param from_: I{(int)} 9306 @param to: Index the line part ends at + 1. I{(int)} 9307 @return: The coefficients of the polynomial (B{C{coeffs}} when it was not B{C{None}}, 9308 otherwise a newly allocated array). I{(list)} 9309 """ 9310 return None
9311
9312 - def fit_polynom(n):
9313 """ 9314 Fits a polynomial through a data line. 9315 9316 Note B{C{n}} is polynomial degree, so the size of B{C{coeffs}} is B{C{n}}+1. X-values 9317 are indices in the data line. 9318 9319 For polynomials of degree 0 and 1 it's better to use L{DataLine.get_avg}() 9320 and L{DataLine.get_line_coeffs}() because they are faster. 9321 9322 9323 @param n: Polynom degree. I{(int)} 9324 @return: The coefficients of the polynomial (B{C{coeffs}} when it was not B{C{None}}, 9325 otherwise a newly allocated array). I{(list)} 9326 """ 9327 return None
9328
9329 - def part_subtract_polynom(coeffs, from_, to):
9330 """ 9331 Subtracts a polynomial from a part of a data line. 9332 9333 @param coeffs: An array of size B{C{n}}+1 with polynomial coefficients to. I{(list)} 9334 @param from_: I{(int)} 9335 @param to: Index the line part ends at + 1. I{(int)} 9336 """ 9337 pass
9338
9339 - def subtract_polynom(coeffs):
9340 """ 9341 Subtracts a polynomial from a data line. 9342 9343 @param coeffs: An array of size B{C{n}}+1 with polynomial coefficients to. I{(list)} 9344 """ 9345 pass
9346
9347 - def get_kth_peaks(m, rank, peaks, average, pthreshold, vthreshold):
9348 """ 9349 Calculate k-th largers peaks or valleys in a data line split into given 9350 number of sampling lengths. 9351 9352 This is a general function that can be used as the base for various standard 9353 roughness quantities such as Rp, Rpm, Rv, Rvm or R3z. It is assumed 9354 the line is already levelled, the form removed, etc. 9355 9356 See L{DataLine.count_peaks}() for the description what is considered 9357 a peak. 9358 9359 For larger thresholds and/or short lines some sampling lengths may not 9360 contain the requested number of peaks. If there are any peaks at all, the 9361 smallest peak height (even though it is not B{C{rank}}-th) is used. If there 9362 are no peaks, a large negative value is stored in the corresponding 9363 B{C{peakvalues}} item. 9364 9365 9366 @param m: Number of sampling lengths the line is split into. I{(int)} 9367 @param rank: Rank of the peak to find. One means the highest peak, three the 9368 third highers, etc. I{(int)} 9369 @param peaks: B{C{True}} for peaks, B{C{False}} for valleys. If you pass B{C{False}}, swap 9370 the meanings of peaks and valleys in the description. Valley 9371 depths are positive. I{(bool)} 9372 @param average: Calculate the average of the first B{C{rank}} peaks instead of the 9373 height of B{C{rank}}-th peak. I{(bool)} 9374 @param pthreshold: Peak height threshold. Peaks must stick above this threshold. I{(float)} 9375 @param vthreshold: Valley depth threshold. Valleys must fall below this 9376 threshold. The depth is a positive value. I{(float)} 9377 @return: List with B{C{m}} items containing the peak heights. I{(list)} 9378 """ 9379 return None
9380
9381 - def duplicate():
9382 """ 9383 Convenience macro doing L{gwy_serializable_duplicate}() with all the necessary 9384 typecasting. 9385 9386 @return: I{(L{DataLine})} 9387 """ 9388 return None
9389
9390 - def get_data_pointer():
9391 """ 9392 Gets pointer to data which the data line contains. 9393 9394 9395 @return: integer pointing to the raw data of the data field I{(long)} 9396 """ 9397 return None
9398 9399
9400 -class DataView:
9401 - def __init__(data):
9402 """ 9403 Creates a new data-displaying widget for B{C{data}}. 9404 9405 A newly created B{C{DataView}} doesn't display anything. You have to add 9406 some layers to it, at least a base layer with 9407 L{DataView.set_base_layer}(), and possibly others with 9408 L{DataView.set_alpha_layer}() and L{DataView.set_top_layer}(). 9409 9410 The top layer is special. It must be a vector layer and can receive 9411 mouse and keyboard events. 9412 9413 The base layer it also special. It must be always present, and must not be 9414 transparent or vector. 9415 9416 9417 @param data: A B{C{Container}} containing the data to display. I{(L{Container})} 9418 @return: A newly created data view as a B{C{GtkWidget}}. I{(L{gtk.Widget})} 9419 """ 9420 return None
9421
9422 - def get_base_layer():
9423 """ 9424 Returns the base layer this data view currently uses. 9425 9426 A base layer should be always present. 9427 9428 9429 @return: The currently used base layer. I{(L{PixmapLayer})} 9430 """ 9431 return None
9432
9433 - def set_base_layer(layer):
9434 """ 9435 Plugs B{C{layer}} to B{C{data_view}} as the base layer. 9436 9437 If another base layer is present, it's unplugged. 9438 9439 The layer must not be a vector layer. Theoretically, it can be B{C{None}} to 9440 use no base layer, but then B{C{data_view}} will probably display garbage. 9441 9442 @param layer: A layer to be used as the base layer for B{C{data_view}}. I{(L{PixmapLayer})} 9443 """ 9444 pass
9445
9446 - def get_alpha_layer():
9447 """ 9448 Returns the alpha layer this data view currently uses, or B{C{None}} if none 9449 is present. 9450 9451 9452 @return: The currently used alpha layer. I{(L{PixmapLayer})} 9453 """ 9454 return None
9455
9456 - def set_alpha_layer(layer):
9457 """ 9458 Plugs B{C{layer}} to B{C{data_view}} as the alpha layer. 9459 9460 If another alpha layer is present, it's unplugged. 9461 9462 The layer must not be a vector layer. It can be B{C{None}}, meaning no alpha 9463 layer is to be used. 9464 9465 @param layer: A layer to be used as the alpha layer for B{C{data_view}}. I{(L{PixmapLayer})} 9466 """ 9467 pass
9468
9469 - def get_top_layer():
9470 """ 9471 Returns the top layer this data view currently uses, or B{C{None}} if none 9472 is present. 9473 9474 9475 @return: The currently used top layer. I{(L{VectorLayer})} 9476 """ 9477 return None
9478
9479 - def set_top_layer(layer):
9480 """ 9481 Plugs B{C{layer}} to B{C{data_view}} as the top layer. 9482 9483 If another top layer is present, it's unplugged. 9484 9485 The layer must be a vector layer. It can be B{C{None}}, meaning no top 9486 layer is to be used. 9487 9488 @param layer: A layer to be used as the top layer for B{C{data_view}}. I{(L{VectorLayer})} 9489 """ 9490 pass
9491
9492 - def get_data_prefix():
9493 """ 9494 Gets the prefix for the container data channel that the data view is 9495 currently set to display. 9496 9497 9498 @return: The container data prefix (eg. "/0/data"). I{(string)} 9499 """ 9500 return None
9501
9502 - def set_data_prefix(prefix):
9503 """ 9504 Sets the prefix for the container data channel to display in a data view. 9505 9506 This function only affects where the data view itself takes parameters 9507 from, it does not affect layer keys. 9508 9509 @param prefix: Container prefix for data (eg. "/0/data"). I{(string)} 9510 """ 9511 pass
9512
9513 - def get_hexcess():
9514 """ 9515 Return the horizontal excess of widget size to data size. 9516 9517 Do not use. Only useful for B{C{DataWindow}} implementation. 9518 9519 9520 @return: The execess. I{(float)} 9521 """ 9522 return None
9523
9524 - def get_vexcess():
9525 """ 9526 Return the vertical excess of widget size to data size. 9527 9528 Do not use. Only useful for B{C{DataWindow}} implementation. 9529 9530 9531 @return: The execess. I{(float)} 9532 """ 9533 return None
9534
9535 - def set_zoom(zoom):
9536 """ 9537 Sets zoom of B{C{data_view}} to B{C{zoom}}. 9538 9539 Zoom greater than 1 means larger image on screen and vice versa. 9540 9541 Note window manager can prevent the window from resize and thus the zoom 9542 from change. 9543 9544 @param zoom: A new zoom value. I{(float)} 9545 """ 9546 pass
9547
9548 - def get_zoom():
9549 """ 9550 Returns current ideal zoom of a data view. 9551 9552 More precisely the zoom value requested by L{DataView.set_zoom}(), if 9553 it's in use (real zoom may differ a bit due to pixel rounding). If zoom 9554 was set by explicite widget size change, real and requested zoom are 9555 considered to be the same. 9556 9557 When a resize is queued, the new zoom value is returned. 9558 9559 In other words, this is the zoom B{C{data_view}} would like to have. Use 9560 L{DataView.get_real_zoom}() to get the real zoom. 9561 9562 9563 @return: The zoom as a ratio between ideal displayed size and base data 9564 field size. I{(float)} 9565 """ 9566 return None
9567
9568 - def get_real_zoom():
9569 """ 9570 Returns current real zoom of a data view. 9571 9572 This is the zoom value a data view may not wish to have, but was imposed 9573 by window manager or other constraints. Unlike ideal zoom set by 9574 L{DataView.set_zoom}(), this value cannot be set. 9575 9576 When a resize is queued, the current (old) value is returned. 9577 9578 9579 @return: The zoom as a ratio between real displayed size and base data 9580 field size. I{(float)} 9581 """ 9582 return None
9583
9584 - def get_data():
9585 """ 9586 Returns the data container used by B{C{data_view}}. 9587 9588 9589 @return: The data as a B{C{Container}}. I{(L{Container})} 9590 """ 9591 return None
9592
9593 - def coords_xy_clamp():
9594 """ 9595 Fixes screen coordinates B{C{xscr}} and B{C{yscr}} to be inside the data-displaying 9596 area (which can be smaller than widget size). 9597 9598 @return: Tuple consisting of 2 values (B{C{xscr}}, B{C{yscr}}). (I{(IntInOutArg)}, I{(IntInOutArg)}) 9599 """ 9600 return None, None
9601
9602 - def coords_xy_cut_line():
9603 """ 9604 Fixes screen coordinates of line endpoints to be inside the data-displaying 9605 area (which can be smaller than widget size). 9606 9607 @since: 2.11 9608 9609 @return: Tuple consisting of 4 values (B{C{x0scr}}, B{C{y0scr}}, B{C{x1scr}}, B{C{y1scr}}). (I{(IntInOutArg)}, I{(IntInOutArg)}, I{(IntInOutArg)}, I{(IntInOutArg)}) 9610 """ 9611 return None, None, None, None
9612
9613 - def coords_xy_to_real(xscr, yscr):
9614 """ 9615 Recomputes screen coordinates relative to widget origin to physical 9616 coordinates in the sample. 9617 9618 Note that data fields offsets are I{not} taken into 9619 account. Coordinates B{C{xreal}}, B{C{yreal}} are just relative coordinates to the 9620 top left field corner. 9621 9622 @param xscr: A screen x-coordinate relative to widget origin. I{(int)} 9623 @param yscr: A screen y-coordinate relative to widget origin. I{(int)} 9624 @return: Tuple consisting of 2 values (B{C{xreal}}, B{C{yreal}}). (I{(float)}, I{(float)}) 9625 """ 9626 return None, None
9627
9628 - def coords_real_to_xy(xreal, yreal):
9629 """ 9630 Recomputes physical coordinate in the sample to screen coordinate relative 9631 to widget origin. 9632 9633 Note that data fields offsets are I{not} taken into 9634 account. Coordinates B{C{xreal}}, B{C{yreal}} are just relative coordinates to the 9635 top left field corner. 9636 9637 @param xreal: A physical x-coordinate in the data sample. I{(float)} 9638 @param yreal: A physical y-coordinate in the data sample. I{(float)} 9639 @return: Tuple consisting of 2 values (B{C{xscr}}, B{C{yscr}}). (I{(int)}, I{(int)}) 9640 """ 9641 return None, None
9642
9643 - def coords_real_to_xy_float(xreal, yreal):
9644 """ 9645 Recomputes physical coordinate in the sample to screen coordinate relative 9646 to widget origin, keeping them as floating point values. 9647 9648 Note that data fields offsets are I{not} taken into 9649 account. Coordinates B{C{xreal}}, B{C{yreal}} are just relative coordinates to the 9650 top left field corner. 9651 9652 @since: 2.45 9653 9654 @param xreal: A physical x-coordinate in the data sample. I{(float)} 9655 @param yreal: A physical y-coordinate in the data sample. I{(float)} 9656 @return: Tuple consisting of 2 values (B{C{xscr}}, B{C{yscr}}). (I{(float)}, I{(float)}) 9657 """ 9658 return None, None
9659
9660 - def get_xmeasure():
9661 """ 9662 Returns the ratio between horizontal physical lengths and horizontal 9663 screen lengths in pixels. 9664 9665 9666 @return: The horizontal measure. I{(float)} 9667 """ 9668 return None
9669
9670 - def get_ymeasure():
9671 """ 9672 Returns the ratio between vertical physical lengths and horizontal 9673 screen lengths in pixels. 9674 9675 9676 @return: The vertical measure. I{(float)} 9677 """ 9678 return None
9679
9680 - def get_pixel_data_sizes():
9681 """ 9682 Obtains pixel dimensions of data displayed by a data view. 9683 9684 This is a convenience method, the same values could be obtained 9685 by L{DataField.get_xres}() and L{DataField.get_yres}() of the data 9686 field displayed by the base layer. 9687 9688 @return: Tuple consisting of 2 values (B{C{xres}}, B{C{yres}}). (I{(int)}, I{(int)}) 9689 """ 9690 return None, None
9691
9692 - def get_real_data_sizes():
9693 """ 9694 Obtains physical dimensions of data displayed by a data view. 9695 9696 Physical coordinates are always taken from data field displayed by the base 9697 layer. This is a convenience method, the same values could be obtained 9698 by L{DataField.get_xreal}() and L{DataField.get_yreal}() of the data 9699 field displayed by the base layer. 9700 9701 @return: Tuple consisting of 2 values (B{C{xreal}}, B{C{yreal}}). (I{(float)}, I{(float)}) 9702 """ 9703 return None, None
9704
9705 - def get_real_data_offsets():
9706 """ 9707 Obtains physical offsets of data displayed by a data view. 9708 9709 Physical coordinates are always taken from data field displayed by the base 9710 layer. This is a convenience method, the same values could be obtained 9711 by L{DataField.get_xoffset}() and L{DataField.get_yoffset}() of the data 9712 field displayed by the base layer. 9713 9714 @since: 2.16 9715 9716 @return: Tuple consisting of 2 values (B{C{xoffset}}, B{C{yoffset}}). (I{(float)}, I{(float)}) 9717 """ 9718 return None, None
9719
9720 - def get_pixbuf(max_width, max_height):
9721 """ 9722 Creates and returns a pixbuf from the data view. 9723 9724 If the data is not square, the resulting pixbuf is also nonsquare. 9725 The returned pixbuf also never has an alpha channel. 9726 9727 9728 @param max_width: Pixbuf width that should not be exceeeded. Value smaller than 9729 1 means unlimited size. I{(int)} 9730 @param max_height: Pixbuf height that should not be exceeeded. Value smaller than 9731 1 means unlimited size. I{(int)} 9732 @return: The pixbuf as a newly created B{C{GdkPixbuf}}, it should be freed 9733 when no longer needed. It is never larger than the actual data 9734 size, as B{C{max_width}} and B{C{max_height}} are only upper limits. I{(L{gdk.Pixbuf})} 9735 """ 9736 return None
9737
9738 - def export_pixbuf(zoom, draw_alpha, draw_top):
9739 """ 9740 Exports data view to a pixbuf. 9741 9742 9743 @param zoom: Zoom to export data with (unrelated to data view zoom). I{(float)} 9744 @param draw_alpha: B{C{True}} to draw alpha layer (mask). I{(bool)} 9745 @param draw_top: B{C{True}} to draw top layer (selection). I{(bool)} 9746 @return: A newly created pixbuf, it must be freed by caller. I{(L{gdk.Pixbuf})} 9747 """ 9748 return None
9749
9750 - def get_metric():
9751 """ 9752 Fills metric matrix for a data view. 9753 9754 The metric matrix essentially transforms distances in physical coordinates 9755 to screen distances. It is to be used with functions like 9756 L{gwy_math_find_nearest_point}() and L{gwy_math_find_nearest_line}() when the 9757 distance should be screen-Euclidean. 9758 9759 @return: I{(list)} 9760 """ 9761 return None
9762 9763
9764 -class DataViewLayer:
9765 - def plugged():
9766 """ 9767 Emits a "plugged" singal on a layer. 9768 9769 Primarily intended for B{C{DataView}} implementation. 9770 9771 """ 9772 pass
9773
9774 - def unplugged():
9775 """ 9776 Emits a "unplugged" singal on a layer. 9777 9778 Primarily intended for B{C{DataView}} implementation. 9779 9780 """ 9781 pass
9782
9783 - def updated():
9784 """ 9785 Emits a "updated" singal on a layer. 9786 9787 """ 9788 pass
9789
9790 - def realize():
9791 """ 9792 Tells a data view layer its parent was realized and it can create 9793 display-specific resources. 9794 9795 """ 9796 pass
9797
9798 - def unrealize():
9799 """ 9800 Tells a data view layer its parent was unrealized and it should destroy 9801 display-specific resources. 9802 9803 """ 9804 pass
9805 9806
9807 -class DataWindow:
9808 - def __init__(data_view):
9809 """ 9810 Creates a new data displaying window. 9811 9812 9813 @param data_view: A B{C{DataView}} containing the data-displaying widget to show. I{(L{DataView})} 9814 @return: A newly created widget, as B{C{GtkWidget}}. I{(L{gtk.Widget})} 9815 """ 9816 return None
9817
9818 - def get_data_view():
9819 """ 9820 Returns the data view widget a data window currently shows. 9821 9822 9823 @return: The currently shown data view. I{(L{DataView})} 9824 """ 9825 return None
9826
9827 - def get_color_axis():
9828 """ 9829 Returns the color axis widget displayed by a data window. 9830 9831 9832 @return: The color axis. I{(L{gtk.Widget})} 9833 """ 9834 return None
9835
9836 - def get_data():
9837 """ 9838 Returns the data for the data view a data window currently shows. 9839 9840 9841 @return: The data as B{C{Container}}. I{(L{Container})} 9842 """ 9843 return None
9844
9845 - def set_zoom(izoom):
9846 """ 9847 Sets the zoom of a data window to B{C{izoom}}. 9848 9849 When B{C{izoom}} is -1 it zooms out; when B{C{izoom}} is 1 it zooms out. 9850 Otherwise the new zoom value is set to B{C{izoom}}/10000. 9851 9852 @param izoom: The new zoom value (as an integer). I{(int)} 9853 """ 9854 pass
9855
9856 - def fit_to_screen():
9857 """ 9858 Sets the zoom of data windows's data view in an attempt to make the window 9859 fit to the screen. 9860 9861 @since: 2.56 9862 9863 """ 9864 pass
9865
9866 - def get_data_name():
9867 """ 9868 Gets the data name part of a data window's title. 9869 9870 9871 @return: The data name as a string owned by the window. I{(string)} 9872 """ 9873 return None
9874
9875 - def set_data_name(data_name):
9876 """ 9877 Sets the data name of a data window. 9878 9879 The data name is used in the window's title. 9880 9881 @param data_name: New data name. I{(string)} 9882 """ 9883 pass
9884
9885 - def get_ul_corner_widget():
9886 """ 9887 Returns the upper left corner widget of B{C{data_window}}. 9888 9889 9890 @return: The upper left corner widget as a B{C{GtkWidget}}, B{C{None}} if there is 9891 no such widget. I{(L{gtk.Widget})} 9892 """ 9893 return None
9894
9895 - def set_ul_corner_widget(corner):
9896 """ 9897 Sets the widget in upper left corner of a data window to B{C{corner}}. 9898 9899 @param corner: A widget to set as upper left corner widget, many be B{C{None}} to 9900 just remove any eventual existing one. I{(L{gtk.Widget})} 9901 """ 9902 pass
9903 9904
9905 -class Graph:
9906 - def __init__(gmodel):
9907 """ 9908 Creates graph widget based on information in model. 9909 9910 9911 @param gmodel: A graph model. I{(L{GraphModel})} 9912 @return: new graph widget. I{(L{gtk.Widget})} 9913 """ 9914 return None
9915
9916 - def get_axis(type):
9917 """ 9918 Gets a graph axis. 9919 9920 9921 @param type: Axis orientation I{(GtkPositionType)} 9922 @return: The axis (of given orientation) within the graph widget. I{(L{Axis})} 9923 """ 9924 return None
9925
9926 - def set_axis_visible(type, is_visible):
9927 """ 9928 Sets the visibility of graph axis of given orientation. Visibility 9929 can be set also directly using Axis API. 9930 9931 @param type: Axis orientation I{(GtkPositionType)} 9932 @param is_visible: set/unset axis visibility within graph widget I{(bool)} 9933 """ 9934 pass
9935
9936 - def get_area():
9937 """ 9938 Gets the area widget of a graph. 9939 9940 9941 @return: The graph area widget within the graph. I{(L{gtk.Widget})} 9942 """ 9943 return None
9944
9945 - def set_model(gmodel):
9946 """ 9947 Changes the model a graph displays. 9948 9949 Everything in graph widgets will be reset to reflect the new data. 9950 9951 @param gmodel: New graph model I{(L{GraphModel})} 9952 """ 9953 pass
9954
9955 - def get_model():
9956 """ 9957 Gets the model of a graph. 9958 9959 9960 @return: The graph model this graph widget displays. I{(L{GraphModel})} 9961 """ 9962 return None
9963
9964 - def set_status(status):
9965 """ 9966 Sets the status of a graph widget. 9967 9968 The status determines how the graph reacts on mouse events. 9969 This includes point or area selection and zooming. 9970 9971 @param status: graph status Expected values: C{B{GRAPH_STATUS_PLAIN}}, C{B{GRAPH_STATUS_XSEL}}, C{B{GRAPH_STATUS_YSEL}}, C{B{GRAPH_STATUS_POINTS}}, C{B{GRAPH_STATUS_ZOOM}}, C{B{GRAPH_STATUS_XLINES}}, C{B{GRAPH_STATUS_YLINES}}. I{(L{GraphStatusType})} 9972 """ 9973 pass
9974
9975 - def get_status():
9976 """ 9977 Get the status of a graph widget. 9978 9979 See L{Graph.set_status}() for more. 9980 9981 9982 @return: The current graph status. I{(GraphStatusType)} 9983 """ 9984 return None
9985
9986 - def enable_user_input(enable):
9987 """ 9988 Enables/disables all the graph/curve settings dialogs to be invoked by 9989 mouse clicks. 9990 9991 @param enable: whether to enable user input I{(bool)} 9992 """ 9993 pass
9994
9995 - def export_pixmap(export_title, export_axis, export_labels):
9996 """ 9997 Renders a graph widget into a pixbuf. 9998 9999 10000 @param export_title: B{C{True}} to export graph title. Currently unimplemented. I{(bool)} 10001 @param export_axis: B{C{True}} to export graph axes. Currently unimplemented. I{(bool)} 10002 @param export_labels: B{C{True}} to export graph labels. Currently unimplemented. I{(bool)} 10003 @return: A newly created pixbuf. I{(L{gdk.Pixbuf})} 10004 """ 10005 return None
10006
10007 - def export_postscript(export_title, export_axis, export_labels):
10008 """ 10009 Approximately renders a graph widget in PostScript. 10010 10011 10012 @param export_title: B{C{True}} to export graph title. Currently unimplemented. I{(bool)} 10013 @param export_axis: B{C{True}} to export graph axes. Currently unimplemented. I{(bool)} 10014 @param export_labels: B{C{True}} to export graph labels. Currently unimplemented. I{(bool)} 10015 @return: Tuple consisting of 2 values (B{C{value}}, B{C{str}}). (I{(string)}, I{(SkipArg)}) 10016 """ 10017 return None, None
10018
10019 - def window_new():
10020 """ 10021 Creates a new window showing B{C{graph}}. 10022 10023 10024 @return: A newly created graph window as B{C{GtkWidget}}. I{(L{gtk.Widget})} 10025 """ 10026 return None
10027 10028
10029 -class GraphArea:
10030 - def __init__():
10031 """ 10032 Creates a new graph area widget. 10033 10034 10035 @return: Newly created graph area as B{C{GtkWidget}}. I{(L{gtk.Widget})} 10036 """ 10037 return None
10038
10039 - def get_label():
10040 """ 10041 Gets the label inside a graph area. 10042 10043 10044 @return: The graph label widget within the graph area. I{(L{gtk.Widget})} 10045 """ 10046 return None
10047
10048 - def set_model(gmodel):
10049 """ 10050 Sets the graph model of a graph area. 10051 10052 @param gmodel: New graph model. I{(L{GraphModel})} 10053 """ 10054 pass
10055
10056 - def get_model():
10057 """ 10058 Gets the model of a graph area. 10059 10060 10061 @return: The graph model this graph area widget displays. I{(L{GraphModel})} 10062 """ 10063 return None
10064
10065 - def get_cursor():
10066 """ 10067 Gets mouse cursor related values within a graph area. 10068 10069 @return: Tuple consisting of 2 values (B{C{x_cursor}}, B{C{y_cursor}}). (I{(float)}, I{(float)}) 10070 """ 10071 return None, None
10072
10073 - def set_x_range(x_min, x_max):
10074 """ 10075 Sets the horizontal range a graph area displays. 10076 10077 @param x_min: The minimum x value, in real coodrinates. I{(float)} 10078 @param x_max: The maximum x value, in real coodrinates. I{(float)} 10079 """ 10080 pass
10081
10082 - def set_y_range(y_min, y_max):
10083 """ 10084 Sets the vertical range a graph area displays. 10085 10086 @param y_min: The minimum y value, in real coodrinates. I{(float)} 10087 @param y_max: The maximum y value, in real coodrinates. I{(float)} 10088 """ 10089 pass
10090
10091 - def get_selection(status_type):
10092 """ 10093 Gets the selection object corresponding to a status of a graph area. 10094 10095 A selection object exists even for inactive status types (selection modes), 10096 therefore also selections for other modes than the currently active one can 10097 be requested. 10098 10099 10100 @param status_type: Graph status. Value B{C{GRAPH_STATUS_PLAIN}} mode (which has 10101 no selection associated) stands for the currentl selection 10102 mode. Expected values: C{B{GRAPH_STATUS_PLAIN}}, C{B{GRAPH_STATUS_XSEL}}, C{B{GRAPH_STATUS_YSEL}}, C{B{GRAPH_STATUS_POINTS}}, C{B{GRAPH_STATUS_ZOOM}}, C{B{GRAPH_STATUS_XLINES}}, C{B{GRAPH_STATUS_YLINES}}. I{(L{GraphStatusType})} 10103 @return: The requested selection. It is B{C{None}} only if B{C{status_type}} is 10104 B{C{GRAPH_STATUS_PLAIN}} and the current selection mode is 10105 B{C{GRAPH_STATUS_PLAIN}}. I{(L{Selection})} 10106 """ 10107 return None
10108
10109 - def set_status(status_type):
10110 """ 10111 Sets the status of a graph area. 10112 10113 When the area is inside a B{C{Graph}}, use L{Graph.set_status}() instead 10114 (also see this function for details). 10115 10116 @param status_type: New graph area status. Expected values: C{B{GRAPH_STATUS_PLAIN}}, C{B{GRAPH_STATUS_XSEL}}, C{B{GRAPH_STATUS_YSEL}}, C{B{GRAPH_STATUS_POINTS}}, C{B{GRAPH_STATUS_ZOOM}}, C{B{GRAPH_STATUS_XLINES}}, C{B{GRAPH_STATUS_YLINES}}. I{(L{GraphStatusType})} 10117 """ 10118 pass
10119
10120 - def get_status():
10121 """ 10122 Gets the status of a grap area. 10123 10124 See L{Graph.area_set_status}(). 10125 10126 10127 @return: The current graph area status. I{(GraphStatusType)} 10128 """ 10129 return None
10130
10131 - def draw_on_drawable(drawable, gc, x, y, width, height):
10132 """ 10133 Draws a graph area to a Gdk drawable. 10134 10135 @param drawable: a B{C{GdkDrawable}} (destination for graphics operations) I{(L{gdk.Drawable})} 10136 @param gc: Graphics context. 10137 It is modified by this function unpredictably. I{(L{gdk.GC})} 10138 @param x: X position in B{C{drawable}} where the graph area should be drawn I{(int)} 10139 @param y: Y position in B{C{drawable}} where the graph area should be drawn I{(int)} 10140 @param width: width of the graph area on the drawable I{(int)} 10141 @param height: height of the graph area on the drawable I{(int)} 10142 """ 10143 pass
10144
10145 - def export_vector(x, y, width, height):
10146 """ 10147 Creates PostScript representation of a graph area. 10148 10149 10150 @param x: Bounding box origin X-coordinate. I{(int)} 10151 @param y: Bounding box origin Y-coordinate. I{(int)} 10152 @param width: Bounding box width. I{(int)} 10153 @param height: Bounding box height. I{(int)} 10154 @return: A fragment of PostScript code representing the the graph area 10155 as a newly allocated B{C{GString}}. I{(string)} 10156 """ 10157 return None
10158
10159 - def enable_user_input(enable):
10160 """ 10161 Enables/disables auxiliary graph area dialogs (invoked by clicking the 10162 mouse). 10163 10164 Note, however, that this setting does not control editability of selections. 10165 Use L{Graph.area_set_selection_editable}() for that. 10166 10167 @param enable: B{C{True}} to enable user interaction, B{C{False}} to disable it. I{(bool)} 10168 """ 10169 pass
10170
10171 - def set_selection_editable(setting):
10172 """ 10173 Enables/disables selection editing using mouse. 10174 10175 When selection editing is disabled the graph area status type determines 10176 the selection type that can be drawn on the area. However, the user cannot 10177 modify it. 10178 10179 @since: 2.45 10180 10181 @param setting: B{C{True}} to enable selection editing, B{C{False}} to disable it. I{(bool)} 10182 """ 10183 pass
10184
10185 - def edit_curve(id):
10186 """ 10187 Invokes the curve property dialog for a curve. 10188 10189 If the dialog is already displayed, it is switched to the requested curve. 10190 10191 @since: 2.5 10192 10193 @param id: The index of the curve to edit properties of. I{(int)} 10194 """ 10195 pass
10196
10197 - def set_x_grid_data(grid_data):
10198 """ 10199 Sets the grid data on the x-axis of a graph area 10200 10201 @param grid_data: Array of grid line positions on the x-axis (in real values, 10202 not pixels). I{(list)} 10203 """ 10204 pass
10205
10206 - def set_y_grid_data(grid_data):
10207 """ 10208 Sets the grid data on the y-axis of a graph area 10209 10210 @param grid_data: Array of grid line positions on the y-axis (in real values, 10211 not pixels). I{(list)} 10212 """ 10213 pass
10214
10215 - def get_x_grid_data():
10216 """ 10217 Gets the grid data on the x-axis of a graph area. 10218 10219 10220 @return: Array of grid line positions (in real values, not pixels) owned 10221 by the graph area. I{(list)} 10222 """ 10223 return None
10224
10225 - def get_y_grid_data():
10226 """ 10227 Gets the grid data on the y-axis of a graph area. 10228 10229 10230 @return: Array of grid line positions (in real values, not pixels) owned 10231 by the graph area. I{(list)} 10232 """ 10233 return None
10234 10235
10236 -class GraphCorner:
10237 - def __init__():
10238 """ 10239 Creates a new graph corner. 10240 10241 10242 @return: A new graph corner as a B{C{GtkWidget}}. I{(L{gtk.Widget})} 10243 """ 10244 return None
10245 10246
10247 -class GraphCurveModel:
10248 - def __init__():
10249 """ 10250 Creates a new graph curve model. 10251 10252 10253 @return: New empty graph curve model as a B{C{GObject}}. I{(L{GraphCurveModel})} 10254 """ 10255 return None
10256
10257 - def new_alike():
10258 """ 10259 Creates new graph curve model object that has the same settings as B{C{gcmodel}}. 10260 10261 Curve data are not duplicated. 10262 10263 10264 @return: New graph curve model. I{(L{GraphCurveModel})} 10265 """ 10266 return None
10267
10268 - def set_data_from_dataline(dline, from_index, to_index):
10269 """ 10270 Sets graph curve model data from a data line. 10271 10272 The range of import can be modified using parameters B{C{from_index}} and B{C{to_index}} that are interpreted directly as 10273 data indices within the B{C{DataLine}}. In the case that B{C{from_index}} == B{C{to_index}}, the full B{C{DataLine}} is used. 10274 10275 If there were calibration data in the former B{C{gcmodel}}, they are removed. 10276 10277 @param dline: A data line. I{(L{DataLine})} 10278 @param from_index: Data line index where to start. I{(int)} 10279 @param to_index: Data line index where to stop. I{(int)} 10280 """ 10281 pass
10282
10283 - def enforce_order():
10284 """ 10285 Ensures curve model data points are ordered by abscissa in ascending order. 10286 10287 The function reorders the data points currently present in the model. It does not prevent functions such as 10288 L{Graph.curve_model_set_data}() from disrupting the order again. See its documentation for further remarks. 10289 10290 The "data-changed" signal is emitted if the data order actually changes. 10291 10292 @since: 2.45 10293 10294 """ 10295 pass
10296
10297 - def is_ordered():
10298 """ 10299 Checks if a curve model data points are ordered by abscissa in ascending order. 10300 10301 If the curve model has less than two points it is considered ordered by abscissa. Two points with the same 10302 abscissa are considered correctly ordered in both orders. 10303 10304 See L{Graph.curve_model_enforce_order}() for fixing the point order. 10305 10306 @since: 2.46 10307 10308 @return: B{C{True}} if the graph curve model points are sorted by abscissa, B{C{False}} when they are not. I{(bool)} 10309 """ 10310 return None
10311
10312 - def get_ndata():
10313 """ 10314 Gets the number of points in a graph curve model. 10315 10316 10317 @return: number of data points within the curve data I{(int)} 10318 """ 10319 return None
10320
10321 - def get_x_range():
10322 """ 10323 Gets the abscissa range of a graph curve. 10324 10325 The values are cached in the curve model therefore repeated calls to this function (with unchanged data) are cheap. 10326 10327 If there are no data points in the curve, B{C{x_min}} and B{C{x_max}} are untouched and the function returns B{C{False}}. 10328 10329 See also L{Graph.curve_model_get_ranges}() for a more high-level function. 10330 10331 10332 @return: Tuple consisting of 3 values (B{C{value}}, B{C{x_min}}, B{C{x_max}}). (I{(bool)}, I{(float)}, I{(float)}) 10333 """ 10334 return None, None, None
10335
10336 - def get_y_range():
10337 """ 10338 Gets the ordinate range of a graph curve. 10339 10340 The values are cached in the curve model therefore repeated calls to this function (with unchanged data) are cheap. 10341 10342 If there are no data points in the curve, B{C{x_min}} and B{C{x_max}} are untouched and the function returns B{C{False}}. 10343 10344 See also L{Graph.curve_model_get_ranges}() for a more high-level function. 10345 10346 10347 @return: Tuple consisting of 3 values (B{C{value}}, B{C{y_min}}, B{C{y_max}}). (I{(bool)}, I{(float)}, I{(float)}) 10348 """ 10349 return None, None, None
10350
10351 - def get_ranges(x_logscale, y_logscale):
10352 """ 10353 Gets the log-scale suitable range minima of a graph curve. 10354 10355 Parameters B{C{x_logscale}} and B{C{y_logscale}} determine which axis or axes are intended to use logarithmical scale. The 10356 range of displayble values for an axis generally depends on the other axis too as it acts as a filter. When both 10357 B{C{x_logscale}} and B{C{y_logscale}} are B{C{False}}, the returned minima are identical to those returned by 10358 L{Graph.curve_model_get_x_range}() and L{Graph.curve_model_get_y_range}(). 10359 10360 The return values are cached in the curve model therefore repeated calls to this function (with unchanged data) are 10361 cheap. 10362 10363 If there are no data points that would be displayable with the intended logarithmical scale setup, the output 10364 arguments are untouched and B{C{False}} is returned. 10365 10366 @since: 2.8 10367 10368 @param x_logscale: B{C{True}} if logarithmical scale is intended for the abscissa. I{(bool)} 10369 @param y_logscale: B{C{True}} if logarithmical scale is intended for the ordinate. I{(bool)} 10370 @return: Tuple consisting of 5 values (B{C{value}}, B{C{x_min}}, B{C{x_max}}, B{C{y_min}}, B{C{y_max}}). (I{(bool)}, I{(float)}, I{(float)}, I{(float)}, I{(float)}) 10371 """ 10372 return None, None, None, None, None
10373
10374 - def get_xdata():
10375 """ 10376 Gets y data points of a graph curve model. 10377 10378 The returned data are owned by the and cannot be modified nor freed. The returned pointer is valid only so long as 10379 the curve model exists and its data do not change. 10380 10381 10382 @return: X data points, owned by the curve model. I{(list)} 10383 """ 10384 return None
10385
10386 - def get_ydata():
10387 """ 10388 Gets y data points of a graph curve model. 10389 10390 The returned data are owned by the and cannot be modified nor freed. The returned pointer is valid only so long as 10391 the curve model exists and its data do not change. 10392 10393 10394 @return: Y data points, owned by the curve model. I{(list)} 10395 """ 10396 return None
10397
10398 - def set_data(xdata, ydata):
10399 """ 10400 Sets curve model data from separated X and Y arrays. 10401 10402 If there were calibration data in the former B{C{gcmodel}}, they are removed. 10403 10404 @warning:The points should be ordered in ascending abscissa order, meaning B{C{xdata}} values ordered from smallest to 10405 largest. It is not enforced and you can create graphs of data the do not satisfy this condition. However, various 10406 graph functionality may be unavailable or degraded then. You also can use L{Graph.curve_model_enforce_order}() 10407 afterwards to ensure the recommended data point order. 10408 10409 @param xdata: X data points (array of size B{C{n}}). I{(list)} 10410 @param ydata: Y data points (array of size B{C{n}}). I{(list)} 10411 """ 10412 pass
10413
10414 - def set_data_interleaved(xydata):
10415 """ 10416 Sets curve model data from an interleaved array. 10417 10418 The array should contain interleaved abscissa and ordinate values: x0, y0, x1, y1, x2, y2, etc. You can also 10419 typecast an array of B{C{XY}} structs and pass it as B{C{xydata}}. 10420 10421 If there were calibration data in the former B{C{gcmodel}}, they are removed. 10422 10423 @warning:The points should be ordered in ascending abscissa order, meaning B{C{xdata}} values ordered from smallest to 10424 largest. It is not enforced and you can create graphs of data the do not satisfy this condition. However, various 10425 graph functionality may be unavailable or degraded then. You also can use L{Graph.curve_model_enforce_order}() 10426 afterwards to ensure the recommended data point order. 10427 10428 @since: 2.45 10429 10430 @param xydata: X and Y data points (array of size 2*B{C{n}}). I{(list)} 10431 """ 10432 pass
10433
10434 - def duplicate():
10435 """ 10436 Convenience macro doing L{gwy_serializable_duplicate}() with all the necessary typecasting. 10437 10438 @return: I{(L{GraphCurveModel})} 10439 """ 10440 return None
10441 10442
10443 -class GraphCurves:
10444 - def __init__(gmodel):
10445 """ 10446 Creates graph curve list widget based on information in graph model. 10447 10448 The B{C{GtkTreeModel}} and the columns follow the graph model and must not be 10449 changed manually. 10450 10451 @since: 2.5 10452 10453 @param gmodel: A graph model. It can be B{C{None}}. I{(L{GraphModel})} 10454 @return: A new graph curve list. I{(L{gtk.Widget})} 10455 """ 10456 return None
10457
10458 - def set_model(gmodel):
10459 """ 10460 Changes the graph model a graph curve list. 10461 10462 @since: 2.5 10463 10464 @param gmodel: New graph model. I{(L{GraphModel})} 10465 """ 10466 pass
10467
10468 - def get_model():
10469 """ 10470 Gets the graph model a graph curve list displays. 10471 10472 @since: 2.5 10473 10474 @return: The graph model associated with this B{C{GraphCurves}} widget. I{(L{GraphModel})} 10475 """ 10476 return None
10477 10478
10479 -class GraphData:
10480 - def __init__(gmodel):
10481 """ 10482 Creates graph_data widget based on information in graph model. 10483 10484 The B{C{GtkTreeModel}} and the columns follow the graph model and must not be 10485 changed manually. 10486 10487 10488 @param gmodel: A graph_data model. It can be B{C{None}}. I{(L{GraphModel})} 10489 @return: A new graph_data widget. I{(L{gtk.Widget})} 10490 """ 10491 return None
10492
10493 - def set_model(gmodel):
10494 """ 10495 Changes the graph model a graph data table displays. 10496 10497 @param gmodel: New graph_data model. I{(L{GraphModel})} 10498 """ 10499 pass
10500
10501 - def get_model():
10502 """ 10503 Gets the graph model a graph data table displays. 10504 10505 10506 @return: The graph model associated with this B{C{GraphData}} widget. I{(L{GraphModel})} 10507 """ 10508 return None
10509 10510
10511 -class GraphLabel:
10512 - def __init__():
10513 """ 10514 Creates a new graph label. 10515 10516 10517 @return: A new graph label widget as a B{C{GtkWidget}}. I{(L{gtk.Widget})} 10518 """ 10519 return None
10520
10521 - def set_model(gmodel):
10522 """ 10523 Sets new model of a graph label. 10524 10525 @param gmodel: New graph model. I{(L{GraphModel})} 10526 """ 10527 pass
10528
10529 - def get_model():
10530 """ 10531 Gets the model of a graph key. 10532 10533 10534 @return: The graph model this graph label takes curve properties and 10535 descriptions from. I{(L{GraphModel})} 10536 """ 10537 return None
10538
10539 - def enable_user_input(enable):
10540 """ 10541 Enables or disables user input to a graph label. 10542 10543 @param enable: Whether to enable the user input. I{(bool)} 10544 """ 10545 pass
10546
10547 - def draw_on_drawable(drawable, gc, layout, x, y, width, height):
10548 """ 10549 draws a graph label on a drawable 10550 10551 @param drawable: the B{C{GdkDrawable}} I{(L{gdk.Drawable})} 10552 @param gc: Graphics context. 10553 It is modified by this function unpredictably. I{(L{gdk.GC})} 10554 @param layout: pango layout I{(PangoLayout*)} 10555 @param x: x position where label is to be drawn I{(int)} 10556 @param y: y position where label is to be drawn I{(int)} 10557 @param width: width of the label I{(int)} 10558 @param height: hieght of the label I{(int)} 10559 """ 10560 pass
10561
10562 - def export_vector(x, y, width, height, fontsize):
10563 """ 10564 Creates PostScript representation of a graph label. 10565 10566 10567 @param x: x position of the graph label I{(int)} 10568 @param y: y position of the graph label I{(int)} 10569 @param width: width of the graph label I{(int)} 10570 @param height: hieght of the graph label I{(int)} 10571 @param fontsize: fontsize of the label I{(int)} 10572 @return: A fragment of PostScript code representing the the graph label 10573 as a newly allocated B{C{GString}}. I{(string)} 10574 """ 10575 return None
10576 10577
10578 -class GraphModel:
10579 - def __init__():
10580 """ 10581 Creates a new graph model. 10582 10583 10584 @return: New graph model as a B{C{GObject}}. I{(L{GraphModel})} 10585 """ 10586 return None
10587
10588 - def new_alike():
10589 """ 10590 Creates new graph model object that has the same settings as B{C{gmodel}}. 10591 10592 This includes axis/label visibility, actual plotting range, etc. 10593 Curves are not duplicated or referenced. 10594 10595 10596 @return: New graph model. I{(L{GraphModel})} 10597 """ 10598 return None
10599
10600 - def get_n_curves():
10601 """ 10602 Reports the number of curves in a graph model. 10603 10604 10605 @return: Number of curves in graph model. I{(int)} 10606 """ 10607 return None
10608
10609 - def add_curve(curve):
10610 """ 10611 Adds a new curve to a graph model. 10612 10613 10614 @param curve: A B{C{GraphCurveModel}} representing the curve to add. I{(L{GraphCurveModel})} 10615 @return: The index of the added curve in B{C{gmodel}}. I{(int)} 10616 """ 10617 return None
10618
10619 - def remove_curve_by_description(description):
10620 """ 10621 Removes all the curves having same description string as B{C{description}}. 10622 10623 10624 @param description: Curve description (label). I{(string)} 10625 @return: The number of removed curves. I{(int)} 10626 """ 10627 return None
10628
10629 - def remove_curve(cindex):
10630 """ 10631 Removes the curve having given index. 10632 10633 @param cindex: Curve index in graph model. I{(int)} 10634 """ 10635 pass
10636
10637 - def get_curve_by_description(description):
10638 """ 10639 Finds a graph curve model in a graph model by its description. 10640 10641 10642 @param description: Curve description (label). I{(string)} 10643 @return: The first curve that has description (label) given by B{C{description}} 10644 (no reference is added). I{(L{GraphCurveModel})} 10645 """ 10646 return None
10647
10648 - def get_curve(cindex):
10649 """ 10650 Gets a graph curve model in a graph model by its index. 10651 10652 10653 @param cindex: Curve index in graph model. I{(int)} 10654 @return: The curve with index B{C{cindex}} (no reference is added). I{(L{GraphCurveModel})} 10655 """ 10656 return None
10657
10658 - def get_curve_index(curve):
10659 """ 10660 Finds the index of a graph model curve. 10661 10662 10663 @param curve: A curve model present in B{C{gmodel}} to find. I{(L{GraphCurveModel})} 10664 @return: The index of B{C{curve}} in B{C{gmodel}}, -1 if it is not present there. I{(int)} 10665 """ 10666 return None
10667
10668 - def replace_curve(cindex, curve):
10669 """ 10670 Replaces a curve in a graph model. 10671 10672 @since: 2.51 10673 10674 @param cindex: Curve index in graph model. I{(int)} 10675 @param curve: A curve model to put into B{C{gmodel}} at position B{C{cindex}}. I{(L{GraphCurveModel})} 10676 """ 10677 pass
10678
10679 - def remove_all_curves():
10680 """ 10681 Removes all the curves from graph model 10682 10683 """ 10684 pass
10685
10686 - def append_curves(source, colorstep):
10687 """ 10688 Appends all curves from another graph model to a graph model. 10689 10690 The colors of the curves can be updated, presumably to continue a preset 10691 color sequence. This is controlled by argument B{C{colorstep}}. When B{C{colorstep}} 10692 is zero no curve color modification is done. When it is positive, a block 10693 of curves of size B{C{colorstep}} is always given the same color, the first color 10694 being the first preset color corresponding to the number of curves already 10695 in B{C{gmodel}}. So pass B{C{colorstep}}=1 for individual curves, B{C{colorstep}}=2 for 10696 couples of curves (e.g. data and fit) that should have the same color, etc. 10697 10698 @since: 2.41 10699 10700 @param source: Graph model containing the curves to append. I{(L{GraphModel})} 10701 @param colorstep: Block size for curve color updating. I{(int)} 10702 """ 10703 pass
10704
10705 - def set_units_from_data_line(data_line):
10706 """ 10707 Sets x and y graph model units to match a data line. 10708 10709 @param data_line: A data line to take units from. I{(L{DataLine})} 10710 """ 10711 pass
10712
10713 - def set_units_from_data_field(data_field, power_xy_in_x, power_z_in_x, power_xy_in_y, power_z_in_y):
10714 """ 10715 Sets x and y graph model units to units derived from a data field. 10716 10717 @since: 2.51 10718 10719 @param data_field: A data field. I{(L{DataField})} 10720 @param power_xy_in_x: Power of field's lateral units to appear in graph's abscissa 10721 units. I{(int)} 10722 @param power_z_in_x: Power of field's value units to appear in graph's abscissa 10723 units. I{(int)} 10724 @param power_xy_in_y: Power of field's lateral units to appear in graph's ordinate 10725 units. I{(int)} 10726 @param power_z_in_y: Power of field's value units to appear in graph's ordinate 10727 units. I{(int)} 10728 """ 10729 pass
10730
10731 - def units_are_compatible(othergmodel):
10732 """ 10733 Checks if the units of two graph models are compatible. 10734 10735 This function is useful namely as a pre-check for moving curves between 10736 graphs. 10737 10738 @since: 2.41 10739 10740 @param othergmodel: Another graph model. I{(L{GraphModel})} 10741 @return: B{C{True}} if the abscissa and ordinate units of the two graphs are 10742 compatible. I{(bool)} 10743 """ 10744 return None
10745
10747 """ 10748 Checks whehter x axis can be lograrithmed. 10749 10750 10751 @return: True if all x-values are greater than zero (thus logarithmic 10752 display of x-data is feasible). I{(bool)} 10753 """ 10754 return None
10755
10757 """ 10758 Checks whehter y axis can be lograrithmed. 10759 10760 10761 @return: True if all y-values are greater than zero (thus logarithmic 10762 display of y-data is feasible). I{(bool)} 10763 """ 10764 return None
10765
10766 - def set_axis_label(pos, label):
10767 """ 10768 Sets one axis label of a graph model. 10769 10770 @param pos: Axis position. I{(GtkPositionType)} 10771 @param label: The new label. I{(string)} 10772 """ 10773 pass
10774
10775 - def get_axis_label(pos):
10776 """ 10777 Gets the label of a one graph model axis. 10778 10779 10780 @param pos: Axis position. I{(GtkPositionType)} 10781 @return: The label as a string owned by the model. I{(string)} 10782 """ 10783 return None
10784
10785 - def get_x_range():
10786 """ 10787 Gets the abscissa range of a graph. 10788 10789 Explicitly set minimum and maximum range properties take precedence over 10790 values calculated from curve abscissa ranges. 10791 10792 10793 @return: Tuple consisting of 3 values (B{C{value}}, B{C{x_min}}, B{C{x_max}}). (I{(bool)}, I{(float)}, I{(float)}) 10794 """ 10795 return None, None, None
10796
10797 - def get_y_range():
10798 """ 10799 Gets the ordinate range of a graph. 10800 10801 Explicitly set minimum and maximum range properties take precedence over 10802 values calculated from curve ordinate ranges. 10803 10804 10805 @return: Tuple consisting of 3 values (B{C{value}}, B{C{y_min}}, B{C{y_max}}). (I{(bool)}, I{(float)}, I{(float)}) 10806 """ 10807 return None, None, None
10808
10809 - def get_ranges(x_logscale, y_logscale):
10810 """ 10811 Gets the log-scale suitable range minima of a graph curve. 10812 10813 See L{Graph.curve_model_get_ranges}() for discussion. 10814 10815 @since: 2.8 10816 10817 @param x_logscale: B{C{True}} if logarithmical scale is intended for the abscissa. I{(bool)} 10818 @param y_logscale: B{C{True}} if logarithmical scale is intended for the ordinate. I{(bool)} 10819 @return: Tuple consisting of 5 values (B{C{value}}, B{C{x_min}}, B{C{x_max}}, B{C{y_min}}, B{C{y_max}}). (I{(bool)}, I{(float)}, I{(float)}, I{(float)}, I{(float)}) 10820 """ 10821 return None, None, None, None, None
10822
10823 - def export_ascii(export_units, export_labels, export_metadata, export_style):
10824 """ 10825 Exports a graph model data to a string. 10826 10827 The export format is specified by parameter B{C{export_style}}. 10828 10829 10830 @param export_units: B{C{True}} to export units in the column header. I{(bool)} 10831 @param export_labels: B{C{True}} to export labels in the column header. I{(bool)} 10832 @param export_metadata: B{C{True}} to export all graph metadata within file header. I{(bool)} 10833 @param export_style: File format subtype to export to (e. g. plain, csv, gnuplot, 10834 etc.). Expected values: C{B{GRAPH_MODEL_EXPORT_ASCII_PLAIN}}, C{B{GRAPH_MODEL_EXPORT_ASCII_GNUPLOT}}, C{B{GRAPH_MODEL_EXPORT_ASCII_CSV}}, C{B{GRAPH_MODEL_EXPORT_ASCII_ORIGIN}}, C{B{GRAPH_MODEL_EXPORT_ASCII_IGORPRO}}, C{B{GRAPH_MODEL_EXPORT_ASCII_POSIX}}, C{B{GRAPH_MODEL_EXPORT_ASCII_MERGED}}. I{(L{GraphModelExportStyle})} 10835 @return: Tuple consisting of 2 values (B{C{value}}, B{C{string}}). (I{(string)}, I{(SkipArg)}) 10836 """ 10837 return None, None
10838
10839 - def duplicate():
10840 """ 10841 Convenience macro doing L{gwy_serializable_duplicate}() with all the necessary 10842 typecasting. 10843 10844 @return: I{(L{GraphModel})} 10845 """ 10846 return None
10847 10848
10849 -class GraphWindow:
10850 - def get_graph():
10851 """ 10852 Gets the graph widget a graph window currently shows. 10853 10854 10855 @return: The currently shown B{C{Graph}}. I{(L{gtk.Widget})} 10856 """ 10857 return None
10858
10859 - def get_graph_data():
10860 """ 10861 Gets the graph data widget of a graph window. 10862 10863 @since: 2.5 10864 10865 @return: The B{C{GraphData}} widget of this graph window. Its model and 10866 column layout must be considered private. I{(L{gtk.Widget})} 10867 """ 10868 return None
10869
10870 - def get_graph_curves():
10871 """ 10872 Gets the graph curves widget of a graph window. 10873 10874 @since: 2.5 10875 10876 @return: The B{C{GraphCurves}} widget of this graph window. Its model and 10877 column layout must be considered private. I{(L{gtk.Widget})} 10878 """ 10879 return None
10880 10881
10882 -class Inventory:
10883 """ 10884 Ordered item inventory, indexed by both name and 10885 position. 10886 10887 10888 B{C{Inventory}} is a uniform container that offers both hash table and array 10889 (sorted or unsorted) interfaces. Both types of read access are fast, 10890 operations that modify it may be slower. Inventory can also maintain a 10891 notion of default item. 10892 10893 B{C{Inventory}} can be used both as an actual container for some data, or just 10894 wrap a static array with a the same interface so the actual storage is 10895 opaque to inventory user. The former kind of inventories can be created 10896 with L{Inventory.new}() or L{Inventory.new_filled}(); constant inventory 10897 is created with L{Inventory.new_from_array}(). Contantess of an inventory 10898 can be tested with L{Inventory.is_const}(). 10899 10900 Possible operations with data items stored in an inventory are specified 10901 upon inventory creation with B{C{InventoryItemType}} structure. Not all 10902 fields are mandatory, with items allowing more operations the inventory is 10903 more capable too. For example, if items offer a method to make copies, 10904 L{Inventory.new_item}() can be used to directly create new items in the 10905 inventory (this capability can be tested with 10906 L{Inventory.can_make_copies}()). 10907 10908 Item can have `traits', that is data that can be obtained generically. They 10909 are similar to B{C{GObject}} properties. Actually, if items are objects, they 10910 should simply map object properties to traits. But it is possible to define 10911 traits for simple structures too. 10912 10913 """
10914 - def __init__(itype):
10915 """ 10916 Creates a new inventory. 10917 10918 10919 @param itype: Type of items the inventory will contain. I{(const-InventoryItemType*)} 10920 @return: The newly created inventory. I{(L{Inventory})} 10921 """ 10922 return None
10923
10924 - def get_n_items():
10925 """ 10926 Returns the number of items in an inventory. 10927 10928 10929 @return: The number of items. I{(int)} 10930 """ 10931 return None
10932
10933 - def can_make_copies():
10934 """ 10935 Returns whether an inventory can create new items itself. 10936 10937 The prerequistie is that item type is a serializable object. It enables 10938 functions like L{Inventory.new_item}(). 10939 10940 10941 @return: B{C{True}} if inventory can create new items itself. I{(bool)} 10942 """ 10943 return None
10944
10945 - def get_item_position(name):
10946 """ 10947 Finds position of an item in an inventory. 10948 10949 10950 @param name: Item name. I{(string)} 10951 @return: Item position, or (guint)-1 if there is no such item. I{(int)} 10952 """ 10953 return None
10954
10955 - def foreach(function, user_data):
10956 """ 10957 Calls a function on each item of an inventory, in order. 10958 10959 B{C{function}}'s first argument is item position (transformed with 10960 GUINT_TO_POINTER()), second is item pointer, and the last is B{C{user_data}}. 10961 10962 @param function: A function to call on each item. It must not modify B{C{inventory}}. I{(GHFunc)} 10963 @param user_data: Data passed to B{C{function}}. I{(gpointer)} 10964 """ 10965 pass
10966
10967 - def find(predicate, user_data):
10968 """ 10969 Finds an inventory item using user-specified predicate function. 10970 10971 B{C{predicate}} is called for each item in B{C{inventory}} (in order) until it returns 10972 B{C{True}}. Its arguments are the same as in L{Inventory.foreach}(). 10973 10974 10975 @param predicate: A function testing some item property. It must not modify 10976 B{C{inventory}}. I{(GHRFunc)} 10977 @param user_data: Data passed to B{C{predicate}}. I{(gpointer)} 10978 @return: The item for which B{C{predicate}} returned B{C{True}}. If there is no 10979 such item in the inventory, B{C{None}} is returned. I{(gpointer)} 10980 """ 10981 return None
10982
10983 - def set_default_item_name(name):
10984 """ 10985 Sets the default of an inventory. 10986 10987 Item B{C{name}} must already exist in the inventory. 10988 10989 @param name: Item name, pass B{C{None}} to unset default item. I{(string)} 10990 """ 10991 pass
10992
10993 - def get_default_item_name():
10994 """ 10995 Returns the name of the default item of an inventory. 10996 10997 10998 @return: The default item name, B{C{None}} if no default name is set. 10999 Item of this name may or may not exist in the inventory. I{(string)} 11000 """ 11001 return None
11002
11003 - def item_updated(name):
11004 """ 11005 Notifies inventory an item was updated. 11006 11007 This function makes sense primarily for non-object items, as object items 11008 can notify inventory via signals. 11009 11010 @param name: Item name. I{(string)} 11011 """ 11012 pass
11013
11014 - def nth_item_updated(n):
11015 """ 11016 Notifies inventory item on given position was updated. 11017 11018 This function makes sense primarily for non-object items, as object items 11019 can provide B{C{watchable_signal}}. 11020 11021 @param n: Item position. I{(int)} 11022 """ 11023 pass
11024
11025 - def restore_order():
11026 """ 11027 Assures an inventory is sorted. 11028 11029 """ 11030 pass
11031
11032 - def forget_order():
11033 """ 11034 Forces an inventory to be unsorted. 11035 11036 Item positions don't change, but future L{Inventory.insert_item}() won't 11037 try to insert items in order. 11038 11039 """ 11040 pass
11041
11042 - def delete_item(name):
11043 """ 11044 Deletes an item from an inventory. 11045 11046 11047 @param name: Name of item to delete. I{(string)} 11048 @return: B{C{True}} if item was deleted. I{(bool)} 11049 """ 11050 return None
11051
11052 - def delete_nth_item(n):
11053 """ 11054 Deletes an item on given position from an inventory. 11055 11056 11057 @param n: Position of B{C{item}} to delete. I{(int)} 11058 @return: B{C{True}} if item was deleted. I{(bool)} 11059 """ 11060 return None
11061
11062 - def store_new():
11063 """ 11064 Creates a new B{C{GtkTreeModel}} wrapper around a B{C{Inventory}}. 11065 11066 11067 @return: The newly created inventory store. I{(L{InventoryStore})} 11068 """ 11069 return None
11070
11071 - def get_item(name):
11072 """ 11073 Looks up an item in an inventory. 11074 11075 11076 @param name: Item name. I{(string)} 11077 @return: Item called B{C{name}}, or B{C{None}} if there is no such item. I{(L{gobject.GObject})} 11078 """ 11079 return None
11080
11081 - def get_item_or_default(name):
11082 """ 11083 Looks up an item in an inventory, eventually falling back to default. 11084 11085 The lookup order is: item of requested name, default item (if set), any 11086 inventory item, B{C{None}} (can happen only when inventory is empty). 11087 11088 11089 @param name: Item name. I{(string)} 11090 @return: Item called B{C{name}}, or default item. I{(L{gobject.GObject})} 11091 """ 11092 return None
11093
11094 - def get_nth_item(n):
11095 """ 11096 Returns item on given position in an inventory. 11097 11098 11099 @param n: Item position. It must be between zero and the number of items in 11100 inventory, inclusive. If it is equal to the number of items, B{C{None}} 11101 is returned. In other words, inventory behaves like a B{C{None}}-terminated 11102 array, you can simply iterate over it until L{Inventory.get_nth_item}() 11103 returns B{C{None}}. I{(int)} 11104 @return: Item at given position. I{(L{gobject.GObject})} 11105 """ 11106 return None
11107
11108 - def get_default_item():
11109 """ 11110 Returns the default item of an inventory. 11111 11112 11113 @return: The default item. If there is no default item, B{C{None}} is returned. I{(L{gobject.GObject})} 11114 """ 11115 return None
11116
11117 - def insert_item(object):
11118 """ 11119 Inserts an item into an inventory. 11120 11121 Item of the same name must not exist yet. 11122 11123 If the inventory is sorted, item is inserted to keep order. If the 11124 inventory is unsorted, item is simply added to the end. 11125 11126 11127 @param object: I{(L{gobject.GObject})} 11128 """ 11129 pass
11130
11131 - def insert_nth_item(object, n):
11132 """ 11133 Inserts an item to an explicit position in an inventory. 11134 11135 Item of the same name must not exist yet. 11136 11137 11138 @param object: I{(L{gobject.GObject})} 11139 @param n: Position to insert B{C{item}} to. I{(int)} 11140 """ 11141 pass
11142
11143 - def rename_item(name, newname):
11144 """ 11145 Renames an inventory item. 11146 11147 If an item of name B{C{newname}} is already present in B{C{inventory}}, the rename 11148 will fail. 11149 11150 11151 @param name: Name of item to rename. I{(string)} 11152 @param newname: New name of item. I{(string)} 11153 """ 11154 pass
11155
11156 - def new_item(name, newname):
11157 """ 11158 Creates a new item as a copy of existing one and inserts it to inventory. 11159 11160 The newly created item can be called differently than B{C{newname}} if that 11161 already exists. 11162 11163 11164 @param name: Name of item to duplicate, may be B{C{None}} to use default item (the 11165 same happens when B{C{name}} does not exist). I{(string)} 11166 @param newname: Name of new item, it must not exist yet. It may be B{C{None}}, the 11167 new name is based on B{C{name}} then. I{(string)} 11168 @return: The newly added item. I{(L{gobject.GObject})} 11169 """ 11170 return None
11171 11172
11173 -class InventoryStore:
11174 - def get_inventory():
11175 """ 11176 Gets the inventory a inventory store wraps. 11177 11178 11179 @return: The underlying inventory (its reference count is not increased). I{(L{Inventory})} 11180 """ 11181 return None
11182
11183 - def get_column_by_name(name):
11184 """ 11185 Gets tree model column corresponding to a trait name. 11186 11187 The underlying inventory must support trait names, except for B{C{name}} C{"item"} which always works 11188 (and always maps to 0). 11189 11190 11191 @param name: Trait (column) name. I{(string)} 11192 @return: The underlying inventory (its reference count is not increased). I{(int)} 11193 """ 11194 return None
11195 11196
11197 -class Lawn:
11198 """ 11199 Three-dimensional data representation 11200 11201 11202 B{C{Lawn}} represents 3D data arrays in Gwyddion. It is typically useful for different volume data obtained from 11203 SPMs, like in force volume measurements. 11204 11205 """
11206 - def __init__(xres, yres, xreal, yreal, ncurves, nsegments):
11207 """ 11208 Creates a new data lawn. 11209 11210 @since: 2.60 11211 11212 @param xres: X resolution, i.e., the number of samples in x direction I{(int)} 11213 @param yres: Y resolution, i.e., the number of samples in y direction I{(int)} 11214 @param xreal: Real physical dimension in x direction. I{(float)} 11215 @param yreal: Real physical dimension in y direction. I{(float)} 11216 @param ncurves: The number of curves at each sample. I{(int)} 11217 @param nsegments: The number of curve segments. I{(int)} 11218 @return: A newly created data lawn. I{(L{Lawn})} 11219 """ 11220 return None
11221
11222 - def check_compatibility(lawn2, check):
11223 """ 11224 Checks whether two data lawns are compatible. 11225 11226 Dimensions are checked only in the plane. To check if the curve lengths match, use the 11227 B{C{DATA_COMPATIBILITY_CURVELEN}} flag. Use B{C{DATA_COMPATIBILITY_NCURVES}} to check if the two lawns have the 11228 same number of curves. 11229 11230 @since: 2.60 11231 11232 @param lawn2: Another data lawn. I{(L{Lawn})} 11233 @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_AXISCAL}}, C{B{DATA_COMPATIBILITY_NCURVES}}, C{B{DATA_COMPATIBILITY_CURVELEN}}, C{B{DATA_COMPATIBILITY_ALL}}. I{(L{DataCompatibilityFlags})} 11234 @return: Zero if all tested properties are compatible. Flags corresponding to failed tests if lawns are not 11235 compatible. I{(DataCompatibilityFlags)} 11236 """ 11237 return None
11238
11239 - def new_alike():
11240 """ 11241 Creates a new data lawn similar to an existing one. 11242 11243 Use L{Lawn.duplicate}() if you want to copy a data lawn including 11244 data. 11245 11246 @since: 2.60 11247 11248 @return: A newly created data lawn. I{(L{Lawn})} 11249 """ 11250 return None
11251
11252 - def new_part(xpos, ypos, xres, yres, keep_offsets):
11253 """ 11254 Creates a new data lawn as a part of existing one. 11255 11256 Use L{Lawn.duplicate}() if you want to copy a whole data lawn. 11257 11258 @since: 2.60 11259 11260 @param xpos: x position where to start from I{(int)} 11261 @param ypos: y position where to start from I{(int)} 11262 @param xres: x resolution (width) to be extracted I{(int)} 11263 @param yres: y resolution (height) to be extracted I{(int)} 11264 @param keep_offsets: keep offsets of data during extraction I{(bool)} 11265 @return: A newly created data lawn. I{(L{Lawn})} 11266 """ 11267 return None
11268
11269 - def data_changed():
11270 """ 11271 Emits signal "data_changed" on a data lawn. 11272 11273 @since: 2.60 11274 11275 """ 11276 pass
11277
11278 - def copy(dest, nondata_too):
11279 """ 11280 Copies the contents of an already allocated lawn to a lawn of the same size. 11281 11282 @param dest: Destination lawn. I{(L{Lawn})} 11283 @param nondata_too: Whether non-data (units, labels, segment information) should be copied too. I{(bool)} 11284 """ 11285 pass
11286
11287 - def get_xres():
11288 """ 11289 Gets the x resolution of a data lawn. 11290 11291 @since: 2.60 11292 11293 @return: Resolution (number of data points). I{(int)} 11294 """ 11295 return None
11296
11297 - def get_yres():
11298 """ 11299 Gets the y resolution of a data lawn. 11300 11301 @since: 2.60 11302 11303 @return: Resolution (number of data points). I{(int)} 11304 """ 11305 return None
11306
11307 - def get_xreal():
11308 """ 11309 Gets the physical size of a data lawn in the x direction. 11310 11311 @since: 2.60 11312 11313 @return: Real size of a data lawn the x direction. I{(float)} 11314 """ 11315 return None
11316
11317 - def get_yreal():
11318 """ 11319 Gets the physical size of a data lawn in the y direction. 11320 11321 @since: 2.60 11322 11323 @return: Real size of a data lawn the y direction. I{(float)} 11324 """ 11325 return None
11326
11327 - def get_xoffset():
11328 """ 11329 Gets the offset of data lawn origin in x direction. 11330 11331 @since: 2.60 11332 11333 @return: Offset value. I{(float)} 11334 """ 11335 return None
11336
11337 - def get_yoffset():
11338 """ 11339 Gets the offset of data lawn origin in y direction. 11340 11341 @since: 2.60 11342 11343 @return: Offset value. I{(float)} 11344 """ 11345 return None
11346
11347 - def get_n_curves():
11348 """ 11349 Gets the number of curves at each sample. 11350 11351 @since: 2.60 11352 11353 @return: Number of curves. I{(int)} 11354 """ 11355 return None
11356
11357 - def set_xreal(xreal):
11358 """ 11359 Sets the real x dimension of a lawn. 11360 11361 @since: 2.60 11362 11363 @param xreal: New real x dimensions value I{(float)} 11364 """ 11365 pass
11366
11367 - def set_yreal(yreal):
11368 """ 11369 Sets the real y dimension of a lawn. 11370 11371 @since: 2.60 11372 11373 @param yreal: New real y dimensions value I{(float)} 11374 """ 11375 pass
11376
11377 - def set_xoffset(xoffset):
11378 """ 11379 Sets the offset of a data lawn origin in the x direction. 11380 11381 Note offsets don't affect any calculation. 11382 11383 @since: 2.60 11384 11385 @param xoffset: New offset value. I{(float)} 11386 """ 11387 pass
11388
11389 - def set_yoffset(yoffset):
11390 """ 11391 Sets the offset of a data lawn origin in the y direction. 11392 11393 Note offsets don't affect any calculation. 11394 11395 @since: 2.60 11396 11397 @param yoffset: New offset value. I{(float)} 11398 """ 11399 pass
11400
11401 - def get_dx():
11402 """ 11403 Gets the horizontal (X) pixel size of a lawn in real units. 11404 11405 The result is the same as L{Lawn.get_xreal}(lawn)/L{Lawn.get_xres}(lawn). 11406 11407 @since: 2.60 11408 11409 @return: Horizontal pixel size. I{(float)} 11410 """ 11411 return None
11412
11413 - def get_dy():
11414 """ 11415 Gets the vertical (Y) pixel size of a lawn in real units. 11416 11417 The result is the same as L{Lawn.get_yreal}(lawn)/L{Lawn.get_yres}(lawn). 11418 11419 @since: 2.60 11420 11421 @return: Vertical pixel size. I{(float)} 11422 """ 11423 return None
11424
11425 - def get_si_unit_xy():
11426 """ 11427 Returns x- and y-direction SI unit of a data lawn. 11428 11429 @since: 2.60 11430 11431 @return: SI unit corresponding to the lateral (X) dimension of the data lawn. Its reference count is not 11432 incremented. I{(L{SIUnit})} 11433 """ 11434 return None
11435
11436 - def get_si_unit_curve(n):
11437 """ 11438 Returns value SI unit of the n-th curve of a data lawn. 11439 11440 @since: 2.60 11441 11442 @param n: Index of a curve in B{C{lawn}}. I{(int)} 11443 @return: SI unit corresponding to the "value" of the data lawn. Its reference count is not incremented. I{(L{SIUnit})} 11444 """ 11445 return None
11446
11447 - def set_si_unit_xy(si_unit):
11448 """ 11449 Sets the SI unit corresponding to the lateral (X, Y) dimensions of a data lawn. 11450 11451 It does not assume a reference on B{C{si_unit}}, instead it adds its own reference. 11452 11453 @since: 2.60 11454 11455 @param si_unit: SI unit to be set. I{(L{SIUnit})} 11456 """ 11457 pass
11458
11459 - def set_si_unit_curve(n, si_unit):
11460 """ 11461 Sets the SI unit corresponding of the n-th curve of a data lawn. 11462 11463 It does not assume a reference on B{C{si_unit}}, instead it adds its own reference. 11464 11465 @since: 2.60 11466 11467 @param n: Index of a curve in B{C{lawn}}. I{(int)} 11468 @param si_unit: SI unit to be set. I{(L{SIUnit})} 11469 """ 11470 pass
11471
11472 - def copy_units(target):
11473 """ 11474 Sets lateral and curve units of a data lawn to match another data lawn. 11475 11476 @since: 2.60 11477 11478 @param target: Target data lawn. I{(L{Lawn})} 11479 """ 11480 pass
11481
11482 - def set_curve_label(n, label):
11483 """ 11484 Sets the label of a curve in data lawn. 11485 11486 @since: 2.60 11487 11488 @param n: Index of a curve in B{C{lawn}}. I{(int)} 11489 @param label: New curve label. I{(string)} 11490 """ 11491 pass
11492
11493 - def get_curve_label(n):
11494 """ 11495 Gets the label of a curve in data lawn. 11496 11497 @since: 2.60 11498 11499 @param n: Index of a curve in B{C{lawn}}. I{(int)} 11500 @return: Curve label, as a string owned by B{C{lawn}}. It may be B{C{None}}. I{(string)} 11501 """ 11502 return None
11503
11504 - def get_value_format_xy(style):
11505 """ 11506 Finds value format good for displaying coordinates of a data lawn. 11507 11508 @since: 2.60 11509 11510 @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}}, C{B{SI_UNIT_FORMAT_VFTEX}}, C{B{SI_UNIT_FORMAT_UNICODE}}, C{B{SI_UNIT_FORMAT_VFUNICODE}}. I{(L{SIUnitFormatStyle})} 11511 @return: Tuple consisting of 2 values (B{C{value}}, B{C{format}}). (I{(L{SIValueFormat})}, I{(SkipArg)}) 11512 """ 11513 return None, None
11514
11515 - def get_value_format_curve(n, style):
11516 return None, None
11517
11518 - def get_curve_length(col, row):
11519 """ 11520 Gets the length of the curves at given position in a data lawn. 11521 11522 @since: 2.60 11523 11524 @param col: Position in the lawn (column index). I{(int)} 11525 @param row: Position in the lawn (row index). I{(int)} 11526 @return: The curves length at given index. I{(int)} 11527 """ 11528 return None
11529
11530 - def get_n_segments():
11531 """ 11532 Gets the number of segments marked in curves in a data lawn. 11533 11534 All curves have the same number of segments, even empty curves. Empty curves simply have the corresponding number 11535 of trivial zero-length segments. 11536 11537 @since: 2.60 11538 11539 @return: The number of segments. Zero is returned if no segments are marked. I{(int)} 11540 """ 11541 return None
11542
11543 - def get_segment_label(segment):
11544 """ 11545 Gets the label of a curve segment in data lawn. 11546 11547 @since: 2.60 11548 11549 @param segment: Index of a curve segment in B{C{lawn}}. I{(int)} 11550 @return: Segment label, as a string owned by B{C{lawn}}. It may be B{C{None}}. I{(string)} 11551 """ 11552 return None
11553
11554 - def set_segment_label(segment, label):
11555 """ 11556 Sets the label of a curve segment in data lawn. 11557 11558 Since all curves in B{C{lawn}} are segmented into the same segments the segments share labels. The first segment label 11559 corresponds to the first segment in all the curves. 11560 11561 @since: 2.60 11562 11563 @param segment: Index of a curve segment in B{C{lawn}}. I{(int)} 11564 @param label: New segment label. I{(string)} 11565 """ 11566 pass
11567
11568 - def clear():
11569 """ 11570 Removes curve data at all samples (curve number, units, and labels preserved). 11571 11572 @since: 2.60 11573 11574 """ 11575 pass
11576
11577 - def new_rotated_90(clockwise):
11578 """ 11579 Creates a new data lawn by rotating a data lawn by 90 degrees. 11580 11581 @since: 2.60 11582 11583 @param clockwise: B{C{True}} to rotate clocwise, B{C{False}} to rotate anti-clockwise. I{(bool)} 11584 @return: A newly created data lawn. I{(L{Lawn})} 11585 """ 11586 return None
11587
11588 - def invert(xflipped, yflipped):
11589 """ 11590 Flips a data lawn in place. 11591 11592 Since real sizes cannot go backward, flipping an axis results in the corresponding offset being reset (the real 11593 dimension stays positive). 11594 11595 Note that the axis parameter convention is different from the confusing one of L{DataField.invert}(). Here 11596 parameters simply correspond to directions that should be flipped. 11597 11598 @since: 2.60 11599 11600 @param xflipped: B{C{True}} to reflect X, i.e. rows. I{(bool)} 11601 @param yflipped: B{C{True}} to reflect Y, i.e. columns. I{(bool)} 11602 """ 11603 pass
11604 11605
11606 -class MarkerBox:
11607 - def get_selected_marker():
11608 """ 11609 Gets the index of the currently selected marker in a marker 11610 box. 11611 11612 11613 @return: The index of currently selected marker, -1 when none is 11614 selected. I{(int)} 11615 """ 11616 return None
11617
11618 - def set_selected_marker(i):
11619 """ 11620 Selects a marker in a marker box. 11621 11622 @param i: The index of marker to select. Pass -1 to unselect. I{(int)} 11623 """ 11624 pass
11625
11626 - def get_marker_position(i):
11627 """ 11628 Gets the position of a marker in a marker box. 11629 11630 11631 @param i: The index of marker to get position of. I{(int)} 11632 @return: The marker position, in the range [0.0, 1.0]. I{(float)} 11633 """ 11634 return None
11635
11636 - def set_marker_position(i, pos):
11637 """ 11638 Moves a marker in a marker box. 11639 11640 11641 @param i: Index of marker to move. I{(int)} 11642 @param pos: The new marker position, in the range [0.0, 1.0]. I{(float)} 11643 @return: B{C{True}} on success. If the move does not validate, B{C{False}} is returned 11644 and the marker position does not change. I{(bool)} 11645 """ 11646 return None
11647
11648 - def add_marker(i, pos):
11649 """ 11650 Adds a marker to a marker box. 11651 11652 11653 @param i: Index to insert marker at. I{(int)} 11654 @param pos: Position to insert marker to, in the range [0.0, 1.0]. I{(float)} 11655 @return: On success, the index the marker was added at. If the insertion 11656 does not validate, -1 is returned and no marker is added. I{(int)} 11657 """ 11658 return None
11659
11660 - def remove_marker(i):
11661 """ 11662 Removes a marker from a marker box. 11663 11664 11665 @param i: Index of marker to remove. I{(int)} 11666 @return: B{C{True}} on success. If the removal does not validate, B{C{False}} is 11667 returned and the marker is kept. I{(bool)} 11668 """ 11669 return None
11670
11671 - def get_nmarkers():
11672 """ 11673 Gets the number of markers in a marker box. 11674 11675 11676 @return: The number of markers. I{(int)} 11677 """ 11678 return None
11679
11680 - def set_flipped(flipped):
11681 """ 11682 Sets whether a marker box is drawn upside down. 11683 11684 @param flipped: B{C{True}} to draw markers upside down. I{(bool)} 11685 """ 11686 pass
11687
11688 - def get_flipped():
11689 """ 11690 Returns whether a marker box is drawn upside down. 11691 11692 11693 @return: B{C{True}} if markers are drawn upside down. I{(bool)} 11694 """ 11695 return None
11696
11697 - def set_highlight_selected(highlight):
11698 """ 11699 Sets whether a marker box highlights selected marker. 11700 11701 @param highlight: B{C{True}} to visually differentiate selected marker, B{C{False}} to 11702 draw markers uniformly. I{(bool)} 11703 """ 11704 pass
11705
11707 """ 11708 Returns whether a marker box highlights selected marker. 11709 11710 11711 @return: B{C{True}} if selected marker is visually differentiated, B{C{False}} if 11712 markers are drawn uniformly. I{(bool)} 11713 """ 11714 return None
11715
11716 - def get_markers():
11717 """ 11718 Gets all markers in a marker box. 11719 11720 11721 @return: The markers as an array of positions, owned by B{C{mbox}}. It must 11722 not be modified nor freed by caller and it's valid only until 11723 next marker change. I{(list)} 11724 """ 11725 return None
11726
11727 - def set_markers(markers):
11728 """ 11729 Sets positions of all markers in a marker box. 11730 11731 No validation is performed, even if validator is set. It's up to caller to 11732 set markers that do not logically conflict with the validator. 11733 11734 @param markers: Markers position. I{(list)} 11735 """ 11736 pass
11737 11738
11739 -class HMarkerBox:
11740 - def __init__():
11741 """ 11742 Creates a new horizontal marker box. 11743 11744 11745 @return: The new horizontal marker box as a B{C{GtkWidget}}. I{(L{gtk.Widget})} 11746 """ 11747 return None
11748 11749
11750 -class NullStore:
11751 - def __init__(n):
11752 """ 11753 Creates a new B{C{GtkTreeModel}} wrapper around nothing. 11754 11755 11756 @param n: The initial number of rows. I{(int)} 11757 @return: The newly created null store. I{(L{NullStore})} 11758 """ 11759 return None
11760
11761 - def get_n_rows():
11762 """ 11763 Gets the number of imaginary rows in a null store. 11764 11765 This is a convenience function, the same information can be obtained with gtk_tree_model_iter_n_children(). 11766 11767 11768 @return: The number of rows. I{(int)} 11769 """ 11770 return None
11771
11772 - def set_n_rows(n):
11773 """ 11774 Sets the number of imaginary rows in a null store. 11775 11776 If the new number of rows is larger than the current one, rows will be sequentially and virtually appended to the 11777 end of the store until the requested number of rows is reached. 11778 11779 Similarly, if the new number of rows is smaller then the current one, rows will be sequentially and virtually 11780 deleted from the end of the store until the requested number of rows is reached. 11781 11782 Note for radical changes it is usually more useful to disconnect the model from its view(s), change the number of 11783 rows, and then reconnect. 11784 11785 @param n: The new number of rows. I{(int)} 11786 """ 11787 pass
11788
11789 - def get_model():
11790 """ 11791 Gets the model pointer of a null store. 11792 11793 11794 @return: The pointer set with L{NullStore.set_model}(). I{(gpointer)} 11795 """ 11796 return None
11797
11798 - def set_model(model, destroy):
11799 """ 11800 Sets the model pointer of a null store. 11801 11802 While the virtual integers in B{C{NullStore}} can be used directly, a null store typically serves as an adaptor for 11803 array-like structures and its rows are used as indices to these structures. This helper method provides means to 11804 attach such a structure to a null store in the common case. 11805 11806 The store itself does not interpret nor access the attached data by any means. No signals are emitted in response 11807 to the model pointer change either, particularly because it is expected to be set only once upon creation (null 11808 stores are cheap). 11809 11810 You are free to keep the model pointer at B{C{None}} if these functions do not suit your needs. 11811 11812 @param model: Model pointer. I{(gpointer)} 11813 @param destroy: Function to call on B{C{model}} when it is replaced or the store is destroyed. I{(GDestroyNotify)} 11814 """ 11815 pass
11816
11817 - def row_changed(i):
11818 """ 11819 Emits "GtkTreeModel::row-changed" signal on a null store. 11820 11821 This is a convenience method, with a bit more work the same effect can be achieved with 11822 gtk_tree_model_row_changed(). 11823 11824 @param i: A row to emit "row-changed" on. I{(int)} 11825 """ 11826 pass
11827
11828 - def rows_changed(ifrom, ito):
11829 """ 11830 Emits "GtkTreeModel::row-changed" signal on a block of rows in a null store. 11831 11832 This is a convenience method, with a bit more work the same effect can be achieved with 11833 gtk_tree_model_row_changed(). 11834 11835 It is possible to pass B{C{ifrom}} larger than B{C{ito}}. The signal is then emitted for the same rows, but in the opposite 11836 order. 11837 11838 @since: 2.62 11839 11840 @param ifrom: The first row to emit "row-changed" on. I{(int)} 11841 @param ito: The last row to emit "row-changed" on (inclusive). I{(int)} 11842 """ 11843 pass
11844 11845
11846 -class PixmapLayer:
11847 - def wants_repaint():
11848 """ 11849 Checks whether a pixmap layer wants repaint. 11850 11851 11852 @return: B{C{True}} if the the layer wants repaint itself, B{C{False}} otherwise. I{(bool)} 11853 """ 11854 return None
11855
11856 - def paint():
11857 """ 11858 Returns a pixbuf with painted pixmap layer. 11859 11860 This method does not enforce repaint. If the layer doesn't think it needs 11861 to repaint the pixbuf, it simply returns the current one. To enforce 11862 update, emit "data-changed" signal on corresponding data field. 11863 11864 11865 @return: The pixbuf. It should not be modified or freed. If the data field 11866 to draw is not present in the container, B{C{None}} is returned. I{(L{gdk.Pixbuf})} 11867 """ 11868 return None
11869
11870 - def set_data_key(key):
11871 """ 11872 Sets the data field to display by a pixmap layer. 11873 11874 @param key: Container string key identifying the data field to display. I{(string)} 11875 """ 11876 pass
11877
11878 - def get_data_key():
11879 """ 11880 Gets the key identifying data field this pixmap layer displays. 11881 11882 11883 @return: The string key, or B{C{None}} if it isn't set. I{(string)} 11884 """ 11885 return None
11886
11887 - def make_pixbuf(has_alpha):
11888 """ 11889 Creates or resizes pixmap layer B{C{GdkPixbuf}} to match its data field. 11890 11891 This method is intended for pixmap layer implementation. 11892 11893 @param has_alpha: Whether pixbuf should have alpha channel. I{(bool)} 11894 """ 11895 pass
11896 11897
11898 -class LayerMask:
11899 - def __init__():
11900 """ 11901 Creates a new mask layer. 11902 11903 By default, is uses a transparent color (thus not displaying anything). 11904 11905 11906 @return: The newly created layer. I{(L{PixmapLayer})} 11907 """ 11908 return None
11909
11910 - def set_color_key(prefix):
11911 """ 11912 Sets the container key of colour components of a mask layer. 11913 11914 @param prefix: Prefix of keys identifying mask color components, "/red", "/green", 11915 "/blue", and "/alpha" is appended to it to get the individual 11916 keys. I{(string)} 11917 """ 11918 pass
11919
11920 - def get_color_key():
11921 """ 11922 Gets prefix identifying color components. 11923 11924 11925 @return: The prefix, or B{C{None}} if it isn't set. I{(string)} 11926 """ 11927 return None
11928
11929 - def get_color():
11930 """ 11931 Returns the color used by a mask layer. 11932 11933 11934 @return: The color as B{C{RGBA}}. I{(RGBA)} 11935 """ 11936 return None
11937 11938
11939 -class LayerBasic:
11940 - def __init__():
11941 """ 11942 Creates a new basic data displaying layer. 11943 11944 11945 @return: The newly created layer. I{(L{PixmapLayer})} 11946 """ 11947 return None
11948
11949 - def get_range():
11950 """ 11951 Gets the range colors are mapped from in current mode. 11952 11953 This function does not take presentations into account. It always returns 11954 ther range corresponding to the underlying data even if a presentation is 11955 shown instead. 11956 11957 @return: Tuple consisting of 2 values (B{C{min}}, B{C{max}}). (I{(float)}, I{(float)}) 11958 """ 11959 return None, None
11960
11961 - def get_range_type():
11962 """ 11963 Gets the current color mapping mode. 11964 11965 @since: 2.7 11966 11967 @return: The current color mapping mode. I{(LayerBasicRangeType)} 11968 """ 11969 return None
11970
11971 - def set_gradient_key(key):
11972 """ 11973 Sets the container key of the colour gradient to use to visualize data. 11974 11975 @param key: Container string key identifying the color gradient to use. I{(string)} 11976 """ 11977 pass
11978
11979 - def get_gradient_key():
11980 """ 11981 Gets key identifying color gradient. 11982 11983 11984 @return: The string key, or B{C{None}} if it isn't set. I{(string)} 11985 """ 11986 return None
11987
11988 - def set_presentation_key(key):
11989 """ 11990 Sets the container key of the data field to actually display by a basic 11991 layer. 11992 11993 The data field set with L{PixmapLayer.get_data_key}() is used to obtain 11994 values, it determines physical dimensions, etc. When a data field is set 11995 with this method, it is displayed instead of the actual data. 11996 11997 @param key: Container string key identifying the data field to actually display. I{(string)} 11998 """ 11999 pass
12000
12001 - def get_presentation_key():
12002 """ 12003 Gets the key identifying data field this pixmap layer actually displays. 12004 12005 See L{LayerBasic.set_presentation_key}() for details. 12006 12007 12008 @return: The string key, or B{C{None}} if it isn't set. I{(string)} 12009 """ 12010 return None
12011
12012 - def get_has_presentation():
12013 """ 12014 Tests whether a basic layer displays a presentation instead of the data. 12015 12016 12017 @return: B{C{True}} if the layer has a presentation, B{C{False}} it it displays the 12018 data. I{(bool)} 12019 """ 12020 return None
12021
12022 - def set_min_max_key(prefix):
12023 """ 12024 Sets basic layer fixed range minimum and maximum. 12025 12026 @param prefix: Prefix of keys identifying minimum and maximum values for fixed 12027 range, "/min" and "/max" is appended to it to get the individual 12028 minimum and maximum keys. I{(string)} 12029 """ 12030 pass
12031
12032 - def get_min_max_key():
12033 """ 12034 Gets prefix identifying fixed range minimum and maximum. 12035 12036 12037 @return: The prefix, or B{C{None}} if it isn't set. I{(string)} 12038 """ 12039 return None
12040
12041 - def set_range_type_key(key):
12042 """ 12043 Sets the container key of the color range mapping type to use to visualize 12044 data. 12045 12046 @param key: Container string key identifying the range type to use. I{(string)} 12047 """ 12048 pass
12049
12050 - def get_range_type_key():
12051 """ 12052 Gets key identifying color range mapping type. 12053 12054 12055 @return: The string key, or B{C{None}} if it isn't set. I{(string)} 12056 """ 12057 return None
12058 12059
12060 -class PlainTool:
12061 - def set_selection_key(bname):
12062 """ 12063 Constructs selection key from data key and sets it on the vector layer. 12064 12065 This is a low-level function, normally you would use 12066 L{PlainTool.connect_selection}(). 12067 12068 12069 @param bname: Selection key base name, for example C{"line"}. I{(string)} 12070 @return: The full key (as a layer-owned string). I{(string)} 12071 """ 12072 return None
12073
12074 - def log_add():
12075 """ 12076 Logs a data modification operation of a plain tool. 12077 12078 This is a convenience wrapper for L{gwy_app_channel_log_add}(), setting automatically the container, data id and 12079 function name from the tool. It can only be used for simple data modification operations in which the source and 12080 target ids are the same. In more complex cases you have to use L{gwy_app_channel_log_add}() directly. 12081 12082 @since: 2.35 12083 12084 """ 12085 pass
12086 12087
12088 -class Resource:
12089 """ 12090 Built-in and/or user supplied application resources 12091 12092 12093 B{C{Resource}} is a base class for various application resources. It defines common interface: questioning resource 12094 name (L{Resource.get_name}()), modifiability (L{Resource.get_is_modifiable}()), loading resources from files and 12095 saving them. 12096 12097 """
12098 - def get_name():
12099 """ 12100 Returns resource name. 12101 12102 12103 @return: Name of B{C{resource}}. The string is owned by B{C{resource}} and must not 12104 be modfied or freed. I{(string)} 12105 """ 12106 return None
12107
12108 - def get_is_modifiable():
12109 """ 12110 Returns whether a resource is modifiable. 12111 12112 12113 @return: B{C{True}} if resource is modifiable, B{C{False}} if it's fixed (system) 12114 resource. I{(bool)} 12115 """ 12116 return None
12117
12118 - def get_is_preferred():
12119 """ 12120 Returns whether a resource is preferred. 12121 12122 12123 @return: B{C{True}} if resource is preferred, B{C{False}} otherwise. I{(bool)} 12124 """ 12125 return None
12126
12127 - def set_is_preferred(is_preferred):
12128 """ 12129 Sets preferability of a resource. 12130 12131 @param is_preferred: B{C{True}} to make B{C{resource}} preferred, B{C{False}} to make it not preferred. I{(bool)} 12132 """ 12133 pass
12134
12135 - def use():
12136 """ 12137 Starts using a resource. 12138 12139 Call to this function is necessary to use a resource properly. It makes the resource to create any auxiliary 12140 structures that consume considerable amount of memory and perform other initialization to ready-to-use form. 12141 12142 When a resource is no longer used, it should be released with L{Resource.release}(). 12143 12144 In addition, it calls g_object_ref() on the resource. 12145 12146 Resources usually exist through almost whole program lifetime from B{C{GObject}} perspective, but from the viewpoint of 12147 use this method is the constructor and L{Resource.release}() is the destructor. 12148 12149 """ 12150 pass
12151
12152 - def release():
12153 """ 12154 Releases a resource. 12155 12156 When the number of resource uses drops to zero, it frees all auxiliary data and returns back to `latent' form. In 12157 addition, it calls g_object_unref() on it. See L{Resource.use}() for more. 12158 12159 """ 12160 pass
12161
12162 - def is_used():
12163 """ 12164 Tells whether a resource is currently in use. 12165 12166 See L{Resource.use}() for details. 12167 12168 12169 @return: B{C{True}} if resource is in use, B{C{False}} otherwise. I{(bool)} 12170 """ 12171 return None
12172
12173 - def data_changed():
12174 """ 12175 Emits signal "data-changed" on a resource. 12176 12177 It can be called only on non-constant resources. The default handler sets B{C{is_modified}} flag on the resource. 12178 12179 Mostly useful in resource implementation. 12180 12181 """ 12182 pass
12183
12184 - def data_saved():
12185 """ 12186 Clears B{C{is_modified}} flag of a resource. 12187 12188 @since: 2.8 12189 12190 """ 12191 pass
12192
12193 - def build_filename():
12194 """ 12195 Builds file name a resource should be saved to. 12196 12197 If the resource has not been newly created, renamed, or system it was probably loaded from file of the same name. 12198 12199 12200 @return: Resource file name as a newly allocated string that must be freed by caller. I{(string)} 12201 """ 12202 return None
12203
12204 - def dump():
12205 """ 12206 Dumps a resource to a textual (human readable) form. 12207 12208 12209 @return: Textual resource representation. I{(string)} 12210 """ 12211 return None
12212
12213 - def rename(newname):
12214 """ 12215 Renames a resource, including renaming it on disk. 12216 12217 The method renames the resource both in the inventory and on disk. The renaming must not conflict with an existing 12218 resource, constant resources cannot be renamed, etc. It is OK to rename a resource to the same name (nothing 12219 happens then). 12220 12221 @since: 2.51 12222 12223 @param newname: New resource name. I{(string)} 12224 @return: B{C{True}} if the renaming succeeded. I{(bool)} 12225 """ 12226 return None
12227
12228 - def delete():
12229 """ 12230 Deletes a resource, including removal from disk. 12231 12232 The method deletes the resource both in the inventory and on disk. Constant resources cannot be deleted. 12233 12234 @since: 2.51 12235 12236 @return: B{C{True}} if the removal succeeded. I{(bool)} 12237 """ 12238 return None
12239
12240 - def save():
12241 """ 12242 Saves a resource to disk. 12243 12244 Only non-constant resources can be saved. The file name is determined by L{Resource.build_filename}(). The 12245 resource data are saved even if the modified flag is not set. Upon successful save, the modified flag is cleared. 12246 12247 Instead of saving individual resources, consider also using L{Resource.class_save_modified}(). 12248 12249 @since: 2.62 12250 12251 @return: B{C{True}} if resource was saved to disk, B{C{False}} otherwise. I{(bool)} 12252 """ 12253 return None
12254 12255
12256 -class NLFitPreset:
12257 - def get_value(x, params, fres):
12258 """ 12259 Calculates preset function value in a single point with given parameters. 12260 12261 12262 @param x: The point to compute value at. I{(float)} 12263 @param params: Preset parameter values. I{(const-gdouble*)} 12264 @param fres: Set to B{C{True}} if succeeds, B{C{False}} on failure. I{(gboolean*)} 12265 @return: The function value. I{(float)} 12266 """ 12267 return None
12268
12269 - def get_formula():
12270 """ 12271 Gets function formula of B{C{preset}} (with Pango markup). 12272 12273 12274 @return: The preset function formula. I{(string)} 12275 """ 12276 return None
12277
12278 - def get_nparams():
12279 """ 12280 Return the number of parameters of B{C{preset}}. 12281 12282 12283 @return: The number of function parameters. I{(int)} 12284 """ 12285 return None
12286
12287 - def get_param_name(param):
12288 """ 12289 Gets the name of a fitting parameter of a fitter preset. 12290 12291 The name may contain Pango markup. 12292 12293 12294 @param param: A parameter number. I{(int)} 12295 @return: The name of parameter @param. I{(string)} 12296 """ 12297 return None
12298
12299 - def get_param_units(param, siunit_x, siunit_y):
12300 """ 12301 Derives the SI unit of a fitting parameter from the units of abscissa and 12302 ordinate. 12303 12304 @since: 2.5 12305 12306 @param param: A parameter number. I{(int)} 12307 @param siunit_x: SI unit of abscissa. I{(L{SIUnit})} 12308 @param siunit_y: SI unit of ordinate. I{(L{SIUnit})} 12309 @return: A newly created B{C{SIUnit}} with the units of the parameter @param. 12310 If the units of @param are not representable as B{C{SIUnit}}, 12311 the result is unitless (i.e. it will be presented as a mere 12312 number). I{(L{SIUnit})} 12313 """ 12314 return None
12315
12316 - def fit(fitter, n_dat, x, y, params, err, fixed_param):
12317 """ 12318 Performs a nonlinear fit with a preset. 12319 12320 See L{gwy_math_nlfit_fit_full}() for details. 12321 12322 12323 @param fitter: A Marquardt-Levenberg nonlinear fitter already initialized for 12324 B{C{preset}}'s function, or B{C{None}}. I{(MathNLFit*)} 12325 @param n_dat: The number of data points (number of items in B{C{x}} and B{C{y}}). I{(int)} 12326 @param x: Abscissa points. I{(const-gdouble*)} 12327 @param y: Ordinate points. I{(const-gdouble*)} 12328 @param params: Initial parameter estimate (the number of parameters depends on 12329 the fitted preset and it can be obtained with 12330 L{gwy_nlfit_preset_get_nparams}()). I{(gdouble*)} 12331 @param err: Array to store parameter errros to, may be B{C{None}}. I{(gdouble*)} 12332 @param fixed_param: Which parameters should be treated as fixed (set 12333 corresponding element to B{C{True}} for them). May be B{C{None}} if 12334 all parameters are variable. I{(const-gboolean*)} 12335 @return: Either B{C{fitter}} itself, or a newly created fitter if it was B{C{None}}. I{(MathNLFit*)} 12336 """ 12337 return None
12338 12339
12340 -class Gradient:
12341 """ 12342 A map from numbers to RGBA colors 12343 12344 12345 Gradient is a map from interval [0,1] to RGB(A) color space. Each gradient 12346 is defined by an ordered set of color points, the first of them is always at 12347 0.0, the last at 1.0 (thus each gradient must consist of at least two 12348 points). Between them, the color is interpolated. Color points of 12349 modifiable gradients (see B{C{Resource}}) can be edited with functions like 12350 L{Gradient.insert_point}(), L{Gradient.set_point_color}(), or 12351 L{Gradient.set_points}(). 12352 12353 Gradient objects can be obtained from L{gwy_gradients_get_gradient}(). New 12354 gradients can be created with L{Inventory.new_item}() on the B{C{Inventory}} 12355 returned by L{gwy_gradients}(). 12356 12357 """
12358 - def get_color(x, color):
12359 """ 12360 Computes the color at a given position of a color gradient. 12361 12362 @param x: Position in gradient, in range 0..1. I{(float)} 12363 @param color: Color to fill with interpolated color at position B{C{x}}. I{(L{RGBA})} 12364 """ 12365 pass
12366
12367 - def sample_to_pixbuf(pixbuf):
12368 """ 12369 Samples a color gradient to a provided pixbuf. 12370 12371 Unlike L{Gradient.sample}() which simply takes samples at equidistant 12372 points this method uses supersampling and thus it gives a bit better 12373 looking gradient presentation. 12374 12375 @param pixbuf: A pixbuf to sample gradient to (in horizontal direction). I{(L{gdk.Pixbuf})} 12376 """ 12377 pass
12378
12379 - def get_npoints():
12380 """ 12381 Returns the number of points in a color gradient. 12382 12383 12384 @return: The number of points in B{C{gradient}}. I{(int)} 12385 """ 12386 return None
12387
12388 - def get_point(index_):
12389 """ 12390 Returns the point at given index of a color gradient. 12391 12392 12393 @param index_: Color point index in B{C{gradient}}. I{(int)} 12394 @return: Color point at B{C{index_}}. I{(GradientPoint)} 12395 """ 12396 return None
12397
12398 - def set_point(index_, point):
12399 """ 12400 Sets a single color point in a color gradient. 12401 12402 It is an error to try to move points beyond its neighbours, or to move first 12403 (or last) point from 0 (or 1). 12404 12405 @param index_: Color point index in B{C{gradient}}. I{(int)} 12406 @param point: Color point to replace current point at B{C{index_}} with. I{(const-GradientPoint*)} 12407 """ 12408 pass
12409
12410 - def set_point_color(index_, color):
12411 """ 12412 Sets the color of a color gradient point without moving it. 12413 12414 @param index_: Color point index in B{C{gradient}}. I{(int)} 12415 @param color: Color to set the point to. I{(const-RGBA*)} 12416 """ 12417 pass
12418
12419 - def delete_point(index_):
12420 """ 12421 Deletes a point at given index in a color gradient. 12422 12423 It is not possible to delete points in gradients with less than 3 points. 12424 First and last points should not be deleted unless there's another point 12425 with B{C{x}} = 0 or B{C{x}} = 1 present. 12426 12427 @param index_: Color point index in B{C{gradient}}. I{(int)} 12428 """ 12429 pass
12430
12431 - def reset():
12432 """ 12433 Resets a gradient to the default two-point gray scale state. 12434 12435 """ 12436 pass
12437
12438 - def get_points():
12439 """ 12440 Returns the complete set of color points of a gradient. 12441 12442 12443 @return: Tuple consisting of 2 values (B{C{value}}, B{C{npoints}}). (I{(const-GradientPoint*)}, I{(int)}) 12444 """ 12445 return None, None
12446
12447 - def set_points(npoints, points):
12448 """ 12449 Sets the complete color gradient definition to a given set of points. 12450 12451 The point positions should be ordered, and first point should start at 0.0, 12452 last end at 1.0. There should be no redundant points. 12453 12454 @param npoints: The length of B{C{points}}. I{(int)} 12455 @param points: Color points to set as new gradient definition. I{(const-GradientPoint*)} 12456 """ 12457 pass
12458
12459 - def set_from_samples(nsamples, samples, threshold):
12460 """ 12461 Reconstructs a color gradient definition from sampled colors. 12462 12463 The result is usually approximate. 12464 12465 @param nsamples: Number of samples, it must be at least one. I{(int)} 12466 @param samples: Sampled color gradient in B{C{GdkPixbuf}}-like RRGGBBAA form. I{(string)} 12467 @param threshold: Maximum allowed difference (for color components in range 0..1). 12468 When negative, default value 1/80 suitable for most purposes 12469 is used. I{(float)} 12470 """ 12471 pass
12472 12473
12474 -class GLMaterial:
12475 """ 12476 OpenGL material representation 12477 12478 12479 B{C{GLMaterial}} represents an OpenGL material. Its properties directly map 12480 to corresponding OpenGL material characteristics, all are in the range 12481 [0,1]. 12482 12483 Gradient objects can be obtained from L{gwy_gl_materials_get_gl_material}(). 12484 New GL materials can be created with L{Inventory.new_item}() on the 12485 B{C{Inventory}} returned by L{gwy_gl_materials}(). 12486 12487 """
12488 - def get_ambient():
12489 """ 12490 Gets the ambient reflectance of a GL material. 12491 12492 12493 @return: Ambient reflectance (owned by GL material, must not be modified 12494 nor freed). I{(const-RGBA*)} 12495 """ 12496 return None
12497
12498 - def set_ambient(ambient):
12499 """ 12500 Sets the ambient reflectance of a GL material. 12501 12502 @param ambient: Ambient reflectance. I{(const-RGBA*)} 12503 """ 12504 pass
12505
12506 - def get_diffuse():
12507 """ 12508 Gets the diffuse reflectance of a GL material. 12509 12510 12511 @return: Diffuse reflectance (owned by GL material, must not be modified 12512 nor freed). I{(const-RGBA*)} 12513 """ 12514 return None
12515
12516 - def set_diffuse(diffuse):
12517 """ 12518 Sets the diffuse reflectance of a GL material. 12519 12520 @param diffuse: Diffuse reflectance. I{(const-RGBA*)} 12521 """ 12522 pass
12523
12524 - def get_specular():
12525 """ 12526 Gets the specular reflectance of a GL material. 12527 12528 12529 @return: Specular reflectance (owned by GL material, must not be modified 12530 nor freed). I{(const-RGBA*)} 12531 """ 12532 return None
12533
12534 - def set_specular(specular):
12535 """ 12536 Sets the specular reflectance of a GL material. 12537 12538 @param specular: Specular reflectance. I{(const-RGBA*)} 12539 """ 12540 pass
12541
12542 - def get_emission():
12543 """ 12544 Gets the emission component of a GL material. 12545 12546 12547 @return: Emission component (owned by GL material, must not be modified 12548 nor freed). I{(const-RGBA*)} 12549 """ 12550 return None
12551
12552 - def set_emission(emission):
12553 """ 12554 Sets the emission component of a GL material. 12555 12556 @param emission: Emission component. I{(const-RGBA*)} 12557 """ 12558 pass
12559
12560 - def get_shininess():
12561 """ 12562 Gets the shininess value of a GL material. 12563 12564 12565 @return: The shininess value (in range 0..1, not 0..128). I{(float)} 12566 """ 12567 return None
12568
12569 - def set_shininess(shininess):
12570 """ 12571 Sets the shininess value of a GL material. 12572 12573 @param shininess: Shinniness value (in range 0..1, not 0..128). I{(float)} 12574 """ 12575 pass
12576
12577 - def sample_to_pixbuf(pixbuf):
12578 """ 12579 Samples GL material to a provided pixbuf. 12580 12581 @param pixbuf: A pixbuf to sample gl_material to (in horizontal direction). I{(L{gdk.Pixbuf})} 12582 """ 12583 pass
12584
12585 - def reset():
12586 """ 12587 Resets a GL material to default values. 12588 12589 """ 12590 pass
12591 12592
12593 -class CDLine:
12594 - def get_name():
12595 """ 12596 Return cdline name (its unique identifier). 12597 12598 12599 @return: The cdline name. I{(string)} 12600 """ 12601 return None
12602
12603 - def get_definition():
12604 """ 12605 Gets the name of the image file with critical dimension evaluator 12606 description. 12607 12608 12609 @return: The cdline function definition. I{(string)} 12610 """ 12611 return None
12612
12613 - def get_param_name(param):
12614 """ 12615 Returns the name of a critical dimension evaluator parameter. 12616 12617 The name may contain Pango markup. 12618 12619 12620 @param param: A parameter number. I{(int)} 12621 @return: The name of parameter @param. I{(string)} 12622 """ 12623 return None
12624
12625 - def get_param_default(param):
12626 """ 12627 Returns a constant default parameter value. 12628 12629 12630 @param param: A parameter number. I{(int)} 12631 @return: The default parameter value, unrelated to the actual data fitted. 12632 It is worthless. I{(float)} 12633 """ 12634 return None
12635
12636 - def get_param_units(param, siunit_x, siunit_y):
12637 """ 12638 Derives the SI unit of a critical dimension parameter from the units of 12639 abscissa and ordinate. 12640 12641 @since: 2.5 12642 12643 @param param: A parameter number. I{(int)} 12644 @param siunit_x: SI unit of abscissa. I{(L{SIUnit})} 12645 @param siunit_y: SI unit of ordinate. I{(L{SIUnit})} 12646 @return: A newly created B{C{SIUnit}} with the units of the parameter @param. 12647 If the units of @param are not representable as B{C{SIUnit}}, 12648 the result is unitless (i.e. it will be presented as a mere 12649 number). I{(L{SIUnit})} 12650 """ 12651 return None
12652
12653 - def get_nparams():
12654 """ 12655 Return the number of parameters of B{C{cdline}}. 12656 12657 12658 @return: The number of function parameters. I{(int)} 12659 """ 12660 return None
12661
12662 - def fit(x, y):
12663 """ 12664 Performs a critical dimension evaulation (fit). 12665 12666 @param x: Abscissa points. I{(list)} 12667 @param y: Ordinate points. I{(list)} 12668 @return: Tuple consisting of 2 values (B{C{params}}, B{C{err}}). (I{(list)}, I{(list)}) 12669 """ 12670 return None, None
12671
12672 - def get_value(x, params):
12673 """ 12674 Calculates critical dimension function value in a single point with given 12675 parameters. 12676 12677 12678 @param x: The point to compute value at. I{(float)} 12679 @param params: Evaluator parameter values. I{(list)} 12680 @return: Tuple consisting of 2 values (B{C{value}}, B{C{fres}}). (I{(float)}, I{(BooleanOutArg)}) 12681 """ 12682 return None, None
12683 12684
12685 -class ResourceEditor:
12686 - def get_edited():
12687 """ 12688 Gets the currently edited resource. 12689 12690 It is an error to call this method when no resource is being edited. 12691 12692 12693 @return: The currently edited resource. I{(L{Resource})} 12694 """ 12695 return None
12696
12697 - def queue_commit():
12698 """ 12699 Queues commit of resource changes, marking the currently edited resource 12700 `dirty'. 12701 12702 Call this method in particular resource editor subclass whenever user 12703 changes some editor property. 12704 12705 To flush pending commit, call L{Resource.editor_commit}(). To immediately 12706 commit a change, call this method and then L{Resource.editor_commit}(). 12707 12708 """ 12709 pass
12710
12711 - def commit():
12712 """ 12713 Commits pending resource changes, if there are any. 12714 12715 It calls B{C{apply_changes}} method first (if it exists), then saves resource to 12716 disk. 12717 12718 Changes are always immediately committed (if there are any pending): before 12719 the editor is destroyed, when a resource stops being edited, before a 12720 resource is deleted, before a resource is renamed. When a resource is newly 12721 created, it is immediately created on disk too. 12722 12723 12724 @return: Always B{C{False}} (to be usable as B{C{GSourceFunc}}). I{(bool)} 12725 """ 12726 return None
12727
12728 - def setup():
12729 """ 12730 Sets up particular resource editor. 12731 12732 Helper method only intended for resource editor implementation. 12733 To be called in particular resource initialization methods. 12734 12735 """ 12736 pass
12737 12738
12739 -class Ruler:
12740 - def set_range(lower, upper, position, max_size):
12741 """ 12742 Sets range and current value of a ruler. 12743 12744 @param lower: Lower limit of the ruler. I{(float)} 12745 @param upper: Upper limit of the ruler. I{(float)} 12746 @param position: Current position of the mark on the ruler. I{(float)} 12747 @param max_size: Maximum value used for calculating size of text labels. I{(float)} 12748 """ 12749 pass
12750
12751 - def draw_pos():
12752 """ 12753 Draws a position marker. 12754 12755 This method is intended primarily for subclass implementation. 12756 12757 """ 12758 pass
12759
12760 - def get_range():
12761 """ 12762 Retrieves values indicating the range and current position of a B{C{Ruler}}. 12763 See L{Ruler.set_range}(). 12764 12765 @return: Tuple consisting of 4 values (B{C{lower}}, B{C{upper}}, B{C{position}}, B{C{max_size}}). (I{(float)}, I{(float)}, I{(float)}, I{(float)}) 12766 """ 12767 return None, None, None, None
12768
12769 - def set_si_unit(units):
12770 """ 12771 Sets the base units a ruler displays. 12772 12773 Setting units to B{C{None}} effectively disables them. 12774 12775 @param units: The base units this ruler should display. I{(L{SIUnit})} 12776 """ 12777 pass
12778
12779 - def get_si_unit():
12780 """ 12781 Returns the base units a ruler uses. 12782 12783 12784 @return: The units the rules uses. I{(L{SIUnit})} 12785 """ 12786 return None
12787
12788 - def get_units_placement():
12789 """ 12790 Gets current units placement of ruler B{C{ruler}}. 12791 12792 12793 @return: The units placement. I{(UnitsPlacement)} 12794 """ 12795 return None
12796
12797 - def set_units_placement(placement):
12798 """ 12799 Sets whether and where units should be placed on the ruler. 12800 12801 @param placement: Units placement specification. Expected values: C{B{UNITS_PLACEMENT_NONE}}, C{B{UNITS_PLACEMENT_AT_ZERO}}. I{(L{UnitsPlacement})} 12802 """ 12803 pass
12804 12805
12806 -class HRuler:
12807 - def __init__():
12808 """ 12809 Creates a new B{C{HRuler}}. 12810 12811 12812 @return: The new ruler as a B{C{GtkWidget}}. I{(L{gtk.Widget})} 12813 """ 12814 return None
12815 12816
12817 -class SIUnit:
12818 """ 12819 SI unit representation, physical quantitiy formatting 12820 12821 12822 B{C{SIUnit}} object represents a physical SI unit (or any other unit), it can be created from a unit string with 12823 L{SIUnit.new}(). 12824 12825 SIUnit is also responsible for prefixes selection and generally formatting of physical quantities (see also 12826 gwymath for pure number formatting functions). There are several functions computing value format (as 12827 a B{C{SIValueFormat}} structure) with given resolution -- L{SIUnit.get_format_with_resolution}(), or number of 12828 significant digits -- L{SIUnit.get_format_with_digits}(). 12829 12830 """
12831 - def __init__(unit_string):
12832 """ 12833 Creates a new SI unit from string representation. 12834 12835 Unit string represents unit with no prefixes (e. g. "m", "N", "A", etc.) 12836 12837 12838 @param unit_string: Unit string (it can be B{C{None}} for an empty unit). I{(string)} 12839 @return: A new SI unit. I{(L{SIUnit})} 12840 """ 12841 return None
12842
12843 - def set_from_string(unit_string):
12844 """ 12845 Sets string that represents unit. 12846 12847 It must be base unit with no prefixes (e. g. "m", "N", "A", etc.). 12848 12849 @param unit_string: Unit string to set B{C{siunit}} from (it can be B{C{None}} for an empty unit). I{(string)} 12850 """ 12851 pass
12852
12853 - def set_from_string_parse(unit_string):
12854 """ 12855 Changes an SI unit according to string representation. 12856 12857 This is a more powerful version of L{SIUnit.set_from_string}(), please see L{SIUnit.new_parse}() for some 12858 discussion. 12859 12860 @param unit_string: Unit string to set B{C{siunit}} from (it can be B{C{None}} for an empty 12861 unit). I{(string)} 12862 @return: Value B{C{power10}}. (I{(int)}) 12863 """ 12864 return None
12865
12866 - def get_string(style):
12867 """ 12868 Obtains string representing a SI unit. 12869 12870 12871 @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}}, C{B{SI_UNIT_FORMAT_VFTEX}}, C{B{SI_UNIT_FORMAT_UNICODE}}, C{B{SI_UNIT_FORMAT_VFUNICODE}}. I{(L{SIUnitFormatStyle})} 12872 @return: A newly allocated string that represents the base unit (with no prefixes). I{(string)} 12873 """ 12874 return None
12875
12876 - def multiply(siunit2, result):
12877 """ 12878 Multiplies two SI units. 12879 12880 12881 @param siunit2: An SI unit. I{(L{SIUnit})} 12882 @param result: An SI unit to set to product of B{C{siunit1}} and B{C{siunit2}}. It is safe to pass one of B{C{siunit1}}, B{C{siunit2}}. It 12883 can be B{C{None}} too, a new SI unit is created then and returned. I{(L{SIUnit})} 12884 @return: When B{C{result}} is B{C{None}}, a newly created SI unit that has to be dereferenced when no longer used later. 12885 Otherwise B{C{result}} itself is simply returned, its reference count is NOT increased. I{(L{SIUnit})} 12886 """ 12887 return None
12888
12889 - def divide(siunit2, result):
12890 """ 12891 Divides two SI units. 12892 12893 12894 @param siunit2: An SI unit. I{(L{SIUnit})} 12895 @param result: An SI unit to set to quotient of B{C{siunit1}} and B{C{siunit2}}. It is safe to pass one of B{C{siunit1}}, B{C{siunit2}}. It 12896 can be B{C{None}} too, a new SI unit is created then and returned. I{(L{SIUnit})} 12897 @return: When B{C{result}} is B{C{None}}, a newly created SI unit that has to be dereferenced when no longer used later. 12898 Otherwise B{C{result}} itself is simply returned, its reference count is NOT increased. I{(L{SIUnit})} 12899 """ 12900 return None
12901
12902 - def power(power, result):
12903 """ 12904 Computes a power of an SI unit. 12905 12906 12907 @param power: Power to raise B{C{siunit}} to. I{(int)} 12908 @param result: An SI unit to set to power of B{C{siunit}}. It is safe to pass B{C{siunit}} itself. It can be B{C{None}} too, a new SI 12909 unit is created then and returned. I{(L{SIUnit})} 12910 @return: When B{C{result}} is B{C{None}}, a newly created SI unit that has to be dereferenced when no longer used later. 12911 Otherwise B{C{result}} itself is simply returned, its reference count is NOT increased. I{(L{SIUnit})} 12912 """ 12913 return None
12914
12915 - def nth_root(ipower, result):
12916 """ 12917 Calulates n-th root of an SI unit. 12918 12919 This operation fails if the result would have fractional powers that are not representable by B{C{SIUnit}}. 12920 12921 @since: 2.5 12922 12923 @param ipower: The root to take: 2 means a quadratic root, 3 means cubic root, etc. I{(int)} 12924 @param result: An SI unit to set to power of B{C{siunit}}. It is safe to pass B{C{siunit}} itself. It can be B{C{None}} too, a new SI 12925 unit is created then and returned. I{(L{SIUnit})} 12926 @return: On success: When B{C{result}} is B{C{None}}, a newly created SI unit that has to be dereferenced when no longer used 12927 later, otherwise B{C{result}} itself is simply returned, its reference count is NOT increased. On failure B{C{None}} 12928 is always returned. I{(L{SIUnit})} 12929 """ 12930 return None
12931
12932 - def power_multiply(power1, siunit2, power2, result):
12933 """ 12934 Computes the product of two SI units raised to arbitrary powers. 12935 12936 This is the most complex SI unit arithmetic function. It can be easily chained when more than two units are to be 12937 multiplied. 12938 12939 @since: 2.4 12940 12941 @param power1: Power to raise B{C{siunit1}} to. I{(int)} 12942 @param siunit2: An SI unit. I{(L{SIUnit})} 12943 @param power2: Power to raise B{C{siunit2}} to. I{(int)} 12944 @param result: An SI unit to set to B{C{siunit1}}^B{C{power1}}*B{C{siunit2}}^B{C{power2}}. It is safe to pass B{C{siunit1}} or B{C{siunit2}}. It can 12945 be B{C{None}} too, a new SI unit is created then and returned. I{(L{SIUnit})} 12946 @return: When B{C{result}} is B{C{None}}, a newly created SI unit that has to be dereferenced when no longer used later. 12947 Otherwise B{C{result}} itself is simply returned, its reference count is NOT increased. I{(L{SIUnit})} 12948 """ 12949 return None
12950
12951 - def equal(siunit2):
12952 """ 12953 Checks whether two SI units are equal. 12954 12955 12956 @param siunit2: Second unit. I{(L{SIUnit})} 12957 @return: B{C{True}} if the units are equal. I{(bool)} 12958 """ 12959 return None
12960
12961 - def equal_string(unit_string):
12962 """ 12963 Checks whether an SI unit corresponds to given string. 12964 12965 Any power-of-ten prefixes are ignored. This function is mostly useful for quick commensurability checks with 12966 simple units such as "m" and for checking whether a unit is non-empty (by comparing with B{C{None}} or an empty string). 12967 12968 @since: 2.49 12969 12970 @param unit_string: Unit string (it can be B{C{None}} for an empty unit). I{(string)} 12971 @return: B{C{True}} if the units is equivalent to the given string. I{(bool)} 12972 """ 12973 return None
12974
12975 - def get_format(style, value, format):
12976 """ 12977 Finds a good format for representing a value. 12978 12979 The values should be then printed as value/B{C{format}}->magnitude [B{C{format}}->units] with B{C{format}}->precision decimal 12980 places. 12981 12982 12983 @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}}, C{B{SI_UNIT_FORMAT_VFTEX}}, C{B{SI_UNIT_FORMAT_UNICODE}}, C{B{SI_UNIT_FORMAT_VFUNICODE}}. I{(L{SIUnitFormatStyle})} 12984 @param value: Value the format should be suitable for. I{(float)} 12985 @param format: A value format to set-up, may be B{C{None}}, a new value format is allocated then. I{(L{SIValueFormat})} 12986 @return: The value format. If B{C{format}} was B{C{None}}, a newly allocated format is returned, otherwise (modified) 12987 B{C{format}} itself is returned. I{(L{SIValueFormat})} 12988 """ 12989 return None
12990
12991 - def get_format_for_power10(style, power10, format):
12992 """ 12993 Finds format for representing a specific power-of-10 multiple of a unit. 12994 12995 The values should be then printed as value/B{C{format}}->magnitude [B{C{format}}->units] with B{C{format}}->precision decimal 12996 places. 12997 12998 This function does not change the precision field of B{C{format}}. 12999 13000 13001 @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}}, C{B{SI_UNIT_FORMAT_VFTEX}}, C{B{SI_UNIT_FORMAT_UNICODE}}, C{B{SI_UNIT_FORMAT_VFUNICODE}}. I{(L{SIUnitFormatStyle})} 13002 @param power10: Power of 10, in the same sense as L{SIUnit.new_parse}() returns it. I{(int)} 13003 @param format: A value format to set-up, may be B{C{None}}, a new value format is allocated then. I{(L{SIValueFormat})} 13004 @return: The value format. If B{C{format}} was B{C{None}}, a newly allocated format is returned, otherwise (modified) 13005 B{C{format}} itself is returned. I{(L{SIValueFormat})} 13006 """ 13007 return None
13008
13009 - def get_format_with_resolution(style, maximum, resolution, format):
13010 """ 13011 Finds a good format for representing a range of values with given resolution. 13012 13013 The values should be then printed as value/B{C{format}}->magnitude [B{C{format}}->units] with B{C{format}}->precision decimal 13014 places. 13015 13016 13017 @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}}, C{B{SI_UNIT_FORMAT_VFTEX}}, C{B{SI_UNIT_FORMAT_UNICODE}}, C{B{SI_UNIT_FORMAT_VFUNICODE}}. I{(L{SIUnitFormatStyle})} 13018 @param maximum: The maximum value to be represented. I{(float)} 13019 @param resolution: The smallest step (approximately) that should make a visible difference in the representation. I{(float)} 13020 @param format: A value format to set-up, may be B{C{None}}, a new value format is allocated then. I{(L{SIValueFormat})} 13021 @return: The value format. If B{C{format}} was B{C{None}}, a newly allocated format is returned, otherwise (modified) 13022 B{C{format}} itself is returned. I{(L{SIValueFormat})} 13023 """ 13024 return None
13025
13026 - def get_format_with_digits(style, maximum, sdigits, format):
13027 """ 13028 Finds a good format for representing a values with given number of significant digits. 13029 13030 The values should be then printed as value/B{C{format}}->magnitude [B{C{format}}->units] with B{C{format}}->precision decimal 13031 places. 13032 13033 13034 @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}}, C{B{SI_UNIT_FORMAT_VFTEX}}, C{B{SI_UNIT_FORMAT_UNICODE}}, C{B{SI_UNIT_FORMAT_VFUNICODE}}. I{(L{SIUnitFormatStyle})} 13035 @param maximum: The maximum value to be represented. I{(float)} 13036 @param sdigits: The number of significant digits the value should have. I{(int)} 13037 @param format: A value format to set-up, may be B{C{None}}, a new value format is allocated then. I{(L{SIValueFormat})} 13038 @return: The value format. If B{C{format}} was B{C{None}}, a newly allocated format is returned, otherwise (modified) 13039 B{C{format}} itself is returned. I{(L{SIValueFormat})} 13040 """ 13041 return None
13042
13043 - def duplicate():
13044 """ 13045 Convenience macro doing L{gwy_serializable_duplicate}() with all the necessary typecasting. 13046 13047 @return: I{(L{SIUnit})} 13048 """ 13049 return None
13050 13051
13052 -class SciText:
13053 - def __init__():
13054 """ 13055 Creates a new scientific text entry. 13056 13057 13058 @return: A newly created scientific text entry. I{(L{gtk.Widget})} 13059 """ 13060 return None
13061
13062 - def get_text():
13063 """ 13064 Gets the text in a scientific text entry. 13065 13066 The text is already in UTF-8 with all entities converted. 13067 13068 13069 @return: The text as a newly allocated string. It should be freed when no 13070 longer used. I{(string)} 13071 """ 13072 return None
13073
13074 - def set_text(new_text):
13075 """ 13076 Sets the text a scientific text widget displays. 13077 13078 It can contain both UTF-8 and entities. UTF-8 characters corresponding to 13079 known entities are converted to entities, other characters are left as they 13080 are. 13081 13082 @param new_text: The text to display. I{(string)} 13083 """ 13084 pass
13085
13086 - def get_has_preview():
13087 """ 13088 Tests the display of a preview in a scientific text entry. 13089 13090 13091 @return: B{C{True}} if there is a preview, B{C{False}} if preview is not shown. I{(bool)} 13092 """ 13093 return None
13094
13095 - def set_has_preview(has_preview):
13096 """ 13097 Sets the display of a preview in a scientific text entry. 13098 13099 @param has_preview: B{C{True}} to display a preview, B{C{False}} to disable it. I{(bool)} 13100 """ 13101 pass
13102
13103 - def get_entry():
13104 """ 13105 Gets the entry widget of a scientific text entry. 13106 13107 13108 @return: The entry widget, no reference is added. I{(L{gtk.Widget})} 13109 """ 13110 return None
13111 13112
13113 -class Selection:
13114 """ 13115 Data selection base class 13116 13117 13118 B{C{Selection}} is an abstract class representing data selections. Particular selection types are defined by vector 13119 layer modules. 13120 13121 Selections behave as flat arrays of coordinates. They are however logically split into selection objects (points, 13122 lines, rectangles), characteristic for each selection type. For example, to describe a horizontal line one needs 13123 only one coordinate, for a point two coordinates are needed, rectangle or arbitrary line need four. 13124 L{Selection.get_object_size}() can be used to generically determine the number of coordinates used to describe 13125 a one selection object. 13126 13127 The number of selection objects in a selection can vary, L{Selection.set_max_objects}() sets the maximum possible 13128 number. Functions for getting and setting individual selection objects (L{Selection.get_object}(), 13129 L{Selection.set_object}()) or complete selection (L{Selection.get_data}(), L{Selection.set_data}()) are 13130 available. The method L{Selection.set_data}() with B{C{None}} second argument is also used to determine the number of 13131 selected object. 13132 13133 """
13134 - def get_object_size():
13135 """ 13136 Gets the number of coordinates that make up a one selection object. 13137 13138 13139 @return: The number of coordinates in one selection object. I{(int)} 13140 """ 13141 return None
13142
13143 - def clear():
13144 """ 13145 Clears a selection. 13146 13147 """ 13148 pass
13149
13150 - def delete_object(i):
13151 """ 13152 Deletes a one selection object. 13153 13154 Since there cannot be holes in the object list, the rest of selection objects is moved to close the gap. 13155 13156 @param i: Index of object to delete. I{(int)} 13157 """ 13158 pass
13159
13160 - def get_max_objects():
13161 """ 13162 Gets the maximum number of selected objects. 13163 13164 13165 @return: The maximum number of selected objects; I{(int)} 13166 """ 13167 return None
13168
13169 - def set_max_objects(max_objects):
13170 """ 13171 Sets the maximum number of objects allowed to select. 13172 13173 When selection reaches this number of selected objects, it emits "finished" signal. 13174 13175 @param max_objects: The maximum number of objects allowed to select. Note particular selection types may allow only 13176 specific values. I{(int)} 13177 """ 13178 pass
13179
13180 - def is_full():
13181 """ 13182 Checks whether the maximum number of objects is selected. 13183 13184 13185 @return: B{C{True}} when the maximum possible number of objects is selected, B{C{False}} otherwise. I{(bool)} 13186 """ 13187 return None
13188
13189 - def crop(xmin, ymin, xmax, ymax):
13190 """ 13191 Limits objects in a selection to a rectangle. 13192 13193 Objects that are fully outside specified rectangle are removed. Objects partially outside may be removed or cut, 13194 depending on what makes sense for the specific selection type. If the selection class does not implement this 13195 method then all objects are removed. 13196 13197 @since: 2.16 13198 13199 @param xmin: Minimum x-coordinate. I{(float)} 13200 @param ymin: Minimum y-coordinate. I{(float)} 13201 @param xmax: Maximum x-coordinate. I{(float)} 13202 @param ymax: Maximum y-coordinate. I{(float)} 13203 """ 13204 pass
13205
13206 - def move(vx, vy):
13207 """ 13208 Moves entire selection in plane by given vector. 13209 13210 If a selection class does not implement this operation the selection remains unchanged. Bult-in selection classes 13211 generally implement this operation if it is meaningful. For some, such as SelectionLattice, it is not 13212 meaningful and moving SelectionLattice thus does not do anything. 13213 13214 @since: 2.43 13215 13216 @param vx: Value to add to all x-coordinates. I{(float)} 13217 @param vy: Value to add to all y-coordinates. I{(float)} 13218 """ 13219 pass
13220
13221 - def filter(filter, data):
13222 """ 13223 Removes selection objects matching certain criteria. 13224 13225 @since: 2.16 13226 13227 @param filter: Function returning B{C{True}} for objects that should be kept, B{C{False}} for objects that should be removed. I{(SelectionFilterFunc)} 13228 @param data: User data passed to B{C{filter}}. I{(gpointer)} 13229 """ 13230 pass
13231
13232 - def changed(i):
13233 """ 13234 Emits "changed" signal on a selection. 13235 13236 @param i: Index of object that changed. Use -1 when not applicable, e.g., when complete selection was changed, cleared, 13237 or truncated. I{(int)} 13238 """ 13239 pass
13240
13241 - def finished():
13242 """ 13243 Emits "finished" signal on a selection. 13244 13245 """ 13246 pass
13247
13248 - def get_data():
13249 """ 13250 Get selection coordinates as single flat list. 13251 13252 13253 @return: a list of selected data I{(list)} 13254 """ 13255 return None
13256
13257 - def get_object(i):
13258 """ 13259 Gets one selection object. 13260 13261 13262 @param i: Index of object to get. I{(int)} 13263 @return: B{C{True}} if there was such an object and B{C{data}} was filled. I{(list)} 13264 """ 13265 return None
13266
13267 - def set_data(data):
13268 """ 13269 Sets selection data. 13270 13271 @param data: Selection data, that is an array B{C{nselected}} * L{Selection.get_object_size}() long with selected object 13272 coordinates. I{(list)} 13273 """ 13274 pass
13275
13276 - def set_object(i, data):
13277 """ 13278 Sets one selection object. 13279 13280 This method can be also used to append objects (if the maximum number is not exceeded). Since there cannot be 13281 holes in the object list, B{C{i}} must be then equal to either the number of selected objects or special value -1 13282 meaning append to end. 13283 13284 13285 @param i: Index of object to set. I{(int)} 13286 @param data: Object selection data. It's an array of coordinates whose precise meaning is defined by particular selection 13287 types. I{(list)} 13288 """ 13289 pass
13290
13291 - def duplicate():
13292 """ 13293 Convenience macro doing L{gwy_serializable_duplicate}() with all the necessary typecasting. 13294 13295 @return: I{(L{Selection})} 13296 """ 13297 return None
13298 13299
13300 -class SelectionGraphArea:
13301 - def __init__():
13302 """ 13303 Creates a new area-wise graph selection. 13304 13305 @since: 2.1 13306 13307 @return: A new selection object. I{(L{Selection})} 13308 """ 13309 return None
13310 13311
13312 -class SelectionGraphLine:
13313 - def __init__():
13314 """ 13315 Creates a new line-wise graph selection. 13316 13317 @since: 2.1 13318 13319 @return: A new selection object. I{(L{Selection})} 13320 """ 13321 return None
13322 13323
13324 -class SelectionGraphPoint:
13325 - def __init__():
13326 """ 13327 Creates a new point-wise graph selection. 13328 13329 @since: 2.1 13330 13331 @return: A new selection object. I{(L{Selection})} 13332 """ 13333 return None
13334 13335
13336 -class SelectionGraphZoom:
13337 - def __init__():
13338 """ 13339 Creates a new zoom-wise graph selection. 13340 13341 @since: 2.1 13342 13343 @return: A new selection object. I{(L{Selection})} 13344 """ 13345 return None
13346 13347
13348 -class SensitivityGroup:
13349 - def __init__():
13350 """ 13351 Creates a new flag-based widget sensitivity group. 13352 13353 13354 @return: The newly created sensitivity group. It starts with zero state. I{(L{SensitivityGroup})} 13355 """ 13356 return None
13357
13358 - def add_widget(widget, mask):
13359 """ 13360 Adds a widget to flag sensitivity group. 13361 13362 Widget sensitivity should not be set manually after the addition as the 13363 result is likely to be a fight over sensitivity setting. 13364 13365 The added widget takes a reference on B{C{sensgroup}}. So the group is not 13366 destroyed when they are any widgets in, generally, you can release your 13367 initial reference after adding widgets to the group. 13368 13369 @param widget: Widget to add to B{C{sensgroup}}. I{(L{gtk.Widget})} 13370 @param mask: Which flags the widget is sensitive to. See 13371 L{SensitivityGroup.set_state}() for details. I{(int)} 13372 """ 13373 pass
13374
13375 - def set_state(affected_mask, state):
13376 """ 13377 Sets the state of a widget flag sensitivity group. 13378 13379 Widget sensitivity states are then updated accordingly. 13380 13381 More precisely, widget will be made sensitive when all bits in its B{C{mask}} are 13382 set in current B{C{sensgroup}} state, insensitive otherwise. This means when 13383 B{C{mask}} is zero, widget will be always sensitive. 13384 13385 @param affected_mask: Which bits in B{C{state}} to copy to B{C{sensgroup}} state. 13386 1's in B{C{affected_mask}} causes corresponding bits in 13387 B{C{sensgroup}} state to be set to the value of corresponding 13388 bit in B{C{state}}. 13389 0's in B{C{affected_mask}} cause corresponding state bits to be 13390 kept on their current value. I{(int)} 13391 @param state: The new state of B{C{sensgroup}} (masked with B{C{affected_mask}}). I{(int)} 13392 """ 13393 pass
13394
13395 - def get_state():
13396 """ 13397 Gets the current state of a widget flag sensitivity group. 13398 13399 13400 @return: The current state as set with L{SensitivityGroup.set_state}(). I{(int)} 13401 """ 13402 return None
13403
13404 - def release_widget(widget):
13405 """ 13406 Removes a widget from flag sensitivity group. 13407 13408 @param widget: Widget to remove from B{C{sensgroup}}. I{(L{gtk.Widget})} 13409 """ 13410 pass
13411
13412 - def get_widget_mask(widget):
13413 """ 13414 Gets sensitivity flags of a widget in a flag sensitivity group. 13415 13416 13417 @param widget: Widget to get flags of. I{(L{gtk.Widget})} 13418 @return: The mask as passed to L{SensitivityGroup.add_widget}() 13419 or L{SensitivityGroup.set_widget_mask}(). I{(int)} 13420 """ 13421 return None
13422
13423 - def set_widget_mask(widget, mask):
13424 """ 13425 Sets the flag mask of a widget in a flag sensitivity group. 13426 13427 @param widget: Widget to set flags of. I{(L{gtk.Widget})} 13428 @param mask: Which flags the widget is sensitive to. See 13429 L{SensitivityGroup.set_state}() for details. I{(int)} 13430 """ 13431 pass
13432
13433 - def contains_widget(widget):
13434 """ 13435 Checks whether a widget belongs to a sensitivity group. 13436 13437 @since: 2.34 13438 13439 @param widget: Widget to test for membership. I{(L{gtk.Widget})} 13440 @return: B{C{True}} if B{C{widget}} is in B{C{sensgroup}}, B{C{False}} otherwise. I{(bool)} 13441 """ 13442 return None
13443 13444
13445 -class Shader:
13446 - def __init__(gradient):
13447 """ 13448 Creates a new spherical shader. 13449 13450 The widget takes up all the space allocated for it. 13451 13452 13453 @param gradient: Name of gradient to color the spehere with. Can be B{C{None}} to 13454 use the default gradient. I{(string)} 13455 @return: The new shader as a B{C{GtkWidget}}. I{(L{gtk.Widget})} 13456 """ 13457 return None
13458
13459 - def get_theta():
13460 """ 13461 Returns the theta coordinate of a shader. 13462 13463 13464 @return: The theta coordinate, in radians. Theta coordinate is angle from 13465 sphere's north pole. I{(float)} 13466 """ 13467 return None
13468
13469 - def get_phi():
13470 """ 13471 Returns the phi coordinate of a shader. 13472 13473 13474 @return: The phi coordinate, in radians. Phi coordinate is orientation 13475 in horizontal plane, measured from x axis, counterclockwise. I{(float)} 13476 """ 13477 return None
13478
13479 - def set_theta(theta):
13480 """ 13481 Sets the theta coordinate of a shader. 13482 13483 @param theta: The theta coordinate to set. See L{Shader.get_theta}() for 13484 description. I{(float)} 13485 """ 13486 pass
13487
13488 - def set_phi(phi):
13489 """ 13490 Sets the phi coordinate of a shader. 13491 13492 @param phi: The phi coordinate to set. See L{Shader.get_phi}() for description. I{(float)} 13493 """ 13494 pass
13495
13496 - def set_angle(theta, phi):
13497 """ 13498 Sets the spherical angle of a shader. 13499 13500 @param theta: The theta coordinate to set. See L{Shader.get_theta}() for 13501 description. I{(float)} 13502 @param phi: The phi coordinate to set. See L{Shader.get_phi}() for description. I{(float)} 13503 """ 13504 pass
13505
13506 - def get_gradient():
13507 """ 13508 Returns the name of color gradient a shader uses. 13509 13510 13511 @return: The gradient name. It must not be modified or freed. It may 13512 differ the name that was used on initialization or set with 13513 L{Shader.set_gradient}(), if the gradient didn't exist or 13514 was renamed meanwhile. I{(string)} 13515 """ 13516 return None
13517
13518 - def set_gradient(gradient):
13519 """ 13520 Sets the gradient a shader uses. 13521 13522 @param gradient: Name of gradient B{C{shader}} should use. It should exist. I{(string)} 13523 """ 13524 pass
13525
13526 - def get_update_policy():
13527 """ 13528 Returns the update policy of a shader. 13529 13530 13531 @return: The update policy. I{(GtkUpdateType)} 13532 """ 13533 return None
13534
13535 - def set_update_policy(update_policy):
13536 """ 13537 Sets the update policy of a shader. 13538 13539 @param update_policy: The update policy B{C{shader}} should use. I{(GtkUpdateType)} 13540 """ 13541 pass
13542 13543
13544 -class ShapeFitPreset:
13545 - def needs_same_units():
13546 """ 13547 Reports if a 3D geometrical shape fitter preset requires the same lateral and value units. 13548 13549 For instance, fitting a sphere is meaningless if the horizontal and vertical radii would be different physical 13550 quantities. 13551 13552 @since: 2.47 13553 13554 @return: B{C{True}} if the function requires the same lateral and value units. I{(bool)} 13555 """ 13556 return None
13557
13558 - def get_nparams():
13559 """ 13560 Reports the number of parameters of a 3D geometrical shape fitter preset. 13561 13562 @since: 2.47 13563 13564 @return: The number of function parameters. I{(int)} 13565 """ 13566 return None
13567
13568 - def get_param_name(i):
13569 """ 13570 Gets the name of a fitting parameter of a 3D geometrical shape fitter preset. 13571 13572 The name may contain Pango markup. 13573 13574 @since: 2.47 13575 13576 @param i: Parameter number. I{(int)} 13577 @return: The name of the B{C{i}}-th parameter. I{(string)} 13578 """ 13579 return None
13580
13581 - def get_param_description(i):
13582 """ 13583 Gets the description of a fitting parameter of a 3D geometrical shape fitter preset. 13584 13585 The description may contain Pango markup. It may also be B{C{None}} if the parameter is currently undescribed. 13586 13587 @since: 2.61 13588 13589 @param i: Parameter number. I{(int)} 13590 @return: The description of the B{C{i}}-th parameter, possibly B{C{None}}. I{(string)} 13591 """ 13592 return None
13593
13594 - def get_param_flags(i):
13595 """ 13596 Gets the properties of a fitting parameter of a 3D geometrical shape fitter preset. 13597 13598 @since: 2.47 13599 13600 @param i: Parameter number. I{(int)} 13601 @return: The flags of the B{C{i}}-th parameter. I{(NLFitParamFlags)} 13602 """ 13603 return None
13604
13605 - def get_param_units(i, siunit_xy, siunit_z):
13606 """ 13607 Derives the SI unit of a fitting parameter from the units of abscissa and ordinate. 13608 13609 Note that angle parameters are by default in radians and thus unitless. If you want to convert them to degrees for 13610 presentation to the user you must do it explicitly. 13611 13612 @since: 2.47 13613 13614 @param i: Parameter number. I{(int)} 13615 @param siunit_xy: SI unit of lateral coordinates. I{(L{SIUnit})} 13616 @param siunit_z: SI unit of values. I{(L{SIUnit})} 13617 @return: A newly created B{C{SIUnit}} with the units of the B{C{i}}-th parameter. I{(L{SIUnit})} 13618 """ 13619 return None
13620
13621 - def get_param_power_xy(i):
13622 """ 13623 Gets the power of abscissa units in a shape fitting parameter. 13624 13625 Usually it is easier to let L{ShapeFitPreset.get_param_units}() derive the parameter units. 13626 13627 @since: 2.50 13628 13629 @param i: Parameter number. I{(int)} 13630 @return: The power of abscissa in the parameter. I{(int)} 13631 """ 13632 return None
13633
13634 - def get_param_power_z(i):
13635 """ 13636 Gets the power of ordinate units in a shape fitting parameter. 13637 13638 Usually it is easier to let L{ShapeFitPreset.get_param_units}() derive the parameter units. 13639 13640 @since: 2.50 13641 13642 @param i: Parameter number. I{(int)} 13643 @return: The power of ordinate in the parameter. I{(int)} 13644 """ 13645 return None
13646
13647 - def get_nsecondary():
13648 """ 13649 Reports the number of secondary (derived) quantities of a 3D geometrical shape fitter preset. 13650 13651 @since: 2.47 13652 13653 @return: The number of secondary quantities. I{(int)} 13654 """ 13655 return None
13656
13657 - def get_secondary_name(i):
13658 """ 13659 Gets the name of a secondary (derived) quantity of a 3D geometrical shape fitter preset. 13660 13661 The name may contain Pango markup. 13662 13663 @since: 2.47 13664 13665 @param i: Secondary quantity number. I{(int)} 13666 @return: The name of the B{C{i}}-th secondary quantity. I{(string)} 13667 """ 13668 return None
13669
13671 """ 13672 Gets the description of a secondary quantity of a 3D geometrical shape fitter preset. 13673 13674 The description may contain Pango markup. It may also be B{C{None}} if the quantity is currently undescribed. 13675 13676 @since: 2.61 13677 13678 @param i: Secondary quantity number. I{(int)} 13679 @return: The description of the B{C{i}}-th secondary quantity, possibly B{C{None}}. I{(string)} 13680 """ 13681 return None
13682
13683 - def get_secondary_flags(i):
13684 """ 13685 Gets the properties of a secondary (derived) quantity of a 3D geometrical shape fitter preset. 13686 13687 @since: 2.47 13688 13689 @param i: Secondary quantity number. I{(int)} 13690 @return: The flags of the B{C{i}}-th secondary quantity. I{(NLFitParamFlags)} 13691 """ 13692 return None
13693
13694 - def get_secondary_units(i, siunit_xy, siunit_z):
13695 """ 13696 Derives the SI unit of a secondary (derived) quantity from the units of abscissa and ordinate. 13697 13698 Note that angle parameters are by default in radians and thus unitless. If you want to convert them to degrees for 13699 presentation to the user you must do it explicitly. 13700 13701 @since: 2.47 13702 13703 @param i: Secondary quantity number. I{(int)} 13704 @param siunit_xy: SI unit of lateral coordinates. I{(L{SIUnit})} 13705 @param siunit_z: SI unit of values. I{(L{SIUnit})} 13706 @return: A newly created B{C{SIUnit}} with the units of the B{C{i}}-th secondary quantity. I{(L{SIUnit})} 13707 """ 13708 return None
13709
13710 - def get_secondary_power_xy(i):
13711 """ 13712 Gets the power of abscissa units in a shape fitting secondary (derived) quantity. 13713 13714 Usually it is easier to let L{ShapeFitPreset.get_secondary_units}() derive the quantity units. 13715 13716 @since: 2.50 13717 13718 @param i: Secondary quantity number. I{(int)} 13719 @return: The power of abscissa in the secondary quantity. I{(int)} 13720 """ 13721 return None
13722
13723 - def get_secondary_power_z(i):
13724 """ 13725 Gets the power of ordinate units in a shape fitting secondary (derived) quantity. 13726 13727 Usually it is easier to let L{ShapeFitPreset.get_secondary_units}() derive the quantity units. 13728 13729 @since: 2.50 13730 13731 @param i: Secondary quantity number. I{(int)} 13732 @return: The power of ordinate in the secondary quantity. I{(int)} 13733 """ 13734 return None
13735
13736 - def setup(points, n, params):
13737 """ 13738 Initialises parameter values of a 3D geometrical shape fitter preset. 13739 13740 The parameters are quickly set to reasonable values that roughly correspond to the ranges of the data points. They 13741 may serve as starting values for manual experimentation but often will not be good enough as initial parameter 13742 estimates for the fit. See also L{ShapeFitPreset.guess}(). 13743 13744 @since: 2.47 13745 13746 @param points: Array of XYZ data to fit. I{(const-XYZ*)} 13747 @param n: Number of data points. I{(int)} 13748 @param params: The array to fill with initialised parameter values. I{(gdouble*)} 13749 """ 13750 pass
13751
13752 - def get_value(x, y, params):
13753 """ 13754 Calculates the value of a 3D geometrical shape fitter preset in a single point. 13755 13756 If you want multiple values you should use either L{ShapeFitPreset.calculate_z}() or 13757 L{ShapeFitPreset.calculate_xyz}() instead of calling this function in a cycle. 13758 13759 @since: 2.47 13760 13761 @param x: X-coordinate. I{(float)} 13762 @param y: Y-coordinate. I{(float)} 13763 @param params: Fitting parameter values. I{(const-gdouble*)} 13764 @return: The calculated function value in (B{C{x}},B{C{y}}). I{(float)} 13765 """ 13766 return None
13767
13768 - def fit(fitter, points, n, params, fixed_param, rss):
13769 """ 13770 Performs a non-linear least-squares fit with a 3D geometrical shape fitter. 13771 13772 If you pass B{C{None}} B{C{fitter}} the function creates one for you and immediately performs the fit. If you want to modify 13773 the fitter settings beforehand or set callback functions create it using L{ShapeFitPreset.create_fitter}() and 13774 pass to this function. The fitter must be created for the same preset. 13775 13776 Additional quantities such as parameter errors or the correlation matrix can be obtained from the fitter. See 13777 L{gwy_math_nlfit_fit_full}() for details. 13778 13779 @since: 2.47 13780 13781 @param fitter: A Marquardt-Levenberg nonlinear fitter already initialized for B{C{preset}}'s function, or B{C{None}}. I{(MathNLFit*)} 13782 @param points: Array of B{C{n}} XYZ data defining the lateral coordinates and values to fit. I{(const-XYZ*)} 13783 @param n: Number of items in B{C{points}}. I{(int)} 13784 @param params: Fitting parameters filled with initial estimates (the fitting starts from the provided values). I{(gdouble*)} 13785 @param fixed_param: Which parameters should be treated as fixed (set corresponding element to B{C{True}} for them). May be 13786 B{C{None}} if all parameters are free. I{(const-gboolean*)} 13787 @param rss: Location to store the residual sum of squares, as returned by L{gwy_math_nlfit_fit_idx}(), may be B{C{None}}. I{(gdouble*)} 13788 @return: Either B{C{fitter}} itself, or a newly created fitter if it was B{C{None}}. I{(MathNLFit*)} 13789 """ 13790 return None
13791 13792
13793 -class Spectra:
13794 """ 13795 Collection of dataline representing point spectra. 13796 13797 13798 B{C{Spectra}} contains an array of B{C{DataLines}} and coordinates 13799 representing where in a data field the spectrum was acquired. 13800 13801 """
13802 - def __init__():
13803 """ 13804 Creates a new Spectra object containing zero spectra. 13805 13806 @since: 2.7 13807 13808 @return: A newly created spectra. I{(L{Spectra})} 13809 """ 13810 return None
13811
13812 - def new_alike():
13813 """ 13814 Creates a new Spectra object similar to an existing one, but containing zero 13815 spectra. 13816 13817 Use L{Spectra.duplicate}() if you want to copy a spectra object including 13818 the spectra in it. 13819 13820 @since: 2.7 13821 13822 @return: A newly created Spectra object. I{(L{Spectra})} 13823 """ 13824 return None
13825
13826 - def data_changed():
13827 """ 13828 Emits signal "data_changed" on a spectra object. 13829 13830 @since: 2.7 13831 13832 """ 13833 pass
13834
13835 - def get_si_unit_xy():
13836 """ 13837 Gets SI unit used for the location co-ordinates of spectra. 13838 13839 @since: 2.7 13840 13841 @return: SI unit corresponding to the the location co-ordinates of spectra 13842 object. Its reference count is not incremented. I{(L{SIUnit})} 13843 """ 13844 return None
13845
13846 - def set_si_unit_xy(si_unit):
13847 """ 13848 Sets the SI unit corresponding to the location co-ordinates of the spectra 13849 object. 13850 13851 It does not assume a reference on B{C{si_unit}}, instead it adds its own 13852 reference. 13853 13854 @since: 2.7 13855 13856 @param si_unit: SI unit to be set. I{(L{SIUnit})} 13857 """ 13858 pass
13859
13860 - def itoxy(i):
13861 """ 13862 Gets the coordinates of one spectrum. 13863 13864 @since: 2.7 13865 13866 @param i: Index of a spectrum. I{(int)} 13867 @return: Tuple consisting of 2 values (B{C{x}}, B{C{y}}). (I{(float)}, I{(float)}) 13868 """ 13869 return None, None
13870
13871 - def xytoi(x, y):
13872 """ 13873 Finds the index of the spectrum closest to the location specified by 13874 the coordinates x and y. 13875 13876 @since: 2.7 13877 13878 @param x: The x coordinate of the location of the spectrum. I{(float)} 13879 @param y: The y coordinate of the location of the spectrum. I{(float)} 13880 @return: The index of the nearest spectrum. If there are no curves in the 13881 spectra, -1 is returned. I{(int)} 13882 """ 13883 return None
13884
13885 - def setpos(i, x, y):
13886 """ 13887 Sets the location coordinates of a spectrum. 13888 13889 @since: 2.7 13890 13891 @param i: The index of a spectrum. I{(int)} 13892 @param x: The new x coordinate of the location of the spectrum. I{(float)} 13893 @param y: The new y coordinate of the location of the spectrum. I{(float)} 13894 """ 13895 pass
13896
13897 - def get_n_spectra():
13898 """ 13899 Gets the number of spectra in a spectra object. 13900 13901 @since: 2.7 13902 13903 @return: The number of spectra. I{(int)} 13904 """ 13905 return None
13906
13907 - def get_spectrum(i):
13908 """ 13909 Gets a dataline that contains the spectrum at index i. 13910 13911 @since: 2.7 13912 13913 @param i: Index of a spectrum I{(int)} 13914 @return: A B{C{DataLine}} containing the spectrum, owned by B{C{spectra}}. I{(L{DataLine})} 13915 """ 13916 return None
13917
13918 - def set_spectrum(i, new_spectrum):
13919 """ 13920 Replaces the ith spectrum in the spectra object with a the 13921 supplied spectrum, new_spectrum. It takes its own reference 13922 to the New_Spectrum dataline. 13923 13924 @since: 2.7 13925 13926 @param i: Index of a spectrum to replace I{(int)} 13927 @param new_spectrum: A B{C{DataLine}} Object containing the new spectrum. I{(L{DataLine})} 13928 """ 13929 pass
13930
13931 - def set_spectrum_selected(i, selected):
13932 """ 13933 Sets selected state of a spectrum in a spectra object. 13934 13935 @since: 2.7 13936 13937 @param i: Index of a spectrum. I{(int)} 13938 @param selected: B{C{True}} to make the spectrum selected, B{C{False}} to deselect it. I{(bool)} 13939 """ 13940 pass
13941
13942 - def get_spectrum_selected(i):
13943 """ 13944 Gets the selected state of a spectrum in a spectra object. 13945 13946 @since: 2.7 13947 13948 @param i: Index of a spectrum. I{(int)} 13949 @return: B{C{True}} if spectrum is selected. I{(bool)} 13950 """ 13951 return None
13952
13953 - def add_spectrum(new_spectrum, x, y):
13954 """ 13955 Appends a new_spectrum to the spectra collection with a position of x, y. 13956 L{Spectra.add} takes a refference to the supplied spectrum. 13957 13958 @since: 2.7 13959 13960 @param new_spectrum: A DataLine containing the spectrum to append. I{(L{DataLine})} 13961 @param x: The physical x coordinate of the location of the spectrum. I{(float)} 13962 @param y: The physical y coordinate of the location of the spectrum. I{(float)} 13963 """ 13964 pass
13965
13966 - def remove_spectrum(i):
13967 """ 13968 Removes the ith spectrum from the Spectra collection. The subsequent 13969 spectra are moved down one place. 13970 13971 @since: 2.7 13972 13973 @param i: Index of spectrum to remove. I{(int)} 13974 """ 13975 pass
13976
13977 - def get_title():
13978 """ 13979 Gets the title of spectra. 13980 13981 @since: 2.7 13982 13983 @return: A pointer to the title string (owned by the spectra object). I{(string)} 13984 """ 13985 return None
13986
13987 - def set_title(title):
13988 """ 13989 Sets the title of the spectra collection. 13990 13991 @since: 2.7 13992 13993 @param title: The new title string. I{(string)} 13994 """ 13995 pass
13996
13997 - def get_spectrum_x_label():
13998 """ 13999 Gets the spectrum abscissa label of a spectra object. 14000 14001 @since: 2.40 14002 14003 @return: The abscissa label. The string is owned by B{C{spectra}} and must not 14004 be modified nor freed. I{(string)} 14005 """ 14006 return None
14007
14008 - def set_spectrum_x_label(label):
14009 """ 14010 Sets the spectrum abscissa label of a spectra object. 14011 14012 @since: 2.40 14013 14014 @param label: New abscissa label. I{(string)} 14015 """ 14016 pass
14017
14018 - def get_spectrum_y_label():
14019 """ 14020 Gets the spectrum ordinate label of a spectra object. 14021 14022 @since: 2.40 14023 14024 @return: The ordinate label. The string is owned by B{C{spectra}} and must not 14025 be modified nor freed. I{(string)} 14026 """ 14027 return None
14028
14029 - def set_spectrum_y_label(label):
14030 """ 14031 Sets the spectrum ordinate label of a spectra object. 14032 14033 @since: 2.40 14034 14035 @param label: New ordinate label. I{(string)} 14036 """ 14037 pass
14038
14039 - def clear():
14040 """ 14041 Removes all spectra from the collection. 14042 14043 @since: 2.7 14044 14045 """ 14046 pass
14047
14048 - def find_nearest(x, y, n):
14049 """ 14050 Gets the list of the indices to spectra ordered by their distance from a 14051 given point. 14052 14053 List positions 14054 14055 @since: 2.7 14056 14057 @param x: Point x-coordinate. I{(float)} 14058 @param y: Point y-coordinate. I{(float)} 14059 @param n: Number of indices to find. Array B{C{ilist}} must have at least this 14060 number of items. I{(int)} 14061 @return: I{(list)} 14062 """ 14063 return None
14064
14065 - def duplicate():
14066 """ 14067 Convenience macro doing L{gwy_serializable_duplicate}() with all the necessary 14068 typecasting. 14069 14070 @since: 2.7 14071 14072 @return: I{(L{Spectra})} 14073 """ 14074 return None
14075 14076
14077 -class Statusbar:
14078 - def __init__():
14079 """ 14080 Creates a new Gwyddion statusbar. 14081 14082 Gwyddion statusbar differs from B{C{GtkStatusbar}} only in one thing: the 14083 messages can contain Pango markup. 14084 14085 14086 @return: The newly created statusbar, as a B{C{GtkWidget}}. I{(L{gtk.Widget})} 14087 """ 14088 return None
14089
14090 - def set_markup(markup):
14091 """ 14092 Sets the text to display in a status bar. 14093 14094 This method is intended for simple status bars that do not have stacks and 14095 do not need contexts. It does not mix with gtk_statusbar_push(). You can 14096 use either this simple interface or the full stacks-and-contexts API with 14097 B{C{Statusbar}}, but not both in the same status bar. 14098 14099 @param markup: Text message to display in the statusbar. It can contain Pango 14100 markup. I{(string)} 14101 """ 14102 pass
14103 14104
14105 -class StringList:
14106 """ 14107 A string list object wrapper 14108 14109 14110 B{C{StringList}} object represents a reference-counted, serializable list of 14111 strings. The current interface is very minimal, more methods may be added 14112 later as needed. 14113 14114 """
14115 - def __init__():
14116 """ 14117 Creates a new string list. 14118 14119 14120 @return: A new empty string list. I{(L{StringList})} 14121 """ 14122 return None
14123
14124 - def append(string):
14125 """ 14126 Appends a string to the end of a string list. 14127 14128 @param string: A string to add. I{(string)} 14129 """ 14130 pass
14131
14132 - def append_take(string):
14133 """ 14134 Appends a string to the end of a string list, taking ownership of the string. 14135 14136 @since: 2.35 14137 14138 @param string: A string to add. I{(string)} 14139 """ 14140 pass
14141
14142 - def get_length():
14143 """ 14144 Gets the number of strings in a string list. 14145 14146 14147 @return: The number of strings in B{C{strlist}}. I{(int)} 14148 """ 14149 return None
14150
14151 - def get(i):
14152 """ 14153 Gets a string from a string list by position. 14154 14155 14156 @param i: The position of string to get. I{(int)} 14157 @return: The string, owned by B{C{strlist}}. It is valid only until B{C{strlist}} 14158 changes. I{(string)} 14159 """ 14160 return None
14161
14162 - def clear():
14163 """ 14164 Clears the contents of a string list, removing all strings. 14165 14166 @since: 2.35 14167 14168 """ 14169 pass
14170
14171 - def duplicate():
14172 """ 14173 Convenience macro doing L{gwy_serializable_duplicate}() with all the necessary 14174 typecasting. 14175 14176 @return: I{(L{StringList})} 14177 """ 14178 return None
14179 14180
14181 -class Surface:
14182 """ 14183 General two-dimensional data 14184 14185 14186 B{C{Surface}} represents general, i.e. possibly unevenly spaced, two-dimensional data, also called XYZ data. 14187 14188 Surface points are stored in a flat array B{C{Surface}}-struct.data of B{C{XYZ}} values. 14189 14190 Unlike B{C{DataField}}, a surface can also be empty, i.e. contain zero points. 14191 14192 """
14193 - def __init__():
14194 """ 14195 Creates a new empty surface. 14196 14197 The surface will not contain any points. This parameterless constructor exists mainly for language bindings, 14198 L{Surface.new_from_data}() is usually more useful. 14199 14200 @since: 2.45 14201 14202 @return: A new empty surface. I{(L{Surface})} 14203 """ 14204 return None
14205
14206 - def new_alike():
14207 """ 14208 Creates a new empty surface similar to another surface. 14209 14210 The units of the new surface will be identical to those of B{C{model}} but the new surface will not contain any points. 14211 Use L{Surface.duplicate}() to completely duplicate a surface including data. 14212 14213 @since: 2.45 14214 14215 @return: A new empty surface. I{(L{Surface})} 14216 """ 14217 return None
14218
14219 - def new_part(xfrom, xto, yfrom, yto):
14220 """ 14221 Creates a new surface as a part of another surface. 14222 14223 The new surface consits of data with lateral coordinates within the specified ranges (inclusively). It may be 14224 empty. 14225 14226 Data are physically copied, i.e. changing the new surface data does not change B{C{surface}}'s data and vice versa. 14227 14228 @since: 2.45 14229 14230 @param xfrom: Minimum x-coordinate value. I{(float)} 14231 @param xto: Maximum x-coordinate value. I{(float)} 14232 @param yfrom: Minimum y-coordinate value. I{(float)} 14233 @param yto: Maximum y-coordinate value. I{(float)} 14234 @return: A new surface. I{(L{Surface})} 14235 """ 14236 return None
14237
14238 - def get_data():
14239 """ 14240 Gets the raw XYZ data array of a surface. 14241 14242 The returned buffer is not guaranteed to be valid through whole data surface life time. 14243 14244 This function invalidates any cached information, use L{Surface.get_data_const}() if you are not going to change 14245 the data. 14246 14247 See L{Surface.invalidate}() for some discussion. 14248 14249 @since: 2.45 14250 14251 @return: The surface XYZ data as a pointer to an array of L{Surface.get_npoints}() items. I{(L{XYZ})} 14252 """ 14253 return None
14254
14255 - def get_npoints():
14256 """ 14257 Gets the number of points in an XYZ surface. 14258 14259 @since: 2.45 14260 14261 @return: The number of points. I{(int)} 14262 """ 14263 return None
14264
14265 - def data_changed():
14266 """ 14267 Emits signal Surface::data-changed on a surface. 14268 14269 @since: 2.45 14270 14271 """ 14272 pass
14273
14274 - def copy(dest):
14275 """ 14276 Copies the data of a surface to another surface of the same dimensions. 14277 14278 Only the data points are copied. To make a surface completely identical to another, including units and change of 14279 dimensions, you can use L{Surface.clone}(). 14280 14281 @since: 2.45 14282 14283 @param dest: Destination surface. I{(L{Surface})} 14284 """ 14285 pass
14286
14287 - def invalidate():
14288 """ 14289 Invalidates cached surface statistics. 14290 14291 Cached statistics include ranges returned by L{Surface.get_xrange}(), L{Surface.get_yrange}() and 14292 L{Surface.get_min_max}(), the fingerprint for L{Surface.xy_is_compatible}() and and possibly other 14293 characteristics in the future. 14294 14295 See L{DataField.invalidate}() for discussion of invalidation and examples. 14296 14297 @since: 2.45 14298 14299 """ 14300 pass
14301
14302 - def set_from_data_field(data_field):
14303 """ 14304 Fills the data of a surface from a data field. 14305 14306 The number of points in the new surface will be equal to the number of points in the field. Lateral coordinates 14307 will be equal to the corresponding B{C{data_field}} coordinates; values will be created in regular grid according to 14308 B{C{data_field}}'s physical size and offset. 14309 14310 Lateral and value units will correspond to B{C{data_field}}'s units. This means the field needs to have identical B{C{x}} 14311 and B{C{y}} units. 14312 14313 @since: 2.45 14314 14315 @param data_field: A two-dimensional data field. I{(L{DataField})} 14316 """ 14317 pass
14318
14319 - def set_from_data_field_mask(data_field, mask, masking):
14320 """ 14321 Fills the data of a surface from a data field, possibly using masking. 14322 14323 @since: 2.46 14324 14325 @param data_field: A two-dimensional data field. I{(L{DataField})} 14326 @param mask: Mask of pixels to include from/exclude, or B{C{None}} I{(L{DataField})} 14327 @param masking: Masking mode to use. Expected values: C{B{MASK_EXCLUDE}}, C{B{MASK_INCLUDE}}, C{B{MASK_IGNORE}}. I{(L{MaskingType})} 14328 """ 14329 pass
14330
14331 - def get_si_unit_xy():
14332 """ 14333 Returns lateral SI unit of a surface. 14334 14335 @since: 2.45 14336 14337 @return: SI unit corresponding to the lateral (XY) dimensions of the surface. Its reference count is not 14338 incremented. I{(L{SIUnit})} 14339 """ 14340 return None
14341
14342 - def get_si_unit_z():
14343 """ 14344 Returns value SI unit of a surface. 14345 14346 @since: 2.45 14347 14348 @return: SI unit corresponding to the "height" (Z) dimension of the surface. Its reference count is not 14349 incremented. I{(L{SIUnit})} 14350 """ 14351 return None
14352
14353 - def set_si_unit_xy(si_unit):
14354 """ 14355 Sets the SI unit corresponding to the lateral (XY) dimensions of a surface. 14356 14357 It does not assume a reference on B{C{si_unit}}, instead it adds its own reference. 14358 14359 @since: 2.45 14360 14361 @param si_unit: SI unit to be set. I{(L{SIUnit})} 14362 """ 14363 pass
14364
14365 - def set_si_unit_z(si_unit):
14366 """ 14367 Sets the SI unit corresponding to the "height" (Z) dimension of a surface. 14368 14369 It does not assume a reference on B{C{si_unit}}, instead it adds its own reference. 14370 14371 @since: 2.45 14372 14373 @param si_unit: SI unit to be set. I{(L{SIUnit})} 14374 """ 14375 pass
14376
14377 - def get_value_format_xy(style):
14378 """ 14379 Finds value format good for displaying coordinates of a surface. 14380 14381 @since: 2.45 14382 14383 @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}}, C{B{SI_UNIT_FORMAT_VFTEX}}, C{B{SI_UNIT_FORMAT_UNICODE}}, C{B{SI_UNIT_FORMAT_VFUNICODE}}. I{(L{SIUnitFormatStyle})} 14384 @return: Tuple consisting of 2 values (B{C{value}}, B{C{format}}). (I{(L{SIValueFormat})}, I{(SkipArg)}) 14385 """ 14386 return None, None
14387
14388 - def get_value_format_z(style):
14389 """ 14390 Finds value format good for displaying values of a surface. 14391 14392 @since: 2.45 14393 14394 @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}}, C{B{SI_UNIT_FORMAT_VFTEX}}, C{B{SI_UNIT_FORMAT_UNICODE}}, C{B{SI_UNIT_FORMAT_VFUNICODE}}. I{(L{SIUnitFormatStyle})} 14395 @return: Tuple consisting of 2 values (B{C{value}}, B{C{format}}). (I{(L{SIValueFormat})}, I{(SkipArg)}) 14396 """ 14397 return None, None
14398
14399 - def copy_units(target):
14400 """ 14401 Sets lateral and value units of a surface to match another surface. 14402 14403 @since: 2.49 14404 14405 @param target: Target surface. I{(L{Surface})} 14406 """ 14407 pass
14408
14409 - def copy_units_to_data_field(data_field):
14410 """ 14411 Sets lateral and value units of a data field to match a surface. 14412 14413 @since: 2.46 14414 14415 @param data_field: A two-dimensional data field. I{(L{DataField})} 14416 """ 14417 pass
14418
14419 - def get(pos):
14420 """ 14421 Obtains a single surface point. 14422 14423 This function exists I{only for language bindings} as it is very slow compared to simply 14424 accessing B{C{data}} in B{C{Surface}} directly in C. 14425 14426 @since: 2.45 14427 14428 @param pos: Position in B{C{surface}}. I{(int)} 14429 @return: The point at B{C{pos}}. I{(XYZ)} 14430 """ 14431 return None
14432
14433 - def get_xrange():
14434 """ 14435 Gets the range of X coordinates of a surface. 14436 14437 This information is cached. 14438 14439 @since: 2.45 14440 14441 @return: Tuple consisting of 2 values (B{C{min}}, B{C{max}}). (I{(float)}, I{(float)}) 14442 """ 14443 return None, None
14444
14445 - def get_yrange():
14446 """ 14447 Gets the range of Y coordinates of a surface. 14448 14449 This information is cached. 14450 14451 @since: 2.45 14452 14453 @return: Tuple consisting of 2 values (B{C{min}}, B{C{max}}). (I{(float)}, I{(float)}) 14454 """ 14455 return None, None
14456
14457 - def get_min_max():
14458 """ 14459 Gets the range of Z values of a surface. 14460 14461 This information is cached. 14462 14463 @since: 2.45 14464 14465 @return: Tuple consisting of 2 values (B{C{min}}, B{C{max}}). (I{(float)}, I{(float)}) 14466 """ 14467 return None, None
14468
14469 - def set_data_full(points, n):
14470 """ 14471 Puts back values from a flat array to an entire data surface. 14472 14473 If you do not have an array of B{C{XYZ}} and want to fill the data sequentially, use L{Surface.resize}() and 14474 L{Surface.get_data}(). 14475 14476 See L{Surface.get_data_full}() for a discussion. 14477 14478 @since: 2.45 14479 14480 @param points: Data points to copy to the surface. They replace whatever points are in B{C{surface}} now. I{(const-XYZ*)} 14481 @param n: The number of points in B{C{data}}. I{(int)} 14482 """ 14483 pass
14484
14485 - def xy_is_compatible(othersurface):
14486 """ 14487 Checks whether the XY positions of two surfaces are compatible. 14488 14489 Compatible XY positions mean the XY units are the same and the points are the same. Two surfaces that have the 14490 same set of XY points but in different orders are I{not} considered compatible. This is because 14491 the points at the same index in B{C{data}} are different and thus calculations involving data from the two surfaces are 14492 impossible. It is necessary to match the points order in the two surfaces to make this possible. 14493 14494 This information is cached. 14495 14496 @since: 2.45 14497 14498 @param othersurface: Another surface. I{(L{Surface})} 14499 @return: B{C{True}} if the surfaces are XY-position compatible, B{C{False}} if they are not. I{(bool)} 14500 """ 14501 return None
14502
14503 - def reduce_points(npoints):
14504 """ 14505 Creates a similar surface with smaller number of points. 14506 14507 The functions attempts to choose points from the original surface to cover its full area, even though points from 14508 dense regions are still more likely to be found in the result than points from sparse regions. As the main purpose 14509 to enable quick rough operations that may take long time with the full surface, the focus is on speed not fidelity. 14510 14511 The function may employ random selection and thus be be non-deterministic. 14512 14513 @since: 2.48 14514 14515 @param npoints: Requested number of points in the reduced surface. If it is not smaller than the number of points in 14516 B{C{surface}} then the function behaves like L{Surface.duplicate}(). I{(int)} 14517 @return: A newly created B{C{Surface}} with reduced number of points. I{(L{Surface})} 14518 """ 14519 return None
14520
14521 - def resize(npoints):
14522 """ 14523 Changes the number of points in a surface. 14524 14525 If the number of points decreases then the first B{C{npoints}} points will be kept. If the number of points increases 14526 the new points will be uninitialised. Although usually you would overwrite all the points after using this 14527 function. 14528 14529 Use L{Surface.set_data_full}() if you already have an array of B{C{XYZ}} to fill the surface data with. 14530 14531 @since: 2.61 14532 14533 @param npoints: New number of points in the surface. I{(int)} 14534 """ 14535 pass
14536
14537 - def set(pos, point):
14538 """ 14539 Sets a single surface value. 14540 14541 This function exists I{only for language bindings} as it is very slow compared to simply 14542 accessing B{C{data}} in B{C{Surface}} directly in C. 14543 14544 @since: 2.45 14545 14546 @param pos: Position in B{C{surface}}. I{(int)} 14547 @param point: Point to store at given position. I{(const-XYZ*)} 14548 """ 14549 pass
14550
14551 - def duplicate():
14552 """ 14553 Duplicates a surface. 14554 14555 This is a convenience wrapper of L{gwy_serializable_duplicate}(). 14556 14557 @since: 2.45 14558 14559 @return: I{(L{Surface})} 14560 """ 14561 return None
14562 14563
14564 -class VRuler:
14565 - def __init__():
14566 """ 14567 Creates a new B{C{VRuler}}. 14568 14569 14570 @return: The new ruler as a B{C{GtkWidget}}. I{(L{gtk.Widget})} 14571 """ 14572 return None
14573 14574
14575 -class VectorLayer:
14576 - def set_selection_key(key):
14577 """ 14578 Sets the selection object to use by a vector layer. 14579 14580 @param key: Container string key identifying the selection object. I{(string)} 14581 """ 14582 pass
14583
14584 - def get_selection_key():
14585 """ 14586 Gets the key identifying selection this vector layer displays. 14587 14588 14589 @return: The string key, or B{C{None}} if it isn't set. I{(string)} 14590 """ 14591 return None
14592
14593 - def ensure_selection():
14594 """ 14595 Ensures a vector layer's selection exist in data container. 14596 14597 This method can be called only when layer is plugged into a data view and it 14598 has a selection key set. If the data container contains a selection under 14599 the specified key the selection is returned. If there is none, 14600 a selection of appropriate type is created and put to the container first. 14601 14602 Provided the above conditions are met this method is suitable for just 14603 obtaining the selection object a vector layer uses too. 14604 14605 14606 @return: The layer's selection (no reference is added). I{(L{Selection})} 14607 """ 14608 return None
14609
14610 - def get_focus():
14611 """ 14612 Gets focused object index. 14613 14614 14615 @return: Focued object index, or -1 if no object is focused. I{(int)} 14616 """ 14617 return None
14618
14619 - def set_focus(focus):
14620 """ 14621 Focues on one selection object. 14622 14623 When a selection object is focused, it becomes the only one user can 14624 interact with. More precisely, "object-chosen" signal is emitted only 14625 for this object, and if the layer is editable only this object can be 14626 modified by the user. 14627 14628 14629 @param focus: Index of object to focus on, use -1 to unfocus (allow interaction 14630 with any object). I{(int)} 14631 @return: B{C{True}} if the object was focused, B{C{False}} on failure. Failure can 14632 be caused by user currently moving another object, wrong object 14633 index, or the feature being unimplemented in B{C{layer}}. I{(bool)} 14634 """ 14635 return None
14636
14637 - def get_editable():
14638 """ 14639 Gets editability of a vector layer. 14640 14641 14642 @return: B{C{True}} if layer is edtiable, B{C{False}} if it is not editable. I{(bool)} 14643 """ 14644 return None
14645
14646 - def set_editable(editable):
14647 """ 14648 Sets a vector layer editability. 14649 14650 It is an error to attempt to set a layer non-editabile while it is being 14651 edited. 14652 14653 When a layer is set noneditable, the user cannot change the selection. 14654 However, "object-chosen" signal is still emitted. 14655 14656 @param editable: B{C{True}} to set layer editable, B{C{False}} to set it noneditable. I{(bool)} 14657 """ 14658 pass
14659
14660 - def draw(drawable, target):
14661 """ 14662 Draws B{C{layer}} on given drawable (which should be a B{C{DataView}} window). 14663 14664 @param drawable: A drawable to draw on. I{(L{gdk.Drawable})} 14665 @param target: Rendering target. Expected values: C{B{RENDERING_TARGET_SCREEN}}, C{B{RENDERING_TARGET_PIXMAP_IMAGE}}. I{(L{RenderingTarget})} 14666 """ 14667 pass
14668
14669 - def object_chosen(id):
14670 """ 14671 Emits "object-chosen" signal on a vector layer. 14672 14673 This function is primarily intended for layer implementations. 14674 14675 @param id: Index of the chosen object. I{(int)} 14676 """ 14677 pass
14678
14679 - def get_selection_type():
14680 """ 14681 Gets the selection type of a vector layer. 14682 14683 This is a convenience wrapper around 14684 L{VectorLayer.class_get_selection_type}(). 14685 14686 @return: I{(GType)} 14687 """ 14688 return None
14689 14690
14691 -class XY:
14692 """ 14693 Representation of Cartesian coordinates in plane. 14694 14695 @since: 2.45 14696 14697 """
14698 - def __init__(x, y):
14699 """ 14700 Creates Cartesian coordinates in plane. 14701 14702 This is mostly useful for language bindings. 14703 14704 @since: 2.47 14705 14706 @param x: X-coordinate. I{(float)} 14707 @param y: Y-coordinate. I{(float)} 14708 @return: New XY structure. The result must be freed using L{XY.free}(), not g_free(). I{(L{XY})} 14709 """ 14710 return None
14711
14712 - def copy():
14713 """ 14714 Copies Cartesian coordinates in plane. 14715 14716 @since: 2.45 14717 14718 @return: A copy of B{C{xy}}. The result must be freed using L{XY.free}(), not g_free(). I{(L{XY})} 14719 """ 14720 return None
14721
14722 - def free():
14723 """ 14724 Frees Cartesian coordinates in plane created with L{XY.copy}(). 14725 14726 @since: 2.45 14727 14728 """ 14729 pass
14730 14731
14732 -class XYZ:
14733 """ 14734 Representation of Cartesian coordinates in space. 14735 14736 @since: 2.45 14737 14738 """
14739 - def __init__(x, y, z):
14740 """ 14741 Creates Cartesian coordinates in space. 14742 14743 This is mostly useful for language bindings. 14744 14745 @since: 2.47 14746 14747 @param x: X-coordinate. I{(float)} 14748 @param y: Y-coordinate. I{(float)} 14749 @param z: Z-coordinate. I{(float)} 14750 @return: New XYZ structure. The result must be freed using L{XY.free}(), not g_free(). I{(L{XYZ})} 14751 """ 14752 return None
14753
14754 - def copy():
14755 """ 14756 Copies Cartesian coordinates in space. 14757 14758 @since: 2.45 14759 14760 @return: A copy of B{C{xyz}}. The result must be freed using L{XY.free}(), not g_free(). I{(L{XYZ})} 14761 """ 14762 return None
14763
14764 - def free():
14765 """ 14766 Frees Cartesian coordinates in space created with L{XY.copy}(). 14767 14768 @since: 2.45 14769 14770 """ 14771 pass
14772 14773
14774 -class RGBA:
14775 """ 14776 Bit depth independet RGBA colors 14777 14778 14779 B{C{RGBA}} is a bit depth independent representation of an RGB or RGBA color, 14780 using floating point values from the [0,1] interval. 14781 14782 B{C{RGBA}} is not an object, but a simple struct that can be allocated on 14783 stack on created with g_new() or malloc(). Helper functions for conversion 14784 between B{C{RGBA}} and B{C{GdkColor}} (L{RGBA.to_gdk_color}(), 14785 L{RGBA.from_gdk_color}()) and for B{C{Container}} storage by component 14786 (L{RGBA.store_to_container}(), L{RGBA.get_from_container}()) are provided. 14787 14788 """
14789 - def __init__(r, g, b, a):
14790 """ 14791 Creates RGBA colour specification. 14792 14793 This is mostly useful for language bindings. 14794 14795 @since: 2.47 14796 14797 @param r: The red component. I{(float)} 14798 @param g: The green component. I{(float)} 14799 @param b: The blue component. I{(float)} 14800 @param a: The alpha (opacity) value. I{(float)} 14801 @return: New RGBA colour structure. The result must be freed with 14802 L{RGBA.free}(), not g_free(). I{(L{RGBA})} 14803 """ 14804 return None
14805
14806 - def copy():
14807 """ 14808 Makes a copy of a rgba structure. The result must be freed using 14809 L{RGBA.free}(). 14810 14811 14812 @return: A copy of B{C{rgba}}. I{(L{RGBA})} 14813 """ 14814 return None
14815
14816 - def free():
14817 """ 14818 Frees an rgba structure created with L{RGBA.copy}(). 14819 14820 """ 14821 pass
14822
14823 - def to_gdk_alpha():
14824 """ 14825 Converts a rgba to a Gdk opacity value. 14826 14827 14828 @return: The opacity value as a 16bit integer. I{(guint16)} 14829 """ 14830 return None
14831
14832 - def interpolate(src2, x, rgba):
14833 """ 14834 Linearly interpolates two colors, including alpha blending. 14835 14836 Correct blending of two not fully opaque colors is tricky. Always use 14837 this function, not simple independent interpolation of r, g, b, and a. 14838 14839 @param src2: Color at point B{C{x}} = 1.0. I{(const-RGBA*)} 14840 @param x: Point in interval 0..1 to take color from. I{(float)} 14841 @param rgba: A B{C{RGBA}} to store the result to. I{(L{RGBA})} 14842 """ 14843 pass
14844
14845 - def get_from_container(container, prefix):
14846 """ 14847 Gets RGBA color components from a container. 14848 14849 This is a convenience function to get the components in the common 14850 arrangement. 14851 14852 14853 @param container: A B{C{Container}} to get the color components from. I{(L{Container})} 14854 @param prefix: Prefix in B{C{container}}, e.g. "/0/mask" (it would try to fetch 14855 "/0/mask/red", "/0/mask/green", etc. then). I{(string)} 14856 @return: Whether all B{C{rgba}} components were successfully found and set. I{(bool)} 14857 """ 14858 return None
14859
14860 - def store_to_container(container, prefix):
14861 """ 14862 Stores RGBA color components to a container. 14863 14864 This is a convenience function to store the components in the common 14865 arrangement. 14866 14867 @param container: A B{C{Container}} to store the color components to. I{(L{Container})} 14868 @param prefix: Prefix in B{C{container}}, e.g. "/0/mask" (it will store 14869 "/0/mask/red", "/0/mask/green", etc. then). I{(string)} 14870 """ 14871 pass
14872
14873 - def set_gdk_gc_fg(gc):
14874 """ 14875 Sets foreground color of a Gdk graphics context from a RGBA color. 14876 14877 This is a convenience wrapper around gdk_gc_set_rgb_fg_color(), see its 14878 documentation for details and caveats. 14879 14880 @param gc: A Gdk graphics context to set forgeground color of. I{(L{gdk.GC})} 14881 """ 14882 pass
14883
14884 - def set_gdk_gc_bg(gc):
14885 """ 14886 Sets foreground color of a Gdk graphics context from a RGBA color. 14887 14888 This is a convenience wrapper around gdk_gc_set_rgb_bg_color(), see its 14889 documentation for details and caveats. 14890 14891 @param gc: A Gdk graphics context to set forgeground color of. I{(L{gdk.GC})} 14892 """ 14893 pass
14894
14895 - def to_hex6(hexout):
14896 """ 14897 Formats the R, G and B components of a RGBA color to hexadecimal string. 14898 14899 The component order is R, G and B. The output has always exactly 6 bytes 14900 and does not include any "#" prefix which is used in some contexts. 14901 14902 @since: 2.32 14903 14904 @param hexout: Buffer at least seven character long where the hexadecimal 14905 representation (e.g. "ff0000" for red) will be stored. I{(string)} 14906 """ 14907 pass
14908
14909 - def to_hex8(hexout):
14910 """ 14911 Formats all components of a RGBA color to hexadecimal string. 14912 14913 The component order is A, R, G and B. Note that while this order is a 14914 common it is by no means universal. The output has always exactly 8 bytes 14915 and does not include any "#" prefix which is used in some contexts. 14916 14917 @since: 2.32 14918 14919 @param hexout: Buffer at least nine character long where the hexadecimal 14920 representation (e.g. "ffff0000" for opaque red) will be stored. I{(string)} 14921 """ 14922 pass
14923
14924 - def to_pixbuf_pixel():
14925 """ 14926 Converts a RGBA color to pixbuf pixel. 14927 14928 The returned pixel value includes opacity. If B{C{rgba}} is partially 14929 transparent, so is the pixel. 14930 14931 @since: 2.49 14932 14933 @return: The pixel value as a 32-bit integer. I{(guint32)} 14934 """ 14935 return None
14936
14937 - def from_pixbuf_pixel(pixel):
14938 """ 14939 Converts a pixbuf pixel value to a RGBA color. 14940 14941 The conversion includes opacity. If the opacity channel is undefined or 14942 should be ignored, you need to either set the lowest byte of B{C{pixel}} to 0xff 14943 or fix B{C{rgba}} afterwards. 14944 14945 @since: 2.49 14946 14947 @param pixel: Pixbuf pixel value as a 32-bit integer. I{(guint32)} 14948 """ 14949 pass
14950 14951
14952 -class AppDataId:
14953 """ 14954 Auxiliary structure representing one data item in an open file. 14955 14956 The data container number can be obtained with L{gwy_app_data_browser_get}() and used to look up the container with 14957 L{gwy_app_data_browser_get_number}(). 14958 14959 @since: 2.41 14960 14961 """
14962 - def __init__(datano, id):
14963 """ 14964 Creates a new data identifier on heap. 14965 14966 This is mostly useful for language bindings. 14967 14968 @since: 2.47 14969 14970 @param datano: Numeric identifier of data container. Zero is used for none. I{(int)} 14971 @param id: Numeric identifier of a specific data item, such as channel or graph number. Value -1 is used for none. I{(int)} 14972 @return: Newly allocated data id. It must be freed with L{AppDataId.free}(). I{(L{AppDataId})} 14973 """ 14974 return None
14975
14976 - def copy():
14977 """ 14978 Creates a copy of data identifier. 14979 14980 This is mostly useful for language bindings. 14981 14982 @since: 2.47 14983 14984 @return: Newly allocated data id. It must be freed with L{AppDataId.free}(). I{(L{AppDataId})} 14985 """ 14986 return None
14987
14988 - def free():
14989 """ 14990 Frees a data identifier. 14991 14992 This is mostly useful for language bindings. 14993 14994 @since: 2.47 14995 14996 """ 14997 pass
14998
14999 - def verify_channel():
15000 """ 15001 Checks if numerical channel identifiers correspond to an existing channel. 15002 15003 If either the data contained referenced in B{C{id}} or the channel does not exist the structure is cleared to 15004 B{C{APP_DATA_ID_NONE}} and the function returns B{C{False}}. If it represents an existing channel it is kept intact and 15005 the function returns B{C{True}}. 15006 15007 @since: 2.41 15008 15009 @return: Whether B{C{id}} refers to an existing channel now. I{(bool)} 15010 """ 15011 return None
15012
15013 - def verify_graph():
15014 """ 15015 Checks if numerical graph identifiers correspond to an existing graph. 15016 15017 If either the data contained referenced in B{C{id}} or the graph model does not exist the structure is cleared to 15018 B{C{APP_DATA_ID_NONE}} and the function returns B{C{False}}. If it represents an existing graph it is kept intact and 15019 the function returns B{C{True}}. 15020 15021 @since: 2.41 15022 15023 @return: Whether B{C{id}} refers to an existing graph now. I{(bool)} 15024 """ 15025 return None
15026
15027 - def verify_volume():
15028 """ 15029 Checks if numerical volume data identifiers correspond to existing volume data. 15030 15031 If either the data contained referenced in B{C{id}} or the volume data does not exist the structure is cleared to 15032 B{C{APP_DATA_ID_NONE}} and the function returns B{C{False}}. If it represents existing volume data it is kept intact and 15033 the function returns B{C{True}}. 15034 15035 @since: 2.41 15036 15037 @return: Whether B{C{id}} refers to existing volume data now. I{(bool)} 15038 """ 15039 return None
15040
15041 - def verify_xyz():
15042 """ 15043 Checks if numerical XYZ data identifiers correspond to existing XYZ data. 15044 15045 If either the data contained referenced in B{C{id}} or the XYZ data does not exist the structure is cleared to 15046 B{C{APP_DATA_ID_NONE}} and the function returns B{C{False}}. If it represents existing XYZ data it is kept intact and 15047 the function returns B{C{True}}. 15048 15049 @since: 2.46 15050 15051 @return: Whether B{C{id}} refers to existing XYZ data now. I{(bool)} 15052 """ 15053 return None
15054
15055 - def verify_curve_map():
15056 """ 15057 Checks if numerical curve map data identifiers correspond to existing curve map data. 15058 15059 If either the data contained referenced in B{C{id}} or the curve map data does not exist the structure is cleared to 15060 B{C{APP_DATA_ID_NONE}} and the function returns B{C{False}}. If it represents existing curve map data it is kept intact 15061 and the function returns B{C{True}}. 15062 15063 @since: 2.46 15064 15065 @return: Whether B{C{id}} refers to existing curve map data now. I{(bool)} 15066 """ 15067 return None
15068
15069 - def verify_spectra():
15070 """ 15071 Checks if numerical spectra identifiers correspond to existing spectra. 15072 15073 If either the data contained referenced in B{C{id}} or the spectra does not exist the structure is cleared to 15074 B{C{APP_DATA_ID_NONE}} and the function returns B{C{False}}. If it represents existing spectra it is kept intact and the 15075 function return B{C{True}}. 15076 15077 @since: 2.41 15078 15079 @return: Whether B{C{id}} refers to existing spectra now. I{(bool)} 15080 """ 15081 return None
15082 15083
15084 -class SIValueFormat:
15085 """ 15086 Physical quantitiy formatting 15087 15088 15089 B{C{SIValueFormat}} object represents instructions how to format numbers 15090 representing physical quantities, including precision and units. They 15091 are usually created based on a B{C{SIUnit}} and some data ranges with 15092 functions such as L{SIUnit.get_format_with_resolution}() or 15093 L{SIUnit.get_format_with_digits}(). Various data objects also offer 15094 method for obtaining value formats representing reasonably their coordinates 15095 or values, for instance L{DataField.get_value_format_xy}(). 15096 15097 """
15098 - def __init__(magnitude, precision, units):
15099 return None
15100
15101 - def copy():
15102 return None
15103
15104 - def free():
15105 pass
15106
15107 - def clone(dest):
15108 return None
15109 15110
15111 -class Peaks:
15112 """ 15113 Graph peak analyser 15114 15115 15116 One B{C{Peaks}} analyser can be used repeatedly to find and characterise peaks in several data sets. 15117 15118 Feed the curve data to the analyser using functions such as L{Peaks.analyze}(), L{Peaks.analyze_dataline}() or 15119 L{Peaks.analyze_xy}(). It will process the data, locate peaks and remember their various characteristics that you 15120 can subsequently obtain using L{Peaks.get_quantity}(). The results are static; if you change the analyser 15121 settings (or the curve data) you need to re-run the analysis function. 15122 15123 """
15124 - def __init__():
15125 """ 15126 Creates a new empty peak analyser. 15127 15128 @since: 2.46 15129 15130 @return: A new peak analyser. I{(L{Peaks})} 15131 """ 15132 return None
15133
15134 - def copy():
15135 """ 15136 Creates a copy of a peak analyser. 15137 15138 This is mostly useful for language bindings. 15139 15140 @since: 2.47 15141 15142 @return: A newly created peak analyser. I{(L{Peaks})} 15143 """ 15144 return None
15145
15146 - def free():
15147 """ 15148 Frees a peak analyser and all associated data. 15149 15150 @since: 2.46 15151 15152 """ 15153 pass
15154
15155 - def set_background(background):
15156 """ 15157 Sets the background type a peak analyser will use. 15158 15159 The default background is B{C{PEAK_BACKGROUND_MMSTEP}}. Note that the new background type will only be used in 15160 future analyses; it does not change the results of the already performed analysis. 15161 15162 @since: 2.46 15163 15164 @param background: Background type to use in future analyses. Expected values: C{B{PEAK_BACKGROUND_ZERO}}, C{B{PEAK_BACKGROUND_MMSTEP}}. I{(L{PeakBackgroundType})} 15165 """ 15166 pass
15167
15168 - def set_order(order):
15169 """ 15170 Sets the order type a peak analyser will use. 15171 15172 The default order is B{C{PEAK_ORDER_ABSCISSA}}. Note that the new order will only be effective in future analyses; 15173 it does not change the results of the already performed analysis. 15174 15175 @since: 2.46 15176 15177 @param order: Order type to use in future analyses. Expected values: C{B{PEAK_ORDER_ABSCISSA}}, C{B{PEAK_ORDER_PROMINENCE}}. I{(L{PeakOrderType})} 15178 """ 15179 pass
15180
15181 - def analyze_xy(xydata, n, maxpeaks):
15182 """ 15183 Finds peaks a graph curve given as XY data. 15184 15185 The peaks are remembered by the analyser and their properties can be subsequently requested using 15186 L{Peaks.get_quantity}(). 15187 15188 @since: 2.46 15189 15190 @param xydata: Curve points (array with B{C{n}} items) that must be ordered by B{C{x}} values in ascending order. I{(const-XY*)} 15191 @param n: Number of data points in the curve. I{(int)} 15192 @param maxpeaks: Maximum number of the most prominent peaks to locate. I{(int)} 15193 @return: The number of peaks found. I{(int)} 15194 """ 15195 return None
15196
15197 - def analyze_dataline(dline, maxpeaks):
15198 """ 15199 Finds peaks a graph curve given as DataLine. 15200 15201 The peaks are remembered by the analyser and their properties can be subsequently requested using 15202 L{Peaks.get_quantity}(). 15203 15204 @since: 2.46 15205 15206 @param dline: Curve data as a data line. I{(L{DataLine})} 15207 @param maxpeaks: Maximum number of the most prominent peaks to locate. I{(int)} 15208 @return: The number of peaks found. I{(int)} 15209 """ 15210 return None
15211
15212 - def n_peaks():
15213 """ 15214 Gets the current number of peaks of a peak analyser. 15215 15216 @since: 2.46 15217 15218 @return: The currently remembered number of peaks. I{(int)} 15219 """ 15220 return None
15221
15222 - def analyze(xdata, ydata, maxpeaks):
15223 """ 15224 Finds peaks a graph curve given as separated B{C{x}} and B{C{y}} data. 15225 15226 The peaks are remembered by the analyser and their properties can be subsequently requested using 15227 L{Peaks.get_quantity}(). 15228 15229 @since: 2.46 15230 15231 @param xdata: Abscissa values (array with B{C{n}} items), must be ordered in ascending order. I{(list)} 15232 @param ydata: Ordinate values corresponding to B{C{xdata}}. I{(list)} 15233 @param maxpeaks: Maximum number of the most prominent peaks to locate. I{(int)} 15234 @return: Value B{C{npeaks}}. (I{(int)}) 15235 """ 15236 return None
15237
15238 - def get_quantity(quantity):
15239 """ 15240 Obtaines values of a given quantity for all found peaks. 15241 15242 @since: 2.46 15243 15244 @param quantity: Peak property to return. Expected values: C{B{PEAK_PROMINENCE}}, C{B{PEAK_ABSCISSA}}, C{B{PEAK_HEIGHT}}, C{B{PEAK_AREA}}, C{B{PEAK_WIDTH}}. I{(L{PeakQuantity})} 15245 @return: I{(list)} 15246 """ 15247 return None
15248 15249
15250 -class Spline:
15251 - def __init__():
15252 """ 15253 Creates a new empty spline curve. 15254 15255 You need to set the curve points using L{Spline.set_points}() before any 15256 sampling along the curve. Alternatively, use L{Spline.new_from_points}() 15257 to construct the spline already with some points. 15258 15259 @since: 2.45 15260 15261 @return: A newly created spline curve. I{(L{Spline})} 15262 """ 15263 return None
15264
15265 - def free():
15266 """ 15267 Frees a spline curve and all associated resources. 15268 15269 @since: 2.45 15270 15271 """ 15272 pass
15273
15274 - def copy():
15275 """ 15276 Creates a copy of a spline curve. 15277 15278 @since: 2.49 15279 15280 @return: A newly created spline curve. I{(L{Spline})} 15281 """ 15282 return None
15283
15284 - def get_npoints():
15285 """ 15286 Gets the number of points of a spline curve. 15287 15288 @since: 2.45 15289 15290 @return: The number of XY points defining the curve. I{(int)} 15291 """ 15292 return None
15293
15294 - def get_slackness():
15295 """ 15296 Gets the slackness parameter of a spline curve. 15297 15298 See L{Spline.set_slackness}() for discussion. 15299 15300 @since: 2.45 15301 15302 @return: The slackness parameter value. I{(float)} 15303 """ 15304 return None
15305
15306 - def get_closed():
15307 """ 15308 Reports whether a spline curve is closed or not. 15309 15310 See L{Spline.set_closed}() for discussion. 15311 15312 @since: 2.45 15313 15314 @return: B{C{True}} if B{C{spline}} is closed, B{C{False}} if it is open-ended. I{(bool)} 15315 """ 15316 return None
15317
15318 - def set_points(xy, n):
15319 """ 15320 Sets the coordinates of XY points a spline curve should pass through. 15321 15322 It is possible to pass B{C{n}}=0 to make the spline empty (B{C{xy}} can be B{C{None}} then) 15323 but such spline may not be sampled using L{Spline.sample_uniformly}(). 15324 15325 The coordinates should be device-scaled, i.e. they should data field rows 15326 and columns, or screen or image pixels. Generally, the unit length should 15327 be about the smallest distinguishable distance. 15328 15329 This is important namely for L{Spline.sample_naturally}() that stops 15330 refining the curve when the details become too tiny, even though there may 15331 be sharp changes of direction. It is also important if the physical X and Y 15332 scales differ. 15333 15334 Using unscaled physical coordinates may produce odd results. 15335 15336 @since: 2.45 15337 15338 @param xy: Array of points in plane the curve will pass through. I{(const-XY*)} 15339 @param n: Number of points in B{C{xy}}. I{(int)} 15340 """ 15341 pass
15342
15343 - def set_slackness(slackness):
15344 """ 15345 Sets the slackness parameter of a spline curve. 15346 15347 The slackness parameter determines how taut or slack the curve is. 15348 15349 The curve always passes through the given XY points. For zero slackness 15350 the curve is maximally taut, i.e. the shortest possible passing 15351 through the points. Such curve is formed by straight segments. For 15352 slackness of 1 the curve is a ‘free’ spline. Values smaller than 1 mean 15353 tensile stress while values larger than 1 compressive stres. The default 15354 value is 1/sqrt(2). 15355 15356 @since: 2.45 15357 15358 @param slackness: New slackness parameter value from the range [0, B{C{glib.SQRT2}}]. I{(float)} 15359 """ 15360 pass
15361
15362 - def set_closed(closed):
15363 """ 15364 Sets whether a spline curve is closed or open. 15365 15366 In closed curve the last point is connected smoothly with the first point, 15367 forming a cycle. Note you should not repeat the point in the B{C{xy}} array. 15368 When a closed curve is sampled, the sampling starts from the first point 15369 and continues beyond the last point until it gets close to the first point 15370 again. 15371 15372 An open curve begins with the first point and ends with the last point. It 15373 has zero curvature at these two points. 15374 15375 @since: 2.45 15376 15377 @param closed: B{C{True}} to make B{C{spline}} closed, B{C{False}} to make it open-ended. I{(bool)} 15378 """ 15379 pass
15380
15381 - def length():
15382 """ 15383 Calculates the length of a spline curve. 15384 15385 This is useful when you want to sample the curve with a specific step 15386 (at least approximately). 15387 15388 Note L{Spline.sample_uniformly}() also returns the length. 15389 15390 @since: 2.45 15391 15392 @return: The curve length. I{(float)} 15393 """ 15394 return None
15395
15396 - def get_points():
15397 """ 15398 Gets the coordinates of spline curve points. 15399 15400 If the spline is empty (there are no points) the function returns B{C{None}}. 15401 15402 @since: 2.45 15403 15404 @return: Coordinates of the XY points defining the curve. The returned 15405 array is owned by B{C{spline}}, must not be modified and is only 15406 guaranteed to exist so long as the spline is not modified nor 15407 destroyed. I{(list)} 15408 """ 15409 return None
15410
15411 - def get_tangents():
15412 """ 15413 Gets tangents to the curve in its defining points. 15414 15415 See L{Spline.sample_uniformly}() for discussion. 15416 15417 If the spline is empty (there are no points) the function returns B{C{None}}. 15418 15419 @since: 2.45 15420 15421 @return: Tangents to the spline in the XY points defining the curve. The 15422 returned array is owned by B{C{spline}}, must not be modified and is 15423 only guaranteed to exist so long as the spline is not modified nor 15424 destroyed. I{(list)} 15425 """ 15426 return None
15427
15428 - def sample_naturally():
15429 """ 15430 Samples efficiently a spline curve. 15431 15432 This function calculates coordinates of points that lie on the spline curve 15433 and are sufficient for a good approximation by straight lines. This is 15434 particularly useful for drawing the curve. 15435 15436 See L{Spline.sample_uniformly}() for some discussion of closed versus open 15437 curves and corner case handling. 15438 15439 @since: 2.45 15440 15441 @return: Coordinates of the XY points defining the sampled curve. The 15442 returned array is owned by B{C{spline}}, must not be modified and is 15443 only guaranteed to exist so long as the spline is not modified nor 15444 destroyed. I{(list)} 15445 """ 15446 return None
15447
15448 - def sample_uniformly(n):
15449 """ 15450 Samples uniformly a spline curve. 15451 15452 This function calculates coordinates of points that lie on the spline curve 15453 and are equidistant along it. For open curves the first sampled point 15454 coincides with the first given XY point and, similar, the last with the last. 15455 For closed curves the first point again coincides with the first given XY 15456 point but the last lies one sampling distance before the curve gets back 15457 again to the first point. 15458 15459 If you want to specify the sampling step instead of the number of samples 15460 use L{Spline.length}() first to obtain the curve length and calculate B{C{n}} 15461 accordingly. 15462 15463 A single-point curve always consists of a single point. Hence all samples 15464 lie in this point. A two-point curve is always formed by straight segments, 15465 in the case of a closed curve one going forward and the other back. A 15466 meaningful sampling requires B{C{n}} at least 2, nevertheless, the function 15467 permits also B{C{n}} of one or zero. 15468 15469 The tangents vectors stored in B{C{t}} are normalised and oriented from the 15470 beginning of the curve towards the end. If two or more consecutive given XY 15471 points coincide or the curve has only a single point the vectors may be 15472 (0,0). 15473 15474 @since: 2.45 15475 15476 @param n: The number of samples to take. I{(int)} 15477 @return: Tuple consisting of 3 values (B{C{value}}, B{C{xy}}, B{C{t}}). (I{(float)}, I{(list)}, I{(list)}) 15478 """ 15479 return None, None, None
15480
15481 -def gwy_3d_view_class_disable_axis_drawing(disable):
15482 """ 15483 Globally disables drawing of 3D view axes. 15484 15485 If axis drawing is disabled, axes are never drawn. If it is not disabled, their rendering depends on the 3D view 15486 setup. 15487 15488 This function is a hack and exists to work around various GL implementations that crash on pixmap drawing 15489 operations. 15490 15491 @since: 2.14 15492 15493 @param disable: B{C{True}} to disable 3D view axes globally, B{C{False}} to enable them. I{(bool)} 15494 """ 15495 pass
15496
15497 -def gwy_3d_window_class_get_tooltips():
15498 """ 15499 Gets the tooltips object used for adding tooltips to 3D window parts. 15500 15501 This function does not do anything useful. Do not use it. 15502 15503 15504 @return: The B{C{GtkTooltips}} object. I{(L{gtk.Tooltips})} 15505 """ 15506 return None
15507
15508 -def gwy_3d_window_class_set_tooltips(tips):
15509 """ 15510 Sets the tooltips object to use for adding tooltips to 3D window parts. 15511 15512 This function does not do anything useful. Do not use it. 15513 15514 This is a class method. It affects only newly cerated 3D windows, existing 15515 3D windows will continue to use the tooltips they were constructed with. 15516 15517 If no class tooltips object is set before first B{C{3DWindow}} is created, 15518 the class instantiates one on its own. You can normally obtain it with 15519 L{gwy_3d_window_class_get_tooltips}() then. The class takes a reference on 15520 the tooltips in either case. 15521 15522 @param tips: Tooltips object B{C{3DWindow}}'s should use for setting tooltips. 15523 A B{C{None}} value disables tooltips altogether. I{(L{gtk.Tooltips})} 15524 """ 15525 pass
15526
15527 -def gwy_app_add_graph_or_curves(gmodel, data, target_graph, colorstep):
15528 """ 15529 Puts the curves of a graph to another graph if possible, or adds the graph as new. 15530 15531 If the units of B{C{gmodel}} are compatible with the units of the graph identified by B{C{target_graph}} the curves are 15532 copied to the target graph with L{Graph.model_append_curves}(). 15533 15534 In all other cases, including when B{C{target_graph}} does not refer to any existing graph, the graph model is added to 15535 B{C{data}} as a new graph. 15536 15537 Either way, the caller usually need to release its own reference afterwards. 15538 15539 This function is useful particularly in modules that create graphs and can be run non-interactively. 15540 15541 @since: 2.41 15542 15543 @param gmodel: A graph model with curves to add. I{(L{GraphModel})} 15544 @param data: Data container where the graph would be added. I{(L{Container})} 15545 @param target_graph: Graph where curves would be added. I{(const-AppDataId*)} 15546 @param colorstep: Curve block size as in L{Graph.model_append_curves}(). I{(int)} 15547 @return: The numerical identifier of the newly-created graph of one was created. Value -1 is returned if curves 15548 were added to B{C{target_graph}}. I{(int)} 15549 """ 15550 return None
15551
15552 -def gwy_app_add_main_accel_group(window):
15553 """ 15554 Adds main (global) application accelerator group to a window. 15555 15556 This includes accelerators for terminating Gwyddion, opening files, etc. 15557 15558 @param window: A window. I{(L{gtk.Window})} 15559 """ 15560 pass
15561
15562 -def gwy_app_build_curve_map_menu(accel_group):
15563 """ 15564 Constructs the application I{Curve Maps} menu. 15565 15566 The menu is created from curve map data processing functions registered by modules, therefore module registration 15567 has to be done first for this function to make sense. 15568 15569 @since: 2.60 15570 15571 @param accel_group: Acceleration group to be associated with the menu. I{(L{gtk.AccelGroup})} 15572 @return: A newly ceated curve map data processing menu (a B{C{GtkMenu}}). I{(L{gtk.Widget})} 15573 """ 15574 return None
15575
15576 -def gwy_app_build_graph_menu(accel_group):
15577 """ 15578 Constructs the application I{Graph} menu. 15579 15580 The menu is created from graph functions registered by modules, therefore module registration has to be done first 15581 for this function to make sense. 15582 15583 15584 @param accel_group: Acceleration group to be associated with the menu. I{(L{gtk.AccelGroup})} 15585 @return: A newly ceated graph menu (a B{C{GtkMenu}}). I{(L{gtk.Widget})} 15586 """ 15587 return None
15588
15589 -def gwy_app_build_process_menu(accel_group):
15590 """ 15591 Constructs the application I{Data Process} menu. 15592 15593 The menu is created from data processing functions registered by modules, therefore module registration has to be 15594 done first for this function to make sense. 15595 15596 15597 @param accel_group: Acceleration group to be associated with the menu. I{(L{gtk.AccelGroup})} 15598 @return: A newly ceated data processing menu (a B{C{GtkMenu}}). I{(L{gtk.Widget})} 15599 """ 15600 return None
15601
15602 -def gwy_app_build_volume_menu(accel_group):
15603 """ 15604 Constructs the application I{Volume Data} menu. 15605 15606 The menu is created from volume data processing functions registered by modules, therefore module registration has 15607 to be done first for this function to make sense. 15608 15609 @since: 2.32 15610 15611 @param accel_group: Acceleration group to be associated with the menu. I{(L{gtk.AccelGroup})} 15612 @return: A newly ceated volume data processing menu (a B{C{GtkMenu}}). I{(L{gtk.Widget})} 15613 """ 15614 return None
15615
15616 -def gwy_app_build_xyz_menu(accel_group):
15617 """ 15618 Constructs the application I{XYZ Data} menu. 15619 15620 The menu is created from XYZ data processing functions registered by modules, therefore module registration has to 15621 be done first for this function to make sense. 15622 15623 @since: 2.45 15624 15625 @param accel_group: Acceleration group to be associated with the menu. I{(L{gtk.AccelGroup})} 15626 @return: A newly ceated XYZ data processing menu (a B{C{GtkMenu}}). I{(L{gtk.Widget})} 15627 """ 15628 return None
15629
15630 -def gwy_app_channel_log_add_proc(data, previd, newid):
15631 """ 15632 Adds an entry to the log of the current data processing operations for a channel. 15633 15634 This simplified variant of L{gwy_app_channel_log_add}() takes the currently running data processing function name and 15635 constructs the qualified function name from that. 15636 15637 @since: 2.38 15638 15639 @param data: A data container. I{(L{Container})} 15640 @param previd: Identifier of the previous (source) data channel in the container. 15641 Pass -1 for a no-source (or unclear source) operation. I{(int)} 15642 @param newid: Identifier of the new (target) data channel in the container. I{(int)} 15643 """ 15644 pass
15645
15646 -def gwy_app_channel_mask_of_nans(dfield, removebad):
15647 """ 15648 Creates a mask corresponding to not-a-number and infinite values in a data 15649 field. 15650 15651 NaNs and infinities are not normally allowed in Gwyddion so this function 15652 should be used upon import if the source file format can represent such 15653 values. 15654 15655 The invalid values can be automatically removed using the same method as 15656 L{gwy_app_channel_remove_bad_data}(). 15657 15658 @since: 2.38 15659 15660 @param dfield: A data field possibly containing NaNs and infinities. I{(L{DataField})} 15661 @param removebad: Automatically remove the invalid values. I{(bool)} 15662 @return: A newly created data field with 1.0 in pixels corresponding to a 15663 NaN or infinity in B{C{dfield}}. If no such pixels are present, B{C{None}} 15664 is returned. I{(L{DataField})} 15665 """ 15666 return None
15667
15668 -def gwy_app_channel_remove_bad_data(dfield, mfield):
15669 """ 15670 Replaces bad data points with some neutral values. 15671 15672 Since Gwyddion has no concept of bad data points, they are usually marked 15673 with a mask and replaced with some neutral values upon import, leaving the 15674 user to decide how to proceed further. This helper function performs such 15675 replacement. 15676 15677 @since: 2.14 15678 15679 @param dfield: A data field. The values of bad data points are ignored and might 15680 be even left uninitialized. I{(L{DataField})} 15681 @param mfield: A mask field containing 1.0 in place of good data points, 0.0 in 15682 place of bad points. It will be inverted to become the mask of 15683 bad points. I{(L{DataField})} 15684 @return: The number of bad data points replaced. If zero is returned, all 15685 points are good and there is no need for masking. I{(int)} 15686 """ 15687 return None
15688
15689 -def gwy_app_channel_title_fall_back(data, id):
15690 """ 15691 Adds a channel title based on data field units. 15692 15693 The guess is very simple, but probably better than `Unknown channel' in 15694 most cases. If there already is a title it is left intact, making use of 15695 this function as a fall-back easier. 15696 15697 @since: 2.3 15698 15699 @param data: A data container. I{(L{Container})} 15700 @param id: Data channel id. I{(int)} 15701 @return: B{C{True}} if the title was set (either by this function or before). I{(bool)} 15702 """ 15703 return None
15704
15705 -def gwy_app_current_tool():
15706 """ 15707 Obtains the currently active tool object. 15708 15709 In some rare circumstances, this function can return B{C{None}} because no tool is active. This includes program 15710 startup and shutdown and during the construction of a new B{C{Tool}} object while switching tools. Also, B{C{None}} is 15711 typically returned outside Gwyddion in programs just using the libraries. 15712 15713 @since: 2.55 15714 15715 @return: The current tool object. I{(Tool*)} 15716 """ 15717 return None
15718
15719 -def gwy_app_current_tool_name():
15720 """ 15721 Obtains the name of currently active tool. 15722 15723 See L{gwy_app_switch_tool}() for the name description. 15724 15725 In some rare circumstances, this function can return B{C{None}} because no tool is active. This includes program 15726 startup and shutdown and during the construction of a new B{C{Tool}} object while switching tools. Also, B{C{None}} is 15727 typically returned outside Gwyddion in programs just using the libraries. 15728 15729 @since: 2.38 15730 15731 @return: The tool name. I{(string)} 15732 """ 15733 return None
15734
15735 -def gwy_app_curve_map_log_add_curve_map(data, previd, newid):
15736 """ 15737 Adds an entry to the log of the current B{C{Lawn}} curve map processing operations for B{C{Lawn}} curve map. 15738 15739 This simplified variant of L{gwy_app_curve_map_log_add}() takes the currently running function B{C{Lawn}} curve map 15740 processing name and constructs the qualified function name from that. 15741 15742 @since: 2.60 15743 15744 @param data: A data container. I{(L{Container})} 15745 @param previd: Identifier of the previous (source) B{C{Lawn}} curve map in the container. 15746 Pass -1 for a no-source (or unclear source) operation. I{(int)} 15747 @param newid: Identifier of the new (target) B{C{Lawn}} curve map in the container. I{(int)} 15748 """ 15749 pass
15750
15751 -def gwy_app_data_browser_add(data):
15752 """ 15753 Adds a data container to the application data browser. 15754 15755 The data browser takes a reference on the container so you can release yours. 15756 15757 @param data: A data container. I{(L{Container})} 15758 """ 15759 pass
15760
15761 -def gwy_app_data_browser_add_brick(brick, preview, data, showit):
15762 """ 15763 Adds a volume data brick to a data container. 15764 15765 The data browser takes a reference to B{C{brick}} (and B{C{preview}} if given) so usually you will want to release your 15766 reference, especially when done as the ‘create output’ step of a module function. 15767 15768 @since: 2.32 15769 15770 @param brick: A data brick to add. I{(L{Brick})} 15771 @param preview: Preview data field. It may be B{C{None}} to create a 15772 preview automatically. If non-B{C{None}}, its dimensions 15773 should match those of brick planes. You must 15774 I{not} pass a field which already represents a 15775 channel. If you want a to show the same field as an existing 15776 channel you must create a copy with L{DataField.duplicate}(). I{(L{DataField})} 15777 @param data: A data container to add B{C{brick}} to. It can be B{C{None}} to add the data field to current data container. I{(L{Container})} 15778 @param showit: B{C{True}} to display it immediately, B{C{False}} to just add it. I{(bool)} 15779 @return: The id of the data brick in the container. I{(int)} 15780 """ 15781 return None
15782
15783 -def gwy_app_data_browser_add_data_field(dfield, data, showit):
15784 """ 15785 Adds a data field to a data container. 15786 15787 The data browser takes a reference to B{C{dfield}} so usually you will want to release your reference, especially when 15788 done as the ‘create output’ step of a module function. 15789 15790 15791 @param dfield: A data field to add. I{(L{DataField})} 15792 @param data: A data container to add B{C{dfield}} to. It can be B{C{None}} to add the data field to current data container. I{(L{Container})} 15793 @param showit: B{C{True}} to display it immediately, B{C{False}} to just add it. I{(bool)} 15794 @return: The id of the data field in the container. I{(int)} 15795 """ 15796 return None
15797
15798 -def gwy_app_data_browser_add_graph_model(gmodel, data, showit):
15799 """ 15800 Adds a graph model to a data container. 15801 15802 The data browser takes a reference to B{C{gmodel}} so usually you will want to release your reference, especially when 15803 done as the ‘create output’ step of a module function. 15804 15805 15806 @param gmodel: A graph model to add. I{(L{GraphModel})} 15807 @param data: A data container to add B{C{gmodel}} to. 15808 It can be B{C{None}} to add the graph model to current data container. I{(L{Container})} 15809 @param showit: B{C{True}} to display it immediately, B{C{False}} to just add it. I{(bool)} 15810 @return: The id of the graph model in the container. I{(int)} 15811 """ 15812 return None
15813
15814 -def gwy_app_data_browser_add_lawn(lawn, preview, data, showit):
15815 """ 15816 Adds B{C{Lawn}} curve map data to a data container. 15817 15818 The data browser takes a reference to B{C{lawn}} so usually you will want to release your reference, especially when 15819 done as the ‘create output’ step of a module function. 15820 15821 @since: 2.60 15822 15823 @param lawn: B{C{Lawn}} to add. I{(L{Lawn})} 15824 @param preview: Preview data field. It may be B{C{None}} to create a 15825 preview automatically. If non-B{C{None}}, its dimensions 15826 should match those of lawn planes. You must 15827 I{not} pass a field which already represents a 15828 channel. If you want a to show the same field as an existing 15829 channel you must create a copy with L{DataField.duplicate}(). I{(L{DataField})} 15830 @param data: A data container to add B{C{lawn}} to. 15831 It can be B{C{None}} to add the data field to current data container. I{(L{Container})} 15832 @param showit: B{C{True}} to display it immediately, B{C{False}} to just add it. I{(bool)} 15833 @return: The id of the data lawn in the container. I{(int)} 15834 """ 15835 return None
15836
15837 -def gwy_app_data_browser_add_spectra(spectra, data, showit):
15838 """ 15839 Adds a spectra object to a data container. 15840 15841 The data browser takes a reference to B{C{spectra}} so usually you will want to release your reference, especially when 15842 done as the ‘create output’ step of a module function. 15843 15844 @since: 2.7 15845 15846 @param spectra: A spectra object to add. I{(L{Spectra})} 15847 @param data: A data container to add B{C{gmodel}} to. It can be B{C{None}} to add the spectra to current data container. I{(L{Container})} 15848 @param showit: B{C{True}} to display it immediately, B{C{False}} to just add it. I{(bool)} 15849 @return: The id of the spectra object in the container. I{(int)} 15850 """ 15851 return None
15852
15853 -def gwy_app_data_browser_add_surface(surface, data, showit):
15854 """ 15855 Adds XYZ surface data to a data container. 15856 15857 The data browser takes a reference to B{C{surface}} so usually you will want to release your reference, especially when 15858 done as the ‘create output’ step of a module function. 15859 15860 @since: 2.45 15861 15862 @param surface: XYZ surface data to add. I{(L{Surface})} 15863 @param data: A data container to add B{C{surface}} to. It can be B{C{None}} to add the data field to current data container. I{(L{Container})} 15864 @param showit: B{C{True}} to display it immediately, B{C{False}} to just add it. I{(bool)} 15865 @return: The id of the data surface in the container. I{(int)} 15866 """ 15867 return None
15868
15869 -def gwy_app_data_browser_copy_channel(source, id, dest):
15870 """ 15871 Copies a channel including all auxiliary data. 15872 15873 15874 @param source: Source container. I{(L{Container})} 15875 @param id: Data channel id. I{(int)} 15876 @param dest: Target container (may be identical to source). I{(L{Container})} 15877 @return: The id of the copy. I{(int)} 15878 """ 15879 return None
15880
15881 -def gwy_app_data_browser_copy_curve_map(source, id, dest):
15882 """ 15883 Copies B{C{Lawn}} curve map data including all auxiliary data. 15884 15885 @since: 2.60 15886 15887 @param source: Source container. I{(L{Container})} 15888 @param id: B{C{Lawn}} curve map data id. I{(int)} 15889 @param dest: Target container (may be identical to source). I{(L{Container})} 15890 @return: The id of the copy. I{(int)} 15891 """ 15892 return None
15893
15894 -def gwy_app_data_browser_copy_volume(source, id, dest):
15895 """ 15896 Copies volume brick data including all auxiliary data. 15897 15898 @since: 2.32 15899 15900 @param source: Source container. I{(L{Container})} 15901 @param id: Volume data brick id. I{(int)} 15902 @param dest: Target container (may be identical to source). I{(L{Container})} 15903 @return: The id of the copy. I{(int)} 15904 """ 15905 return None
15906
15907 -def gwy_app_data_browser_copy_xyz(source, id, dest):
15908 """ 15909 Copies XYZ surface data including all auxiliary data. 15910 15911 @since: 2.45 15912 15913 @param source: Source container. I{(L{Container})} 15914 @param id: XYZ surface data id. I{(int)} 15915 @param dest: Target container (may be identical to source). I{(L{Container})} 15916 @return: The id of the copy. I{(int)} 15917 """ 15918 return None
15919
15920 -def gwy_app_data_browser_find_data_by_title(data, titleglob):
15921 """ 15922 Gets the list of all channels in a data container whose titles match the specified pattern. 15923 15924 The function originally could be used only for data containers managed by the data browser. Since version 2.49 it 15925 can be used for all file-like data containers. 15926 15927 @since: 2.21 15928 15929 @param data: A data container. I{(L{Container})} 15930 @param titleglob: Pattern, as used by B{C{GPatternSpec}}, to match the channel titles against. I{(string)} 15931 @return: A newly allocated array with channel ids, -1 terminated. I{(list)} 15932 """ 15933 return None
15934
15935 -def gwy_app_data_browser_find_graphs_by_title(data, titleglob):
15936 """ 15937 Gets the list of all graphs in a data container whose titles match the specified pattern. 15938 15939 The function originally could be used only for data containers managed by the data browser. Since version 2.49 it 15940 can be used for all file-like data containers. 15941 15942 @since: 2.21 15943 15944 @param data: A data container. I{(L{Container})} 15945 @param titleglob: Pattern, as used by B{C{GPatternSpec}}, to match the graph titles against. I{(string)} 15946 @return: A newly allocated array with graph ids, -1 terminated. I{(list)} 15947 """ 15948 return None
15949
15950 -def gwy_app_data_browser_find_spectra_by_title(data, titleglob):
15951 """ 15952 Gets the list of all spectra in a data container whose titles match the specified pattern. 15953 15954 The function originally could be used only for data containers managed by the data browser. Since version 2.49 it 15955 can be used for all file-like data containers. 15956 15957 @since: 2.21 15958 15959 @param data: A data container. I{(L{Container})} 15960 @param titleglob: Pattern, as used by B{C{GPatternSpec}}, to match the spectra titles against. I{(string)} 15961 @return: A newly allocated array with spectra ids, -1 terminated. I{(list)} 15962 """ 15963 return None
15964
15965 -def gwy_app_data_browser_find_volume_by_title(data, titleglob):
15966 """ 15967 Gets the list of all volume data in a data container whose titles match the specified pattern. 15968 15969 The function originally could be used only for data containers managed by the data browser. Since version 2.49 it 15970 can be used for all file-like data containers. 15971 15972 @since: 2.45 15973 15974 @param data: A data container. I{(L{Container})} 15975 @param titleglob: Pattern, as used by B{C{GPatternSpec}}, to match the volume data titles against. I{(string)} 15976 @return: A newly allocated array with volume data ids, -1 terminated. I{(list)} 15977 """ 15978 return None
15979
15980 -def gwy_app_data_browser_find_xyz_by_title(data, titleglob):
15981 """ 15982 Gets the list of all XYZ data in a data container whose titles match the specified pattern. 15983 15984 The function originally could be used only for data containers managed by the data browser. Since version 2.49 it 15985 can be used for all file-like data containers. 15986 15987 @since: 2.45 15988 15989 @param data: A data container. I{(L{Container})} 15990 @param titleglob: Pattern, as used by B{C{GPatternSpec}}, to match the XYZ data titles against. I{(string)} 15991 @return: A newly allocated array with XYZ data ids, -1 terminated. I{(list)} 15992 """ 15993 return None
15994
15995 -def gwy_app_data_browser_foreach(function, user_data):
15996 """ 15997 Calls a function for each data container managed by data browser. 15998 15999 @param function: Function to run on each data container. I{(AppDataForeachFunc)} 16000 @param user_data: Data to pass as second argument of B{C{function}}. I{(gpointer)} 16001 """ 16002 pass
16003
16004 -def gwy_app_data_browser_get(number):
16005 """ 16006 Gets the data corresponding to a numerical identifier. 16007 16008 The identifier can be obtained with L{gwy_app_data_browser_get_number}(). See its documentation for discussion. 16009 16010 @since: 2.41 16011 16012 @param number: Numerical identifier of open data managed by the data browser, or 16013 zero. I{(int)} 16014 @return: The corresponding data container. B{C{None}} is returned if B{C{number}} does not identify any existing data. I{(L{Container})} 16015 """ 16016 return None
16017
16018 -def gwy_app_data_browser_get_containers():
16019 """ 16020 Get list of containers of current data browser. 16021 16022 16023 @return: list of containers L{Container} object I{(list)} 16024 """ 16025 return None
16026
16027 -def gwy_app_data_browser_get_current(obj_type):
16028 """ 16029 Get current data item of given type. 16030 16031 Depending on what you request, the function can return data object 16032 themselves, integer keys, ids, ... 16033 16034 16035 @param obj_type: Data item type. I{(L{AppWhat})} Expected values: C{B{APP_CONTAINER}}, C{B{APP_DATA_VIEW}}, C{B{APP_GRAPH}}, C{B{APP_DATA_FIELD}}, C{B{APP_DATA_FIELD_KEY}}, C{B{APP_DATA_FIELD_ID}}, C{B{APP_MASK_FIELD}}, C{B{APP_MASK_FIELD_KEY}}, C{B{APP_SHOW_FIELD}}, C{B{APP_SHOW_FIELD_KEY}}, C{B{APP_GRAPH_MODEL}}, C{B{APP_GRAPH_MODEL_KEY}}, C{B{APP_GRAPH_MODEL_ID}}, C{B{APP_SPECTRA}}, C{B{APP_SPECTRA_KEY}}, C{B{APP_SPECTRA_ID}}, C{B{APP_VOLUME_VIEW}}, C{B{APP_BRICK}}, C{B{APP_BRICK_KEY}}, C{B{APP_BRICK_ID}}, C{B{APP_CONTAINER_ID}}, C{B{APP_XYZ_VIEW}}, C{B{APP_SURFACE}}, C{B{APP_SURFACE_KEY}}, C{B{APP_SURFACE_ID}}, C{B{APP_PAGE}}, C{B{APP_LAWN}}, C{B{APP_LAWN_KEY}}, C{B{APP_LAWN_ID}}, C{B{APP_CURVE_MAP_VIEW}}. I{(L{AppWhat})} 16036 @return: The current object or None. I{(any)} 16037 """ 16038 return None
16039
16040 -def gwy_app_data_browser_get_data_ids(container):
16041 """ 16042 Gets the list of all channels in a data container (presumably representing 16043 a file). 16044 16045 16046 @param container: A data container. I{(L{Container})} 16047 @return: List of channel ids. I{(list)} 16048 """ 16049 return None
16050
16051 -def gwy_app_data_browser_get_graph_ids(container):
16052 """ 16053 Gets the list of all graphs in a data container (presumably representing 16054 a file). 16055 16056 16057 @param container: A data container. I{(L{Container})} 16058 @return: List of graph ids. I{(list)} 16059 """ 16060 return None
16061
16062 -def gwy_app_data_browser_get_gui_enabled():
16063 """ 16064 Reports whether creation of windows by the data-browser is enabled. 16065 16066 @since: 2.21 16067 16068 @return: B{C{True}} if the data-browser is permitted to create windows, B{C{False}} if it is not. I{(bool)} 16069 """ 16070 return None
16071
16072 -def gwy_app_data_browser_get_keep_invisible(data):
16073 """ 16074 Gets data browser behaviour for inaccessible data. 16075 16076 16077 @param data: A data container. I{(L{Container})} 16078 @return: See L{gwy_app_data_browser_set_keep_invisible}(). I{(bool)} 16079 """ 16080 return None
16081
16082 -def gwy_app_data_browser_get_number(data):
16083 """ 16084 Gets the numerical identifier of data. 16085 16086 Each time a data container is added with L{gwy_app_data_browser_add}() it is assigned a new unique numerical 16087 identifier. This number can be used in multi-data modules to remember and restore secondary data. 16088 16089 Note, however, that the number is only guaranteed to be unique within one process. It does not persist across 16090 different program invocations and it does not make sense to store it to the settings or other kinds of permanent 16091 storage. 16092 16093 @since: 2.41 16094 16095 @param data: A data container managed by the data browser. For convenience, B{C{None}} is also permitted. I{(L{Container})} 16096 @return: A positive numerical identifier of B{C{data}}. Zero is returned if B{C{data}} is B{C{None}}. I{(int)} 16097 """ 16098 return None
16099
16100 -def gwy_app_data_browser_get_spectra_ids(container):
16101 """ 16102 Gets the list of all spectra in a data container (presumably representing 16103 a file). 16104 16105 16106 @param container: A data container. I{(L{Container})} 16107 @return: List of spectra ids. I{(list)} 16108 """ 16109 return None
16110
16111 -def gwy_app_data_browser_get_volume_ids(container):
16112 """ 16113 Gets the list of all volume data in a data container (presumably 16114 representing a file). 16115 16116 16117 @param container: A data container. I{(L{Container})} 16118 @return: List of volume data ids. I{(list)} 16119 """ 16120 return None
16121
16122 -def gwy_app_data_browser_get_xyz_ids(container):
16123 """ 16124 Gets the list of all XYZ data in a data container (presumably representing 16125 a file). 16126 16127 16128 @param container: A data container. I{(L{Container})} 16129 @return: List of XYZ data ids. I{(list)} 16130 """ 16131 return None
16132
16133 -def gwy_app_data_browser_merge(data):
16134 """ 16135 Merges the data from a data container to the current one. 16136 16137 @since: 2.7 16138 16139 @param data: A data container, not managed by the data browser. I{(L{Container})} 16140 """ 16141 pass
16142
16143 -def gwy_app_data_browser_remove(data):
16144 """ 16145 Removed a data container from the application data browser. 16146 16147 @param data: A data container. I{(L{Container})} 16148 """ 16149 pass
16150
16151 -def gwy_app_data_browser_remove_channel_watch(id):
16152 """ 16153 Removes a channel watch function. 16154 16155 @since: 2.21 16156 16157 @param id: Watch function id, as returned by L{gwy_app_data_browser_add_channel_watch}(). I{(gulong)} 16158 """ 16159 pass
16160
16161 -def gwy_app_data_browser_remove_curve_map_watch(id):
16162 """ 16163 Removes a curve map data watch function. 16164 16165 @since: 2.60 16166 16167 @param id: Watch function id, as returned by L{gwy_app_data_browser_add_curve_map_watch}(). I{(gulong)} 16168 """ 16169 pass
16170
16171 -def gwy_app_data_browser_remove_graph_watch(id):
16172 """ 16173 Removes a graph watch function. 16174 16175 @since: 2.41 16176 16177 @param id: Watch function id, as returned by L{gwy_app_data_browser_add_graph_watch}(). I{(gulong)} 16178 """ 16179 pass
16180
16181 -def gwy_app_data_browser_remove_volume_watch(id):
16182 """ 16183 Removes a volume data watch function. 16184 16185 @since: 2.60 16186 16187 @param id: Watch function id, as returned by L{gwy_app_data_browser_add_volume_watch}(). I{(gulong)} 16188 """ 16189 pass
16190
16191 -def gwy_app_data_browser_remove_xyz_watch(id):
16192 """ 16193 Removes an XYZ data watch function. 16194 16195 @since: 2.60 16196 16197 @param id: Watch function id, as returned by L{gwy_app_data_browser_add_xyz_watch}(). I{(gulong)} 16198 """ 16199 pass
16200
16201 -def gwy_app_data_browser_reset_visibility(data, reset_type):
16202 """ 16203 Resets visibility of all data objects in a container. 16204 16205 16206 @param data: A data container. I{(L{Container})} 16207 @param reset_type: Type of visibility reset. Expected values: C{B{VISIBILITY_RESET_DEFAULT}}, C{B{VISIBILITY_RESET_RESTORE}}, C{B{VISIBILITY_RESET_SHOW_ALL}}, C{B{VISIBILITY_RESET_HIDE_ALL}}. I{(L{VisibilityResetType})} 16208 @return: B{C{True}} if anything is visible after the reset. I{(bool)} 16209 """ 16210 return None
16211
16212 -def gwy_app_data_browser_restore():
16213 """ 16214 Restores the data browser window. 16215 16216 The data browser window is always created (if it does not exist). If it should be visible according to settings, is 16217 shown at the saved position. Otherwise it is kept hidden until L{gwy_app_data_browser_show}(). 16218 16219 """ 16220 pass
16221
16222 -def gwy_app_data_browser_select_brick(data, id):
16223 """ 16224 Makes a brick (volume data) current in the data browser. 16225 16226 @warning:This function does not do what you might expect. Selecting a data object which is not displayed in any 16227 view makes it just possible to delete or duplicate in the data browser. Module functions can be only run on 16228 visible data. 16229 16230 @since: 2.61 16231 16232 @param data: The container to select. I{(L{Container})} 16233 @param id: Number (id) of the brick in B{C{data}} to select. I{(int)} 16234 """ 16235 pass
16236
16237 -def gwy_app_data_browser_select_curve_map(data_view):
16238 """ 16239 Switches application data browser to display container of data and selects B{C{data_view}}'s curve_map data in the graph 16240 list. 16241 16242 @since: 2.60 16243 16244 @param data_view: A data view widget showing a preview of curve_map data. I{(L{DataView})} 16245 """ 16246 pass
16247
16248 -def gwy_app_data_browser_select_data_field(data, id):
16249 """ 16250 Makes a data field (image) current in the data browser. 16251 16252 @warning:This function does not do what you might expect. Selecting a data object which is not displayed in any 16253 view makes it just possible to delete or duplicate in the data browser. Module functions can be only run on 16254 visible data. 16255 16256 @param data: The container to select. I{(L{Container})} 16257 @param id: Number (id) of the data field in B{C{data}} to select. I{(int)} 16258 """ 16259 pass
16260
16261 -def gwy_app_data_browser_select_data_view(data_view):
16262 """ 16263 Switches application data browser to display container of B{C{data_view}}'s data and selects B{C{data_view}}'s data in the 16264 channel list. 16265 16266 @param data_view: A data view widget. I{(L{DataView})} 16267 """ 16268 pass
16269
16270 -def gwy_app_data_browser_select_graph(graph):
16271 """ 16272 Switches application data browser to display container of B{C{graph}}'s data and selects B{C{graph}}'s data in the graph 16273 list. 16274 16275 @param graph: A graph widget. I{(L{Graph})} 16276 """ 16277 pass
16278
16279 -def gwy_app_data_browser_select_graph_model(data, id):
16280 """ 16281 Makes a graph model current in the data browser. 16282 16283 @warning:This function does not do what you might expect. Selecting a data object which is not displayed in any 16284 view makes it just possible to delete or duplicate in the data browser. Module functions can be only run on 16285 visible data. 16286 16287 @param data: The container to select. I{(L{Container})} 16288 @param id: Number (id) of the graph model in B{C{data}} to select. I{(int)} 16289 """ 16290 pass
16291
16292 -def gwy_app_data_browser_select_lawn(data, id):
16293 """ 16294 Makes a lawn (curve map) current in the data browser. 16295 16296 @warning:This function does not do what you might expect. Selecting a data object which is not displayed in any 16297 view makes it just possible to delete or duplicate in the data browser. Module functions can be only run on 16298 visible data. 16299 16300 @since: 2.61 16301 16302 @param data: The container to select. I{(L{Container})} 16303 @param id: Number (id) of the lawn in B{C{data}} to select. I{(int)} 16304 """ 16305 pass
16306
16307 -def gwy_app_data_browser_select_spectra(spectra):
16308 """ 16309 Switches application data browser to display container of B{C{spectra}}'s data and selects B{C{spectra}}'s data in the graph 16310 list. 16311 16312 However, it is not actually supposed to work with spectra from a different container than those of the currently 16313 active channel, so do not try that for now. 16314 16315 @since: 2.7 16316 16317 @param spectra: A spectra object. I{(L{Spectra})} 16318 """ 16319 pass
16320
16321 -def gwy_app_data_browser_select_surface(data, id):
16322 """ 16323 Makes a surface (XYZ data) current in the data browser. 16324 16325 @warning:This function does not do what you might expect. Selecting a data object which is not displayed in any 16326 view makes it just possible to delete or duplicate in the data browser. Module functions can be only run on 16327 visible data. 16328 16329 @since: 2.61 16330 16331 @param data: The container to select. I{(L{Container})} 16332 @param id: Number (id) of the surface in B{C{data}} to select. I{(int)} 16333 """ 16334 pass
16335
16336 -def gwy_app_data_browser_select_volume(data_view):
16337 """ 16338 Switches application data browser to display container of data and selects B{C{data_view}}'s volume data in the graph 16339 list. 16340 16341 @since: 2.32 16342 16343 @param data_view: A data view widget showing a preview of volume data. I{(L{DataView})} 16344 """ 16345 pass
16346
16347 -def gwy_app_data_browser_select_xyz(data_view):
16348 """ 16349 Switches application data browser to display container of data and selects B{C{data_view}}'s XYZ data in the graph list. 16350 16351 @since: 2.45 16352 16353 @param data_view: A data view widget showing a preview of XYZ data. I{(L{DataView})} 16354 """ 16355 pass
16356
16357 -def gwy_app_data_browser_set_gui_enabled(setting):
16358 """ 16359 Globally enables or disables creation of widgets by the data-browser. 16360 16361 By default, the data-browser creates windows for data objects automatically, for instance when reconstructing view 16362 of a loaded file, after a module function creates a new channel or graph or when it is explicitly asked so by 16363 L{gwy_app_data_browser_show_3d}(). Non-GUI applications that run module functions usually wish to disable GUI. 16364 16365 If GUI is disabled the data browser never creates windows showing data objects and also L{gwy_app_data_browser_show}() 16366 becomes no-op. 16367 16368 Disabling GUI after widgets have been already created is a bad idea. Hence you should do so before loading files or 16369 calling module functions. 16370 16371 @since: 2.21 16372 16373 @param setting: B{C{True}} to enable creation of widgets by the data-browser, B{C{False}} to disable it. I{(bool)} 16374 """ 16375 pass
16376
16377 -def gwy_app_data_browser_set_keep_invisible(data, keep_invisible):
16378 """ 16379 Sets data browser behaviour for inaccessible data. 16380 16381 Normally, when all visual objects belonging to a file are closed the container is removed from the data browser and 16382 dereferenced, leading to its finalization. By setting B{C{keep_invisible}} to B{C{True}} the container can be made to sit in 16383 the browser indefinitely. 16384 16385 @param data: A data container. I{(L{Container})} 16386 @param keep_invisible: B{C{True}} to retain B{C{data}} in the browser even when it becomes inaccessible, B{C{False}} to dispose of it. I{(bool)} 16387 """ 16388 pass
16389
16390 -def gwy_app_data_browser_show():
16391 """ 16392 Shows the data browser window. 16393 16394 If the window does not exist, it is created. 16395 16396 """ 16397 pass
16398
16399 -def gwy_app_data_browser_show_3d(data, id):
16400 """ 16401 Shows a 3D window displaying a channel. 16402 16403 If a 3D window of the specified channel already exists, it is just presented to the user. If it does not exist, it 16404 is created. 16405 16406 The caller must ensure 3D display is available, for example by checking L{gwy_app_gl_is_ok}(). 16407 16408 @param data: A data container. I{(L{Container})} 16409 @param id: Channel id. I{(int)} 16410 """ 16411 pass
16412
16413 -def gwy_app_data_browser_shut_down():
16414 """ 16415 Releases data browser resources and saves its state. 16416 16417 """ 16418 pass
16419
16420 -def gwy_app_data_clear_selections(data, id):
16421 """ 16422 Clears all selections associated with a data channel. 16423 16424 This is the preferred selection handling after changes in data geometry as they have generally unpredictable 16425 effects on selections. Selection should not be removed because this is likely to make the current tool stop 16426 working. 16427 16428 @param data: A data container. I{(L{Container})} 16429 @param id: Data channel id. I{(int)} 16430 """ 16431 pass
16432
16433 -def gwy_app_data_view_change_mask_color(data_view):
16434 """ 16435 Runs mask color selector on a data view. 16436 16437 This is a convenience function to run L{gwy_color_selector_for_mask}(), possibly taking the initial color from 16438 settings. 16439 16440 @param data_view: A data view (of application's data window). It must have a mask. I{(L{DataView})} 16441 """ 16442 pass
16443
16444 -def gwy_app_file_close():
16445 """ 16446 Closes the current file file (very high-level app function). 16447 16448 @since: 2.45 16449 16450 """ 16451 pass
16452
16453 -def gwy_app_file_confirm_overwrite(chooser):
16454 """ 16455 Asks for file overwrite for a file save chooser. 16456 16457 16458 @param chooser: A file chooser for save action. I{(L{gtk.Widget})} 16459 @return: B{C{True}} if it is OK to overwrite the file, B{C{False}} when user cancelled 16460 it or there was other problem. I{(bool)} 16461 """ 16462 return None
16463
16464 -def gwy_app_file_load(filename_utf8, name):
16465 """ 16466 Loads a file into application (a high-level function). 16467 16468 At least one of B{C{filename_utf8}}, B{C{filename_sys}} must be non-B{C{None}}. 16469 16470 The file is loaded in interactive mode, modules can ask for user input. Upon a successful load all necessary setup 16471 tasks are performed. If the load fails, an error dialog is presented. 16472 16473 16474 @param filename_utf8: Name of file to load, in UTF-8. I{(string)} 16475 @param name: File type to open file as, but normally B{C{None}} to automatically detect from file contents. I{(string)} 16476 @return: Tuple consisting of 2 values (B{C{value}}, B{C{filename_sys}}). (I{(L{Container})}, I{(SkipArg)}) 16477 """ 16478 return None, None
16479
16480 -def gwy_app_file_merge():
16481 """ 16482 Merges a user-selected file (very high-level app function). 16483 16484 @since: 2.7 16485 16486 """ 16487 pass
16488
16489 -def gwy_app_file_open():
16490 """ 16491 Opens a user-selected file (very high-level app function). 16492 16493 """ 16494 pass
16495
16496 -def gwy_app_file_save():
16497 """ 16498 Saves current data to a file (very high-level app function). 16499 16500 May fall back to L{gwy_app_file_save_as}() when current data has no file name associated with it, or the format it was 16501 loaded from is not saveable. 16502 16503 """ 16504 pass
16505
16506 -def gwy_app_file_save_as():
16507 """ 16508 Saves current data to a user-selected file (very high-level app function). 16509 16510 """ 16511 pass
16512
16513 -def gwy_app_file_write(data, filename_utf8, name):
16514 """ 16515 Writes container to a file (a high-level function). 16516 16517 At least one of B{C{filename_utf8}}, B{C{filename_sys}} must be non-B{C{None}}. 16518 16519 The file is saved in interactive mode, modules can ask for user input. If the write fails, an error dialog is 16520 presented. 16521 16522 16523 @param data: Data to write. I{(L{Container})} 16524 @param filename_utf8: Name of file to write data to, in UTF-8. I{(string)} 16525 @param name: File type to save file as, but normally B{C{None}} to automatically detect from file name. I{(string)} 16526 @return: Tuple consisting of 2 values (B{C{value}}, B{C{filename_sys}}). (I{(bool)}, I{(SkipArg)}) 16527 """ 16528 return None, None
16529
16530 -def gwy_app_find_window_for_channel(data, id):
16531 """ 16532 Finds the window displaying a data channel. 16533 16534 16535 @param data: A data container to find window for. I{(L{Container})} 16536 @param id: Data channel id. It can be -1 to find any data window displaying a channel from B{C{data}}. I{(int)} 16537 @return: The window if found, B{C{None}} if no data window displays the requested channel. I{(L{gtk.Window})} 16538 """ 16539 return None
16540
16541 -def gwy_app_find_window_for_curve_map(data, id):
16542 """ 16543 Finds the window displaying given curve map. 16544 16545 @since: 2.60 16546 16547 @param data: A data container to find window for. I{(L{Container})} 16548 @param id: curve map id. It can be -1 to find any data window displaying curve map from B{C{data}}. I{(int)} 16549 @return: The window if found, B{C{None}} if no data window displays the requested curve map. I{(L{gtk.Window})} 16550 """ 16551 return None
16552
16553 -def gwy_app_find_window_for_graph(data, id):
16554 """ 16555 Finds the window displaying a graph model. 16556 16557 @since: 2.45 16558 16559 @param data: A data container to find window for. I{(L{Container})} 16560 @param id: Graph model id. It can be -1 to find any graph window displaying a graph model from B{C{data}}. I{(int)} 16561 @return: The window if found, B{C{None}} if no graph window displays the requested channel. I{(L{gtk.Window})} 16562 """ 16563 return None
16564
16565 -def gwy_app_find_window_for_volume(data, id):
16566 """ 16567 Finds the window displaying given volume data. 16568 16569 @since: 2.42 16570 16571 @param data: A data container to find window for. I{(L{Container})} 16572 @param id: Volume data id. It can be -1 to find any data window displaying volume data from B{C{data}}. I{(int)} 16573 @return: The window if found, B{C{None}} if no data window displays the requested volume data. I{(L{gtk.Window})} 16574 """ 16575 return None
16576
16577 -def gwy_app_find_window_for_xyz(data, id):
16578 """ 16579 Finds the window displaying given XYZ data. 16580 16581 @since: 2.45 16582 16583 @param data: A data container to find window for. I{(L{Container})} 16584 @param id: XYZ data id. It can be -1 to find any data window displaying XYZ data from B{C{data}}. I{(int)} 16585 @return: The window if found, B{C{None}} if no data window displays the requested XYZ data. I{(L{gtk.Window})} 16586 """ 16587 return None
16588
16589 -def gwy_app_get_brick_key_for_id(id):
16590 """ 16591 Calculates data brick quark identifier from its id. 16592 16593 @since: 2.32 16594 16595 @param id: Numerical id of a data brick in file (container). I{(int)} 16596 @return: The quark key identifying data brick with number B{C{id}}. I{(int)} 16597 """ 16598 return None
16599
16600 -def gwy_app_get_brick_meta_key_for_id(id):
16601 """ 16602 Calculates data brick title quark identifier from its id. 16603 16604 @since: 2.43 16605 16606 @param id: Numerical id of a data brick in file (container). I{(int)} 16607 @return: The quark key identifying metadata container of data brick with number B{C{id}}. I{(int)} 16608 """ 16609 return None
16610
16611 -def gwy_app_get_brick_palette_key_for_id(id):
16612 """ 16613 Calculates data brick palette quark identifier from its id. 16614 16615 @since: 2.43 16616 16617 @param id: Numerical id of a data brick in file (container). I{(int)} 16618 @return: The quark key identifying string name palette of data brick with number B{C{id}}. I{(int)} 16619 """ 16620 return None
16621
16622 -def gwy_app_get_brick_preview_key_for_id(id):
16623 """ 16624 Calculates data brick preview quark identifier from its id. 16625 16626 @since: 2.43 16627 16628 @param id: Numerical id of a data brick in file (container). I{(int)} 16629 @return: The quark key identifying preview data field of data brick with number B{C{id}}. I{(int)} 16630 """ 16631 return None
16632
16633 -def gwy_app_get_brick_title(data, id):
16634 """ 16635 Gets a volume data brick title. 16636 16637 @since: 2.32 16638 16639 @param data: A data container. I{(L{Container})} 16640 @param id: Volume data brick id. I{(int)} 16641 @return: The brick title as a newly allocated string. I{(string)} 16642 """ 16643 return None
16644
16645 -def gwy_app_get_brick_title_key_for_id(id):
16646 """ 16647 Calculates data brick title quark identifier from its id. 16648 16649 @since: 2.43 16650 16651 @param id: Numerical id of a data brick in file (container). I{(int)} 16652 @return: The quark key identifying string title of data brick with number B{C{id}}. I{(int)} 16653 """ 16654 return None
16655
16656 -def gwy_app_get_channel_thumbnail(data, id, max_width, max_height):
16657 """ 16658 Creates a channel thumbnail. 16659 16660 16661 @param data: A data container. I{(L{Container})} 16662 @param id: Data channel id. I{(int)} 16663 @param max_width: Maximum width of the created pixbuf, it must be at least 2. I{(int)} 16664 @param max_height: Maximum height of the created pixbuf, it must be at least 2. I{(int)} 16665 @return: A newly created pixbuf with channel thumbnail. It keeps the aspect 16666 ratio of the data field while not exceeding B{C{max_width}} and 16667 B{C{max_height}}. I{(L{gdk.Pixbuf})} 16668 """ 16669 return None
16670
16671 -def gwy_app_get_current_directory():
16672 """ 16673 Returns what the app uses as `current directory'. 16674 16675 Warning: This function is probably temporary. 16676 16677 16678 @return: A string in GLib file name encoding that should not be modified neither freed, valid only until next call 16679 to L{gwy_app_set_current_directory}(). It ends with a B{C{glib.DIR_SEPARATOR_S}}. I{(string)} 16680 """ 16681 return None
16682
16683 -def gwy_app_get_curve_map_thumbnail(data, id, max_width, max_height):
16684 """ 16685 Creates a curve map thumbnail. 16686 16687 @since: 2.60 16688 16689 @param data: A data container. I{(L{Container})} 16690 @param id: Volume data id. I{(int)} 16691 @param max_width: Maximum width of the created pixbuf, it must be at least 2. I{(int)} 16692 @param max_height: Maximum height of the created pixbuf, it must be at least 2. I{(int)} 16693 @return: A newly created pixbuf with curve map data thumbnail. It keeps the aspect ratio of the lawn preview while 16694 not exceeding B{C{max_width}} and B{C{max_height}}. I{(L{gdk.Pixbuf})} 16695 """ 16696 return None
16697
16698 -def gwy_app_get_data_base_key_for_id(id):
16699 """ 16700 Calculates data field base visualisation quark identifier from its id. 16701 16702 This is the common prefix for range and palette key. It is not useful alone because it is only prefix. 16703 16704 @since: 2.59 16705 16706 @param id: Numerical id of a image in file (container). I{(int)} 16707 @return: The quark key identifying base string prefix of image with number B{C{id}}. I{(int)} 16708 """ 16709 return None
16710
16711 -def gwy_app_get_data_field_title(data, id):
16712 """ 16713 Gets a data channel title. 16714 16715 This function should return a reasonable title for untitled channels, channels with old titles, channels with and 16716 without a file, etc. 16717 16718 16719 @param data: A data container. I{(L{Container})} 16720 @param id: Data channel id. I{(int)} 16721 @return: The channel title as a newly allocated string. I{(string)} 16722 """ 16723 return None
16724
16725 -def gwy_app_get_data_key_for_id(id):
16726 """ 16727 Calculates data field quark identifier from its id. 16728 16729 16730 @param id: Numerical id of a channel in file (container). I{(int)} 16731 @return: The quark key identifying channel data field with number B{C{id}}. I{(int)} 16732 """ 16733 return None
16734
16735 -def gwy_app_get_data_meta_key_for_id(id):
16736 """ 16737 Calculates data field metadata quark identifier from its id. 16738 16739 @since: 2.43 16740 16741 @param id: Numerical id of a image in file (container). I{(int)} 16742 @return: The quark key identifying metadata container of image with number B{C{id}}. I{(int)} 16743 """ 16744 return None
16745
16746 -def gwy_app_get_data_palette_key_for_id(id):
16747 """ 16748 Calculates data field palette quark identifier from its id. 16749 16750 @since: 2.43 16751 16752 @param id: Numerical id of a image in file (container). I{(int)} 16753 @return: The quark key identifying string name palette of image with number B{C{id}}. I{(int)} 16754 """ 16755 return None
16756
16757 -def gwy_app_get_data_range_max_key_for_id(id):
16758 """ 16759 Calculates data field fixed range maximum quark identifier from its id. 16760 16761 @since: 2.43 16762 16763 @param id: Numerical id of a image in file (container). I{(int)} 16764 @return: The quark key identifying floating fixed false colour range maximum of image with number B{C{id}}. I{(int)} 16765 """ 16766 return None
16767
16768 -def gwy_app_get_data_range_min_key_for_id(id):
16769 """ 16770 Calculates data field fixed range minimum quark identifier from its id. 16771 16772 @since: 2.43 16773 16774 @param id: Numerical id of a image in file (container). I{(int)} 16775 @return: The quark key identifying floating fixed false colour range minimum of image with number B{C{id}}. I{(int)} 16776 """ 16777 return None
16778
16779 -def gwy_app_get_data_range_type_key_for_id(id):
16780 """ 16781 Calculates data field range type quark identifier from its id. 16782 16783 @since: 2.43 16784 16785 @param id: Numerical id of a image in file (container). I{(int)} 16786 @return: The quark key identifying B{C{LayerBasicRangeType}} false colour mapping type of image with number B{C{id}}. I{(int)} 16787 """ 16788 return None
16789
16790 -def gwy_app_get_data_real_square_key_for_id(id):
16791 """ 16792 Calculates data field real-square quark identifier from its id. 16793 16794 @since: 2.60 16795 16796 @param id: Numerical id of a image in file (container). I{(int)} 16797 @return: The quark key identifying boolean controlling real-square setting of image with number B{C{id}}. I{(int)} 16798 """ 16799 return None
16800
16801 -def gwy_app_get_data_title_key_for_id(id):
16802 """ 16803 Calculates data field title quark identifier from its id. 16804 16805 @since: 2.43 16806 16807 @param id: Numerical id of a image in file (container). I{(int)} 16808 @return: The quark key identifying string title of image with number B{C{id}}. I{(int)} 16809 """ 16810 return None
16811
16812 -def gwy_app_get_graph_key_for_id(id):
16813 """ 16814 Calculates graph model quark identifier from its id. 16815 16816 @since: 2.7 16817 16818 @param id: Numerical id of a graph in file (container). I{(int)} 16819 @return: The quark key identifying graph model with number B{C{id}}. I{(int)} 16820 """ 16821 return None
16822
16823 -def gwy_app_get_graph_thumbnail(data, id, max_width, max_height):
16824 """ 16825 Creates a graph thumbnail. 16826 16827 Note this function needs the GUI running (unlike the other thumbnail functions). It cannot be used in a console 16828 program. 16829 16830 @since: 2.45 16831 16832 @param data: A data container. I{(L{Container})} 16833 @param id: Graph model data id. I{(int)} 16834 @param max_width: Maximum width of the created pixbuf, it must be at least 2. I{(int)} 16835 @param max_height: Maximum height of the created pixbuf, it must be at least 2. I{(int)} 16836 @return: A newly created pixbuf with graph thumbnail. Since graphs do not have natural width and height, its size 16837 will normally be exactly B{C{max_width}} and B{C{max_height}}. I{(L{gdk.Pixbuf})} 16838 """ 16839 return None
16840
16841 -def gwy_app_get_lawn_key_for_id(id):
16842 """ 16843 Calculates B{C{Lawn}} curve map quark identifier from its id. 16844 16845 @since: 2.60 16846 16847 @param id: Numerical id of a B{C{Lawn}} curve map in file (container). I{(int)} 16848 @return: The quark key identifying B{C{Lawn}} curve map with number B{C{id}}. I{(int)} 16849 """ 16850 return None
16851
16852 -def gwy_app_get_lawn_meta_key_for_id(id):
16853 """ 16854 Calculates B{C{Lawn}} curve map title quark identifier from its id. 16855 16856 @since: 2.60 16857 16858 @param id: Numerical id of a B{C{Lawn}} curve map in file (container). I{(int)} 16859 @return: The quark key identifying metadata container of B{C{Lawn}} curve map with number B{C{id}}. I{(int)} 16860 """ 16861 return None
16862
16863 -def gwy_app_get_lawn_palette_key_for_id(id):
16864 """ 16865 Calculates B{C{Lawn}} curve map palette quark identifier from its id. 16866 16867 @since: 2.60 16868 16869 @param id: Numerical id of a B{C{Lawn}} curve map in file (container). I{(int)} 16870 @return: The quark key identifying string name palette of B{C{Lawn}} curve map with number B{C{id}}. I{(int)} 16871 """ 16872 return None
16873
16874 -def gwy_app_get_lawn_preview_key_for_id(id):
16875 """ 16876 Calculates B{C{Lawn}} curve map preview quark identifier from its id. 16877 16878 @since: 2.60 16879 16880 @param id: Numerical id of a B{C{Lawn}} curve map in file (container). I{(int)} 16881 @return: The quark key identifying preview data field of B{C{Lawn}} curve map with number B{C{id}}. I{(int)} 16882 """ 16883 return None
16884
16885 -def gwy_app_get_lawn_real_square_key_for_id(id):
16886 """ 16887 Calculates B{C{Lawn}} curve map real-square quark identifier from its id. 16888 16889 @since: 2.60 16890 16891 @param id: Numerical id of a B{C{Lawn}} curve map in file (container). I{(int)} 16892 @return: The quark key identifying boolean controlling real-square setting of B{C{Lawn}} curve map with number B{C{id}}. I{(int)} 16893 """ 16894 return None
16895
16896 -def gwy_app_get_lawn_title(data, id):
16897 """ 16898 Gets a B{C{Lawn}} curve map data title. 16899 16900 @since: 2.60 16901 16902 @param data: A data container. I{(L{Container})} 16903 @param id: XYZ data lawn id. I{(int)} 16904 @return: The lawn title as a newly allocated string. I{(string)} 16905 """ 16906 return None
16907
16908 -def gwy_app_get_lawn_title_key_for_id(id):
16909 """ 16910 Calculates B{C{Lawn}} curve map title quark identifier from its id. 16911 16912 @since: 2.60 16913 16914 @param id: Numerical id of a B{C{Lawn}} curve map in file (container). I{(int)} 16915 @return: The quark key identifying string title of B{C{Lawn}} curve map with number B{C{id}}. I{(int)} 16916 """ 16917 return None
16918
16919 -def gwy_app_get_log_text_buffer():
16920 """ 16921 Obtains a text buffer with program log messages. 16922 16923 This functions may only be called after L{gwy_app_setup_logging}() and, 16924 obviously, after GTK+ was intialised. 16925 16926 The text buffer is owned by the library and must not be modified nor 16927 destroyed. It will be already filled with messages occurring between 16928 L{gwy_app_setup_logging}() and this function call. New messages will be 16929 appended to the buffer as they arrive. 16930 16931 @since: 2.45 16932 16933 @return: Text buffer with the program log messages. I{(L{gtk.TextBuffer})} 16934 """ 16935 return None
16936
16937 -def gwy_app_get_mask_key_for_id(id):
16938 """ 16939 Calculates mask field quark identifier from its id. 16940 16941 16942 @param id: Numerical id of a channel in file (container). I{(int)} 16943 @return: The quark key identifying mask data field with number B{C{id}}. I{(int)} 16944 """ 16945 return None
16946
16947 -def gwy_app_get_show_key_for_id(id):
16948 """ 16949 Calculates presentation field quark identifier from its id. 16950 16951 16952 @param id: Numerical id of a channel in file (container). I{(int)} 16953 @return: The quark key identifying presentation data field with number B{C{id}}. I{(int)} 16954 """ 16955 return None
16956
16957 -def gwy_app_get_spectra_key_for_id(id):
16958 """ 16959 Calculates spectra quark identifier from its id. 16960 16961 @since: 2.7 16962 16963 @param id: Numerical id of a spectra set in file (container). I{(int)} 16964 @return: The quark key identifying spectra with number B{C{id}}. I{(int)} 16965 """ 16966 return None
16967
16968 -def gwy_app_get_surface_key_for_id(id):
16969 """ 16970 Calculates XYZ surface quark identifier from its id. 16971 16972 @since: 2.45 16973 16974 @param id: Numerical id of an XYZ surface in file (container). I{(int)} 16975 @return: The quark key identifying XYZ surface with number B{C{id}}. I{(int)} 16976 """ 16977 return None
16978
16979 -def gwy_app_get_surface_meta_key_for_id(id):
16980 """ 16981 Calculates XYZ surface title quark identifier from its id. 16982 16983 @since: 2.45 16984 16985 @param id: Numerical id of an XYZ surface in file (container). I{(int)} 16986 @return: The quark key identifying metadata container of XYZ surface with number B{C{id}}. I{(int)} 16987 """ 16988 return None
16989
16990 -def gwy_app_get_surface_palette_key_for_id(id):
16991 """ 16992 Calculates XYZ surface palette quark identifier from its id. 16993 16994 @since: 2.45 16995 16996 @param id: Numerical id of an XYZ surface in file (container). I{(int)} 16997 @return: The quark key identifying string name palette of XYZ surface with number B{C{id}}. I{(int)} 16998 """ 16999 return None
17000
17001 -def gwy_app_get_surface_preview_key_for_id(id):
17002 """ 17003 Calculates XYZ surface preview quark identifier from its id. 17004 17005 @since: 2.46 17006 17007 @param id: Numerical id of an XYZ surface in file (container). I{(int)} 17008 @return: The quark key identifying preview data field of XYZ surface with number B{C{id}}. I{(int)} 17009 """ 17010 return None
17011
17012 -def gwy_app_get_surface_title(data, id):
17013 """ 17014 Gets an XYZ surface data title. 17015 17016 @since: 2.45 17017 17018 @param data: A data container. I{(L{Container})} 17019 @param id: XYZ data surface id. I{(int)} 17020 @return: The surface title as a newly allocated string. I{(string)} 17021 """ 17022 return None
17023
17024 -def gwy_app_get_surface_title_key_for_id(id):
17025 """ 17026 Calculates data surface title quark identifier from its id. 17027 17028 @since: 2.45 17029 17030 @param id: Numerical id of a data surface in file (container). I{(int)} 17031 @return: The quark key identifying string title of data surface with number B{C{id}}. I{(int)} 17032 """ 17033 return None
17034
17035 -def gwy_app_get_tooltips():
17036 """ 17037 Gets the application-wide tooltips instance. 17038 17039 Do not use. Use gtk_widget_set_tooltip_text() or gtk_widget_set_tooltip_markup() instead. 17040 17041 17042 @return: The global tooltips instance. No reference is added, you can add yours, but the returned object will 17043 exist to the end of program anyway. I{(L{gtk.Tooltips})} 17044 """ 17045 return None
17046
17047 -def gwy_app_get_volume_thumbnail(data, id, max_width, max_height):
17048 """ 17049 Creates a volume thumbnail. 17050 17051 @since: 2.33 17052 17053 @param data: A data container. I{(L{Container})} 17054 @param id: Volume data id. I{(int)} 17055 @param max_width: Maximum width of the created pixbuf, it must be at least 2. I{(int)} 17056 @param max_height: Maximum height of the created pixbuf, it must be at least 2. I{(int)} 17057 @return: A newly created pixbuf with volume data thumbnail. It keeps the aspect ratio of the brick preview while 17058 not exceeding B{C{max_width}} and B{C{max_height}}. I{(L{gdk.Pixbuf})} 17059 """ 17060 return None
17061
17062 -def gwy_app_get_xyz_thumbnail(data, id, max_width, max_height):
17063 """ 17064 Creates an XYZ data thumbnail. 17065 17066 @since: 2.45 17067 17068 @param data: A data container. I{(L{Container})} 17069 @param id: XYZ surface data id. I{(int)} 17070 @param max_width: Maximum width of the created pixbuf, it must be at least 2. I{(int)} 17071 @param max_height: Maximum height of the created pixbuf, it must be at least 2. I{(int)} 17072 @return: A newly created pixbuf with XYZ data thumbnail. It keeps the aspect ratio of the brick preview while not 17073 exceeding B{C{max_width}} and B{C{max_height}}. I{(L{gdk.Pixbuf})} 17074 """ 17075 return None
17076
17077 -def gwy_app_gl_is_ok():
17078 """ 17079 Returns OpenGL availability. 17080 17081 17082 @return: The return value is the same as the return value of L{gwy_app_gl_init}() which needs to be called prior to 17083 this function (until then, the return value is always B{C{False}}). I{(bool)} 17084 """ 17085 return None
17086
17087 -def gwy_app_gl_material_editor():
17088 """ 17089 Creates or presents OpenGL material editor. 17090 17091 Material editor is singleton, therefore if it doesn't exist, this function 17092 creates and displays it. If it already exists, it simply calls 17093 gtk_window_present() on the existing instance. It exists until it's closed 17094 by user. 17095 17096 """ 17097 pass
17098
17099 -def gwy_app_gradient_editor():
17100 """ 17101 Creates or presents color gradient editor. 17102 17103 Gradient editor is singleton, therefore if it doesn't exist, this function 17104 creates and displays it. If it already exists, it simply calls 17105 gtk_window_present() on the existing instance. It exists until it's closed 17106 by user. 17107 17108 """ 17109 pass
17110
17111 -def gwy_app_init_i18n():
17112 """ 17113 Initializes internationalization. 17114 17115 Normally not needed to call explicitly. 17116 17117 """ 17118 pass
17119
17120 -def gwy_app_init_widget_styles():
17121 """ 17122 Sets up style properties for special Gwyddion widgets. 17123 17124 Normally not needed to call explicitly. 17125 17126 """ 17127 pass
17128
17129 -def gwy_app_log_browser_for_channel(data, id):
17130 """ 17131 Shows a simple log browser for a channel. 17132 17133 If the log browser is already shown for this channel it is just raised and given focus. Otherwise, a new window is 17134 created. 17135 17136 @since: 2.35 17137 17138 @param data: A data container. I{(L{Container})} 17139 @param id: Id of a channel in B{C{data}} to show log for. I{(int)} 17140 @return: The log browser (owned by the library). Usually, you can ignore the return value. I{(L{gtk.Widget})} 17141 """ 17142 return None
17143
17144 -def gwy_app_log_browser_for_curve_map(data, id):
17145 """ 17146 Shows a simple log browser for B{C{Lawn}} curve map. 17147 17148 If the log browser is already shown for this B{C{Lawn}} curve map it is just raised and given focus. Otherwise, 17149 a new window is created. 17150 17151 @since: 2.60 17152 17153 @param data: A data container. I{(L{Container})} 17154 @param id: Id of B{C{Lawn}} curve map in B{C{data}} to show log for. I{(int)} 17155 @return: The log browser (owned by the library). Usually, you can ignore the return value. I{(L{gtk.Widget})} 17156 """ 17157 return None
17158
17159 -def gwy_app_log_browser_for_volume(data, id):
17160 """ 17161 Shows a simple log browser for volume data. 17162 17163 If the log browser is already shown for this volume data it is just raised and given focus. Otherwise, a new 17164 window is created. 17165 17166 @since: 2.35 17167 17168 @param data: A data container. I{(L{Container})} 17169 @param id: Id of volume data in B{C{data}} to show log for. I{(int)} 17170 @return: The log browser (owned by the library). Usually, you can ignore the return value. I{(L{gtk.Widget})} 17171 """ 17172 return None
17173
17174 -def gwy_app_log_browser_for_xyz(data, id):
17175 """ 17176 Shows a simple log browser for XYZ data. 17177 17178 If the log browser is already shown for this XYZ data it is just raised and given focus. Otherwise, a new window 17179 is created. 17180 17181 @since: 2.45 17182 17183 @param data: A data container. I{(L{Container})} 17184 @param id: Id of XYZ data in B{C{data}} to show log for. I{(int)} 17185 @return: The log browser (owned by the library). Usually, you can ignore the return value. I{(L{gtk.Widget})} 17186 """ 17187 return None
17188
17189 -def gwy_app_main_window_get():
17190 """ 17191 Returns Gwyddion main application window (toolbox). 17192 17193 17194 @return: The Gwyddion toolbox. I{(L{gtk.Widget})} 17195 """ 17196 return None
17197
17198 -def gwy_app_main_window_set(window):
17199 """ 17200 Sets the main application window. 17201 17202 This function is probably only useful in Gwyddion itself and should be ignored. 17203 17204 It needs to be called exactly once at Gwyddion startup. It restores the toolbox position and makes 17205 L{gwy_app_main_window_get}() work. 17206 17207 @param window: A window, presumably the Gwyddion toolbox. I{(L{gtk.Widget})} 17208 """ 17209 pass
17210
17211 -def gwy_app_menu_recent_files_get():
17212 """ 17213 Gets the application recent files menu. 17214 17215 The menu is initially empty and can be updated with L{gwy_app_menu_recent_files_update}(). This function is 17216 essentially useful only for toolbox construction. 17217 17218 17219 @return: The recent files menu (a B{C{GtkMenu}}). I{(L{gtk.Widget})} 17220 """ 17221 return None
17222
17223 -def gwy_app_metadata_browser_for_channel(data, id):
17224 """ 17225 Shows a simple metadata browser for a channel. 17226 17227 If the metadata browser is already shown for this channel it is just raised and given focus. Otherwise, a new 17228 window is created. 17229 17230 @since: 2.32 17231 17232 @param data: A data container. I{(L{Container})} 17233 @param id: Id of a channel in B{C{data}} to show metadata for. I{(int)} 17234 @return: The metadata browser (owned by the library). Usually, you can ignore the return value. I{(L{gtk.Widget})} 17235 """ 17236 return None
17237
17238 -def gwy_app_metadata_browser_for_curve_map(data, id):
17239 """ 17240 Shows a simple metadata browser for curve map data. 17241 17242 If the metadata browser is already shown for this curve map data it is just raised and given focus. Otherwise, 17243 a new window is created. 17244 17245 @since: 2.60 17246 17247 @param data: A data container. I{(L{Container})} 17248 @param id: Id of curve map data in B{C{data}} to show metadata for. I{(int)} 17249 @return: The metadata browser (owned by the library). Usually, you can ignore the return value. I{(L{gtk.Widget})} 17250 """ 17251 return None
17252
17253 -def gwy_app_metadata_browser_for_volume(data, id):
17254 """ 17255 Shows a simple metadata browser for volume data. 17256 17257 If the metadata browser is already shown for this volume data it is just raised and given focus. Otherwise, a new 17258 window is created. 17259 17260 @since: 2.32 17261 17262 @param data: A data container. I{(L{Container})} 17263 @param id: Id of volume data in B{C{data}} to show metadata for. I{(int)} 17264 @return: The metadata browser (owned by the library). Usually, you can ignore the return value. I{(L{gtk.Widget})} 17265 """ 17266 return None
17267
17268 -def gwy_app_metadata_browser_for_xyz(data, id):
17269 """ 17270 Shows a simple metadata browser for XYZ data. 17271 17272 If the metadata browser is already shown for this XYZ data it is just raised and given focus. Otherwise, a new 17273 window is created. 17274 17275 @since: 2.45 17276 17277 @param data: A data container. I{(L{Container})} 17278 @param id: Id of XYZ data in B{C{data}} to show metadata for. I{(int)} 17279 @return: The metadata browser (owned by the library). Usually, you can ignore the return value. I{(L{gtk.Widget})} 17280 """ 17281 return None
17282
17283 -def gwy_app_process_func_save_use():
17284 """ 17285 Saves application data processing function statistics. 17286 17287 """ 17288 pass
17289
17290 -def gwy_app_process_menu_add_run_last(menu):
17291 """ 17292 Adds I{Re-show Last} and I{Repeat Last} items to application data 17293 process menu. 17294 17295 This function is essentially useful only for toolbox construction. 17296 17297 @param menu: Menu created with L{gwy_app_build_process_menu}(). I{(L{gtk.Widget})} 17298 """ 17299 pass
17300
17301 -def gwy_app_quit():
17302 """ 17303 Quits the application. 17304 17305 This function may present a confirmation dialog to the user and it may let the application to continue running. If 17306 it quits the application, it performs some shutdown actions and then quits the Gtk+ main loop with gtk_main_quit(). 17307 17308 17309 @return: Always B{C{True}} to be usable as an event handler. However, if the application is actually terminated, this 17310 function does not return. I{(bool)} 17311 """ 17312 return None
17313
17314 -def gwy_app_recent_file_get_thumbnail(filename_utf8):
17315 """ 17316 Gets thumbnail of a recently open file. 17317 17318 17319 @param filename_utf8: Name of a recent file, in UTF-8 encoding. I{(string)} 17320 @return: The thumbnail as a new pixbuf or a pixbuf with a new reference. 17321 The caller must unreference it but not modify it. If not 17322 thumbnail can not be obtained, a fully transparent pixbuf is 17323 returned. I{(L{gdk.Pixbuf})} 17324 """ 17325 return None
17326
17327 -def gwy_app_recent_file_list_load(filename):
17328 """ 17329 Loads list of recently open files from B{C{filename}}. 17330 17331 Cannot be called more than once (at least not without doing L{gwy_app_recent_file_list_free}() first). Must be called 17332 before any other document history function can be used, even if on a nonexistent file: use B{C{None}} as B{C{filename}} in 17333 that case. 17334 17335 17336 @param filename: Name of file containing list of recently open files. I{(string)} 17337 @return: B{C{True}} if the file was read successfully, B{C{False}} otherwise. I{(bool)} 17338 """ 17339 return None
17340
17341 -def gwy_app_recent_file_list_save(filename):
17342 """ 17343 Saves list of recently open files to B{C{filename}}. 17344 17345 17346 @param filename: Name of file to save the list of recently open files to. I{(string)} 17347 @return: B{C{True}} if the file was written successfully, B{C{False}} otherwise. I{(bool)} 17348 """ 17349 return None
17350
17351 -def gwy_app_recent_file_list_update(data, filename_utf8, filename_sys, hint):
17352 """ 17353 Moves B{C{filename_utf8}} to the first position in document history, possibly adding it if not present yet. 17354 17355 At least one of B{C{filename_utf8}}, B{C{filename_sys}} should be set. 17356 17357 @param data: A data container corresponding to the file. I{(L{Container})} 17358 @param filename_utf8: A recent file to insert or move to the first position in document history, in UTF-8. I{(string)} 17359 @param filename_sys: A recent file to insert or move to the first position in document history, in GLib encoding. I{(string)} 17360 @param hint: Preferred channel id to use for thumbnail, pass 0 if no channel is specificaly preferred. I{(int)} 17361 """ 17362 pass
17363
17364 -def gwy_app_restore_window_position(window, prefix, grow_only):
17365 """ 17366 Restores a window position and/or size from settings. 17367 17368 Unlike L{gwy_app_save_window_position}(), this function has no B{C{position}} and B{C{size}} arguments, it simply restores all 17369 attributes that were saved. 17370 17371 Note to restore position (not size) it should be called twice for each window to accommodate sloppy window 17372 managers: once before the window is shown, second time immediately after showing the window. 17373 17374 Some sanity checks are included, therefore if saved window position and/or size is too suspicious, it is not 17375 restored. 17376 17377 @param window: A window to restore position of. I{(L{gtk.Window})} 17378 @param prefix: Unique prefix in settings to get the information from (the same as 17379 in L{gwy_app_save_window_position}()). I{(string)} 17380 @param grow_only: B{C{True}} to only attempt set the window default size bigger than it 17381 requests, never smaller. I{(bool)} 17382 """ 17383 pass
17384
17385 -def gwy_app_run_curve_map_func(name):
17386 """ 17387 Runs a curve map processing function on the current data. 17388 17389 From the run modes function B{C{name}} supports, the most interactive one is selected. 17390 17391 @since: 2.45 17392 17393 @param name: A curve map processing function name. I{(string)} 17394 @return: The actually used mode (nonzero), or 0 on failure. I{(RunType)} 17395 """ 17396 return None
17397
17398 -def gwy_app_run_curve_map_func_in_mode(name, run):
17399 """ 17400 Runs a curve map processing function on current data in specified mode. 17401 17402 @since: 2.45 17403 17404 @param name: A curve map processing function name. I{(string)} 17405 @param run: A run mode. Expected values: C{B{RUN_NONE}}, C{B{RUN_NONINTERACTIVE}}, C{B{RUN_INTERACTIVE}}, C{B{RUN_IMMEDIATE}}, C{B{RUN_MASK}}. I{(L{RunType})} 17406 """ 17407 pass
17408
17409 -def gwy_app_run_graph_func(name):
17410 """ 17411 Runs a graph function on the current graph. 17412 17413 @param name: A graph function name. I{(string)} 17414 """ 17415 pass
17416
17417 -def gwy_app_run_process_func(name):
17418 """ 17419 Runs a data processing function on the current data. 17420 17421 From the run modes function B{C{name}} supports, the most interactive one is 17422 selected. 17423 17424 17425 @param name: A data processing function name. I{(string)} 17426 @return: The actually used mode (nonzero), or 0 on failure. I{(RunType)} 17427 """ 17428 return None
17429
17430 -def gwy_app_run_process_func_in_mode(name, run):
17431 """ 17432 Runs a data processing function on current data in specified mode. 17433 17434 @param name: A data processing function name. I{(string)} 17435 @param run: A run mode. Expected values: C{B{RUN_NONE}}, C{B{RUN_NONINTERACTIVE}}, C{B{RUN_INTERACTIVE}}, C{B{RUN_IMMEDIATE}}, C{B{RUN_MASK}}. I{(L{RunType})} 17436 """ 17437 pass
17438
17439 -def gwy_app_run_volume_func(name):
17440 """ 17441 Runs a volume data processing function on the current data. 17442 17443 From the run modes function B{C{name}} supports, the most interactive one is selected. 17444 17445 @since: 2.32 17446 17447 @param name: A volume data processing function name. I{(string)} 17448 @return: The actually used mode (nonzero), or 0 on failure. I{(RunType)} 17449 """ 17450 return None
17451
17452 -def gwy_app_run_volume_func_in_mode(name, run):
17453 """ 17454 Runs a volume data processing function on current data in specified mode. 17455 17456 @since: 2.32 17457 17458 @param name: A volume data processing function name. I{(string)} 17459 @param run: A run mode. Expected values: C{B{RUN_NONE}}, C{B{RUN_NONINTERACTIVE}}, C{B{RUN_INTERACTIVE}}, C{B{RUN_IMMEDIATE}}, C{B{RUN_MASK}}. I{(L{RunType})} 17460 """ 17461 pass
17462
17463 -def gwy_app_run_xyz_func(name):
17464 """ 17465 Runs a XYZ data processing function on the current data. 17466 17467 From the run modes function B{C{name}} supports, the most interactive one is selected. 17468 17469 @since: 2.45 17470 17471 @param name: A XYZ data processing function name. I{(string)} 17472 @return: The actually used mode (nonzero), or 0 on failure. I{(RunType)} 17473 """ 17474 return None
17475
17476 -def gwy_app_run_xyz_func_in_mode(name, run):
17477 """ 17478 Runs a XYZ data processing function on current data in specified mode. 17479 17480 @since: 2.45 17481 17482 @param name: A XYZ data processing function name. I{(string)} 17483 @param run: A run mode. Expected values: C{B{RUN_NONE}}, C{B{RUN_NONINTERACTIVE}}, C{B{RUN_INTERACTIVE}}, C{B{RUN_IMMEDIATE}}, C{B{RUN_MASK}}. I{(L{RunType})} 17484 """ 17485 pass
17486
17487 -def gwy_app_save_window_position(window, prefix, position, size):
17488 """ 17489 Saves position and/or size of a window to settings. 17490 17491 Some sanity checks are included, therefore if window position and/or size is too suspicious, it is not saved. 17492 17493 @param window: A window to save position of. I{(L{gtk.Window})} 17494 @param prefix: Unique prefix in settings to store the information under. I{(string)} 17495 @param position: B{C{True}} to save position information. I{(bool)} 17496 @param size: B{C{True}} to save size information. I{(bool)} 17497 """ 17498 pass
17499
17500 -def gwy_app_sensitivity_add_widget(widget, mask):
17501 """ 17502 Adds a widget to the application-wide widget sensitvity group. 17503 17504 The semantics of this function is the same as L{SensitivityGroup.add_widget}() (in fact, it's a simple wrapper 17505 around it). 17506 17507 @param widget: Widget to add. I{(L{gtk.Widget})} 17508 @param mask: Which flags the widget is sensitive to. Expected values: C{B{MENU_FLAG_DATA}}, C{B{MENU_FLAG_UNDO}}, C{B{MENU_FLAG_REDO}}, C{B{MENU_FLAG_GRAPH}}, C{B{MENU_FLAG_LAST_PROC}}, C{B{MENU_FLAG_LAST_GRAPH}}, C{B{MENU_FLAG_DATA_MASK}}, C{B{MENU_FLAG_DATA_SHOW}}, C{B{MENU_FLAG_3D}}, C{B{MENU_FLAG_FILE}}, C{B{MENU_FLAG_VOLUME}}, C{B{MENU_FLAG_XYZ}}, C{B{MENU_FLAG_CURVE_MAP}}, C{B{MENU_FLAG_GRAPH_CURVE}}, C{B{MENU_FLAG_MASK}}. I{(L{MenuSensFlags})} 17509 """ 17510 pass
17511
17512 -def gwy_app_sensitivity_get_group():
17513 """ 17514 Gets the application-wide widget sensitvity group. 17515 17516 The flags to be used with this sensitvity group are defined in B{C{MenuSensFlags}}. 17517 17518 17519 @return: The global sensitvity group instead. No reference is added, you can add yours, but the returned object 17520 will exist to the end of program anyway. I{(L{SensitivityGroup})} 17521 """ 17522 return None
17523
17524 -def gwy_app_sensitivity_set_state(affected_mask, state):
17525 """ 17526 Sets the state of application-wide widget sensitvity group. 17527 17528 The semantics of this function is the same as L{SensitivityGroup.set_state}() (in fact, it's a simple wrapper 17529 around it). 17530 17531 @param affected_mask: Which bits in B{C{state}} to copy to state. Expected values: C{B{MENU_FLAG_DATA}}, C{B{MENU_FLAG_UNDO}}, C{B{MENU_FLAG_REDO}}, C{B{MENU_FLAG_GRAPH}}, C{B{MENU_FLAG_LAST_PROC}}, C{B{MENU_FLAG_LAST_GRAPH}}, C{B{MENU_FLAG_DATA_MASK}}, C{B{MENU_FLAG_DATA_SHOW}}, C{B{MENU_FLAG_3D}}, C{B{MENU_FLAG_FILE}}, C{B{MENU_FLAG_VOLUME}}, C{B{MENU_FLAG_XYZ}}, C{B{MENU_FLAG_CURVE_MAP}}, C{B{MENU_FLAG_GRAPH_CURVE}}, C{B{MENU_FLAG_MASK}}. I{(L{MenuSensFlags})} 17532 @param state: The new state (masked with B{C{affected_mask}}). Expected values: C{B{MENU_FLAG_DATA}}, C{B{MENU_FLAG_UNDO}}, C{B{MENU_FLAG_REDO}}, C{B{MENU_FLAG_GRAPH}}, C{B{MENU_FLAG_LAST_PROC}}, C{B{MENU_FLAG_LAST_GRAPH}}, C{B{MENU_FLAG_DATA_MASK}}, C{B{MENU_FLAG_DATA_SHOW}}, C{B{MENU_FLAG_3D}}, C{B{MENU_FLAG_FILE}}, C{B{MENU_FLAG_VOLUME}}, C{B{MENU_FLAG_XYZ}}, C{B{MENU_FLAG_CURVE_MAP}}, C{B{MENU_FLAG_GRAPH_CURVE}}, C{B{MENU_FLAG_MASK}}. I{(L{MenuSensFlags})} 17533 """ 17534 pass
17535
17536 -def gwy_app_set_brick_title(data, id, name):
17537 """ 17538 Sets volume data title. 17539 17540 @since: 2.32 17541 17542 @param data: A data container. I{(L{Container})} 17543 @param id: The volume data brick id. I{(int)} 17544 @param name: The title to set. It can be B{C{None}} to use somthing like "Untitled". The id will be appended to it or 17545 (replaced in it if it already ends with digits). I{(string)} 17546 """ 17547 pass
17548
17549 -def gwy_app_set_current_directory(directory):
17550 """ 17551 Sets what the app should use as `current directory'. 17552 17553 Warning: This function is probably temporary. 17554 17555 @param directory: The directory to set, or a filename to take directory part from, it must be an absolute path. In GLib 17556 file name encoding. I{(string)} 17557 """ 17558 pass
17559
17560 -def gwy_app_set_data_field_title(data, id, name):
17561 """ 17562 Sets channel title. 17563 17564 @param data: A data container. I{(L{Container})} 17565 @param id: The data channel id. I{(int)} 17566 @param name: The title to set. It can be B{C{None}} to use somthing like "Untitled". The id will be appended to it or 17567 (replaced in it if it already ends with digits). I{(string)} 17568 """ 17569 pass
17570
17571 -def gwy_app_set_lawn_title(data, id, name):
17572 """ 17573 Sets B{C{Lawn}} curve map data title. 17574 17575 @since: 2.60 17576 17577 @param data: A data container. I{(L{Container})} 17578 @param id: The B{C{Lawn}} curve map data channel id. I{(int)} 17579 @param name: The title to set. It can be B{C{None}} to use somthing like "Untitled". The id will be appended to it or 17580 (replaced in it if it already ends with digits). I{(string)} 17581 """ 17582 pass
17583
17584 -def gwy_app_set_surface_title(data, id, name):
17585 """ 17586 Sets XYZ surface data title. 17587 17588 @since: 2.45 17589 17590 @param data: A data container. I{(L{Container})} 17591 @param id: The XYZ surface data channel id. I{(int)} 17592 @param name: The title to set. It can be B{C{None}} to use somthing like "Untitled". The id will be appended to it or 17593 (replaced in it if it already ends with digits). I{(string)} 17594 """ 17595 pass
17596
17597 -def gwy_app_settings_create_config_dir():
17598 """ 17599 Create gwyddion config directory. 17600 17601 17602 @return: Whether it succeeded (also returns B{C{True}} if the directory already 17603 exists). I{(bool)} 17604 """ 17605 return None
17606
17607 -def gwy_app_settings_error_quark():
17608 """ 17609 Returns error domain for application settings operations. 17610 17611 See and use B{C{APP_SETTINGS_ERROR}}. 17612 17613 17614 @return: The error domain. I{(int)} 17615 """ 17616 return None
17617
17618 -def gwy_app_settings_get():
17619 """ 17620 Gets the Gwyddion settings. 17621 17622 The program settings are a B{C{Container}} automatically loaded at program startup and saved ad its exit. For 17623 storing persistent module data manually you should use C{"/module/YOUR_MODULE_NAME/"} prefix. 17624 However, in common cases you should use B{C{ParamDef}} and B{C{Params}} which can handle the dirty work themselves. 17625 17626 17627 @return: The settings as a B{C{Container}}. I{(L{Container})} 17628 """ 17629 return None
17630
17631 -def gwy_app_settings_get_log_filename():
17632 """ 17633 Returns a suitable log file name. 17634 17635 17636 @return: The file name as a newly allocated string. I{(string)} 17637 """ 17638 return None
17639
17640 -def gwy_app_settings_get_recent_file_list_filename():
17641 """ 17642 Returns a suitable recent file list file name. 17643 17644 17645 @return: The file name as a newly allocated string. I{(string)} 17646 """ 17647 return None
17648
17649 -def gwy_app_settings_get_settings_filename():
17650 """ 17651 Returns a suitable human-readable settings file name. 17652 17653 17654 @return: The file name as a newly allocated string. I{(string)} 17655 """ 17656 return None
17657
17658 -def gwy_app_settings_load(filename):
17659 """ 17660 Loads settings file. 17661 17662 17663 @param filename: A filename to read settings from. I{(string)} 17664 @return: Whether it succeeded. In either case you can call L{gwy_app_settings_get}() then to obtain either the loaded 17665 settings or the old ones (if failed), or an empty B{C{Container}}. I{(bool)} 17666 """ 17667 return None
17668
17669 -def gwy_app_settings_save(filename):
17670 """ 17671 Saves the settings. 17672 17673 Use L{gwy_app_settings_get_settings_filename}() to obtain a suitable default filename. 17674 17675 17676 @param filename: A filename to save the settings to. I{(string)} 17677 @return: Whether it succeeded. I{(bool)} 17678 """ 17679 return None
17680
17681 -def gwy_app_setup_logging(flags):
17682 """ 17683 Sets up Gwyddion GLib log handler. 17684 17685 The log handler sends the messages to a log file or console, as Gwyddion 17686 usually does. This function may not be useful in Gwyddion-based programs 17687 unless they try to emulate Gwyddion behaviour closely. 17688 17689 @since: 2.45 17690 17691 @param flags: Flags controlling how messages are handled. Expected values: C{B{APP_LOGGING_TO_FILE}}, C{B{APP_LOGGING_TO_CONSOLE}}. I{(L{AppLoggingFlags})} 17692 """ 17693 pass
17694
17695 -def gwy_app_switch_tool(toolname):
17696 """ 17697 Switches the current tool to given tool. 17698 17699 If the tool is already active it is shown when hidden and hidden when 17700 visible. 17701 17702 @param toolname: Tool name, that is type name of the tool object in the GLib 17703 type system. This can be for instance "ToolGrainMeasure". I{(string)} 17704 """ 17705 pass
17706
17707 -def gwy_app_sync_data_items(source, dest, from_id, to_id, delete_too, items):
17708 """ 17709 Synchronizes auxiliary image data items between data containers. 17710 17711 @param source: Source container. I{(L{Container})} 17712 @param dest: Target container (may be identical to source). I{(L{Container})} 17713 @param from_id: Data number to copy items from. I{(int)} 17714 @param to_id: Data number to copy items to. I{(int)} 17715 @param delete_too: B{C{True}} to delete items in target if source does not contain 17716 them, B{C{False}} to copy only. I{(bool)} 17717 @param items: I{(list)} 17718 """ 17719 pass
17720
17721 -def gwy_app_undo_checkpoint(container, keys):
17722 """ 17723 Create a point in the undo history it is possible to return to. 17724 17725 In addition to what L{gwy_undo_checkpoint}() does, this function takes care 17726 of updating application controls state. 17727 17728 17729 @param container: I{(L{Container})} 17730 @param keys: I{(StringArray*)} 17731 @return: Undo level id (zero if undo/redo is disabled). Not useful (yet). I{(gulong)} 17732 """ 17733 return None
17734
17735 -def gwy_app_undo_container_remove(data, prefix):
17736 """ 17737 Removes undo/redo information for a data container. 17738 17739 In addition to what L{gwy_undo_container_remove}() does, this function takes 17740 care of updating application controls state. 17741 17742 @since: 2.23 17743 17744 @param data: A data container managed by the data-browser. I{(L{Container})} 17745 @param prefix: Prefix to remove undo/redo information under. Pass B{C{None}} to remove 17746 undo/redo information altogether. I{(string)} 17747 """ 17748 pass
17749
17750 -def gwy_app_undo_qcheckpoint(container, keys):
17751 """ 17752 Create a point in the undo history it is possible to return to. 17753 17754 In addition to what L{gwy_undo_checkpoint}() does, this function takes care 17755 of updating application controls state. 17756 17757 17758 @param container: I{(L{Container})} 17759 @param keys: I{(list)} 17760 @return: Undo level id. Not useful (yet). I{(gulong)} 17761 """ 17762 return None
17763
17764 -def gwy_app_undo_redo_container(data):
17765 """ 17766 Performs undo on a data container. 17767 17768 It must have redo available. 17769 17770 In addition to what L{gwy_undo_redo_container}() does, this function takes care 17771 of updating application controls state. 17772 17773 @param data: A data container. I{(L{Container})} 17774 """ 17775 pass
17776
17777 -def gwy_app_undo_undo_container(data):
17778 """ 17779 Performs undo on a data container. 17780 17781 It must have undo available. 17782 17783 In addition to what L{gwy_undo_undo_container}() does, this function takes care 17784 of updating application controls state. 17785 17786 @param data: A data container. I{(L{Container})} 17787 """ 17788 pass
17789
17790 -def gwy_app_volume_log_add_volume(data, previd, newid):
17791 """ 17792 Adds an entry to the log of the current volume data processing operations for volume data. 17793 17794 This simplified variant of L{gwy_app_volume_log_add}() takes the currently running function volume data processing 17795 name and constructs the qualified function name from that. 17796 17797 @since: 2.38 17798 17799 @param data: A data container. I{(L{Container})} 17800 @param previd: Identifier of the previous (source) volume data in the container. 17801 Pass -1 for a no-source (or unclear source) operation. I{(int)} 17802 @param newid: Identifier of the new (target) volume data in the container. I{(int)} 17803 """ 17804 pass
17805
17806 -def gwy_app_wait_cursor_finish(window):
17807 """ 17808 Resets the cursor for a window. 17809 17810 This function lets the Gtk+ main loop to run. 17811 17812 If the window cursor was non-default before L{gwy_app_wait_cursor_start}(), it is not restored and has to be set 17813 manually. This limitation is due to the nonexistence of a method to obtain the current cursor. 17814 17815 @since: 2.3 17816 17817 @param window: A window. I{(L{gtk.Window})} 17818 """ 17819 pass
17820
17821 -def gwy_app_wait_cursor_start(window):
17822 """ 17823 Changes the cursor for a window to indicate work. 17824 17825 This function lets the Gtk+ main loop to run. 17826 17827 @since: 2.3 17828 17829 @param window: A window. I{(L{gtk.Window})} 17830 """ 17831 pass
17832
17833 -def gwy_app_wait_finish():
17834 """ 17835 Finishes waiting, closing the dialog. 17836 17837 No function like L{gwy_app_wait_set_message}() should be call after that. 17838 17839 This function must be called even if user cancelled the operation. 17840 17841 """ 17842 pass
17843
17844 -def gwy_app_wait_get_enabled():
17845 """ 17846 Reports whether progress reporting is globally enabled. 17847 17848 @since: 2.48 17849 17850 @return: B{C{True}} if progress reporting is enabled, B{C{False}} if it is disabled. I{(bool)} 17851 """ 17852 return None
17853
17854 -def gwy_app_wait_preview_data_field(dfield, data, id):
17855 """ 17856 Helper function for progressive animated preview. 17857 17858 This is a wrapper for L{gwy_app_wait_set_preview_widget}() which creates a simple image preview displaying B{C{dfield}}. 17859 Call L{DataField.data_changed}() on it to redraw the preview. 17860 17861 No preview is created if progress bars are disabled, see L{gwy_app_wait_set_enabled}(). 17862 17863 @since: 2.59 17864 17865 @param dfield: A data field used for preview. I{(L{DataField})} 17866 @param data: Data container with source image (or B{C{None}}). I{(L{Container})} 17867 @param id: Source image id (or -1). I{(int)} 17868 @return: The created B{C{DataView}} with the preview (possibly B{C{None}} if not preview was actually created). Usually 17869 you can ignore it. I{(L{gtk.Widget})} 17870 """ 17871 return None
17872
17873 -def gwy_app_wait_set_enabled(setting):
17874 """ 17875 Globally enables or disables progress reporting. 17876 17877 This function may not be used when a waiting dialog is currently being shown. 17878 17879 By default, progress reporting is enabled. Non-GUI applications that run module functions may wish to disable it 17880 to avoid GTK+ calls or just showing the progress dialogs. 17881 17882 If progress reporting is disabled then functions such as L{gwy_app_wait_set_message}() and L{gwy_app_wait_set_fraction}() 17883 become no-op and always return B{C{True}} as nothing can be cancelled by the user. Functions 17884 L{gwy_app_wait_cursor_start}() and L{gwy_app_wait_cursor_finish}() still work but may be called with B{C{None}} arguments. 17885 17886 @since: 2.48 17887 17888 @param setting: B{C{True}} to enable progress reporting, B{C{False}} to disable it. I{(bool)} 17889 """ 17890 pass
17891
17892 -def gwy_app_wait_set_fraction(fraction):
17893 """ 17894 Sets the amount of progress the progress bar on the dialog displays. 17895 17896 This function may let the Gtk+ main loop to run. It used to let the main loop to run always. Since version 2.46 17897 it performs automated rate-limiting and only does so if sufficient time has passed since the last main loop 17898 invocation. Therefore, you can call it 10000 times per second without fearing that the program will spend all time 17899 updating the GUI and no time in the calculation. 17900 17901 It must not be called again once the operation is cancelled, i.e. after any of the progress reporting functions 17902 return B{C{False}}. 17903 17904 17905 @param fraction: The progress of the operation, as a number from 0 to 1. I{(float)} 17906 @return: B{C{True}} if the operation can continue, B{C{False}} if user cancelled it meanwhile. You must always check the 17907 return value and cancel the operation if it is B{C{False}}. I{(bool)} 17908 """ 17909 return None
17910
17911 -def gwy_app_wait_set_message(message):
17912 """ 17913 Sets the message shown on the progress dialog. 17914 17915 See also L{gwy_app_wait_set_message_prefix}() which makes this function more usable directly as a callback. 17916 17917 This function lets the Gtk+ main loop to run. 17918 17919 It must not be called again once the operation is cancelled, i.e. after any of the progress reporting functions 17920 return B{C{False}}. 17921 17922 17923 @param message: A mesage to show in the progress dialog. I{(string)} 17924 @return: B{C{True}} if the operation can continue, B{C{False}} if user cancelled it meanwhile. You must always check the 17925 return value and cancel the operation if it is B{C{False}}. I{(bool)} 17926 """ 17927 return None
17928
17929 -def gwy_app_wait_set_message_prefix(prefix):
17930 """ 17931 Sets prefix for the messages shown in the progress dialog. 17932 17933 The prefix will take effect in the next L{gwy_app_wait_set_message}() call. 17934 17935 This function lets the Gtk+ main loop to run. 17936 17937 It must not be called again once the operation is cancelled, i.e. after any of the progress reporting functions 17938 return B{C{False}}. 17939 17940 17941 @param prefix: The prefix for new messages. I{(string)} 17942 @return: B{C{True}} if the operation can continue, B{C{False}} if user cancelled it meanwhile. You must always check the 17943 return value and cancel the operation if it is B{C{False}}. I{(bool)} 17944 """ 17945 return None
17946
17947 -def gwy_app_wait_set_preview_widget(widget):
17948 """ 17949 Sets the preview widget of a wait dialogue. 17950 17951 This function needs to be used before L{gwy_app_wait_start}() to have any effect. 17952 17953 @since: 2.54 17954 17955 @param widget: Preview widget, usually something like B{C{DataView}}. I{(L{gtk.Widget})} 17956 """ 17957 pass
17958
17959 -def gwy_app_wait_start(window, message):
17960 """ 17961 Starts waiting for a window B{C{window}}, creating a dialog with a progress bar. 17962 17963 Waiting is global, there can be only one at a time. 17964 17965 Do not forget to call L{gwy_app_wait_finish}() when the computation is finished (or cancelled). You should also call 17966 L{gwy_app_wait_set_fraction}() or L{gwy_app_wait_set_message}() regularly to leave the GUI responsive. 17967 17968 @param window: A window. I{(L{gtk.Window})} 17969 @param message: A message to show in the wait dialog. I{(string)} 17970 """ 17971 pass
17972
17973 -def gwy_app_wait_was_canceled():
17974 """ 17975 Checks if a progress dialog was cancelled. 17976 17977 Calling this function is only meaningful between L{gwy_app_wait_start}() and L{gwy_app_wait_finish}(). It returns B{C{True}} 17978 if the computation was cancelled by the user. This may be occasionaly useful in complex multi-level calculations. 17979 Usually, the return values of L{gwy_app_wait_set_fraction}() and L{gwy_app_wait_set_message}() are sufficient. 17980 17981 @since: 2.49 17982 17983 @return: B{C{True}} if the currently running calculation was cancelled. I{(bool)} 17984 """ 17985 return None
17986
17987 -def gwy_app_xyz_log_add_xyz(data, previd, newid):
17988 """ 17989 Adds an entry to the log of the current XYZ data processing operations for XYZ data. 17990 17991 This simplified variant of L{gwy_app_xyz_log_add}() takes the currently running function XYZ data processing name and 17992 constructs the qualified function name from that. 17993 17994 @since: 2.45 17995 17996 @param data: A data container. I{(L{Container})} 17997 @param previd: Identifier of the previous (source) XYZ data in the container. 17998 Pass -1 for a no-source (or unclear source) operation. I{(int)} 17999 @param newid: Identifier of the new (target) XYZ data in the container. I{(int)} 18000 """ 18001 pass
18002
18003 -def gwy_app_xyz_title_fall_back(data, id):
18004 """ 18005 Adds a XYZ data title based on surface value units. 18006 18007 The guess is very simple, but probably better than `Unknown channel' in 18008 most cases. If there already is a title it is left intact, making use of 18009 this function as a fall-back easier. 18010 18011 @since: 2.45 18012 18013 @param data: A data container. I{(L{Container})} 18014 @param id: XYZ surface data id. I{(int)} 18015 @return: B{C{True}} if the title was set (either by this function or before). I{(bool)} 18016 """ 18017 return None
18018
18019 -def gwy_canonicalize_angle(phi, positive, oriented):
18020 """ 18021 Canonicalizes an angle to requested interval. 18022 18023 For B{C{positive}}=B{C{False}}, B{C{oriented}}=B{C{False}} the output interval is [-π/2,π/2]. 18024 18025 For B{C{positive}}=B{C{False}}, B{C{oriented}}=B{C{True}} the output interval is [-π,π]. 18026 18027 For B{C{positive}}=B{C{True}}, B{C{oriented}}=B{C{False}} the output interval is [0,π). 18028 18029 For B{C{positive}}=B{C{True}}, B{C{oriented}}=B{C{True}} the output interval is [0,2π). 18030 18031 @since: 2.50 18032 18033 @param phi: Angle to canonicalize, in radians. I{(float)} 18034 @param positive: B{C{True}} if a positive angle is requested, B{C{False}} for outputs symmetrical around zero. I{(bool)} 18035 @param oriented: B{C{True}} for direction of a vector, B{C{False}} for the direction of a line (i.e. with no distinction between 18036 forward and backward direction). I{(bool)} 18037 @return: Canonicalized angle, equivalent (in given sense) to B{C{phi}}. I{(float)} 18038 """ 18039 return None
18040
18041 -def gwy_canonicalize_path(path):
18042 """ 18043 Canonicalizes a filesystem path. 18044 18045 Particularly it makes the path absolute, resolves `..' and `.', and fixes slash sequences to single slashes. On 18046 Win32 it also converts all backslashes to slashes along the way. 18047 18048 Note this function does NOT resolve symlinks, use g_file_read_link() for that. 18049 18050 18051 @param path: A filesystem path. I{(string)} 18052 @return: The canonical path, as a newly created string. I{(string)} 18053 """ 18054 return None
18055
18056 -def gwy_cdlines():
18057 """ 18058 Gets inventory with all the critical dimension evaluators. 18059 18060 18061 @return: Critical dimension evaluator inventory. I{(L{Inventory})} 18062 """ 18063 return None
18064
18065 -def gwy_check_box_get_value(checkbox):
18066 """ 18067 Gets the flag value associated with a check box. 18068 18069 @since: 2.51 18070 18071 @param checkbox: A check box belonging to a group created by 18072 L{gwy_check_boxes_create}() or L{gwy_check_boxes_createl}(). I{(L{gtk.Widget})} 18073 @return: The flag value corresponding to B{C{button}}. I{(int)} 18074 """ 18075 return None
18076
18077 -def gwy_color_axis_new_with_range(orientation, min, max):
18078 """ 18079 Creates a new color axis. 18080 18081 18082 @param orientation: The orientation of the axis. I{(GtkOrientation)} 18083 @param min: The minimum. I{(float)} 18084 @param max: The maximum. I{(float)} 18085 @return: The newly created color axis as a B{C{GtkWidget}}. I{(L{gtk.Widget})} 18086 """ 18087 return None
18088
18089 -def gwy_color_button_new_with_color(color):
18090 """ 18091 Creates a new color button. 18092 18093 18094 @param color: A B{C{RGBA}} to set the current color with. I{(const-RGBA*)} 18095 @return: a new color button. I{(L{gtk.Widget})} 18096 """ 18097 return None
18098
18099 -def gwy_color_selector_for_mask(dialog_title, color_button, container, prefix):
18100 """ 18101 Creates and runs a color selector dialog for a mask. 18102 18103 See L{gwy_mask_color_selector_run}() for details. 18104 18105 @param dialog_title: Title of the color selection dialog (B{C{None}} to use default). I{(string)} 18106 @param color_button: Color button to update on color change (or B{C{None}}). I{(L{ColorButton})} 18107 @param container: Container to initialize the color from and save it to. I{(L{Container})} 18108 @param prefix: Prefix in B{C{container}} (normally "/0/mask"). I{(string)} 18109 """ 18110 pass
18111
18112 -def gwy_combo_box_graph_curve_new(gmodel, current):
18113 """ 18114 Creates an enum combo box with curves from a graph model. 18115 18116 This function is intended for selection of curves from static graphs in graph modules. The graph model is not 18117 permitted to change. 18118 18119 @since: 2.45 18120 18121 @param gmodel: A graph model. I{(L{GraphModel})} 18122 @param current: Index of currently selected curve. I{(int)} 18123 @return: The newly created combo box as B{C{GtkWidget}}. I{(L{gtk.Widget})} 18124 """ 18125 return None
18126
18127 -def gwy_combo_box_metric_unit_new(from_, to, unit, active):
18128 """ 18129 Creates an enum combo box with SI power of 10 multiplies. 18130 18131 The integer value is the power of 10. 18132 18133 18134 @param from_: I{(int)} 18135 @param to: The exponent of 10 the menu should end at (a multiple of 3, will be rounded upward if isn't). I{(int)} 18136 @param unit: The unit to be prefixed. I{(L{SIUnit})} 18137 @param active: The power of 10 to show as currently selected (a multiple of 3). I{(int)} 18138 @return: The newly created combo box as B{C{GtkWidget}}. I{(L{gtk.Widget})} 18139 """ 18140 return None
18141
18142 -def gwy_combo_box_metric_unit_set_unit(combo, from_, to, unit):
18143 """ 18144 Changes the unit selection displayed by a metric unit combo box. 18145 18146 @since: 2.5 18147 18148 @param combo: A combo box which was created with L{gwy_combo_box_metric_unit_new}(). I{(L{gtk.ComboBox})} 18149 @param from_: I{(int)} 18150 @param to: The exponent of 10 the menu should end at (a multiple of 3, will be rounded upward if isn't). I{(int)} 18151 @param unit: The unit to be prefixed. I{(L{SIUnit})} 18152 """ 18153 pass
18154
18155 -def gwy_construct_grain_quantity_units(quantity, siunitxy, siunitz):
18156 return None
18157
18158 -def gwy_container_deserialize_from_text(text):
18159 """ 18160 Restores a container from is text representation. 18161 18162 18163 @param text: Text containing serialized container contents as dumped by 18164 L{Container.serialize_to_text}(). I{(string)} 18165 @return: The restored container, or B{C{None}} on failure. I{(L{Container})} 18166 """ 18167 return None
18168
18169 -def gwy_create_dialog_preview_hbox(dialog, dataview, pack_end):
18170 """ 18171 Creates the typical data processing dialog hbox with a preview. 18172 18173 The box is added to the dialog. 18174 18175 @since: 2.59 18176 18177 @param dialog: A data processing dialog. I{(L{gtk.Dialog})} 18178 @param dataview: Preview data view, usually created by L{gwy_create_preview}(). I{(L{DataView})} 18179 @param pack_end: B{C{True}} to pack the data view to the end; B{C{False}} to pack it to the start. I{(bool)} 18180 @return: A new B{C{GtkBox}} widget. I{(L{gtk.Widget})} 18181 """ 18182 return None
18183
18184 -def gwy_create_preview(data, id, size, have_mask):
18185 """ 18186 Creates and sets up a preview widget for use in modules. 18187 18188 @since: 2.59 18189 18190 @param data: Data container with images to preview. I{(L{Container})} 18191 @param id: Data id of preview image in B{C{data}}. I{(int)} 18192 @param size: Preview size. Prefrably one of the standard sizes. I{(int)} 18193 @param have_mask: B{C{True}} if the preview will have mask and should be set up so. I{(bool)} 18194 @return: A new data view widget with the preview. I{(L{gtk.Widget})} 18195 """ 18196 return None
18197
18198 -def gwy_create_preview_vector_layer(dataview, id, name, max_objects, editable):
18199 """ 18200 Creates and sets up a vector layer for use in module previews. 18201 18202 The selection's key will have the form "/0/select/lcname", where B{C{lcname}} is the lowercase version of B{C{name}}. You 18203 can query the layer using B{C{DataView}} functions. 18204 18205 Parameters B{C{max_objects}} and B{C{editable}} exist for convenience. The corresponding properties can be modified later. 18206 18207 In typical scenarios this function is also suitable for switching vector layers in the preview. Simply create 18208 a different layer and the current one will be discarded – this assumes you do not keep the old layer object around. 18209 Selections are kept in B{C{dataview}}'s data, so they will be automatically restored when switching back and forth. 18210 18211 @since: 2.61 18212 18213 @param dataview: Preview data view, usually created by L{gwy_create_preview}(). I{(L{DataView})} 18214 @param id: Data id of preview image in B{C{dataview}}'s data. I{(int)} 18215 @param name: Layer/selection type name, without the Layer/Selection prefix. So usually "Point", "Line" or 18216 "Rectangle". I{(string)} 18217 @param max_objects: Maximum number of objects in the selection. I{(int)} 18218 @param editable: B{C{True}} for a user-editable selection, B{C{False}} to disable editing. I{(bool)} 18219 @return: The layer's selection. No reference is added; use g_object_ref() if you want to keep the selection 18220 around after the preview is destroyed. I{(L{Selection})} 18221 """ 18222 return None
18223
18224 -def gwy_curve_map_func_current():
18225 """ 18226 Obtains the name of currently running curve map processing function. 18227 18228 If no curve map processing function is currently running, B{C{None}} is returned. 18229 18230 If multiple nested functions are running (which is not usual but technically possible), the innermost function name 18231 is returned. 18232 18233 @since: 2.60 18234 18235 @return: The name of currently running curve map processing function or B{C{None}}. I{(string)} 18236 """ 18237 return None
18238
18239 -def gwy_curve_map_func_exists(name):
18240 """ 18241 Checks whether a curve map processing function exists. 18242 18243 @since: 2.60 18244 18245 @param name: Curve map data processing function name. I{(string)} 18246 @return: B{C{True}} if function B{C{name}} exists, B{C{False}} otherwise. I{(bool)} 18247 """ 18248 return None
18249
18250 -def gwy_curve_map_func_get_menu_path(name):
18251 """ 18252 Returns the menu path of a curve map processing function. 18253 18254 The returned menu path is only the tail part registered by the function, i.e., without any leading "/Curve Map". 18255 18256 @since: 2.60 18257 18258 @param name: Curve map data processing function name. I{(string)} 18259 @return: The menu path. The returned string is owned by the module. I{(string)} 18260 """ 18261 return None
18262
18263 -def gwy_curve_map_func_get_run_types(name):
18264 """ 18265 Returns run modes supported by a curve map processing function. 18266 18267 @since: 2.60 18268 18269 @param name: Curve map data processing function name. I{(string)} 18270 @return: The run mode bit mask. I{(RunType)} 18271 """ 18272 return None
18273
18274 -def gwy_curve_map_func_get_sensitivity_mask(name):
18275 """ 18276 Gets menu sensititivy mask for a curve map processing function. 18277 18278 @since: 2.60 18279 18280 @param name: Curve map data processing function name. I{(string)} 18281 @return: The menu item sensitivity mask (a combination of B{C{MenuSensFlags}} flags). I{(int)} 18282 """ 18283 return None
18284
18285 -def gwy_curve_map_func_get_stock_id(name):
18286 """ 18287 Gets stock icon id of a curve map processing function. 18288 18289 @since: 2.60 18290 18291 @param name: Curve map data processing function name. I{(string)} 18292 @return: The stock icon id. The returned string is owned by the module. I{(string)} 18293 """ 18294 return None
18295
18296 -def gwy_curve_map_func_get_tooltip(name):
18297 """ 18298 Gets tooltip for a curve map processing function. 18299 18300 @since: 2.60 18301 18302 @param name: Curve map data processing function name. I{(string)} 18303 @return: The tooltip. The returned string is owned by the module. I{(string)} 18304 """ 18305 return None
18306
18307 -def gwy_curve_map_func_run(name, data, run):
18308 """ 18309 Runs a curve map processing function identified by B{C{name}}. 18310 18311 @since: 2.60 18312 18313 @param name: Curve map data processing function name. I{(string)} 18314 @param data: Data (a B{C{Container}}). I{(L{Container})} 18315 @param run: How the function should be run. Expected values: C{B{RUN_NONE}}, C{B{RUN_NONINTERACTIVE}}, C{B{RUN_INTERACTIVE}}, C{B{RUN_IMMEDIATE}}, C{B{RUN_MASK}}. I{(L{RunType})} 18316 """ 18317 pass
18318
18319 -def gwy_cwt_wfunc_2d(scale, mval, xres, wtype):
18320 return None
18321
18322 -def gwy_data_chooser_new_channels():
18323 """ 18324 Creates a data chooser for data channels. 18325 18326 18327 @return: A new channel chooser. Nothing may be assumed about the type and properties of the returned widget as 18328 they can change in the future. I{(L{gtk.Widget})} 18329 """ 18330 return None
18331
18332 -def gwy_data_chooser_new_curve_maps():
18333 """ 18334 Creates a data chooser for curve map data. 18335 18336 @since: 2.60 18337 18338 @return: A new curve map data chooser. Nothing may be assumed about the type and properties of the returned widget 18339 as they can change in the future. I{(L{gtk.Widget})} 18340 """ 18341 return None
18342
18343 -def gwy_data_chooser_new_graphs():
18344 """ 18345 Creates a data chooser for graphs. 18346 18347 @since: 2.41 18348 18349 @return: A new graph chooser. Nothing may be assumed about the type and properties of the returned widget as they 18350 can change in the future. I{(L{gtk.Widget})} 18351 """ 18352 return None
18353
18354 -def gwy_data_chooser_new_volumes():
18355 """ 18356 Creates a data chooser for volume data. 18357 18358 @since: 2.33 18359 18360 @return: A new volume chooser. Nothing may be assumed about the type and properties of the returned widget as they 18361 can change in the future. I{(L{gtk.Widget})} 18362 """ 18363 return None
18364
18365 -def gwy_data_chooser_new_xyzs():
18366 """ 18367 Creates a data chooser for XYZ data. 18368 18369 @since: 2.45 18370 18371 @return: A new XYZ data chooser. Nothing may be assumed about the type and properties of the returned widget as 18372 they can change in the future. I{(L{gtk.Widget})} 18373 """ 18374 return None
18375
18376 -def gwy_data_field_correlate_finalize(state):
18377 """ 18378 Destroys a correlation iterator, freeing all resources. 18379 18380 @param state: Correlation iterator. I{(ComputationState*)} 18381 """ 18382 pass
18383
18384 -def gwy_data_field_correlate_iteration(state):
18385 """ 18386 Performs one iteration of correlation. 18387 18388 An iterator can be created with L{DataField.correlate_init}(). When iteration ends, either by finishing or being 18389 aborted, L{DataField.correlate_finalize}() must be called to release allocated resources. 18390 18391 @param state: Correlation iterator. I{(ComputationState*)} 18392 """ 18393 pass
18394
18395 -def gwy_data_field_crosscorrelate_finalize(state):
18396 """ 18397 Destroys a cross-correlation iterator, freeing all resources. 18398 18399 @param state: Cross-correlation iterator. I{(ComputationState*)} 18400 """ 18401 pass
18402
18403 -def gwy_data_field_crosscorrelate_iteration(state):
18404 """ 18405 Performs one iteration of cross-correlation. 18406 18407 Cross-correlation matches two different images of the same object under changes. 18408 18409 It does not use any special features for matching. It simply searches for all points (with their neighbourhood) of 18410 B{C{data_field1}} within B{C{data_field2}}. Parameters B{C{search_width}} and B{C{search_height}} determine maimum area where to search 18411 for points. The area is cenetered in the B{C{data_field2}} at former position of points at B{C{data_field1}}. 18412 18413 A cross-correlation iterator can be created with L{DataField.crosscorrelate_init}(). When iteration ends, either 18414 by finishing or being aborted, L{DataField.crosscorrelate_finalize}() must be called to release allocated 18415 resources. 18416 18417 @param state: Cross-correlation iterator. I{(ComputationState*)} 18418 """ 18419 pass
18420
18421 -def gwy_data_field_crosscorrelate_set_weights(state, type):
18422 """ 18423 Sets the weight function to be used within iterative cross-correlation algorithm. 18424 18425 By default (not setting it), rectangular windowing is used. This function should be called before running first 18426 iteration to get consistent results. 18427 18428 @param state: Cross-correlation iterator. I{(ComputationState*)} 18429 @param type: Set windowing type to be set as correlation weight, see B{C{WindowingType}} for details. 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})} 18430 """ 18431 pass
18432
18433 -def gwy_data_field_fractal_cubecounting_dim(xresult, yresult):
18434 """ 18435 Computes fractal dimension by cube counting method from log-log plot data. 18436 18437 The B{C{xresult}} and B{C{yresult}} data lines are usually calculated by L{DataField.fractal_cubecounting}(). 18438 18439 18440 @param xresult: Log-log fractal data (x values). I{(L{DataLine})} 18441 @param yresult: Log-log fractal data (y values). I{(L{DataLine})} 18442 @return: Tuple consisting of 3 values (B{C{value}}, B{C{a}}, B{C{b}}). (I{(float)}, I{(float)}, I{(float)}) 18443 """ 18444 return None, None, None
18445
18446 -def gwy_data_field_fractal_partitioning_dim(xresult, yresult):
18447 """ 18448 Computes fractal dimension by partitioning method from log-log plot data. 18449 18450 The B{C{xresult}} and B{C{yresult}} data lines are usually calculated by L{DataField.fractal_partitioning}(). 18451 18452 18453 @param xresult: Log-log fractal data (x values). I{(L{DataLine})} 18454 @param yresult: Log-log fractal data (y values). I{(L{DataLine})} 18455 @return: Tuple consisting of 3 values (B{C{value}}, B{C{a}}, B{C{b}}). (I{(float)}, I{(float)}, I{(float)}) 18456 """ 18457 return None, None, None
18458
18459 -def gwy_data_field_fractal_psdf_dim(xresult, yresult):
18460 """ 18461 Computes fractal dimension by spectral density function method from log-log plot data. 18462 18463 The B{C{xresult}} and B{C{yresult}} data lines are usually calculated by L{DataField.fractal_psdf}(). 18464 18465 18466 @param xresult: Log-log fractal data (x values). I{(L{DataLine})} 18467 @param yresult: Log-log fractal data (y values). I{(L{DataLine})} 18468 @return: Tuple consisting of 3 values (B{C{value}}, B{C{a}}, B{C{b}}). (I{(float)}, I{(float)}, I{(float)}) 18469 """ 18470 return None, None, None
18471
18472 -def gwy_data_field_fractal_triangulation_dim(xresult, yresult):
18473 """ 18474 Computes fractal dimension by triangulation method from log-log plot data. 18475 18476 The B{C{xresult}} and B{C{yresult}} data lines are usually calculated by L{DataField.fractal_triangulation}(). 18477 18478 18479 @param xresult: Log-log fractal data (x values). I{(L{DataLine})} 18480 @param yresult: Log-log fractal data (y values). I{(L{DataLine})} 18481 @return: Tuple consisting of 3 values (B{C{value}}, B{C{a}}, B{C{b}}). (I{(float)}, I{(float)}, I{(float)}) 18482 """ 18483 return None, None, None
18484
18485 -def gwy_data_field_get_circular_area_size(radius):
18486 """ 18487 Calculates an upper bound of the number of samples in a circular region. 18488 18489 18490 @param radius: Circular area radius (in pixels). I{(float)} 18491 @return: The number of pixels in a circular region with given rectangular bounds (or its upper bound). I{(int)} 18492 """ 18493 return None
18494
18495 -def gwy_data_field_get_elliptic_area_size(width, height):
18496 """ 18497 Calculates an upper bound of the number of samples in an elliptic region. 18498 18499 This function is useful for elliptic areas more or less contained within the data field. Otherwise the returned 18500 size can be overestimated a lot. Use L{DataField.get_elliptic_intersection}() for elliptic areas intersecting the 18501 data field in arbitrary manner. 18502 18503 18504 @param width: Bounding box width. I{(int)} 18505 @param height: Bounding box height. I{(int)} 18506 @return: The number of pixels in an elliptic region with given rectangular bounds (or its upper bound). I{(int)} 18507 """ 18508 return None
18509
18510 -def gwy_data_field_grains_watershed_finalize(state):
18511 """ 18512 Destroys a watershed iterator, freeing all resources. 18513 18514 @param state: Watershed iterator. I{(ComputationState*)} 18515 """ 18516 pass
18517
18518 -def gwy_data_field_grains_watershed_iteration(state):
18519 """ 18520 Performs one iteration of the watershed algorithm. 18521 18522 Fields B{C{state}} and progress B{C{fraction}} of watershed state are updated 18523 (fraction is calculated for each phase individually). Once B{C{state}} 18524 becomes B{C{WATERSHED_STATE_FINISHED}}, the calculation is finised. 18525 18526 A watershed iterator can be created with 18527 L{DataField.grains_watershed_init}(). When iteration ends, either 18528 by finishing or being aborted, L{DataField.grains_watershed_finalize}() 18529 must be called to release allocated resources. 18530 18531 @param state: Watershed iterator. I{(ComputationState*)} 18532 """ 18533 pass
18534
18535 -def gwy_data_field_hough_datafield_line_to_polar(px1, px2, py1, py2):
18536 return None, None
18537
18538 -def gwy_data_field_unrotate_find_corrections(derdist):
18539 """ 18540 Finds rotation corrections. 18541 18542 Rotation correction is computed for for all symmetry types. 18543 In addition an estimate is made about the prevalent one. 18544 18545 18546 @param derdist: Angular derivation distribution (normally obrained from 18547 L{DataField.slope_distribution}()). I{(L{DataLine})} 18548 @return: Tuple consisting of 2 values (B{C{value}}, B{C{correction}}). (I{(PlaneSymmetry)}, I{(list)}) 18549 """ 18550 return None, None
18551
18552 -def gwy_data_window_class_get_tooltips():
18553 """ 18554 Gets the tooltips object used for adding tooltips to Data window parts. 18555 18556 This function does not do anything useful. Do not use it. 18557 18558 18559 @return: The B{C{GtkTooltips}} object. I{(L{gtk.Tooltips})} 18560 """ 18561 return None
18562
18563 -def gwy_data_window_class_set_tooltips(tips):
18564 """ 18565 Sets the tooltips object to use for adding tooltips to data window parts. 18566 18567 This function does not do anything useful. Do not use it. 18568 18569 This is a class method. It affects only newly cerated data windows, 18570 existing data windows will continue to use the tooltips they were 18571 constructed with. 18572 18573 If no class tooltips object is set before first B{C{DataWindow}} is created, 18574 the class instantiates one on its own. You can normally obtain it with 18575 L{DataWindow.class_get_tooltips}() then. The class takes a reference on 18576 the tooltips in either case. 18577 18578 @param tips: Tooltips object B{C{DataWindow}}'s should use for setting tooltips. 18579 A B{C{None}} value disables tooltips altogether. I{(L{gtk.Tooltips})} 18580 """ 18581 pass
18582
18583 -def gwy_dialog_prevent_delete_cb():
18584 """ 18585 Returns B{C{True}}. 18586 18587 Use gtk_true() instead. 18588 18589 18590 @return: B{C{True}}. I{(bool)} 18591 """ 18592 return None
18593
18594 -def gwy_draw_data_field_map_adaptive(data_field, z):
18595 """ 18596 Maps ordinate values to interval [0,1] as 18597 L{gwy_pixbuf_draw_data_field_adaptive}() would do. 18598 18599 This is useful to find out which positions in the false colour gradient 18600 correspond to specific values. 18601 18602 @since: 2.39 18603 18604 @param data_field: A data field to draw. I{(L{DataField})} 18605 @param z: Array of B{C{n}} data values to map. I{(list)} 18606 @return: I{(list)} 18607 """ 18608 return None
18609
18610 -def gwy_draw_type_init():
18611 """ 18612 Makes libgwydraw types safe for deserialization and performs other 18613 initialization. You have to call this function before using objects 18614 from libgwydraw. 18615 18616 Calls L{gwy_process_type_init}() first to make sure libgwyprocess is 18617 initialized. 18618 18619 It is safe to call this function more than once, subsequent calls are no-op. 18620 18621 """ 18622 pass
18623
18624 -def gwy_dwt_set_coefficients(dline, type):
18625 """ 18626 Fills resampled or nely allocated data line with wavelet coefficients. 18627 18628 18629 @param dline: Data line to store wavelet coefficients to (or B{C{None}} to allocate 18630 a new one). I{(L{DataLine})} 18631 @param type: Wavelet type. Expected values: C{B{DWT_HAAR}}, C{B{DWT_DAUB4}}, C{B{DWT_DAUB6}}, C{B{DWT_DAUB8}}, C{B{DWT_DAUB12}}, C{B{DWT_DAUB20}}. I{(L{DWTType})} 18632 @return: resampled or newly allocated DataLine with wavelet coefficients. I{(L{DataLine})} 18633 """ 18634 return None
18635
18636 -def gwy_entities():
18637 """ 18638 Returns a constant inventory with all available entities. 18639 18640 18641 @return: The entities as a B{C{Inventory}}. I{(L{Inventory})} 18642 """ 18643 return None
18644
18645 -def gwy_entities_entity_to_utf8(entity):
18646 """ 18647 Converts a single named entity B{C{entity}} to UTF-8 representation. 18648 18649 The string passed to this function should be a bare entity name, i.e. it 18650 should not contain the ampersand and semicolon. 18651 18652 18653 @param entity: A single entity name, as a nul-delimited string. I{(string)} 18654 @return: B{C{entity}} if the name was not recognized, or a valid UTF-8 string. 18655 If the returned string is not equal to B{C{entities}}, it's owned by 18656 entities and must not be freed nor modified. I{(string)} 18657 """ 18658 return None
18659
18660 -def gwy_entities_text_to_utf8(text):
18661 """ 18662 Converts entities in a text to UTF-8. 18663 18664 18665 @param text: A nul-delimited string. I{(string)} 18666 @return: A newly allocated nul-delimited string containing the converted 18667 text. I{(string)} 18668 """ 18669 return None
18670
18671 -def gwy_enum_combo_box_get_active(combo):
18672 """ 18673 Gets the enum value corresponding to currently active combo box item. 18674 18675 18676 @param combo: A combo box which was created with L{gwy_enum_combo_box_new}(). I{(L{gtk.ComboBox})} 18677 @return: The selected enum value. I{(int)} 18678 """ 18679 return None
18680
18681 -def gwy_enum_combo_box_set_active(combo, active):
18682 """ 18683 Sets the active combo box item by corresponding enum value. 18684 18685 @param combo: A combo box which was created with L{gwy_enum_combo_box_new}(). I{(L{gtk.ComboBox})} 18686 @param active: The enum value to show as currently selected. I{(int)} 18687 """ 18688 pass
18689
18690 -def gwy_enum_combo_box_update_int(combo):
18691 """ 18692 Convenience callback keeping an integer synchronized with selected enum combo box value. 18693 18694 @param combo: A combo box which was created with L{gwy_enum_combo_box_new}(). I{(L{gtk.ComboBox})} 18695 @return: Value B{C{integer}}. (I{(int)}) 18696 """ 18697 return None
18698
18699 -def gwy_enum_sanitize_value(enumval, enum_type):
18700 """ 18701 Makes sure an enum value is valid. 18702 18703 18704 @param enumval: An enum value. I{(int)} 18705 @param enum_type: B{C{GType}} of a registered enum type. I{(GType)} 18706 @return: Either B{C{enumval}} itself if it's valid, or some valid enum value. When B{C{enumval}} is invalid and larger than 18707 all valid values the largest valid value is returned. Likewise if it's smaller the smallest valid value is 18708 returned. If it's in range but invalid, the first enum value is returned. I{(int)} 18709 """ 18710 return None
18711
18712 -def gwy_expr_error_quark():
18713 """ 18714 Returns error domain for expression parsin and evaluation. 18715 18716 See and use B{C{EXPR_ERROR}}. 18717 18718 18719 @return: The error domain. I{(int)} 18720 """ 18721 return None
18722
18723 -def gwy_fd_curve_presets():
18724 """ 18725 Gets inventory with all the FD curve presets. 18726 18727 @since: 2.7 18728 18729 @return: FD curve preset inventory. I{(L{Inventory})} 18730 """ 18731 return None
18732
18733 -def gwy_fft_find_nice_size(size):
18734 """ 18735 Finds a nice-for-FFT array size. 18736 18737 Here ‘nice’ means three properties are guaranteed: it is greater than or equal to B{C{size}}; it can be directly used 18738 with current FFT backend without scaling (since 2.8 this is true for any size); and the transform is fast, i.e. the 18739 number is highly factorable. 18740 18741 To be compatible with Gwyddion <= 2.7 one has to pass only data fields and lines with sizes returned by this 18742 function to raw integral transforms. Otherwise this function is mainly useful if you extend and pad the input data 18743 for other reasons and thus have the freedom to choose a convenient transform size. 18744 18745 18746 @param size: Transform size. I{(int)} 18747 @return: A nice FFT array size. I{(int)} 18748 """ 18749 return None
18750
18751 -def gwy_fft_window(data, windowing):
18752 """ 18753 Multiplies data by given window. 18754 18755 @param data: Data values. I{(list)} 18756 @param windowing: Method used for windowing. 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})} 18757 @return: I{(list)} 18758 """ 18759 return None
18760
18761 -def gwy_fft_window_data_field(dfield, orientation, windowing):
18762 """ 18763 Performs windowing of a data field in given direction. 18764 18765 This is an old alias for L{DataField.fft_window_1d}(). 18766 18767 @param dfield: A data field. I{(L{DataField})} 18768 @param orientation: Windowing orientation (the same as corresponding FFT orientation). Expected values: C{B{ORIENTATION_HORIZONTAL}}, C{B{ORIENTATION_VERTICAL}}. I{(L{Orientation})} 18769 @param windowing: The 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})} 18770 """ 18771 pass
18772
18773 -def gwy_file_abandon_contents(buffer, size):
18774 """ 18775 Frees or unmmaps memory allocated by L{gwy_file_get_contents}(). 18776 18777 18778 @param buffer: Buffer with file contents as created by L{gwy_file_get_contents}(). I{(guchar*)} 18779 @param size: Buffer size. I{(gsize)} 18780 @return: Whether it succeeded. Since 2.22 it always return B{C{True}}. I{(bool)} 18781 """ 18782 return None
18783
18784 -def gwy_file_channel_import_log_add(data, id, filetype, filename):
18785 """ 18786 Logs the import of a channel from third-party file. 18787 18788 This is a convenience wrapper for L{gwy_app_channel_log_add}(). The source id 18789 will be set to -1. The file name will be added to function arguments. 18790 18791 @since: 2.35 18792 18793 @param data: A data container. I{(L{Container})} 18794 @param id: Data channel id. I{(int)} 18795 @param filetype: File type, i.e. the name of the function importing the data 18796 (without any "file::" prefix). Since 2.38 it is possible to 18797 pass B{C{None}} to fill the name of the currently running file type 18798 function automatically. I{(string)} 18799 @param filename: Name of the imported file. If it is not valid UTF-8, it will be 18800 converted to UTF-8 using g_filename_to_utf8(). Failing even 18801 that, non-ASCII characters will be escaped. I{(string)} 18802 """ 18803 pass
18804
18805 -def gwy_file_curve_map_import_log_add(data, id, filetype, filename):
18806 """ 18807 Logs the import of volume data from third-party file. 18808 18809 This is a convenience wrapper for L{gwy_app_curve_map_log_add}(). The source id 18810 will be set to -1. The file name will be added to function arguments. 18811 18812 @since: 2.60 18813 18814 @param data: A data container. I{(L{Container})} 18815 @param id: Volume data id. I{(int)} 18816 @param filetype: File type, i.e. the name of the function importing the data 18817 (without any "file::" prefix). Since 2.38 it is possible to 18818 pass B{C{None}} to fill the name of the currently running file type 18819 function automatically. I{(string)} 18820 @param filename: Name of the imported file. If it is not valid UTF-8, it will be 18821 converted to UTF-8 using g_filename_to_utf8(). Failing even 18822 that, non-ASCII characters will be escaped. I{(string)} 18823 """ 18824 pass
18825
18826 -def gwy_file_detect(filename, only_name, operations):
18827 """ 18828 Detects the type of a file. 18829 18830 18831 @param filename: A file name to detect type of. I{(string)} 18832 @param only_name: Whether to use only file name for a guess, or try to actually 18833 access the file. I{(bool)} 18834 @param operations: The file operations the file type must support (it must 18835 support all of them to be considered). Expected values: C{B{FILE_OPERATION_DETECT}}, C{B{FILE_OPERATION_LOAD}}, C{B{FILE_OPERATION_SAVE}}, C{B{FILE_OPERATION_EXPORT}}, C{B{FILE_OPERATION_MASK}}. I{(L{FileOperationType})} 18836 @return: The type name (i.e., the same name as passed to 18837 e.g. L{gwy_file_func_run_load}()) of most probable type of B{C{filename}}, 18838 or B{C{None}} if there's no probable one. I{(string)} 18839 """ 18840 return None
18841
18842 -def gwy_file_detect_with_score(filename, only_name, operations):
18843 """ 18844 Detects the type of a file and gives the score. 18845 18846 @since: 2.1 18847 18848 @param filename: A file name to detect type of. I{(string)} 18849 @param only_name: Whether to use only file name for a guess, or try to actually I{(bool)} 18850 @param operations: The file operations the file type must support (it must Expected values: C{B{FILE_OPERATION_DETECT}}, C{B{FILE_OPERATION_LOAD}}, C{B{FILE_OPERATION_SAVE}}, C{B{FILE_OPERATION_EXPORT}}, C{B{FILE_OPERATION_MASK}}. I{(L{FileOperationType})} 18851 @return: Tuple consisting of 2 values (B{C{value}}, B{C{score}}). (I{(string)}, I{(int)}) 18852 """ 18853 return None, None
18854
18855 -def gwy_file_func_current():
18856 """ 18857 Obtains the name of currently running file type function. 18858 18859 Detection routines are not included, only load, save and export functions. 18860 18861 If no file type function is currently running, B{C{None}} is returned. 18862 18863 If multiple nested functions are running (which is not usual but technically 18864 possible), the innermost function name is returned. 18865 18866 @since: 2.38 18867 18868 @return: The name of currently running file type function or B{C{None}}. I{(string)} 18869 """ 18870 return None
18871
18872 -def gwy_file_func_exists(name):
18873 """ 18874 Checks whether a file type function exists. 18875 18876 18877 @param name: File type function name. I{(string)} 18878 @return: B{C{True}} if function B{C{name}} exists, B{C{False}} otherwise. I{(bool)} 18879 """ 18880 return None
18881
18882 -def gwy_file_func_get_description(name):
18883 """ 18884 Gets file function description. 18885 18886 That is, the B{C{description}} argument of L{gwy_file_func_register}() . 18887 18888 18889 @param name: File type function name. I{(string)} 18890 @return: File function description, as a string owned by module loader. I{(string)} 18891 """ 18892 return None
18893
18894 -def gwy_file_func_get_is_detectable(name):
18895 """ 18896 Returns if the file format is reasonably detectable. 18897 18898 This is B{C{True}} for all file types that define a detection method unless they 18899 explicitly call L{gwy_file_func_set_is_detectable}() to set the file format 18900 non-detectable in spite of providing a detection method. 18901 18902 If files that can be actually loaded as a given type form a subset of files 18903 that are detected as this format, which is normaly the case, it makes no 18904 sense to let the user explicitly choose between these formats. Hence, 18905 detectable formats normally are not explicitly offered. 18906 18907 @since: 2.18 18908 18909 @param name: File type function name. I{(string)} 18910 @return: If the file format is detectable. I{(bool)} 18911 """ 18912 return None
18913
18914 -def gwy_file_func_get_operations(name):
18915 """ 18916 Returns operations supported by a file type function. 18917 18918 18919 @param name: File type function name. I{(string)} 18920 @return: The file operation bit mask, zero if B{C{name}} does not exist. I{(FileOperationType)} 18921 """ 18922 return None
18923
18924 -def gwy_file_func_run_detect(name, filename, only_name):
18925 """ 18926 Runs a file type detection function identified by B{C{name}}. 18927 18928 Value of B{C{only_name}} should be B{C{True}} if the file doesn't exist (is to be 18929 written) so its contents can't be used for file type detection. 18930 18931 This is a low-level function, consider using L{gwy_file_detect}() if you 18932 simply want to detect a file type. 18933 18934 18935 @param name: A file type function name. I{(string)} 18936 @param filename: A file name to detect. I{(string)} 18937 @param only_name: Whether to use only file name for a guess, or try to actually 18938 access the file. I{(bool)} 18939 @return: An integer score expressing the likehood of the file being 18940 loadable as this type. A basic scale is 20 for a good extension, 18941 100 for good magic header, more for more thorough tests. I{(int)} 18942 """ 18943 return None
18944
18945 -def gwy_file_func_run_export(name, data, filename, mode):
18946 """ 18947 Runs a file export function identified by B{C{name}}. 18948 18949 It guarantees the container lifetime spans through the actual file saving, 18950 so the module function doesn't have to care about it. 18951 18952 This is a low-level function, consider using L{gwy_file_save}() if you 18953 simply want to save a file. 18954 18955 18956 @param name: A file save function name. I{(string)} 18957 @param data: A B{C{Container}} to save. I{(L{Container})} 18958 @param filename: A file name to save B{C{data}} as. I{(string)} 18959 @param mode: Run mode. Expected values: C{B{RUN_NONE}}, C{B{RUN_NONINTERACTIVE}}, C{B{RUN_INTERACTIVE}}, C{B{RUN_IMMEDIATE}}, C{B{RUN_MASK}}. I{(L{RunType})} 18960 @return: B{C{True}} if file save succeeded, B{C{False}} otherwise. I{(bool)} 18961 """ 18962 return None
18963
18964 -def gwy_file_func_run_load(name, filename, mode):
18965 """ 18966 Runs a file load function identified by B{C{name}}. 18967 18968 This is a low-level function, consider using L{gwy_file_load}() if you 18969 simply want to load a file. 18970 18971 18972 @param name: A file load function name. I{(string)} 18973 @param filename: A file name to load data from. I{(string)} 18974 @param mode: Run mode. Expected values: C{B{RUN_NONE}}, C{B{RUN_NONINTERACTIVE}}, C{B{RUN_INTERACTIVE}}, C{B{RUN_IMMEDIATE}}, C{B{RUN_MASK}}. I{(L{RunType})} 18975 @return: A new B{C{Container}} with data from B{C{filename}}, or B{C{None}}. I{(L{Container})} 18976 """ 18977 return None
18978
18979 -def gwy_file_func_run_save(name, data, filename, mode):
18980 """ 18981 Runs a file save function identified by B{C{name}}. 18982 18983 It guarantees the container lifetime spans through the actual file saving, 18984 so the module function doesn't have to care about it. 18985 18986 This is a low-level function, consider using L{gwy_file_save}() if you 18987 simply want to save a file. 18988 18989 18990 @param name: A file save function name. I{(string)} 18991 @param data: A B{C{Container}} to save. I{(L{Container})} 18992 @param filename: A file name to save B{C{data}} as. I{(string)} 18993 @param mode: Run mode. Expected values: C{B{RUN_NONE}}, C{B{RUN_NONINTERACTIVE}}, C{B{RUN_INTERACTIVE}}, C{B{RUN_IMMEDIATE}}, C{B{RUN_MASK}}. I{(L{RunType})} 18994 @return: B{C{True}} if file save succeeded, B{C{False}} otherwise. I{(bool)} 18995 """ 18996 return None
18997
18998 -def gwy_file_func_set_is_detectable(name, is_detectable):
18999 """ 19000 Sets the detectability status of a file format. 19001 19002 See L{gwy_file_func_get_is_detectable}() for details. The only rare case when 19003 it makes sense to call this function is when a detection function is 19004 provided for some reason, however, this function is not really able to 19005 detect the format. For instance, the fallback detection method of the 19006 Gwyddion rawfile module. 19007 19008 @since: 2.18 19009 19010 @param name: File type function name. I{(string)} 19011 @param is_detectable: B{C{True}} to define format as detectable, B{C{False}} as 19012 non-detectable. I{(bool)} 19013 """ 19014 pass
19015
19016 -def gwy_file_get_filename_sys(data):
19017 """ 19018 Gets the file name corresponding to a data container. 19019 19020 The file name is set on two ocasions: file load and successful file save. 19021 File export does not set it. 19022 19023 @since: 2.36 19024 19025 @param data: A B{C{Container}}. I{(L{Container})} 19026 @return: File name of B{C{data}} (in GLib encoding), or B{C{None}}. The returned 19027 string is owned by module system and is valid only until the 19028 container is destroyed or saved again. I{(string)} 19029 """ 19030 return None
19031
19032 -def gwy_file_load(filename, mode):
19033 """ 19034 Loads a data file, autodetecting its type. 19035 19036 19037 @param filename: A file name to load data from, in GLib encoding. I{(string)} 19038 @param mode: Run mode. Expected values: C{B{RUN_NONE}}, C{B{RUN_NONINTERACTIVE}}, C{B{RUN_INTERACTIVE}}, C{B{RUN_IMMEDIATE}}, C{B{RUN_MASK}}. I{(L{RunType})} 19039 @return: A new B{C{Container}} with data from B{C{filename}}, or B{C{None}}. I{(L{Container})} 19040 """ 19041 return None
19042
19043 -def gwy_file_save(data, filename, mode):
19044 """ 19045 Saves a data file, deciding to save as what type from the file name. 19046 19047 It tries to find a module implementing B{C{FILE_OPERATION_SAVE}} first, when 19048 it does not succeed, it falls back to B{C{FILE_OPERATION_EXPORT}}. 19049 19050 19051 @param data: A B{C{Container}} to save. I{(L{Container})} 19052 @param filename: A file name to save the data as, in GLib encoding. I{(string)} 19053 @param mode: Run mode. Expected values: C{B{RUN_NONE}}, C{B{RUN_NONINTERACTIVE}}, C{B{RUN_INTERACTIVE}}, C{B{RUN_IMMEDIATE}}, C{B{RUN_MASK}}. I{(L{RunType})} 19054 @return: The save operation that was actually realized on success, zero 19055 on failure. I{(FileOperationType)} 19056 """ 19057 return None
19058
19059 -def gwy_file_volume_import_log_add(data, id, filetype, filename):
19060 """ 19061 Logs the import of volume data from third-party file. 19062 19063 This is a convenience wrapper for L{gwy_app_volume_log_add}(). The source id 19064 will be set to -1. The file name will be added to function arguments. 19065 19066 @since: 2.35 19067 19068 @param data: A data container. I{(L{Container})} 19069 @param id: Volume data id. I{(int)} 19070 @param filetype: File type, i.e. the name of the function importing the data 19071 (without any "file::" prefix). Since 2.38 it is possible to 19072 pass B{C{None}} to fill the name of the currently running file type 19073 function automatically. I{(string)} 19074 @param filename: Name of the imported file. If it is not valid UTF-8, it will be 19075 converted to UTF-8 using g_filename_to_utf8(). Failing even 19076 that, non-ASCII characters will be escaped. I{(string)} 19077 """ 19078 pass
19079
19080 -def gwy_file_xyz_import_log_add(data, id, filetype, filename):
19081 """ 19082 Logs the import of xyz data from third-party file. 19083 19084 This is a convenience wrapper for L{gwy_app_xyz_log_add}(). The source id 19085 will be set to -1. The file name will be added to function arguments. 19086 19087 @since: 2.45 19088 19089 @param data: A data container. I{(L{Container})} 19090 @param id: XYZ surface data id. I{(int)} 19091 @param filetype: File type, i.e. the name of the function importing the data 19092 (without any "file::" prefix). It is possible to 19093 pass B{C{None}} to fill the name of the currently running file type 19094 function automatically. I{(string)} 19095 @param filename: Name of the imported file. If it is not valid UTF-8, it will be 19096 converted to UTF-8 using g_filename_to_utf8(). Failing even 19097 that, non-ASCII characters will be escaped. I{(string)} 19098 """ 19099 pass
19100
19101 -def gwy_filename_ignore(filename_sys):
19102 """ 19103 Checks whether file should be ignored. 19104 19105 This function checks for common file names indicating files that should be normally ignored. Currently it means 19106 backup files (ending with ~ or .bak) and Unix hidden files (starting with a dot). 19107 19108 19109 @param filename_sys: File name in GLib encoding. I{(string)} 19110 @return: B{C{True}} to ignore this file, B{C{False}} otherwise. I{(bool)} 19111 """ 19112 return None
19113
19114 -def gwy_find_self_dir(dirname):
19115 """ 19116 Finds a system Gwyddion directory. 19117 19118 On Unix, a compiled-in path is returned, unless it's overriden with environment variables (see gwyddion manual 19119 page). 19120 19121 On Win32, the directory where the libgwyddion DLL from which this function was called resides is taken as the base 19122 and the location of other Gwyddion directories is calculated from it. 19123 19124 The returned value is not actually tested for existence, it's up to caller. 19125 19126 To obtain the Gwyddion user directory see L{gwy_get_user_dir}(). 19127 19128 19129 @param dirname: A gwyddion directory name: 19130 C{"modules"}, 19131 C{"plugins"}, 19132 C{"pixmaps"}, 19133 C{"locale"}, or 19134 C{"data"}. I{(string)} 19135 @return: The path as a newly allocated string. I{(string)} 19136 """ 19137 return None
19138
19139 -def gwy_fopen(filename, mode):
19140 """ 19141 A wrapper for the stdio fopen() function. The fopen() function opens a file and associates a new stream with it. 19142 19143 Because file descriptors are specific to the C library on Windows, and a file descriptor is part of the FILE 19144 struct, the FILE* returned by this function makes sense only to functions in the same C library. Thus if the 19145 GLib-using code uses a different C library than GLib does, the FILE* returned by this function cannot be passed to 19146 C library functions like fprintf() or fread(). 19147 19148 See your C library manual for more details about fopen(). 19149 19150 @since: 2.43 19151 19152 @param filename: a pathname in the GLib file name encoding (UTF-8 on Windows) I{(string)} 19153 @param mode: a string describing the mode in which the file should be opened I{(string)} 19154 @return: A FILE* if the file was successfully opened, or B{C{None}} if an error occurred. I{(FILE*)} 19155 """ 19156 return None
19157
19158 -def gwy_func_use_get(functions, i):
19159 """ 19160 Gets the n-th most function from a function statistics. 19161 19162 19163 @param functions: Function use statistics. I{(FunctionUse*)} 19164 @param i: Position in the top used functions (starting from 0). I{(int)} 19165 @return: The function name, or B{C{None}} if there are not more functions with 19166 use statistics records than B{C{i}}. I{(string)} 19167 """ 19168 return None
19169
19170 -def gwy_func_use_get_filename(type):
19171 """ 19172 Gets the (preferred) name for a file to store function use statistics to. 19173 19174 19175 @param type: Function type, that is an identifier of the type of statistics 19176 gathered. It must be a valid identifier. I{(string)} 19177 @return: The file name as a newly allocated string. I{(string)} 19178 """ 19179 return None
19180
19181 -def gwy_get_grain_quantity_needs_same_units(quantity):
19182 return None
19183
19184 -def gwy_get_home_dir():
19185 """ 19186 Returns home directory, or temporary directory as a fallback. 19187 19188 Under normal circumstances the same string as g_get_home_dir() would return is returned. But on MS Windows, 19189 something like "C:\Windows\Temp" can be returned too, as it is as good as anything else (we can write there). 19190 19191 19192 @return: Something usable as user home directory. It may be silly, but never B{C{None}} or empty. I{(string)} 19193 """ 19194 return None
19195
19196 -def gwy_get_user_dir():
19197 """ 19198 Returns the directory where Gwyddion user settings and data should be stored. 19199 19200 On Unix this is usually a dot-directory in user's home directory. On modern Win32 the returned directory resides 19201 in user's Documents and Settings. On silly platforms or silly occasions, silly locations (namely a temporary 19202 directory) can be returned as fallback. 19203 19204 To obtain a Gwyddion system directory see L{gwy_find_self_dir}(). 19205 19206 19207 @return: The directory as a constant string that should not be freed. I{(string)} 19208 """ 19209 return None
19210
19211 -def gwy_gl_material_selection_get_active(selection):
19212 """ 19213 Gets the name of currently selected GL material of a selection button. 19214 19215 19216 @param selection: GL material selection button. I{(L{gtk.Widget})} 19217 @return: Name as a string owned by the selected GL material. I{(string)} 19218 """ 19219 return None
19220
19221 -def gwy_gl_material_selection_new(active):
19222 """ 19223 Creates a GL material selection button. 19224 19225 19226 @param active: GL material name to be shown as currently selected 19227 (or B{C{None}} for default). I{(string)} 19228 @return: The newly created GL material selection button as B{C{GtkWidget}}. I{(L{gtk.Widget})} 19229 """ 19230 return None
19231
19232 -def gwy_gl_material_selection_set_active(selection, active):
19233 """ 19234 Sets the currently selected GL material of a selection button. 19235 19236 @param selection: GL material selection button. I{(L{gtk.Widget})} 19237 @param active: GL material name to be shown as currently selected. I{(string)} 19238 """ 19239 pass
19240
19241 -def gwy_gl_material_tree_view_new(active):
19242 """ 19243 Creates a tree view with GL material list. 19244 19245 19246 @param active: GL material name to be shown as currently selected 19247 (or B{C{None}} for default). I{(string)} 19248 @return: The newly created GL material tree view as B{C{GtkWidget}}. I{(L{gtk.Widget})} 19249 """ 19250 return None
19251
19252 -def gwy_gl_material_tree_view_set_active(treeview, active):
19253 """ 19254 Selects a GL material in a GL material list and scrolls to make it visible. 19255 19256 19257 @param treeview: A GL material selector tree view. I{(L{gtk.Widget})} 19258 @param active: GL material name to be shown as currently selected. I{(string)} 19259 @return: B{C{True}} if B{C{active}} was selected, B{C{False}} if there is no such 19260 GL material. I{(bool)} 19261 """ 19262 return None
19263
19264 -def gwy_gl_materials():
19265 """ 19266 Gets inventory with all the GL materials. 19267 19268 19269 @return: GL material inventory. I{(L{Inventory})} 19270 """ 19271 return None
19272
19273 -def gwy_gl_materials_get_gl_material(name):
19274 """ 19275 Convenience function to get a GL material from L{gwy_gl_materials}() by name. 19276 19277 19278 @param name: GL material name. May be B{C{None}} to get the default GL material. I{(string)} 19279 @return: GL material identified by B{C{name}} or the default GL material if B{C{name}} 19280 does not exist. I{(L{GLMaterial})} 19281 """ 19282 return None
19283
19284 -def gwy_gradient_selection_get_active(selection):
19285 """ 19286 Gets the name of currently selected gradient of a selection button. 19287 19288 19289 @param selection: Gradient selection button. I{(L{gtk.Widget})} 19290 @return: Name as a string owned by the selected gradient. I{(string)} 19291 """ 19292 return None
19293
19294 -def gwy_gradient_selection_new(active):
19295 """ 19296 Creates a gradient selection button. 19297 19298 19299 @param active: Gradient name to be shown as currently selected 19300 (or B{C{None}} for default). I{(string)} 19301 @return: The newly created gradient selection button as B{C{GtkWidget}}. I{(L{gtk.Widget})} 19302 """ 19303 return None
19304
19305 -def gwy_gradient_selection_set_active(selection, active):
19306 """ 19307 Sets the currently selected gradient of a selection button. 19308 19309 @param selection: Gradient selection button. I{(L{gtk.Widget})} 19310 @param active: Gradient name to be shown as currently selected. I{(string)} 19311 """ 19312 pass
19313
19314 -def gwy_gradient_tree_view_new(active):
19315 """ 19316 Creates a tree view with gradient list. 19317 19318 19319 @param active: Gradient name to be shown as currently selected 19320 (or B{C{None}} for default). I{(string)} 19321 @return: The newly created gradient tree view as B{C{GtkWidget}}. I{(L{gtk.Widget})} 19322 """ 19323 return None
19324
19325 -def gwy_gradient_tree_view_set_active(treeview, active):
19326 """ 19327 Selects a gradient in a gradient list and scrolls to make it visible. 19328 19329 19330 @param treeview: A gradient selector tree view. I{(L{gtk.Widget})} 19331 @param active: Gradient name to be shown as currently selected. I{(string)} 19332 @return: B{C{True}} if B{C{active}} was selected, B{C{False}} if there is no such 19333 gradient. I{(bool)} 19334 """ 19335 return None
19336
19337 -def gwy_gradients():
19338 """ 19339 Gets inventory with all the gradients. 19340 19341 19342 @return: Gradient inventory. I{(L{Inventory})} 19343 """ 19344 return None
19345
19346 -def gwy_gradients_get_gradient(name):
19347 """ 19348 Convenience function to get a gradient from L{gwy_gradients}() by name. 19349 19350 19351 @param name: Gradient name. May be B{C{None}} to get the default gradient. I{(string)} 19352 @return: Gradient identified by B{C{name}} or the default gradient if B{C{name}} does 19353 not exist. I{(L{Gradient})} 19354 """ 19355 return None
19356
19357 -def gwy_graph_draw_line(drawable, gc, x_from, y_from, x_to, y_to, line_style, size, color):
19358 """ 19359 Draws a line segment on a drawable. 19360 19361 @param drawable: A drawable. I{(L{gdk.Drawable})} 19362 @param gc: Graphics context. 19363 It is modified by this function unpredictably. I{(L{gdk.GC})} 19364 @param x_from: x coordinate of the start point of the line I{(int)} 19365 @param y_from: y coordinate of the start point of the line I{(int)} 19366 @param x_to: x coordinate of the end point of the line I{(int)} 19367 @param y_to: y coordinate of the end point of the line I{(int)} 19368 @param line_style: graph line style I{(GdkLineStyle)} 19369 @param size: point size I{(int)} 19370 @param color: point color I{(const-RGBA*)} 19371 """ 19372 pass
19373
19374 -def gwy_graph_draw_point(drawable, gc, x, y, type, size, color):
19375 """ 19376 Draws a point on a drawable. 19377 19378 @param drawable: A drawable. I{(L{gdk.Drawable})} 19379 @param gc: Graphics context. 19380 It is modified by this function unpredictably. I{(L{gdk.GC})} 19381 @param x: X coordinate of the point. I{(int)} 19382 @param y: Y coordinate of the point. I{(int)} 19383 @param type: graph point type Expected values: C{B{GRAPH_POINT_SQUARE}}, C{B{GRAPH_POINT_CROSS}}, C{B{GRAPH_POINT_CIRCLE}}, C{B{GRAPH_POINT_STAR}}, C{B{GRAPH_POINT_TIMES}}, C{B{GRAPH_POINT_TRIANGLE_UP}}, C{B{GRAPH_POINT_TRIANGLE_DOWN}}, C{B{GRAPH_POINT_DIAMOND}}, C{B{GRAPH_POINT_FILLED_SQUARE}}, C{B{GRAPH_POINT_DISC}}, C{B{GRAPH_POINT_FILLED_CIRCLE}}, C{B{GRAPH_POINT_FILLED_TRIANGLE_UP}}, C{B{GRAPH_POINT_FILLED_TRIANGLE_DOWN}}, C{B{GRAPH_POINT_FILLED_DIAMOND}}, C{B{GRAPH_POINT_TRIANGLE_LEFT}}, C{B{GRAPH_POINT_FILLED_TRIANGLE_LEFT}}, C{B{GRAPH_POINT_TRIANGLE_RIGHT}}, C{B{GRAPH_POINT_FILLED_TRIANGLE_RIGHT}}, C{B{GRAPH_POINT_ASTERISK}}. I{(L{GraphPointType})} 19384 @param size: point size I{(int)} 19385 @param color: point color I{(const-RGBA*)} 19386 """ 19387 pass
19388
19389 -def gwy_graph_func_current():
19390 """ 19391 Obtains the name of currently running graph function. 19392 19393 If no graph function is currently running, B{C{None}} is returned. 19394 19395 If multiple nested functions are running (which is not usual but technically 19396 possible), the innermost function name is returned. 19397 19398 @since: 2.38 19399 19400 @return: The name of currently running graph function or B{C{None}}. I{(string)} 19401 """ 19402 return None
19403
19404 -def gwy_graph_func_exists(name):
19405 """ 19406 Checks whether a graph function exists. 19407 19408 19409 @param name: Graph function name. I{(string)} 19410 @return: B{C{True}} if function B{C{name}} exists, B{C{False}} otherwise. I{(bool)} 19411 """ 19412 return None
19413
19414 -def gwy_graph_func_get_menu_path(name):
19415 """ 19416 Gets menu path of a graph function. 19417 19418 The returned menu path is only the tail part registered by the function, 19419 i.e., without any leading "/Graph". 19420 19421 19422 @param name: Graph function name. I{(string)} 19423 @return: The menu path. The returned string is owned by the module. I{(string)} 19424 """ 19425 return None
19426
19427 -def gwy_graph_func_get_sensitivity_mask(name):
19428 """ 19429 Gets menu sensititivy mask for a graph function. 19430 19431 19432 @param name: Graph function name. I{(string)} 19433 @return: The menu item sensitivity mask (a combination of B{C{MenuSensFlags}} 19434 flags). I{(int)} 19435 """ 19436 return None
19437
19438 -def gwy_graph_func_get_stock_id(name):
19439 """ 19440 Gets stock icon id of a graph function. 19441 19442 19443 @param name: Graph function name. I{(string)} 19444 @return: The stock icon id. The returned string is owned by the module. I{(string)} 19445 """ 19446 return None
19447
19448 -def gwy_graph_func_get_tooltip(name):
19449 """ 19450 Gets tooltip for a graph function. 19451 19452 19453 @param name: Graph function name. I{(string)} 19454 @return: The tooltip. The returned string is owned by the module. I{(string)} 19455 """ 19456 return None
19457
19458 -def gwy_graph_func_run(name, graph):
19459 """ 19460 Runs a graph function identified by B{C{name}}. 19461 19462 @param name: Graph function name. I{(string)} 19463 @param graph: Graph (a B{C{Graph}}). I{(L{Graph})} 19464 """ 19465 pass
19466
19467 -def gwy_graph_get_n_preset_colors():
19468 """ 19469 Gets the number of distinct colors L{Graph.get_preset_color}() can return. 19470 19471 19472 @return: The number of distinct colors. I{(int)} 19473 """ 19474 return None
19475
19476 -def gwy_graph_get_preset_color(i):
19477 """ 19478 Gets a preset graph color. 19479 19480 Preset colors are a set of selected colors one can use to distingush graph 19481 curves when there is no reason to prefer a particular color. Note they 19482 can occasionally change between version, even their number can change. 19483 19484 19485 @param i: Color number, starting from 0 which is always black. It can be any 19486 number but colors start to repeat after 19487 L{Graph.get_n_preset_colors}() colors. I{(int)} 19488 @return: A constant color that must not be neither modified nor freed. I{(const-RGBA*)} 19489 """ 19490 return None
19491
19492 -def gwy_graph_window_class_get_tooltips():
19493 """ 19494 Gets the tooltips object used for adding tooltips to Graph window parts. 19495 19496 This function does not do anything useful. Do not use it. 19497 19498 19499 @return: The B{C{GtkTooltips}} object. (Do not free). I{(L{gtk.Tooltips})} 19500 """ 19501 return None
19502
19503 -def gwy_graph_window_class_set_tooltips(tips):
19504 """ 19505 Sets the tooltips object to use for adding tooltips to graph window parts. 19506 19507 This function does not do anything useful. Do not use it. 19508 19509 This is a class method. It affects only newly created graph windows, 19510 existing graph windows will continue to use the tooltips they were 19511 constructed with. 19512 19513 If no class tooltips object is set before first B{C{GraphWindow}} is created, 19514 the class instantiates one on its own. You can normally obtain it with 19515 L{Graph.window_class_get_tooltips}() then. The class takes a reference on 19516 the tooltips in either case. 19517 19518 @param tips: B{C{GtkTooltips}} object B{C{GraphWindow}} should use for setting tooltips. 19519 A B{C{None}} value disables tooltips altogether. I{(L{gtk.Tooltips})} 19520 """ 19521 pass
19522
19523 -def gwy_help_add_to_cmap_dialog(dialog, flags):
19524 """ 19525 Adds help to a curve map data processing function dialog. 19526 19527 Note the help button will not be added if no help URI is found for the currently running function or help is not 19528 available. 19529 19530 @since: 2.60 19531 19532 @param dialog: Main dialog for a curve map data processing function. I{(L{gtk.Dialog})} 19533 @param flags: Flags allowing to modify the help setup. Expected values: C{B{HELP_DEFAULT}}, C{B{HELP_NO_BUTTON}}. I{(L{HelpFlags})} 19534 """ 19535 pass
19536
19537 -def gwy_help_add_to_file_dialog(dialog, flags):
19538 """ 19539 Adds help to a file function dialog. 19540 19541 Note the help button will not be added if no help URI is found for the currently running function or help is not 19542 available. 19543 19544 @since: 2.38 19545 19546 @param dialog: Main dialog for a file function. I{(L{gtk.Dialog})} 19547 @param flags: Flags allowing to modify the help setup. Expected values: C{B{HELP_DEFAULT}}, C{B{HELP_NO_BUTTON}}. I{(L{HelpFlags})} 19548 """ 19549 pass
19550
19551 -def gwy_help_add_to_graph_dialog(dialog, flags):
19552 """ 19553 Adds help to a graph function dialog. 19554 19555 Note the help button will not be added if no help URI is found for the currently running function or help is not 19556 available. 19557 19558 @since: 2.38 19559 19560 @param dialog: Main dialog for a graph function. I{(L{gtk.Dialog})} 19561 @param flags: Flags allowing to modify the help setup. Expected values: C{B{HELP_DEFAULT}}, C{B{HELP_NO_BUTTON}}. I{(L{HelpFlags})} 19562 """ 19563 pass
19564
19565 -def gwy_help_add_to_proc_dialog(dialog, flags):
19566 """ 19567 Adds help to a data processing function dialog. 19568 19569 Note the help button will not be added if no help URI is found for the currently running function or help is not 19570 available. 19571 19572 @since: 2.38 19573 19574 @param dialog: Main dialog for a data processing function. I{(L{gtk.Dialog})} 19575 @param flags: Flags allowing to modify the help setup. Expected values: C{B{HELP_DEFAULT}}, C{B{HELP_NO_BUTTON}}. I{(L{HelpFlags})} 19576 """ 19577 pass
19578
19579 -def gwy_help_add_to_volume_dialog(dialog, flags):
19580 """ 19581 Adds help to a volume data processing function dialog. 19582 19583 Note the help button will not be added if no help URI is found for the currently running function or help is not 19584 available. 19585 19586 @since: 2.38 19587 19588 @param dialog: Main dialog for a volume data processing function. I{(L{gtk.Dialog})} 19589 @param flags: Flags allowing to modify the help setup. Expected values: C{B{HELP_DEFAULT}}, C{B{HELP_NO_BUTTON}}. I{(L{HelpFlags})} 19590 """ 19591 pass
19592
19593 -def gwy_help_add_to_window(window, filename, fragment, flags):
19594 """ 19595 Adds help to a window pointing to the user guide. 19596 19597 If the window is a B{C{GtkDialog}} a help button will be added by default (this can be modified with B{C{flags}}). Normal 19598 windows do not get help buttons. No help may be added if help is not available. 19599 19600 This is a relatively low-level function and should not be necessary in modules. An exception may be modules with 19601 multiple user interfaces described in different parts of the guide – but this should be rare. 19602 19603 It is a suitable functions for adding help to base application windows, such as channel or volume windows. 19604 19605 @since: 2.38 19606 19607 @param window: A window. I{(L{gtk.Window})} 19608 @param filename: Base file name in the user guide without any path or extensions, for instance "statistical-analysis". I{(string)} 19609 @param fragment: Fragment identifier (without "#"), or possibly B{C{None}}. I{(string)} 19610 @param flags: Flags allowing to modify the help setup. Expected values: C{B{HELP_DEFAULT}}, C{B{HELP_NO_BUTTON}}. I{(L{HelpFlags})} 19611 """ 19612 pass
19613
19614 -def gwy_help_add_to_window_uri(window, uri, flags):
19615 """ 19616 Adds help to a window pointing to an arbitrary URI. 19617 19618 If the window is a B{C{GtkDialog}} a help button will be added by default (this can be modified with B{C{flags}}). Normal 19619 windows do not get help buttons. No help may be added if help is not available. 19620 19621 This function should not be necessary anywhere within Gwyddion itself. Use the functions pointing to the user guide 19622 instead as they can handle language versions or changing the user guide base location. 19623 19624 It may be useful for third-party modules if they wish to add a help facility behaving similarly to built-in 19625 modules. 19626 19627 @since: 2.38 19628 19629 @param window: A window. I{(L{gtk.Window})} 19630 @param uri: Full URI pointing to the help for B{C{window}}. I{(string)} 19631 @param flags: Flags allowing to modify the help setup. Expected values: C{B{HELP_DEFAULT}}, C{B{HELP_NO_BUTTON}}. I{(L{HelpFlags})} 19632 """ 19633 pass
19634
19635 -def gwy_help_add_to_xyz_dialog(dialog, flags):
19636 """ 19637 Adds help to a XYZ data processing function dialog. 19638 19639 Note the help button will not be added if no help URI is found for the currently running function or help is not 19640 available. 19641 19642 @since: 2.45 19643 19644 @param dialog: Main dialog for a XYZ data processing function. I{(L{gtk.Dialog})} 19645 @param flags: Flags allowing to modify the help setup. Expected values: C{B{HELP_DEFAULT}}, C{B{HELP_NO_BUTTON}}. I{(L{HelpFlags})} 19646 """ 19647 pass
19648
19649 -def gwy_help_is_available():
19650 """ 19651 Check whether help is available. 19652 19653 This is a weak check that finds if we have any help-showing backend that might work at all, have the user guide 19654 module map, and if the user guide locations is a local directory it checks whether it exists. If it returns B{C{True}} 19655 it does not guarantee help will work. If it returns B{C{False}}, however, it means help will not work. 19656 19657 @since: 2.38 19658 19659 @return: B{C{True}} if help seems available, B{C{False}} if it is not. I{(bool)} 19660 """ 19661 return None
19662
19663 -def gwy_help_show(filename, fragment):
19664 """ 19665 Immediately shows a specific help location. 19666 19667 This function should be rarely needed. It may fail if help is not available. 19668 19669 @since: 2.38 19670 19671 @param filename: Base file name in the user guide without any path or extensions, for instance "statistical-analysis". I{(string)} 19672 @param fragment: Fragment identifier (without "#"), or possibly B{C{None}}. I{(string)} 19673 """ 19674 pass
19675
19676 -def gwy_interpolation_get_dval(x, x1_, y1_, x2_, y2_, interpolation):
19677 """ 19678 This function uses two-point interpolation 19679 methods to get interpolated value between 19680 two arbitrary data points. 19681 19682 19683 @param x: requested value coordinate I{(float)} 19684 @param x1_: x coordinate of first value I{(float)} 19685 @param y1_: y coordinate of first value I{(float)} 19686 @param x2_: x coordinate of second value I{(float)} 19687 @param y2_: y coordinate of second value I{(float)} 19688 @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})} 19689 @return: interpolated value I{(float)} 19690 """ 19691 return None
19692
19693 -def gwy_interpolation_get_dval_of_equidists(x, data, interpolation):
19694 """ 19695 Computes interpolated value from 2 or 4 equidistant values. 19696 19697 For B{C{INTERPOLATION_NONE}} no B{C{data}} value is actually used, and zero is 19698 returned. 19699 19700 For B{C{INTERPOLATION_ROUND}} or B{C{INTERPOLATION_LINEAR}} 19701 it is enough to set middle two B{C{data}} values, that to use B{C{data}} in format 19702 {0, data[i], data[i+1], 0} and function computes value at data[i+x] 19703 (the outer values are not used). 19704 19705 For four value interpolations you have to prepare B{C{data}} as 19706 {data[i-1], data[i], data[i+1], data[i+2]} and function again 19707 returns value at data[i+x]. 19708 19709 Interpolation with non-interpolating bases are silently replaced with an 19710 interpolating function with the same support size. See 19711 L{gwy_interpolation_interpolate_1d}() for a function interpolating from 19712 interpolation coefficients. 19713 19714 19715 @param x: Possibily noninteger position in B{C{data}} to get value at. I{(float)} 19716 @param data: Array of 4 values to interpolate between (see below). I{(list)} 19717 @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})} 19718 @return: Value B{C{result}}. (I{(float)}) 19719 """ 19720 return None
19721
19722 -def gwy_interpolation_get_support_size(interpolation):
19723 """ 19724 Obtains the basis support size for an interpolation type. 19725 19726 @since: 2.2 19727 19728 @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})} 19729 @return: The length of the support interval of the interpolation basis. I{(int)} 19730 """ 19731 return None
19732
19733 -def gwy_interpolation_has_interpolating_basis(interpolation):
19734 """ 19735 Obtains the interpolating basis property of an inteprolation type. 19736 19737 Interpolation types with inteprolating basis directly use data values 19738 for interpolation. For these types L{gwy_interpolation_resolve_coeffs_1d}() 19739 and L{gwy_interpolation_resolve_coeffs_2d}() are no-op. 19740 19741 Generalized interpolation types (with non-interpolation basis) require to 19742 preprocess the data values to obtain interpolation coefficients first. On 19743 the ohter hand they typically offer much higher interpolation quality. 19744 19745 @since: 2.2 19746 19747 @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})} 19748 @return: B{C{True}} if the inteprolation type has interpolating basis, 19749 B{C{False}} if data values cannot be directly used for interpolation 19750 of this type. I{(bool)} 19751 """ 19752 return None
19753
19754 -def gwy_interpolation_interpolate_1d(x, coeff, interpolation):
19755 """ 19756 Interpolates a signle data point in one dimension. 19757 19758 The interpolation basis support size can be obtained generically with 19759 L{gwy_interpolation_get_support_size}(). 19760 19761 @since: 2.2 19762 19763 @param x: Position in interval [0,1) to get value at. I{(float)} 19764 @param coeff: Array of support-length size with interpolation coefficients 19765 (that are equal to data values for an interpolating basis). I{(list)} 19766 @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})} 19767 @return: Value B{C{result}}. (I{(float)}) 19768 """ 19769 return None
19770
19771 -def gwy_interpolation_interpolate_2d(x, y, rowstride, coeff, interpolation):
19772 """ 19773 Interpolates a signle data point in two dimensions. 19774 19775 @since: 2.2 19776 19777 @param x: X-position in interval [0,1) to get value at. I{(float)} 19778 @param y: Y-position in interval [0,1) to get value at. I{(float)} 19779 @param rowstride: Row stride of B{C{coeff}}. I{(int)} 19780 @param coeff: Array of support-length-squared size with interpolation coefficients 19781 (that are equal to data values for an interpolating basis). I{(list)} 19782 @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})} 19783 @return: Value B{C{result}}. (I{(float)}) 19784 """ 19785 return None
19786
19787 -def gwy_interpolation_resample_block_1d(data, newlength, interpolation):
19788 """ 19789 Resamples a one-dimensional data array. 19790 19791 This is a primitive operation, in most cases methods such as 19792 L{DataLine.new_resampled}() provide more convenient interface. 19793 19794 @since: 2.2 19795 19796 @param data: Data block to resample. I{(list)} 19797 @param newlength: Requested length after resampling. I{(int)} 19798 @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})} 19799 @return: I{(list)} 19800 """ 19801 return None
19802
19803 -def gwy_interpolation_resample_block_2d(data, width, height, rowstride, newwidth, newheight, newrowstride, interpolation):
19804 """ 19805 Resamples a two-dimensional data array. 19806 19807 This is a primitive operation, in most cases methods such as 19808 L{DataField.new_resampled}() provide more convenient interface. 19809 19810 @since: 2.2 19811 19812 @param data: Data block to resample. I{(list)} 19813 @param width: Number of columns in B{C{data}}. I{(int)} 19814 @param height: Number of rows in B{C{data}}. I{(int)} 19815 @param rowstride: Total row length (including B{C{width}}). I{(int)} 19816 @param newwidth: Requested number of columns after resampling. I{(int)} 19817 @param newheight: Requested number of rows after resampling. I{(int)} 19818 @param newrowstride: Requested total row length after resampling (including 19819 B{C{newwidth}}). I{(int)} 19820 @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})} 19821 @return: I{(list)} 19822 """ 19823 return None
19824
19825 -def gwy_interpolation_resolve_coeffs_1d(data, interpolation):
19826 """ 19827 Transforms data values in a one-dimensional array to interpolation 19828 coefficients. 19829 19830 This function is no-op for interpolation types with finite-support 19831 interpolating function. Therefore you can also omit it and use the data 19832 array directly for these interpolation types. 19833 19834 @since: 2.2 19835 19836 @param data: An array of data values. It will be rewritten with the coefficients. I{(list)} 19837 @param interpolation: Interpolation type to prepare B{C{data}} for. 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})} 19838 @return: I{(list)} 19839 """ 19840 return None
19841
19842 -def gwy_interpolation_resolve_coeffs_2d(width, height, rowstride, data, interpolation):
19843 """ 19844 Transforms data values in a two-dimensional array to interpolation 19845 coefficients. 19846 19847 This function is no-op for interpolation types with finite-support 19848 interpolating function. Therefore you can also omit it and use the data 19849 array directly for these interpolation types. 19850 19851 @since: 2.2 19852 19853 @param width: Number of columns in B{C{data}}. I{(int)} 19854 @param height: Number of rows in B{C{data}}. I{(int)} 19855 @param rowstride: Total row length (including B{C{width}}). I{(int)} 19856 @param data: An array of data values. It will be rewritten with the coefficients. I{(list)} 19857 @param interpolation: Interpolation type to prepare B{C{data}} for. 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})} 19858 @return: I{(list)} 19859 """ 19860 return None
19861
19862 -def gwy_interpolation_shift_block_1d(data, offset, interpolation, exterior, fill_value):
19863 """ 19864 Shifts a one-dimensional data block by a possibly non-integer offset. 19865 19866 The B{C{EXTERIOR_LAPLACE}} exterior type cannot be used with this function. 19867 19868 @since: 2.2 19869 19870 @param data: Data block to shift. I{(list)} 19871 @param offset: The shift, in corrective sense. Shift value of 1.0 means the 19872 zeroth value of B{C{newdata}} will be set to the first value of B{C{data}}. I{(float)} 19873 @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})} 19874 @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}}, C{B{EXTERIOR_LAPLACE}}. I{(L{ExteriorType})} 19875 @param fill_value: The value to use with B{C{EXTERIOR_FIXED_VALUE}}. I{(float)} 19876 @return: I{(list)} 19877 """ 19878 return None
19879
19880 -def gwy_key_from_name(name):
19881 """ 19882 Convert string representation of key to numerical. 19883 19884 19885 @param name: String representation of key. I{(string)} 19886 @return: Corresponding numerical key. I{(int)} 19887 """ 19888 return None
19889
19890 -def gwy_label_new_header(text):
19891 """ 19892 Creates a bold, left aligned label. 19893 19894 The purpose of this function is to avoid propagation of too much markup to 19895 translations (and to reduce code clutter by avoiding dummy constructor and 19896 left-aligning automatically). 19897 19898 19899 @param text: Text to put into the label. It must be a valid markup and it will 19900 be made bold by adding appropriate markup around it. I{(string)} 19901 @return: A newly created B{C{GtkLabel}}. I{(L{gtk.Widget})} 19902 """ 19903 return None
19904
19905 -def gwy_layer_func_register(type):
19906 """ 19907 Registeres a layer function (layer type). 19908 19909 19910 @param type: Layer type in GObject type system. That is the return value of 19911 L{gwy_layer_foo_get_type}(). I{(GType)} 19912 @return: Normally B{C{True}}; B{C{False}} on failure. I{(bool)} 19913 """ 19914 return None
19915
19916 -def gwy_log_get_enabled():
19917 """ 19918 Reports whether logging of data processing operations is globally enabled. 19919 19920 @since: 2.35 19921 19922 @return: B{C{True}} if logging is enabled, B{C{False}} if it is disabled. I{(bool)} 19923 """ 19924 return None
19925
19926 -def gwy_log_set_enabled(setting):
19927 """ 19928 Globally enables or disables logging of data processing operations. 19929 19930 By default, logging is enabled. Non-GUI applications that run module functions may wish to disable it. Of course, 19931 the log will presist only if the data container is saved into a GWY file. 19932 19933 If logging is disabled logging functions such as L{gwy_app_channel_log_add}() become no-op. It is possible to run the 19934 log viewer with L{gwy_app_log_browser_for_channel}() to see log entries created when logging was enabled. 19935 19936 @since: 2.35 19937 19938 @param setting: B{C{True}} to enable logging, B{C{False}} to disable it. I{(bool)} 19939 """ 19940 pass
19941
19942 -def gwy_mask_color_selector_run(dialog_title, parent, color_button, container, prefix):
19943 """ 19944 Creates and runs a color selector dialog for a mask. 19945 19946 Note this function does not return anything, it runs the color selection 19947 dialog modally and returns when it is finished. 19948 19949 @since: 2.1 19950 19951 @param dialog_title: Title of the color selection dialog (B{C{None}} to use default). I{(string)} 19952 @param parent: Dialog parent window. The color selector dialog will be made 19953 transient for this window. I{(L{gtk.Window})} 19954 @param color_button: Color button to update on color change (or B{C{None}}). I{(L{ColorButton})} 19955 @param container: Container to initialize the color from and save it to. I{(L{Container})} 19956 @param prefix: Prefix in B{C{container}} (normally "/0/mask"). I{(string)} 19957 """ 19958 pass
19959
19960 -def gwy_math_curvature(coeffs):
19961 """ 19962 Calculates curvature parameters at the apex from two-dimensional quadratic polynomial coefficients. 19963 19964 This is an old name for L{gwy_math_curvature_at_apex}(). See the description there. 19965 19966 @since: 2.22 19967 19968 @param coeffs: Array of the six polynomial coefficients of a quadratic surface in the following order: 1, x, y, x², xy, y². I{(list)} 19969 @return: Tuple consisting of 8 values (B{C{dimen}}, B{C{kappa1}}, B{C{kappa2}}, B{C{phi1}}, B{C{phi2}}, B{C{xc}}, B{C{yc}}, B{C{zc}}). (I{(int)}, I{(float)}, I{(float)}, I{(float)}, I{(float)}, I{(float)}, I{(float)}, I{(float)}) 19970 """ 19971 return None, None, None, None, None, None, None, None
19972
19973 -def gwy_math_find_nearest_line(x, y, coords, metric):
19974 """ 19975 Finds the line from B{C{coords}} nearest to the point (B{C{x}}, B{C{y}}). 19976 19977 19978 @param x: X-coordinate of the point to search. I{(float)} 19979 @param y: Y-coordinate of the point to search. I{(float)} 19980 @param coords: Line coordinates stored as x00, y00, x01, y01, x10, y10, etc. I{(list)} 19981 @param metric: Metric matrix (2x2, but stored sequentially by rows: m11, m12, m21, m22), it must be positive definite. 19982 Vector norm is then calculated as m11*x*x + (m12 + m21)*x*y + m22*y*y. It can be B{C{None}}, standard Euclidean 19983 metric is then used. I{(list)} 19984 @return: Tuple consisting of 2 values (B{C{idx}}, B{C{d2min}}). (I{(int)}, I{(float)}) 19985 """ 19986 return None, None
19987
19988 -def gwy_math_find_nearest_point(x, y, coords, metric):
19989 """ 19990 Finds the point from B{C{coords}} nearest to the point (B{C{x}}, B{C{y}}). 19991 19992 19993 @param x: X-coordinate of the point to search. I{(float)} 19994 @param y: Y-coordinate of the point to search. I{(float)} 19995 @param coords: Point coordinates stored as x0, y0, x1, y1, x2, y2, etc. I{(list)} 19996 @param metric: Metric matrix (2x2, but stored sequentially by rows: m11, m12, m21, m22). Vector norm is then calculated 19997 as m11*x*x + (m12 + m21)*x*y + m22*y*y. It can be B{C{None}}, standard Euclidean metric is then used. I{(list)} 19998 @return: Tuple consisting of 2 values (B{C{idx}}, B{C{d2min}}). (I{(int)}, I{(float)}) 19999 """ 20000 return None, None
20001
20002 -def gwy_math_fit_polynom(xdata, ydata, n):
20003 """ 20004 Fits a polynom through a general (x, y) data set. 20005 20006 20007 @param xdata: Independent variable data (of size B{C{ndata}}). I{(list)} 20008 @param ydata: Dependent variable data (of size B{C{ndata}}). I{(list)} 20009 @param n: The degree of polynom to fit. I{(int)} 20010 @return: Value B{C{coeffs}}. (I{(list)}) 20011 """ 20012 return None
20013
20014 -def gwy_math_humanize_numbers(unit, maximum):
20015 """ 20016 Finds a human-friendly representation for a range of numbers. 20017 20018 20019 @param unit: The smallest possible step. I{(float)} 20020 @param maximum: The maximum possible value. I{(float)} 20021 @return: Tuple consisting of 2 values (B{C{value}}, B{C{precision}}). (I{(float)}, I{(int)}) 20022 """ 20023 return None, None
20024
20025 -def gwy_math_is_in_polygon(x, y, poly):
20026 """ 20027 Establishes wether the test point B{C{x}}, B{C{y}} is inside the polygon B{C{poly}}. The polygon can be defined either clockwise 20028 or anti-clockwise and can be a concave, convex or self-intersecting polygon. 20029 20030 @warning: Result can be either True or False if the test point is *exactly* on an edge. 20031 20032 @since: 2.7 20033 20034 @param x: The x coordinate of the test point. I{(float)} 20035 @param y: The y coordinate of the test point. I{(float)} 20036 @param poly: An array of coordinate pairs (points) that define a polygon. I{(list)} 20037 @return: Value B{C{is_inside}}. (I{(BooleanOutArg)}) 20038 """ 20039 return None
20040
20041 -def gwy_math_kth_rank(array, k):
20042 """ 20043 Finds k-th item of an array of values using Quick select algorithm. 20044 20045 The value positions change as follows. The returned value is guaranteed to be at B{C{k}}-th position in the array (i.e. 20046 correctly ranked). All other values are correctly ordered with respect to this value: preceeding values are 20047 smaller (or equal) and following values are larger (or equal). 20048 20049 @since: 2.50 20050 20051 @param array: Array of doubles. It is shuffled by this function. I{(list)} 20052 @param k: Rank of the value to find (from lowest to highest). I{(int)} 20053 @return: The B{C{k}}-th value of B{C{array}} if it was sorted. I{(float)} 20054 """ 20055 return None
20056
20057 -def gwy_math_median(array):
20058 """ 20059 Finds median of an array of values using Quick select algorithm. 20060 20061 See L{gwy_math_kth_rank}() for details of how the values are shuffled. 20062 20063 20064 @param array: Array of doubles. It is shuffled by this function. I{(list)} 20065 @return: The median value of B{C{array}}. I{(float)} 20066 """ 20067 return None
20068
20069 -def gwy_math_refine_maximum(z):
20070 """ 20071 Performs subpixel refinement of parabolic a two-dimensional maximum. 20072 20073 An alias for L{gwy_math_refine_maximum_2d}(). 20074 20075 @since: 2.42 20076 20077 @param z: Array of length 9, containing the square 3x3 neighbourhood values in matrix order and with the maximum in the 20078 centre. I{(list)} 20079 @return: Tuple consisting of 3 values (B{C{x}}, B{C{y}}, B{C{refined}}). (I{(float)}, I{(float)}, I{(BooleanOutArg)}) 20080 """ 20081 return None, None, None
20082
20083 -def gwy_math_refine_maximum_1d(y):
20084 """ 20085 Performs subpixel refinement of parabolic a one-dimensional maximum. 20086 20087 The central value corresponds to x-coordinate 0, distances between values are unity. The refinement is based by 20088 fitting a parabola through the maximum. If it fails or the calculated maximum lies farther than the surrounding 20089 values the function sets the refined maximum to the origin and returns B{C{False}}. 20090 20091 @since: 2.49 20092 20093 @param y: Array of length 3, containing the neighbourhood values with the maximum in the centre. I{(list)} 20094 @return: Tuple consisting of 2 values (B{C{x}}, B{C{refined}}). (I{(float)}, I{(BooleanOutArg)}) 20095 """ 20096 return None, None
20097
20098 -def gwy_math_refine_maximum_2d(z):
20099 """ 20100 Performs subpixel refinement of parabolic a two-dimensional maximum. 20101 20102 The central value corresponds to coordinates (0,0), distances between values are unity. The refinement is based by 20103 fitting a two-dimensional parabola through the maximum. If it fails or the calculated maximum lies farther than 20104 the surrounding values the function sets the refined maximum to the origin and returns B{C{False}}. 20105 20106 @since: 2.49 20107 20108 @param z: Array of length 9, containing the square 3x3 neighbourhood values in matrix order and with the maximum in the 20109 centre. I{(list)} 20110 @return: Tuple consisting of 3 values (B{C{x}}, B{C{y}}, B{C{refined}}). (I{(float)}, I{(float)}, I{(BooleanOutArg)}) 20111 """ 20112 return None, None, None
20113
20114 -def gwy_math_trimmed_mean(array, nlowest, nhighest):
20115 """ 20116 Finds trimmed mean of an array of values. 20117 20118 At least one value must remain after the trimming, i.e. B{C{nlowest}} + B{C{nhighest}} must be smaller than B{C{n}}. Usually one 20119 passes the same number as both B{C{nlowest}} and B{C{nhighest}}, but it is not a requirement. 20120 20121 The function can be also used to calculate normal mean values as it implements efficiently the cases when no 20122 trimming is done at either end. 20123 20124 @since: 2.50 20125 20126 @param array: Array of doubles. It is shuffled by this function. I{(list)} 20127 @param nlowest: The number of lowest values to discard. I{(int)} 20128 @param nhighest: The number of highest values to discard. I{(int)} 20129 @return: The trimmed mean. I{(float)} 20130 """ 20131 return None
20132
20133 -def gwy_menu_gl_material():
20134 """ 20135 Creates a pop-up GL material menu. 20136 20137 Object data C{"gl-material-name"} is set to GL material 20138 name for each menu item. 20139 20140 20141 @return: The newly created pop-up menu as B{C{GtkWidget}}. I{(L{gtk.Widget})} 20142 """ 20143 return None
20144
20145 -def gwy_menu_gradient():
20146 """ 20147 Creates a pop-up gradient menu. 20148 20149 Object data C{"gradient-name"} is set to gradient name for 20150 each menu item. 20151 20152 20153 @return: The newly created pop-up menu as B{C{GtkWidget}}. I{(L{gtk.Widget})} 20154 """ 20155 return None
20156
20157 -def gwy_module_browser():
20158 """ 20159 Shows a simple module browser. 20160 20161 """ 20162 pass
20163
20164 -def gwy_module_data_fopen(modname, filename, mode):
20165 """ 20166 Opens a module data file in the user directory. 20167 20168 The function wraps L{gwy_fopen}(), forming the full file name automatically and handling subdirectory creation. 20169 20170 The error can be from B{C{glib.FILE_ERROR}} domain. 20171 20172 @since: 2.51 20173 20174 @param modname: Module name (determines the subdirectory). I{(string)} 20175 @param filename: Name of the file to save. In GLib encoding, but it really should be just ASCII. I{(string)} 20176 @param mode: File open mode, as in fopen(). I{(string)} 20177 @return: A file handle if the file was opened as requested, B{C{None}} on failure. I{(FILE*)} 20178 """ 20179 return None
20180
20181 -def gwy_module_data_save(modname, filename, contents, length):
20182 """ 20183 Saves module data file to the user directory. 20184 20185 The function wraps g_file_set_contents(), forming the full file name automatically and handling subdirectory 20186 creation. 20187 20188 The error can be from B{C{glib.FILE_ERROR}} domain. 20189 20190 @since: 2.51 20191 20192 @param modname: Module name (determines the subdirectory). I{(string)} 20193 @param filename: Name of the file to save. In GLib encoding, but it really should be just ASCII. I{(string)} 20194 @param contents: File contents to write. I{(string)} 20195 @param length: Length of B{C{contents}}, or -1 if it is a NUL-terminated string. I{(gssize)} 20196 @return: B{C{True}} if the file was saved. I{(bool)} 20197 """ 20198 return None
20199
20200 -def gwy_module_disable_registration(name):
20201 """ 20202 Prevents the registration of a module of given name. 20203 20204 This function blocks future module registration using L{gwy_module_register_modules}(). Already loaded modules are 20205 unaffected. The low-level module loading function L{gwy_module_register_module}() always attempts to load the module, 20206 even if blocked. 20207 20208 @since: 2.48 20209 20210 @param name: A module name. I{(string)} 20211 """ 20212 pass
20213
20214 -def gwy_module_enable_registration(name):
20215 """ 20216 Unblocks the registration of a module of given name. 20217 20218 This function influences future module registration. Already loaded modules are unaffected. 20219 20220 @since: 2.48 20221 20222 @param name: A module name. I{(string)} 20223 """ 20224 pass
20225
20226 -def gwy_module_error_quark():
20227 """ 20228 Returns error domain for module loading. 20229 20230 See and use B{C{MODULE_ERROR}}. 20231 20232 20233 @return: The error domain. I{(int)} 20234 """ 20235 return None
20236
20237 -def gwy_module_file_error_quark():
20238 """ 20239 Returns error domain for file module functions. 20240 20241 See and use B{C{MODULE_FILE_ERROR}}. 20242 20243 20244 @return: The error domain. I{(int)} 20245 """ 20246 return None
20247
20248 -def gwy_module_get_filename(name):
20249 """ 20250 Returns full file name of a module. 20251 20252 20253 @param name: A module name. I{(string)} 20254 @return: Module file name as a string that must be modified or freed. I{(string)} 20255 """ 20256 return None
20257
20258 -def gwy_module_is_enabled(name):
20259 """ 20260 Reports whether the registration of a module is enabled. 20261 20262 If the registration of module B{C{name}} was prevented using L{gwy_module_disable_registration}() and not subsequently 20263 re-enabled using L{gwy_module_enabled_registration}() this function returns B{C{False}}. 20264 20265 The reported values only represents the current state of blocking. A module B{C{name}} could have been loaded when it 20266 was not blocked. 20267 20268 @since: 2.48 20269 20270 @param name: A module name. I{(string)} 20271 @return: B{C{True}} if module B{C{name}} can be registered; B{C{False}} when it is blocked from registration. I{(bool)} 20272 """ 20273 return None
20274
20275 -def gwy_name_from_key(key):
20276 """ 20277 Convert numerical representation of key to string. 20278 20279 The argument may only be identifier actually corresponding to string key, 20280 for instance obtained with L{gwy_key_from_name}(). Do not pass random integers 20281 to this function. 20282 20283 20284 @param key: Numerical representation of a key. I{(int)} 20285 @return: Corresponding string key. I{(string)} 20286 """ 20287 return None
20288
20289 -def gwy_nlfit_presets():
20290 """ 20291 Gets inventory with all the NLFit presets. 20292 20293 20294 @return: NLFit preset inventory. I{(L{Inventory})} 20295 """ 20296 return None
20297
20298 -def gwy_pixbuf_draw_data_field(pixbuf, data_field, gradient):
20299 """ 20300 Paints a data field to a pixbuf with an auto-stretched color gradient. 20301 20302 Minimum data value is mapped to start of B{C{gradient}}, maximum value to its 20303 end, values between are mapped linearly to B{C{gradient}}. 20304 20305 @param pixbuf: A Gdk pixbuf to draw to. I{(L{gdk.Pixbuf})} 20306 @param data_field: A data field to draw. I{(L{DataField})} 20307 @param gradient: A color gradient to draw with. I{(L{Gradient})} 20308 """ 20309 pass
20310
20311 -def gwy_pixbuf_draw_data_field_adaptive(pixbuf, data_field, gradient):
20312 """ 20313 Paints a data field to a pixbuf with a color gradient adaptively. 20314 20315 The mapping from data field (minimum, maximum) range to gradient is 20316 nonlinear, deformed using inverse function to height density cummulative 20317 distribution. 20318 20319 @param pixbuf: A Gdk pixbuf to draw to. I{(L{gdk.Pixbuf})} 20320 @param data_field: A data field to draw. I{(L{DataField})} 20321 @param gradient: A color gradient to draw with. I{(L{Gradient})} 20322 """ 20323 pass
20324
20325 -def gwy_pixbuf_draw_data_field_as_mask(pixbuf, data_field, color):
20326 """ 20327 Paints a data field to a pixbuf as a single-color mask with varying opacity. 20328 20329 Values equal or smaller to 0.0 are drawn as fully transparent, values 20330 greater or equal to 1.0 as fully opaque, values between are linearly 20331 mapped to pixel opacity. 20332 20333 @param pixbuf: A Gdk pixbuf to draw to. I{(L{gdk.Pixbuf})} 20334 @param data_field: A data field to draw. I{(L{DataField})} 20335 @param color: A color to use. I{(const-RGBA*)} 20336 """ 20337 pass
20338
20339 -def gwy_pixbuf_draw_data_field_with_range(pixbuf, data_field, gradient, minimum, maximum):
20340 """ 20341 Paints a data field to a pixbuf with an explicite color gradient range. 20342 20343 B{C{minimum}} and all smaller values are mapped to start of B{C{gradient}}, B{C{maximum}} 20344 and all greater values to its end, values between are mapped linearly to 20345 B{C{gradient}}. 20346 20347 @param pixbuf: A Gdk pixbuf to draw to. I{(L{gdk.Pixbuf})} 20348 @param data_field: A data field to draw. I{(L{DataField})} 20349 @param gradient: A color gradient to draw with. I{(L{Gradient})} 20350 @param minimum: The value corresponding to gradient start. I{(float)} 20351 @param maximum: The value corresponding to gradient end. I{(float)} 20352 """ 20353 pass
20354
20355 -def gwy_preview_surface_to_datafield(surface, dfield, max_xres, max_yres, flags):
20356 """ 20357 Renders a preview of a XYZ data surface to a data field. 20358 20359 @since: 2.46 20360 20361 @param surface: A surface representing a XYZ data. I{(L{Surface})} 20362 @param dfield: A data field to fill with B{C{surface}} preview. I{(L{DataField})} 20363 @param max_xres: Maximum width of the preview, it must be at least 2. I{(int)} 20364 @param max_yres: Maximum height of the preview, it must be at least 2. I{(int)} 20365 @param flags: Flags modifying the behaviour. Expected values: C{B{PREVIEW_SURFACE_DENSITY}}, C{B{PREVIEW_SURFACE_FILL}}. I{(L{PreviewSurfaceFlags})} 20366 """ 20367 pass
20368
20369 -def gwy_process_func_current():
20370 """ 20371 Obtains the name of currently running data processing function. 20372 20373 If no process function is currently running, B{C{None}} is returned. 20374 20375 If multiple nested functions are running (which is not usual but technically 20376 possible), the innermost function name is returned. 20377 20378 @since: 2.38 20379 20380 @return: The name of currently running data processing function or B{C{None}}. I{(string)} 20381 """ 20382 return None
20383
20384 -def gwy_process_func_exists(name):
20385 """ 20386 Checks whether a data processing function exists. 20387 20388 20389 @param name: Data processing function name. I{(string)} 20390 @return: B{C{True}} if function B{C{name}} exists, B{C{False}} otherwise. I{(bool)} 20391 """ 20392 return None
20393
20394 -def gwy_process_func_get_menu_path(name):
20395 """ 20396 Returns the menu path of a data processing function. 20397 20398 The returned menu path is only the tail part registered by the function, 20399 i.e., without any leading "/Data Process". 20400 20401 20402 @param name: Data processing function name. I{(string)} 20403 @return: The menu path. The returned string is owned by the module. I{(string)} 20404 """ 20405 return None
20406
20407 -def gwy_process_func_get_run_types(name):
20408 """ 20409 Returns run modes supported by a data processing function. 20410 20411 20412 @param name: Data processing function name. I{(string)} 20413 @return: The run mode bit mask. I{(RunType)} 20414 """ 20415 return None
20416
20417 -def gwy_process_func_get_sensitivity_mask(name):
20418 """ 20419 Gets menu sensititivy mask for a data processing function. 20420 20421 20422 @param name: Data processing function name. I{(string)} 20423 @return: The menu item sensitivity mask (a combination of B{C{MenuSensFlags}} 20424 flags). I{(int)} 20425 """ 20426 return None
20427
20428 -def gwy_process_func_get_stock_id(name):
20429 """ 20430 Gets stock icon id of a data processing function. 20431 20432 20433 @param name: Data processing function name. I{(string)} 20434 @return: The stock icon id. The returned string is owned by the module. I{(string)} 20435 """ 20436 return None
20437
20438 -def gwy_process_func_get_tooltip(name):
20439 """ 20440 Gets tooltip for a data processing function. 20441 20442 20443 @param name: Data processing function name. I{(string)} 20444 @return: The tooltip. The returned string is owned by the module. I{(string)} 20445 """ 20446 return None
20447
20448 -def gwy_process_func_run(name, data, run):
20449 """ 20450 Runs a data processing function identified by B{C{name}}. 20451 20452 @param name: Data processing function name. I{(string)} 20453 @param data: Data (a B{C{Container}}). I{(L{Container})} 20454 @param run: How the function should be run. Expected values: C{B{RUN_NONE}}, C{B{RUN_NONINTERACTIVE}}, C{B{RUN_INTERACTIVE}}, C{B{RUN_IMMEDIATE}}, C{B{RUN_MASK}}. I{(L{RunType})} 20455 """ 20456 pass
20457
20458 -def gwy_process_type_init():
20459 """ 20460 Makes libgwyprocess types safe for deserialization and performs other 20461 initialization. You have to call this function from the main thread before 20462 using objects from libgwyprocess. 20463 20464 It calls L{gwy_type_init}() first to make sure libgwyddion is initialized. 20465 20466 It is safe to call this function more than once, subsequent calls are no-op. 20467 20468 """ 20469 pass
20470
20471 -def gwy_radio_button_get_value(button):
20472 """ 20473 Gets the integer value associated with a radio button. 20474 20475 20476 @param button: A radio button belonging to a group created by 20477 L{gwy_radio_buttons_create}(). I{(L{gtk.Widget})} 20478 @return: The integer value corresponding to B{C{button}}. I{(int)} 20479 """ 20480 return None
20481
20482 -def gwy_radio_button_set_value(button, value):
20483 """ 20484 Sets the integer value associated with a radio button. 20485 20486 This function allow to change associated radio button values after creation 20487 or even construct a radio button group with associated integers without the 20488 help of L{gwy_radio_buttons_create}(). 20489 20490 @param button: A radio button to set associated value of. I{(L{gtk.Widget})} 20491 @param value: Value to associate. I{(int)} 20492 """ 20493 pass
20494
20495 -def gwy_raw_data_size(datatype):
20496 """ 20497 Reports the size of a single raw data item. 20498 20499 @since: 2.25 20500 20501 @param datatype: Raw data type. Expected values: C{B{RAW_DATA_SINT8}}, C{B{RAW_DATA_UINT8}}, C{B{RAW_DATA_SINT16}}, C{B{RAW_DATA_UINT16}}, C{B{RAW_DATA_SINT32}}, C{B{RAW_DATA_UINT32}}, C{B{RAW_DATA_SINT64}}, C{B{RAW_DATA_UINT64}}, C{B{RAW_DATA_HALF}}, C{B{RAW_DATA_FLOAT}}, C{B{RAW_DATA_REAL}}, C{B{RAW_DATA_DOUBLE}}. I{(L{RawDataType})} 20502 @return: The size of a single raw data item of type B{C{datatype}}. I{(int)} 20503 """ 20504 return None
20505
20506 -def gwy_require_image_same_units(field, data, id, name):
20507 """ 20508 Checks if data field has equal lateral and value units, possibly showing error message. 20509 20510 If the data field does not have the same lateral and value units a simple error message dialog is shown for B{C{data}} 20511 and B{C{id}}. This is only done if other GUI functions (like progress bars for waiting) are enabled. 20512 20513 @since: 2.59 20514 20515 @param field: The data field to check. I{(L{DataField})} 20516 @param data: Data container with the data field. I{(L{Container})} 20517 @param id: The id of B{C{field}} in B{C{data}}. I{(int)} 20518 @param name: Error message prefix, usually module function name. I{(string)} 20519 @return: B{C{True}} if the units are the same, B{C{False}} otherwise. I{(bool)} 20520 """ 20521 return None
20522
20523 -def gwy_require_square_image(field, data, id, name):
20524 """ 20525 Checks if data field has the same horizontal and vertical pixel dimensions, possibly showing error message. 20526 20527 If the data field is not square a simple error message dialog is shown for B{C{data}} and B{C{id}}. This is only done if 20528 other GUI functions (like progress bars for waiting) are enabled. 20529 20530 @since: 2.59 20531 20532 @param field: The data field to check. I{(L{DataField})} 20533 @param data: Data container with the data field. I{(L{Container})} 20534 @param id: The id of B{C{field}} in B{C{data}}. I{(int)} 20535 @param name: Error message prefix, usually module function name. I{(string)} 20536 @return: B{C{True}} if the data field is square, B{C{False}} otherwise. I{(bool)} 20537 """ 20538 return None
20539
20540 -def gwy_resource_classes_finalize():
20541 """ 20542 Destroys the inventories of all resource classes. 20543 20544 This function makes the affected resource classes unusable. Its purpose is to faciliate reference leak debugging 20545 by destroying a large number of objects that normally live forever. 20546 20547 Note static resource classes that never called L{Resource.class_load}() are excluded. 20548 20549 @since: 2.8 20550 20551 """ 20552 pass
20553
20554 -def gwy_resource_parse(text, expected_type):
20555 """ 20556 Reconstructs a resource from human readable form. 20557 20558 20559 @param text: Textual resource representation. I{(string)} 20560 @param expected_type: Resource object type. If not 0, only resources of give type are allowed. Zero value means any 20561 B{C{Resource}} is allowed. I{(GType)} 20562 @return: Newly created resource (or B{C{None}}). I{(L{Resource})} 20563 """ 20564 return None
20565
20566 -def gwy_resource_tree_view_set_active(treeview, active):
20567 """ 20568 Selects a resource in a list and scrolls to make it visible. 20569 20570 20571 @param treeview: A resource selector tree view. I{(L{gtk.Widget})} 20572 @param active: Resource name to be shown as currently selected. I{(string)} 20573 @return: B{C{True}} if B{C{active}} was selected, B{C{False}} if there is no such 20574 resource. I{(bool)} 20575 """ 20576 return None
20577
20578 -def gwy_rgba_remove_from_container(container, prefix):
20579 """ 20580 Removes RGBA color components from a container. 20581 20582 This is a convenience function to remove the components in the common 20583 arrangement. 20584 20585 20586 @param container: A B{C{Container}} to remove the color components from. I{(L{Container})} 20587 @param prefix: Prefix in B{C{container}}, e.g. "/0/mask" (it will remove 20588 "/0/mask/red", "/0/mask/green", etc. then). I{(string)} 20589 @return: B{C{True}} if anything was removed. I{(bool)} 20590 """ 20591 return None
20592
20593 -def gwy_run_subdialog(dialog):
20594 """ 20595 Runs a modal dialog transient for another another dialog, trying to work around bugs. 20596 20597 If both dialogs are modal, bad things can happen in some graphical environments, such as the second being hidden 20598 under the first one and inaccessible. This function attempts to work around this by temporarily setting the parent 20599 dialog (the one B{C{dialog}} is transient for) non-modal. 20600 20601 If the dialog is not transient for anything or its parent is not modal it is just run normally. 20602 20603 When the function resturns only the dialog has been destroyed. 20604 20605 @since: 2.62 20606 20607 @param dialog: A data dialog to be run as modal. I{(L{gtk.Dialog})} 20608 @return: The response of B{C{dialog}}. I{(int)} 20609 """ 20610 return None
20611
20612 -def gwy_save_auxiliary_data(title, parent, data_len, data):
20613 """ 20614 Saves a report or other auxiliary data to a user specified file. 20615 20616 This is actually a simple L{gwy_save_auxiliary_with_callback}() wrapper, see its description for details. 20617 20618 @since: 2.3 20619 20620 @param title: File chooser dialog title. I{(string)} 20621 @param parent: Parent window for the file chooser dialog (may be B{C{None}}). I{(L{gtk.Window})} 20622 @param data_len: The length of B{C{data}} in bytes. Pass -1 if B{C{data}} is text, it must be nul-terminated then and it will be 20623 saved in text mode (this matters if the operating system distinguishes between text and binary). 20624 A non-negative value causes the data to be saved as binary. I{(gssize)} 20625 @param data: The data to save. I{(string)} 20626 @return: B{C{True}} if the data was saved, B{C{False}} if it was not saved for any reason. I{(bool)} 20627 """ 20628 return None
20629
20630 -def gwy_select_in_filtered_inventory_treeeview(treeview, name):
20631 """ 20632 Selects an item in filtered tree view showing an inventory. 20633 20634 Usually the tree view would show a B{C{GtkTreeModelFilter}} model created by 20635 L{gwy_create_inventory_model_without_default}(). However, this function works also for other filter models around 20636 a B{C{InventoryStore}}. 20637 20638 @since: 2.62 20639 20640 @param treeview: A filtered tree view showing an inventory. I{(L{gtk.TreeView})} 20641 @param name: Item name to select. I{(string)} 20642 """ 20643 pass
20644
20645 -def gwy_serializable_clone(source, copy):
20646 """ 20647 Makes an object identical to another object of the same type. 20648 20649 More precisely, B{C{source}} may be subclass of B{C{copy}} (the extra information 20650 is lost then). 20651 20652 @param source: An object implementing B{C{Serializable}} interface. I{(L{gobject.GObject})} 20653 @param copy: An object of the same type as B{C{source}} to modify after it. I{(L{gobject.GObject})} 20654 """ 20655 pass
20656
20657 -def gwy_serializable_clone_with_type(source, copy, type):
20658 """ 20659 Makes an object identical to another object of the same type, with explicit 20660 type checking. 20661 20662 This function is the same as L{gwy_serializable_clone}(), except it asserts 20663 the object type, which must be B{C{type}}. 20664 20665 Since 2.52 20666 20667 @param source: An object implementing B{C{Serializable}} interface. I{(L{gobject.GObject})} 20668 @param copy: An object of the same type as B{C{source}} to modify after it. I{(L{gobject.GObject})} 20669 @param type: The type the objects are asserted to be. I{(GType)} 20670 """ 20671 pass
20672
20673 -def gwy_serializable_duplicate(object):
20674 """ 20675 Creates a copy of an object. 20676 20677 If the object doesn't support duplication natively, it's brute-force 20678 serialized and then deserialized, this may be quite inefficient, 20679 namely for large objects. 20680 20681 You can duplicate a B{C{None}}, too, but you are discouraged from doing it. 20682 20683 20684 @param object: An object implementing B{C{Serializable}} interface. I{(L{gobject.GObject})} 20685 @return: The newly created object copy. However if the object is a 20686 singleton, B{C{object}} itself (with incremented reference count) 20687 can be returned, too. I{(L{gobject.GObject})} 20688 """ 20689 return None
20690
20691 -def gwy_serializable_get_size(serializable):
20692 """ 20693 Calculates the expected size of serialized object. 20694 20695 20696 @param serializable: A B{C{GObject}} that implements B{C{Serializable}} interface. I{(L{gobject.GObject})} 20697 @return: The expected size of serialized B{C{serializable}}. I{(gsize)} 20698 """ 20699 return None
20700
20701 -def gwy_serialize_check_string(buffer, size, position, compare_to):
20702 """ 20703 Check whether B{C{size}} bytes of memory in B{C{buffer}} can be interpreted as a 20704 NUL-terminated string, and eventually whether it's equal to B{C{compare_to}}. 20705 20706 When B{C{compare_to}} is B{C{None}}, the comparsion is not performed. 20707 20708 20709 @param buffer: A memory location containing a NUL-terminated string at position 20710 B{C{position}}. I{(string)} 20711 @param size: The size of B{C{buffer}}. I{(gsize)} 20712 @param position: The position of the string in B{C{buffer}}. I{(gsize)} 20713 @param compare_to: String to compare B{C{buffer}} to, or B{C{None}}. I{(string)} 20714 @return: The length of the NUL-terminated string including the NUL 20715 character; zero otherwise. I{(gsize)} 20716 """ 20717 return None
20718
20719 -def gwy_set_data_preview_size(data_view, max_size):
20720 """ 20721 Sets up data view zoom to not exceed specified size. 20722 20723 Before calling this function, data keys have be set, data fields and layers have to be present and physically 20724 square mode set in the container. Sizing of both pixel-wise square and physically square displays is performed 20725 correctly. 20726 20727 @since: 2.7 20728 20729 @param data_view: A data view used for module preview. I{(L{DataView})} 20730 @param max_size: Maximum allowed B{C{data_view}} size (width and height). I{(int)} 20731 """ 20732 pass
20733
20734 -def gwy_sgettext(msgid):
20735 """ 20736 Translate a message id containing disambiguating prefix ending with `|'. 20737 20738 20739 @param msgid: Message id to translate, containing `|'-separated prefix. I{(string)} 20740 @return: Translated message, or B{C{msgid}} itself with all text up to the last `|' removed if there is no translation. I{(string)} 20741 """ 20742 return None
20743
20744 -def gwy_shape_fit_presets():
20745 """ 20746 Gets inventory with all the 3D geometric shape fitting presets. 20747 20748 @since: 2.47 20749 20750 @return: 3D geometric shape fitting preset inventory. I{(L{Inventory})} 20751 """ 20752 return None
20753
20754 -def gwy_si_unit_new_parse(unit_string):
20755 """ 20756 Creates a new SI unit from string representation. 20757 20758 This is a more powerful version of L{SIUnit.new}(): B{C{unit_string}} may be a relatively complex unit, with prefixes, 20759 like "pA/s" or "km^2". Beside conversion to a base SI unit like "A/s" or "m^2" it also computes the power of 10 one 20760 has to multiply the base unit with to get an equivalent of B{C{unit_string}}. 20761 20762 For example, for C{"pA/s"} it will store -12 to B{C{power10}} because 1 pA/s is 1e-12 A/s, for 20763 C{"km^2"} it will store 6 to B{C{power10}} because 1 km^2 is 1e6 m^2. 20764 20765 20766 @param unit_string: Unit string (it can be B{C{None}} for an empty unit). I{(string)} 20767 @return: Tuple consisting of 2 values (B{C{value}}, B{C{power10}}). (I{(L{SIUnit})}, I{(int)}) 20768 """ 20769 return None, None
20770
20771 -def gwy_si_unit_value_format_clone(source, dest):
20772 """ 20773 Clones a value format to another. 20774 20775 This function follows the convention of many value format updating functions 20776 that can either modify an existing format or allocate a new one. 20777 20778 @since: 2.46 20779 20780 @param source: Source value format. I{(L{SIValueFormat})} 20781 @param dest: Destination value format, or B{C{None}}. I{(L{SIValueFormat})} 20782 @return: The B{C{dest}} value format. If it was B{C{None}}, a newly allocated format 20783 is returned, otherwise (modified) B{C{dest}} itself is returned. I{(L{SIValueFormat})} 20784 """ 20785 return None
20786
20787 -def gwy_si_unit_value_format_copy(format):
20788 """ 20789 Copies a value format structure. 20790 20791 @since: 2.39 20792 20793 @param format: A value format to copy. I{(L{SIValueFormat})} 20794 @return: Newly allocated value format, identical to B{C{format}}. I{(L{SIValueFormat})} 20795 """ 20796 return None
20797
20798 -def gwy_si_unit_value_format_free(format):
20799 """ 20800 Frees a value format structure. 20801 20802 @param format: A value format to free. I{(L{SIValueFormat})} 20803 """ 20804 pass
20805
20806 -def gwy_sinc(x):
20807 """ 20808 Calculates the sinc function. 20809 20810 The sinc function is equal to sin(B{C{x}})/B{C{x}} for non-zero B{C{x}}, and defined to the limit 1 for zero B{C{x}}. 20811 20812 @since: 2.51 20813 20814 @param x: Value to calculate sinc (cardinal sine) of. I{(float)} 20815 @return: Value of sinc(B{C{x}}). I{(float)} 20816 """ 20817 return None
20818
20819 -def gwy_spline_new_from_points(xy):
20820 """ 20821 Creates a new spline curve passing through given points. 20822 20823 See L{Spline.set_points}() for discussion. 20824 20825 @since: 2.45 20826 20827 @param xy: Array of points in plane the curve will pass through. I{(list)} 20828 @return: A newly created spline curve. I{(L{Spline})} 20829 """ 20830 return None
20831
20832 -def gwy_stock_register_stock_items():
20833 """ 20834 Registers stock items. 20835 20836 This function must be called before any stock items are used. 20837 20838 """ 20839 pass
20840
20841 -def gwy_str_fixed_font_width(str):
20842 """ 20843 Measures the width of UTF-8 encoded string in fixed-width font. 20844 20845 This corresponds to width of the string displayed on a text terminal, for instance. Zero and double width 20846 characters are taken into account. It is not guaranteed all terminals display the string with the calculated 20847 width. 20848 20849 @since: 2.52 20850 20851 @param str: UTF-8 encoded string. I{(string)} 20852 @return: String width in fixed font, in character cells. I{(int)} 20853 """ 20854 return None
20855
20856 -def gwy_strdiffpos(s1, s2):
20857 """ 20858 Finds position where two strings differ. 20859 20860 20861 @param s1: A string. I{(string)} 20862 @param s2: A string. I{(string)} 20863 @return: The last position where the strings do not differ yet. Possibly -1 can be returned if either string is 20864 B{C{None}}, zero-length, or they differ in the very first character. I{(int)} 20865 """ 20866 return None
20867
20868 -def gwy_strisident(s, more, startmore):
20869 """ 20870 Checks whether a string is valid identifier. 20871 20872 Valid identifier must start with an alphabetic character or a character from B{C{startmore}}, and it must continue with 20873 alphanumeric characters or characters from B{C{more}}. 20874 20875 Note underscore is not allowed by default, you have to pass it in B{C{more}} and/or B{C{startmore}}. 20876 20877 20878 @param s: A NUL-terminated string. I{(string)} 20879 @param more: List of additional ASCII characters allowed inside identifier, empty list can be passed as B{C{None}}. I{(string)} 20880 @param startmore: List of additional ASCII characters allowed as the first identifier characters, empty list can be 20881 passed as B{C{None}}. I{(string)} 20882 @return: B{C{True}} if B{C{s}} is valid identifier, B{C{False}} otherwise. I{(bool)} 20883 """ 20884 return None
20885
20886 -def gwy_strkill(s, killchars):
20887 """ 20888 Removes characters in B{C{killchars}} from string B{C{s}}, modifying it in place. 20889 20890 Use L{gwy_strkill}(g_strdup(B{C{s}}), B{C{killchars}}) to get a modified copy. 20891 20892 20893 @param s: A NUL-terminated string. I{(string)} 20894 @param killchars: A string containing characters to kill. I{(string)} 20895 @return: B{C{s}} itself, the return value is to allow function call nesting. I{(string)} 20896 """ 20897 return None
20898
20899 -def gwy_strreplace(haystack, needle, replacement, maxrepl):
20900 """ 20901 Replaces occurences of string B{C{needle}} in B{C{haystack}} with B{C{replacement}}. 20902 20903 See L{gwy_gstring_replace}() for a function which does in-place replacement on a B{C{GString}}. 20904 20905 20906 @param haystack: A NUL-terminated string to search in. I{(string)} 20907 @param needle: A NUL-terminated string to search for. I{(string)} 20908 @param replacement: A NUL-terminated string to replace B{C{needle}} with. I{(string)} 20909 @param maxrepl: Maximum number of occurences to replace (use (gsize)-1 to replace all occurences). I{(gsize)} 20910 @return: A newly allocated string. I{(string)} 20911 """ 20912 return None
20913
20914 -def gwy_surface_new_from_data(points, n):
20915 """ 20916 Creates a new surface, filling it with provided points. 20917 20918 @since: 2.45 20919 20920 @param points: Array of B{C{n}} points with the surface data. I{(const-XYZ*)} 20921 @param n: Number of points. I{(int)} 20922 @return: A new surface. I{(L{Surface})} 20923 """ 20924 return None
20925
20926 -def gwy_surface_new_sized(n):
20927 """ 20928 Creates a new surface with preallocated size. 20929 20930 The surface will contain the speficied number of points with uninitialised 20931 values. 20932 20933 @since: 2.45 20934 20935 @param n: Number of points. I{(int)} 20936 @return: A new surface. I{(L{Surface})} 20937 """ 20938 return None
20939
20940 -def gwy_table_attach_adjbar(table, row, name, units, pivot, style):
20941 """ 20942 Attaches an adjustment bar with spinbutton and labels, or something else, to 20943 a table row. 20944 20945 The group of controls takes three table columns: adjustment bar, spinbutton 20946 and units. 20947 20948 You can use functions L{gwy_table_hscale_get_scale}(), 20949 L{gwy_table_hscale_get_check}(), etc. to get the various widgets from pivot 20950 later. 20951 20952 The function usually does the right thing but what exactly happens with 20953 various B{C{style}} values is a bit convoluted. 20954 20955 @since: 2.49 20956 20957 @param table: A B{C{GtkTable}}. I{(L{gtk.Widget})} 20958 @param row: Row in B{C{table}} to attach stuff to. I{(int)} 20959 @param name: The label before B{C{pivot}} widget. I{(string)} 20960 @param units: The label after B{C{pivot}} widget. I{(string)} 20961 @param pivot: Either a B{C{GtkAdjustment}}, or a widget to use instead of the spin 20962 button and scale widgets (if B{C{style}} is B{C{HSCALE_WIDGET}}). I{(L{gtk.Object})} 20963 @param style: A mix of options an flags determining what and how will be attached 20964 to the table. Expected values: C{B{HSCALE_DEFAULT}}, C{B{HSCALE_LOG}}, C{B{HSCALE_SQRT}}, C{B{HSCALE_LINEAR}}, C{B{HSCALE_NO_SCALE}}, C{B{HSCALE_WIDGET}}, C{B{HSCALE_WIDGET_NO_EXPAND}}, C{B{HSCALE_CHECK}}, C{B{HSCALE_SNAP}}. I{(L{HScaleStyle})} 20965 @return: The middle widget. If a spinbutton is attached, then this 20966 spinbutton is returned. Otherwise (in B{C{HSCALE_WIDGET}} case) 20967 B{C{pivot}} itself. I{(L{gtk.Widget})} 20968 """ 20969 return None
20970
20971 -def gwy_table_attach_hscale(table, row, name, units, pivot, style):
20972 """ 20973 Attaches a spinbutton with a scale and labels, or something else, to a table 20974 row. 20975 20976 The group of controls takes four table columns: label, scale, spinbutton 20977 and units. 20978 20979 You can use functions L{gwy_table_hscale_get_scale}(), 20980 L{gwy_table_hscale_get_check}(), etc. to get the various widgets from pivot 20981 later. 20982 20983 The function usually does the right thing but what exactly happens with 20984 various B{C{style}} values is a bit convoluted. 20985 20986 20987 @param table: A B{C{GtkTable}}. I{(L{gtk.Widget})} 20988 @param row: Row in B{C{table}} to attach stuff to. I{(int)} 20989 @param name: The label before B{C{pivot}} widget. I{(string)} 20990 @param units: The label after B{C{pivot}} widget. I{(string)} 20991 @param pivot: Either a B{C{GtkAdjustment}}, or a widget to use instead of the spin 20992 button and scale widgets (if B{C{style}} is B{C{HSCALE_WIDGET}}). I{(L{gtk.Object})} 20993 @param style: A mix of options an flags determining what and how will be attached 20994 to the table. Expected values: C{B{HSCALE_DEFAULT}}, C{B{HSCALE_LOG}}, C{B{HSCALE_SQRT}}, C{B{HSCALE_LINEAR}}, C{B{HSCALE_NO_SCALE}}, C{B{HSCALE_WIDGET}}, C{B{HSCALE_WIDGET_NO_EXPAND}}, C{B{HSCALE_CHECK}}, C{B{HSCALE_SNAP}}. I{(L{HScaleStyle})} 20995 @return: The middle widget. If a spinbutton is attached, then this 20996 spinbutton is returned. Otherwise (in B{C{HSCALE_WIDGET}} case) 20997 B{C{pivot}} itself. I{(L{gtk.Widget})} 20998 """ 20999 return None
21000
21001 -def gwy_table_attach_row(table, row, name, units, middle_widget):
21002 """ 21003 Attaches a widget with two labels to a table. 21004 21005 @param table: A B{C{GtkTable}}. I{(L{gtk.Widget})} 21006 @param row: Table row to attach to. I{(int)} 21007 @param name: The label before B{C{middle_widget}}. I{(string)} 21008 @param units: The label after B{C{adj}}. I{(string)} 21009 @param middle_widget: A widget. I{(L{gtk.Widget})} 21010 """ 21011 pass
21012
21013 -def gwy_table_attach_spinbutton(table, row, name, units, adj):
21014 """ 21015 Attaches a spinbutton with two labels to a table. 21016 21017 21018 @param table: A B{C{GtkTable}}. I{(L{gtk.Widget})} 21019 @param row: Table row to attach to. I{(int)} 21020 @param name: The label before B{C{adj}}. I{(string)} 21021 @param units: The label after B{C{adj}}. I{(string)} 21022 @param adj: An adjustment to create spinbutton from. I{(L{gtk.Object})} 21023 @return: The spinbutton as a B{C{GtkWidget}}. I{(L{gtk.Widget})} 21024 """ 21025 return None
21026
21027 -def gwy_table_get_child_widget(table, row, col):
21028 """ 21029 Finds a widget in B{C{GtkTable}} by its coordinates. 21030 21031 Coordinates (B{C{col}}, B{C{row}}) are taken as coordinates of widget top left corner. 21032 More precisely, the returned widget either contains the specified grid 21033 point or it is attached by its left side, top side, or top left corner to 21034 this point. 21035 21036 If there are multiple matches due to overlapping widgets, a random 21037 match is returned. 21038 21039 21040 @param table: A B{C{GtkTable}}. I{(L{gtk.Widget})} 21041 @param row: Row in B{C{table}}. I{(int)} 21042 @param col: Column in B{C{table}}. I{(int)} 21043 @return: The widget at (B{C{col}}, B{C{row}}) or B{C{None}} if there is no such widget. I{(L{gtk.Widget})} 21044 """ 21045 return None
21046
21047 -def gwy_table_hscale_get_check(pivot):
21048 """ 21049 Gets the check button associated with a pivot object. 21050 21051 May return B{C{None}} if not constructed with B{C{HSCALE_CHECK}}. 21052 21053 @param pivot: Pivot object passed to L{gwy_table_attach_hscale}(). I{(L{gtk.Object})} 21054 @return: I{(L{gtk.Widget})} 21055 """ 21056 return None
21057
21058 -def gwy_table_hscale_get_label(pivot):
21059 """ 21060 Gets the (left) label associated with a pivot object. 21061 21062 May return B{C{None}} if constructed with B{C{HSCALE_CHECK}}. 21063 21064 @param pivot: Pivot object passed to L{gwy_table_attach_hscale}(). I{(L{gtk.Object})} 21065 @return: I{(L{gtk.Widget})} 21066 """ 21067 return None
21068
21069 -def gwy_table_hscale_get_middle_widget(pivot):
21070 """ 21071 Gets the middle widget associated with a pivot object. 21072 21073 @param pivot: Pivot object passed to L{gwy_table_attach_hscale}(). I{(L{gtk.Object})} 21074 @return: I{(L{gtk.Widget})} 21075 """ 21076 return None
21077
21078 -def gwy_table_hscale_get_scale(pivot):
21079 """ 21080 Gets the horizontal scale associated with a pivot object. 21081 21082 May return B{C{None}} if constructed with B{C{HSCALE_NO_SCALE}}, 21083 B{C{HSCALE_WIDGET}}, or B{C{HSCALE_WIDGET_NO_EXPAND}}. 21084 21085 @param pivot: Pivot object passed to L{gwy_table_attach_hscale}(). I{(L{gtk.Object})} 21086 @return: I{(L{gtk.Widget})} 21087 """ 21088 return None
21089
21090 -def gwy_table_hscale_get_units(pivot):
21091 """ 21092 Gets the units label associated with a pivot object. 21093 21094 May return B{C{None}} if constructed without units. 21095 21096 @param pivot: Pivot object passed to L{gwy_table_attach_hscale}(). I{(L{gtk.Object})} 21097 @return: I{(L{gtk.Widget})} 21098 """ 21099 return None
21100
21101 -def gwy_table_hscale_set_sensitive(pivot, sensitive):
21102 """ 21103 Sets sensitivity of a group of controls create by L{gwy_table_attach_hscale}() 21104 or L{gwy_table_attach_adjbar}(). 21105 21106 For controls without an enable/disable check button controls the sensitivity 21107 as expected. If the hscale was created with B{C{HSCALE_CHECK}} you usually 21108 manage its sensitivity by setting state of the check button instead. 21109 Only use this function when you want to enable/disable the entire group 21110 of controls, including the check button. 21111 21112 This function can also be used with rows created by 21113 L{gwy_table_attach_spinbutton}() too if the spinbutton is passed as B{C{pivot}}. 21114 21115 @param pivot: The same object that was passed to L{gwy_table_attach_hscale}() as 21116 B{C{pivot}}. I{(L{gtk.Object})} 21117 @param sensitive: B{C{True}} to make the row sensitive, B{C{False}} to insensitive. I{(bool)} 21118 """ 21119 pass
21120
21121 -def gwy_text_header_error_quark():
21122 """ 21123 Returns error domain for expression parsin and evaluation. 21124 21125 See and use B{C{TEXT_HEADER_ERROR}}. 21126 21127 @since: 2.18 21128 21129 @return: The error domain. I{(int)} 21130 """ 21131 return None
21132
21133 -def gwy_threads_are_enabled():
21134 """ 21135 Obtains the state of internal multithread processing. 21136 21137 @since: 2.53 21138 21139 @return: B{C{True}} if multithread processing is enabled; B{C{False}} otherwise (this 21140 includes the case of Gwyddion not built with multithread processing 21141 support at all). I{(bool)} 21142 """ 21143 return None
21144
21145 -def gwy_threads_set_enabled(setting):
21146 """ 21147 Enables or disables internal multithread processing. 21148 21149 This function can be called any time during the program life time to switch 21150 between single- and multithread processing. It must be called from the main 21151 thread while no Gwyddion data processing functions are being executed. 21152 21153 @since: 2.53 21154 21155 @param setting: B{C{True}} to enable multithread processing; B{C{False}} to disable it. I{(bool)} 21156 """ 21157 pass
21158
21159 -def gwy_tip_cmap(tip, surface):
21160 """ 21161 Performs certainty map algorithm published by Villarrubia. This function 21162 converts all fields into form requested by "morph_lib.c" library, that is 21163 almost identical with original Villarubia's library. Result certainty map 21164 can be used as a mask of points where tip did not directly touch the 21165 surface. 21166 21167 21168 @param tip: Tip data. I{(L{DataField})} 21169 @param surface: Surface data. I{(L{DataField})} 21170 @return: Certainty map, i.e. B{C{result}}, on success. May return B{C{None}} if 21171 aborted. I{(L{DataField})} 21172 """ 21173 return None
21174
21175 -def gwy_tip_dilation(tip, surface):
21176 """ 21177 Performs the tip convolution algorithm published by Villarrubia, which is 21178 equivalent to morphological dilation operation. 21179 21180 If the operation is aborted the size and contents of B{C{result}} field is 21181 undefined. 21182 21183 21184 @param tip: Tip data. I{(L{DataField})} 21185 @param surface: Surface data. I{(L{DataField})} 21186 @return: Dilated surface data, i.e. B{C{result}}, on success. May return B{C{None}} 21187 if aborted. I{(L{DataField})} 21188 """ 21189 return None
21190
21191 -def gwy_tip_erosion(tip, surface):
21192 """ 21193 Performs surface reconstruction (erosion) algorithm published by 21194 Villarrubia, which is equivalent to morphological erosion operation. 21195 21196 If the operation is aborted the size and contents of B{C{result}} field is 21197 undefined. 21198 21199 21200 @param tip: Tip data. I{(L{DataField})} 21201 @param surface: Surface to be eroded. I{(L{DataField})} 21202 @return: Reconstructed (eroded) surface, i.e. B{C{result}}, on success. May 21203 return B{C{None}} if aborted. I{(L{DataField})} 21204 """ 21205 return None
21206
21207 -def gwy_tip_estimate_full(tip, surface, threshold, use_edges):
21208 """ 21209 Performs full blind estimation algorithm published by Villarrubia. This 21210 function converts all fields into form requested by "morph_lib.c" library, 21211 that is almost identical with original Villarubia's library. Note that the 21212 threshold value must be chosen sufficently high value to supress small 21213 fluctulations due to noise (that would lead to very sharp tip) but 21214 sufficiently low value to put algorithm at work. A value similar to 1/10000 21215 of surface range can be good. Otherwise we recommend to start with zero 21216 threshold and increase it slowly to observe changes and choose right value. 21217 21218 21219 @param tip: Tip data to be refined (allocated). I{(L{DataField})} 21220 @param surface: Surface data. I{(L{DataField})} 21221 @param threshold: Threshold for noise supression. I{(float)} 21222 @param use_edges: Whether use also edges of image. I{(bool)} 21223 @return: Tuple consisting of 4 values (B{C{value}}, B{C{count}}, B{C{set_fraction}}, B{C{set_message}}). (I{(L{DataField})}, I{(int)}, I{(SkipArg)}, I{(SkipArg)}) 21224 """ 21225 return None, None, None, None
21226
21227 -def gwy_tip_estimate_partial(tip, surface, threshold, use_edges):
21228 """ 21229 Performs partial blind estimation algorithm published by Villarrubia. This 21230 function converts all fields into form requested by "morph_lib.c" library, 21231 that is almost identical with original Villarubia's library. Note that the 21232 threshold value must be chosen sufficently high value to supress small 21233 fluctulations due to noise (that would lead to very sharp tip) but 21234 sufficiently low value to put algorithm at work. A value similar to 1/10000 21235 of surface range can be good. Otherwise we recommend to start with zero 21236 threshold and increase it slowly to observe changes and choose right value. 21237 21238 21239 @param tip: Tip data to be refined (allocated). I{(L{DataField})} 21240 @param surface: Surface data. I{(L{DataField})} 21241 @param threshold: Threshold for noise supression. I{(float)} 21242 @param use_edges: Whether use also edges of image. I{(bool)} 21243 @return: Tuple consisting of 4 values (B{C{value}}, B{C{count}}, B{C{set_fraction}}, B{C{set_message}}). (I{(L{DataField})}, I{(int)}, I{(SkipArg)}, I{(SkipArg)}) 21244 """ 21245 return None, None, None, None
21246
21247 -def gwy_tip_model_get_npresets():
21248 """ 21249 Find number of actual tip model presets. 21250 21251 21252 @return: Number of presets. I{(int)} 21253 """ 21254 return None
21255
21256 -def gwy_tip_model_get_preset(preset_id):
21257 """ 21258 Get data related to tip preset. 21259 21260 21261 @param preset_id: Preset identifier. I{(int)} 21262 @return: Chosen preset data. I{(const-TipModelPreset*)} 21263 """ 21264 return None
21265
21266 -def gwy_tip_model_get_preset_by_name(name):
21267 """ 21268 Get data related to preset with specified name. 21269 21270 21271 @param name: Name of tip (e. g. "contact"). I{(string)} 21272 @return: Chosen preset data. I{(const-TipModelPreset*)} 21273 """ 21274 return None
21275
21276 -def gwy_tip_model_get_preset_group_name(preset):
21277 """ 21278 Get group name of preset (e. g. "analytical".) 21279 21280 21281 @param preset: Tip model preset. I{(const-TipModelPreset*)} 21282 @return: Preset group name. I{(string)} 21283 """ 21284 return None
21285
21286 -def gwy_tip_model_get_preset_id(preset):
21287 """ 21288 Get preset identifier within all presets. 21289 21290 21291 @param preset: Tip model preset. I{(const-TipModelPreset*)} 21292 @return: Preset id. I{(int)} 21293 """ 21294 return None
21295
21296 -def gwy_tip_model_get_preset_tip_name(preset):
21297 """ 21298 Get name of the preset (e. g. "contact"). 21299 21300 21301 @param preset: Tip model preset. I{(const-TipModelPreset*)} 21302 @return: Preset name. I{(string)} 21303 """ 21304 return None
21305
21306 -def gwy_tool_func_register(type):
21307 """ 21308 Registeres a tool function (tool type). 21309 21310 21311 @param type: Layer type in GObject type system. That is the return value of 21312 L{gwy_tool_foo_get_type}(). I{(GType)} 21313 @return: Normally B{C{True}}; B{C{False}} on failure. I{(bool)} 21314 """ 21315 return None
21316
21317 -def gwy_type_init():
21318 """ 21319 Makes libgwyddion types safe for deserialization and performs other 21320 initialization. You have to call this function from the main thread before 21321 using objects from libgwyddion. 21322 21323 It calls g_type_init() first to make sure GLib object system is initialized. 21324 21325 It is safe to call this function more than once, subsequent calls are no-op. 21326 21327 """ 21328 pass
21329
21330 -def gwy_undo_checkpoint(container, keys):
21331 """ 21332 Create a point in the undo history it is possible to return to. 21333 21334 21335 @param container: I{(L{Container})} 21336 @param keys: I{(StringArray*)} 21337 @return: Undo level id. Not useful (yet). I{(gulong)} 21338 """ 21339 return None
21340
21341 -def gwy_undo_container_get_modified(data):
21342 """ 21343 Tests whether a container was modified. 21344 21345 FIXME: it may not work. 21346 21347 21348 @param data: Data container to get modification infomation of. I{(L{Container})} 21349 @return: B{C{True}} if container was modified, B{C{False}} otherwise. I{(int)} 21350 """ 21351 return None
21352
21353 -def gwy_undo_container_has_redo(data):
21354 """ 21355 Returns whether there is any redo available for a container. 21356 21357 21358 @param data: Data container to get redo infomation of. I{(L{Container})} 21359 @return: B{C{True}} if there is redo, B{C{False}} otherwise. I{(bool)} 21360 """ 21361 return None
21362
21363 -def gwy_undo_container_has_undo(data):
21364 """ 21365 Returns whether there is any undo available for a container. 21366 21367 21368 @param data: Data container to get undo infomation of. I{(L{Container})} 21369 @return: B{C{True}} if there is undo, B{C{False}} otherwise. I{(bool)} 21370 """ 21371 return None
21372
21373 -def gwy_undo_container_remove(data, prefix):
21374 """ 21375 Removes undo/redo information for a data container. 21376 21377 @param data: A data container. I{(L{Container})} 21378 @param prefix: Prefix to remove undo/redo information under. Pass B{C{None}} to remove 21379 undo/redo information altogether. I{(string)} 21380 """ 21381 pass
21382
21383 -def gwy_undo_container_set_unmodified(data):
21384 """ 21385 Marks a data container as umodified (that is, saved). 21386 21387 @param data: Data container to set modification infomation of. I{(L{Container})} 21388 """ 21389 pass
21390
21391 -def gwy_undo_get_enabled():
21392 """ 21393 Reports whether undo/redo is globally enabled. 21394 21395 @since: 2.21 21396 21397 @return: B{C{True}} if undo/redo is enabled, B{C{False}} if it is disabled. I{(bool)} 21398 """ 21399 return None
21400
21401 -def gwy_undo_qcheckpoint(container, keys):
21402 """ 21403 Create a point in the undo history it is possible to return to. 21404 21405 21406 @param container: I{(L{Container})} 21407 @param keys: I{(list)} 21408 @return: Undo level id. Not useful (yet). I{(gulong)} 21409 """ 21410 return None
21411
21412 -def gwy_undo_redo_container(data):
21413 """ 21414 Performs undo on a data container. 21415 21416 It must have redo available. 21417 21418 @param data: A data container. I{(L{Container})} 21419 """ 21420 pass
21421
21422 -def gwy_undo_set_enabled(setting):
21423 """ 21424 Globally enables or disables undo/redo. 21425 21426 By default, undo/redo is enabled. Non-GUI applications that run module 21427 functions may wish to disable it to conserve resources. 21428 21429 If undo/redo is disabled undo information manipulating functions such as 21430 L{gwy_app_undo_qcheckpoint}() become no-op and 21431 L{gwy_undo_container_get_modified}() always returns zero. Disabling undo also 21432 removes saved undo data of all containers. 21433 21434 @since: 2.21 21435 21436 @param setting: B{C{True}} to enable undo, B{C{False}} to disable it. I{(bool)} 21437 """ 21438 pass
21439
21440 -def gwy_undo_undo_container(data):
21441 """ 21442 Performs undo on a data container. 21443 21444 It must have undo available. 21445 21446 @param data: A data container. I{(L{Container})} 21447 """ 21448 pass
21449
21450 -def gwy_utf8_strescape(source, exceptions):
21451 """ 21452 Escapes special characters in a string. 21453 21454 Escapes the special characters '\b', '\f', '\n', '\r', '\t', '\v', '\' and '"' in the string source by inserting 21455 a '\' before them. Additionally all characters in the range 0x01-0x1F (everything below SPACE), the character 0x7F, 21456 characters 0xC0 and 0xC1, and all characters in the range 0xF5-0xFF are replaced with a '\' followed by their octal 21457 representation. Characters supplied in exceptions are not escaped. 21458 21459 In essence, this functions differs from g_strescape() by preserving valid UTF-8 strings, unless they contain ‘odd’ 21460 characters. Passing strings which are not valid UTF-8 is possible, but generally not advised. 21461 21462 Function g_strcompress() does the reverse conversion. 21463 21464 @since: 2.62 21465 21466 @param source: A string to escape. I{(string)} 21467 @param exceptions: A string containing characters to not escape, or B{C{None}}. I{(string)} 21468 @return: A newly allocated string with special characters escaped. I{(string)} 21469 """ 21470 return None
21471
21472 -def gwy_version_major():
21473 """ 21474 Gets the major version of Gwyddion. 21475 21476 If the version is 1.99.7.20060604, this function returns 1. 21477 21478 21479 @return: The major version. I{(int)} 21480 """ 21481 return None
21482
21483 -def gwy_version_minor():
21484 """ 21485 Gets the minor version of Gwyddion. 21486 21487 If the version is 1.99.7.20060604, this function returns 99. 21488 21489 21490 @return: The minor version. I{(int)} 21491 """ 21492 return None
21493
21494 -def gwy_version_string():
21495 """ 21496 Gets the full Gwyddion version as a string. 21497 21498 If the version is 1.99.7.20060604, this function returns 21499 C{"1.99.7.20060604"}. 21500 21501 This is the only method to get finer version information than major.minor. 21502 However, only development versions use finer versioning than major.minor 21503 therefore a module or app requiring such information is probably broken 21504 anyway. A meaningful use is to advertise the version of Gwyddion your app 21505 runs with. 21506 21507 21508 @return: The full version as a constant string. I{(string)} 21509 """ 21510 return None
21511
21512 -def gwy_volume_func_current():
21513 """ 21514 Obtains the name of currently running volume data processing function. 21515 21516 If no volume data processing function is currently running, B{C{None}} is 21517 returned. 21518 21519 If multiple nested functions are running (which is not usual but technically 21520 possible), the innermost function name is returned. 21521 21522 @since: 2.38 21523 21524 @return: The name of currently running volume data processing function or 21525 B{C{None}}. I{(string)} 21526 """ 21527 return None
21528
21529 -def gwy_volume_func_exists(name):
21530 """ 21531 Checks whether a volume data processing function exists. 21532 21533 @since: 2.32 21534 21535 @param name: Volume data processing function name. I{(string)} 21536 @return: B{C{True}} if function B{C{name}} exists, B{C{False}} otherwise. I{(bool)} 21537 """ 21538 return None
21539
21540 -def gwy_volume_func_get_menu_path(name):
21541 """ 21542 Returns the menu path of a volume data processing function. 21543 21544 The returned menu path is only the tail part registered by the function, 21545 i.e., without any leading "/Volume Data". 21546 21547 @since: 2.32 21548 21549 @param name: Volume data processing function name. I{(string)} 21550 @return: The menu path. The returned string is owned by the module. I{(string)} 21551 """ 21552 return None
21553
21554 -def gwy_volume_func_get_run_types(name):
21555 """ 21556 Returns run modes supported by a volume data processing function. 21557 21558 @since: 2.32 21559 21560 @param name: Volume data processing function name. I{(string)} 21561 @return: The run mode bit mask. I{(RunType)} 21562 """ 21563 return None
21564
21565 -def gwy_volume_func_get_sensitivity_mask(name):
21566 """ 21567 Gets menu sensititivy mask for a volume data processing function. 21568 21569 @since: 2.32 21570 21571 @param name: Volume data processing function name. I{(string)} 21572 @return: The menu item sensitivity mask (a combination of B{C{MenuSensFlags}} 21573 flags). I{(int)} 21574 """ 21575 return None
21576
21577 -def gwy_volume_func_get_stock_id(name):
21578 """ 21579 Gets stock icon id of a volume data processing function. 21580 21581 @since: 2.32 21582 21583 @param name: Volume data processing function name. I{(string)} 21584 @return: The stock icon id. The returned string is owned by the module. I{(string)} 21585 """ 21586 return None
21587
21588 -def gwy_volume_func_get_tooltip(name):
21589 """ 21590 Gets tooltip for a volume data processing function. 21591 21592 @since: 2.32 21593 21594 @param name: Volume data processing function name. I{(string)} 21595 @return: The tooltip. The returned string is owned by the module. I{(string)} 21596 """ 21597 return None
21598
21599 -def gwy_volume_func_run(name, data, run):
21600 """ 21601 Runs a volume data processing function identified by B{C{name}}. 21602 21603 @since: 2.32 21604 21605 @param name: Volume data processing function name. I{(string)} 21606 @param data: Data (a B{C{Container}}). I{(L{Container})} 21607 @param run: How the function should be run. Expected values: C{B{RUN_NONE}}, C{B{RUN_NONINTERACTIVE}}, C{B{RUN_INTERACTIVE}}, C{B{RUN_IMMEDIATE}}, C{B{RUN_MASK}}. I{(L{RunType})} 21608 """ 21609 pass
21610
21611 -def gwy_widget_get_activate_on_unfocus(widget):
21612 """ 21613 Obtains the activate-on-unfocus state of a widget. 21614 21615 @since: 2.5 21616 21617 @param widget: A widget. I{(L{gtk.Widget})} 21618 @return: B{C{True}} if signal "GtkWidget::activate" is emitted when focus leaves 21619 the widget. I{(bool)} 21620 """ 21621 return None
21622
21623 -def gwy_widget_set_activate_on_unfocus(widget, activate):
21624 """ 21625 Sets the activate-on-unfocus state of a widget. 21626 21627 When it is enabled, signal "GtkWidget::activate" is emited whenever focus 21628 leaves the widget. 21629 21630 @since: 2.5 21631 21632 @param widget: A widget. I{(L{gtk.Widget})} 21633 @param activate: B{C{True}} to enable activate-on-unfocus, B{C{False}} disable it. I{(bool)} 21634 """ 21635 pass
21636
21637 -def gwy_widget_sync_sensitivity(master, slave):
21638 """ 21639 Make widget's sensitivity follow the sensitivity of another widget. 21640 21641 The sensitivity of B{C{slave}} is set according to B{C{master}}'s effective 21642 sensitivity (as returned by gtk.WIDGET_IS_SENSITIVE()), i.e. it does not 21643 just synchronize GtkWidget:sensitive property. 21644 21645 @since: 2.8 21646 21647 @param master: Master widget. I{(L{gtk.Widget})} 21648 @param slave: Slave widget. I{(L{gtk.Widget})} 21649 """ 21650 pass
21651
21652 -def gwy_widgets_get_gl_config():
21653 """ 21654 Returns OpenGL framebuffer configuration for 3D widgets. 21655 21656 Call L{gwy_widgets_gl_init}() first. 21657 21658 21659 @return: The OpenGL framebuffer configuration, B{C{None}} if OpenGL 21660 initialization was not successfull. I{(L{gdk.GLConfig})} 21661 """ 21662 return None
21663
21664 -def gwy_widgets_gl_init():
21665 """ 21666 Configures an OpenGL-capable visual for 3D widgets. 21667 21668 Use L{gwy_widgets_get_gl_config}() to get the framebuffer configuration. 21669 21670 This function must be called before OpenGL widgets can be used. 21671 21672 21673 @return: B{C{True}} if an appropriate visual was found. If Gwyddion was compiled 21674 without OpenGL support, it always returns B{C{False}}. I{(bool)} 21675 """ 21676 return None
21677
21678 -def gwy_widgets_type_init():
21679 """ 21680 Makes libgwydgets types safe for deserialization and performs other 21681 initialization. You have to call this function before using widgets and 21682 objects from libgwydgets. 21683 21684 Calls L{gwy_draw_type_init}() first to make sure libgwydraw is initialized. 21685 21686 It is safe to call this function more than once, subsequent calls are no-op. 21687 21688 """ 21689 pass
21690
21691 -def gwy_xlnx_int(x):
21692 """ 21693 Calculates natural logarithm multiplied by the argument for integers. 21694 21695 The value for zero B{C{x}} is taken as the limit, i.e. zero. 21696 21697 This function is useful for entropy calculations where values of B{C{n}}*log(B{C{n}}) can be evaulated a lot for small B{C{n}}. 21698 Therefore, values for small arguments are tabulated. For large arguments the function is evaluated using the 21699 standard log() function which is of course slower. 21700 21701 @since: 2.44 21702 21703 @param x: Value to calculate B{C{x}}*log(B{C{x}}) of. I{(int)} 21704 @return: Value of B{C{x}}*log(B{C{x}}). I{(float)} 21705 """ 21706 return None
21707
21708 -def gwy_xyz_func_current():
21709 """ 21710 Obtains the name of currently running surface data processing function. 21711 21712 If no surface data processing function is currently running, B{C{None}} is 21713 returned. 21714 21715 If multiple nested functions are running (which is not usual but technically 21716 possible), the innermost function name is returned. 21717 21718 @since: 2.38 21719 21720 @return: The name of currently running surface data processing function or 21721 B{C{None}}. I{(string)} 21722 """ 21723 return None
21724
21725 -def gwy_xyz_func_exists(name):
21726 """ 21727 Checks whether a surface data processing function exists. 21728 21729 @since: 2.45 21730 21731 @param name: XYZ surface data processing function name. I{(string)} 21732 @return: B{C{True}} if function B{C{name}} exists, B{C{False}} otherwise. I{(bool)} 21733 """ 21734 return None
21735
21736 -def gwy_xyz_func_get_menu_path(name):
21737 """ 21738 Returns the menu path of a surface data processing function. 21739 21740 The returned menu path is only the tail part registered by the function, 21741 i.e., without any leading "/XYZ Data". 21742 21743 @since: 2.45 21744 21745 @param name: XYZ surface data processing function name. I{(string)} 21746 @return: The menu path. The returned string is owned by the module. I{(string)} 21747 """ 21748 return None
21749
21750 -def gwy_xyz_func_get_run_types(name):
21751 """ 21752 Returns run modes supported by a surface data processing function. 21753 21754 @since: 2.45 21755 21756 @param name: XYZ surface data processing function name. I{(string)} 21757 @return: The run mode bit mask. I{(RunType)} 21758 """ 21759 return None
21760
21761 -def gwy_xyz_func_get_sensitivity_mask(name):
21762 """ 21763 Gets menu sensititivy mask for a surface data processing function. 21764 21765 @since: 2.45 21766 21767 @param name: XYZ surface data processing function name. I{(string)} 21768 @return: The menu item sensitivity mask (a combination of B{C{MenuSensFlags}} 21769 flags). I{(int)} 21770 """ 21771 return None
21772
21773 -def gwy_xyz_func_get_stock_id(name):
21774 """ 21775 Gets stock icon id of a surface data processing function. 21776 21777 @since: 2.45 21778 21779 @param name: XYZ surface data processing function name. I{(string)} 21780 @return: The stock icon id. The returned string is owned by the module. I{(string)} 21781 """ 21782 return None
21783
21784 -def gwy_xyz_func_get_tooltip(name):
21785 """ 21786 Gets tooltip for a surface data processing function. 21787 21788 @since: 2.45 21789 21790 @param name: XYZ surface data processing function name. I{(string)} 21791 @return: The tooltip. The returned string is owned by the module. I{(string)} 21792 """ 21793 return None
21794
21795 -def gwy_xyz_func_run(name, data, run):
21796 """ 21797 Runs a surface data processing function identified by B{C{name}}. 21798 21799 @since: 2.45 21800 21801 @param name: XYZ surface data processing function name. I{(string)} 21802 @param data: Data (a B{C{Container}}). I{(L{Container})} 21803 @param run: How the function should be run. Expected values: C{B{RUN_NONE}}, C{B{RUN_NONINTERACTIVE}}, C{B{RUN_INTERACTIVE}}, C{B{RUN_IMMEDIATE}}, C{B{RUN_MASK}}. I{(L{RunType})} 21804 """ 21805 pass
21806 21807
21808 -class SIUnitFormatStyle:
21809 """ 21810 Physical quantity formatting style. 21811 21812 The VF-variants differ from tne non-VF ones by a multiplication sign at the start of units (where appropriate). 21813 21814 @note: All the enumerated values are defined at the module level, I{not} the 21815 class level. The are just groupped by class here for easier orientation. 21816 21817 @cvar SI_UNIT_FORMAT_NONE: No units. This value is unused by B{C{SIUnit}} itself and must not be requested as 21818 a format style. 21819 @cvar SI_UNIT_FORMAT_PLAIN: Plain style, as one would use on a text terminal. 21820 @cvar SI_UNIT_FORMAT_MARKUP: Pango markup, for units usable standalone. 21821 @cvar SI_UNIT_FORMAT_VFMARKUP: Pango markup, for units directly after value. 21822 @cvar SI_UNIT_FORMAT_TEX: Representation that can be typeset by TeX, for units usable standalone. 21823 @cvar SI_UNIT_FORMAT_VFTEX: Representation that can be typeset by TeX, for units directly after value. (Since 2.50) 21824 @cvar SI_UNIT_FORMAT_UNICODE: Representation in which exponents are rendered as Unicode characters, for units usable 21825 standalone. (Since 2.50) 21826 @cvar SI_UNIT_FORMAT_VFUNICODE: Representation in which exponents are rendered as Unicode characters, for units 21827 directly after value. (Since 2.50) 21828 """ 21829 pass
21830
21831 -class NLFitParamFlags:
21832 """ 21833 Type of fitting parameter properties. 21834 21835 @since: 2.47 21836 21837 @note: All the enumerated values are defined at the module level, I{not} the 21838 class level. The are just groupped by class here for easier orientation. 21839 21840 @cvar NLFIT_PARAM_ANGLE: Parameter is an angle. It is defined in radians and 21841 unitless but you may wish to convert it from/to 21842 degrees in the user interface. It is consdered 21843 periodic and always reduced to the range [0, 2π). 21844 @cvar NLFIT_PARAM_ABSVAL: Parameter is a width or distance that is by 21845 definition positive. Only its absolute value 21846 matters and it is always made non-negative. 21847 """ 21848 pass
21849
21850 -class PercentileInterpolationType:
21851 """ 21852 Type of interpolation for percentile calculation. 21853 21854 The interpolations are used when the percentile does not correspond exactly to a rank. 21855 21856 @since: 2.50 21857 21858 @note: All the enumerated values are defined at the module level, I{not} the 21859 class level. The are just groupped by class here for easier orientation. 21860 21861 @cvar PERCENTILE_INTERPOLATION_LINEAR: Linear interpolation of the two nearest values. 21862 @cvar PERCENTILE_INTERPOLATION_LOWER: Round the rank down to an integer. 21863 @cvar PERCENTILE_INTERPOLATION_HIGHER: Round the rank up to an integer. 21864 @cvar PERCENTILE_INTERPOLATION_NEAREST: Round the rank to nearest integer. 21865 @cvar PERCENTILE_INTERPOLATION_MIDPOINT: Average of the two nearest values. 21866 """ 21867 pass
21868
21869 -class ExprError:
21870 """ 21871 Error codes returned by expression parsing and execution. 21872 21873 @note: All the enumerated values are defined at the module level, I{not} the 21874 class level. The are just groupped by class here for easier orientation. 21875 21876 @cvar EXPR_ERROR_CLOSING_PARENTHESIS: A closing parenthesis is missing. 21877 @cvar EXPR_ERROR_EMPTY: Expression is empty. 21878 @cvar EXPR_ERROR_EMPTY_PARENTHESES: A parentheses pair contain nothing 21879 inside. 21880 @cvar EXPR_ERROR_GARBAGE: An symbol unexpectedly managed to survive. 21881 @cvar EXPR_ERROR_INVALID_ARGUMENT: Function or operator argument is not a 21882 value. 21883 @cvar EXPR_ERROR_INVALID_TOKEN: Expression contains an invalid token. 21884 @cvar EXPR_ERROR_MISSING_ARGUMENT: Function or operator arguments is missing. 21885 @cvar EXPR_ERROR_NOT_EXECUTABLE: Compiled stack is not executable. 21886 @cvar EXPR_ERROR_OPENING_PARENTHESIS: An opening parenthesis is missing. 21887 @cvar EXPR_ERROR_STRAY_COMMA: A comma at the start or end of list. 21888 @cvar EXPR_ERROR_UNRESOLVED_IDENTIFIERS: Expression contains unresolved 21889 identifiers. 21890 @cvar EXPR_ERROR_CONSTANT_NAME: Constant name is invalid. 21891 """ 21892 pass
21893
21894 -class RawDataType:
21895 """ 21896 Types of raw data. 21897 21898 Multibyte types usually need to be complemented with B{C{ByteOrder}} to get a full type specification. 21899 21900 @since: 2.25 21901 21902 @note: All the enumerated values are defined at the module level, I{not} the 21903 class level. The are just groupped by class here for easier orientation. 21904 21905 @cvar RAW_DATA_SINT8: Signed 8bit integer (one byte). 21906 @cvar RAW_DATA_UINT8: Unsigned 8bit integer (one byte). 21907 @cvar RAW_DATA_SINT16: Signed 16bit integer (two bytes). 21908 @cvar RAW_DATA_UINT16: Unsigned 16bit integer (two bytes). 21909 @cvar RAW_DATA_SINT32: Signed 32bit integer (four bytes). 21910 @cvar RAW_DATA_UINT32: Unsigned 32bit integer (four bytes). 21911 @cvar RAW_DATA_SINT64: Signed 64bit integer (eight bytes). 21912 @cvar RAW_DATA_UINT64: Unsigned 64bit integer (eight bytes). 21913 @cvar RAW_DATA_HALF: Half-precision floating point number (two bytes). 21914 @cvar RAW_DATA_FLOAT: Single-precision floating point number (four bytes). 21915 @cvar RAW_DATA_REAL: Pascal ‘real’ floating point number (six bytes). 21916 @cvar RAW_DATA_DOUBLE: Double-precision floating point number (eight bytes). 21917 """ 21918 pass
21919
21920 -class ByteOrder:
21921 """ 21922 Type of byte order. 21923 21924 Note all types are valid for all functions. 21925 21926 @since: 2.25 21927 21928 @note: All the enumerated values are defined at the module level, I{not} the 21929 class level. The are just groupped by class here for easier orientation. 21930 21931 @cvar BYTE_ORDER_NATIVE: Native byte order for the system the code is running on. 21932 @cvar BYTE_ORDER_LITTLE_ENDIAN: Little endian byte order (the same as B{C{glib.LITTLE_ENDIAN}}). 21933 @cvar BYTE_ORDER_BIG_ENDIAN: Big endian byte order (the same as B{C{glib.BIG_ENDIAN}}). 21934 @cvar BYTE_ORDER_IMPLICIT: Byte order implied by data, for instance a byte-order-mark (Since 2.60). 21935 """ 21936 pass
21937
21938 -class MergeType:
21939 """ 21940 Mask merge type (namely used in grain processing). 21941 21942 @note: All the enumerated values are defined at the module level, I{not} the 21943 class level. The are just groupped by class here for easier orientation. 21944 21945 @cvar MERGE_UNION: Union (logical or) merging. 21946 @cvar MERGE_INTERSECTION: Intersection (logical and) merging. 21947 """ 21948 pass
21949
21950 -class MaskingType:
21951 """ 21952 Mask handling in procedures that can apply masking. 21953 21954 Note at present many procedures do not have a masking argument and hence cannot apply masks in exclude mode. 21955 21956 @since: 2.12 21957 21958 @note: All the enumerated values are defined at the module level, I{not} the 21959 class level. The are just groupped by class here for easier orientation. 21960 21961 @cvar MASK_EXCLUDE: Exclude data under mask, i.e. take into account only 21962 data not covered by the mask. 21963 @cvar MASK_INCLUDE: Take into account only data under the mask. 21964 @cvar MASK_IGNORE: Ignore mask, if present, and use all data. 21965 """ 21966 pass
21967
21968 -class WatershedStateType:
21969 """ 21970 @note: All the enumerated values are defined at the module level, I{not} the 21971 class level. The are just groupped by class here for easier orientation. 21972 21973 @cvar WATERSHED_STATE_INIT: 21974 @cvar WATERSHED_STATE_LOCATE: 21975 @cvar WATERSHED_STATE_MIN: 21976 @cvar WATERSHED_STATE_WATERSHED: 21977 @cvar WATERSHED_STATE_MARK: 21978 @cvar WATERSHED_STATE_FINISHED: 21979 """ 21980 pass
21981
21982 -class PlaneSymmetry:
21983 """ 21984 Plane symmetry types for rotation correction. 21985 21986 @note: All the enumerated values are defined at the module level, I{not} the 21987 class level. The are just groupped by class here for easier orientation. 21988 21989 @cvar SYMMETRY_AUTO: Automatic symmetry selection. 21990 @cvar SYMMETRY_PARALLEL: Parallel symmetry, there is one prevalent direction (bilateral). 21991 @cvar SYMMETRY_TRIANGULAR: Triangular symmetry, there are three prevalent directions (unilateral) by 120 degrees. 21992 @cvar SYMMETRY_SQUARE: Square symmetry, two prevalent directions (bilateral) oriented approximately along image 21993 sides. 21994 @cvar SYMMETRY_RHOMBIC: Rhombic symmetry, two prevalent directions (bilateral) oriented approximately along 21995 diagonals. 21996 @cvar SYMMETRY_HEXAGONAL: Hexagonal symmetry, three prevalent directions (bilateral) by 120 degrees. 21997 @cvar SYMMETRY_LAST: The number of symmetries. 21998 """ 21999 pass
22000
22001 -class Orientation:
22002 """ 22003 Orientation type. 22004 22005 @note: All the enumerated values are defined at the module level, I{not} the 22006 class level. The are just groupped by class here for easier orientation. 22007 22008 @cvar ORIENTATION_HORIZONTAL: Horizontal orientation. 22009 @cvar ORIENTATION_VERTICAL: Vertical orientation. 22010 """ 22011 pass
22012
22013 -class TransformDirection:
22014 """ 22015 Transform (namely integral transform) direction. 22016 22017 In FFT, it is equal to sign of the exponent, that is the backward transform uses -1, the forward transform +1. 22018 This is the opposite sign convention to FFTW (for instance), so care must be taken when mixing operations. 22019 22020 @note: All the enumerated values are defined at the module level, I{not} the 22021 class level. The are just groupped by class here for easier orientation. 22022 22023 @cvar TRANSFORM_DIRECTION_BACKWARD: Backward (inverse) transform. 22024 @cvar TRANSFORM_DIRECTION_FORWARD: Forward (direct) transform. 22025 """ 22026 pass
22027
22028 -class DataFieldCached:
22029 """ 22030 Cached data field quantity type. 22031 22032 There should be little need to this enum directly except in libgwyprocess 22033 methods. 22034 22035 @note: All the enumerated values are defined at the module level, I{not} the 22036 class level. The are just groupped by class here for easier orientation. 22037 22038 @cvar DATA_FIELD_CACHE_MIN: Overall minimum. 22039 @cvar DATA_FIELD_CACHE_MAX: Overall maximum. 22040 @cvar DATA_FIELD_CACHE_SUM: Sum of all values. 22041 @cvar DATA_FIELD_CACHE_RMS: Root mean square. 22042 @cvar DATA_FIELD_CACHE_MED: Median. 22043 @cvar DATA_FIELD_CACHE_ARF: Auto-range from. 22044 @cvar DATA_FIELD_CACHE_ART: Auto-range to. 22045 @cvar DATA_FIELD_CACHE_ARE: Surface area. 22046 @cvar DATA_FIELD_CACHE_VAR: Variation. 22047 @cvar DATA_FIELD_CACHE_ENT: Entropy. 22048 @cvar DATA_FIELD_CACHE_MSQ: Mean square. 22049 @cvar DATA_FIELD_CACHE_SIZE: The size of statistics cache. 22050 """ 22051 pass
22052
22053 -class ComputationStateType:
22054 """ 22055 Common iterative computation iterator state type. 22056 22057 @note: All the enumerated values are defined at the module level, I{not} the 22058 class level. The are just groupped by class here for easier orientation. 22059 22060 @cvar COMPUTATION_STATE_INIT: Iterator was set up, the next step will actually create temporary data structures and 22061 precalculate values. 22062 @cvar COMPUTATION_STATE_ITERATE: Iteration is in progress, the B{C{fraction}} field of state struct holds the fraction 22063 completed. 22064 @cvar COMPUTATION_STATE_FINISHED: Calculation has been finished, further calls to the iterator will be no-op. 22065 """ 22066 pass
22067
22068 -class DWTType:
22069 """ 22070 @note: All the enumerated values are defined at the module level, I{not} the 22071 class level. The are just groupped by class here for easier orientation. 22072 22073 @cvar DWT_HAAR: 22074 @cvar DWT_DAUB4: 22075 @cvar DWT_DAUB6: 22076 @cvar DWT_DAUB8: 22077 @cvar DWT_DAUB12: 22078 @cvar DWT_DAUB20: 22079 """ 22080 pass
22081
22082 -class DWTDenoiseType:
22083 """ 22084 @note: All the enumerated values are defined at the module level, I{not} the 22085 class level. The are just groupped by class here for easier orientation. 22086 22087 @cvar DWT_DENOISE_UNIVERSAL: 22088 @cvar DWT_DENOISE_SCALE_ADAPTIVE: 22089 @cvar DWT_DENOISE_SPACE_ADAPTIVE: 22090 """ 22091 pass
22092
22093 -class InterpolationType:
22094 """ 22095 Interpolation types. 22096 22097 @note: All the enumerated values are defined at the module level, I{not} the 22098 class level. The are just groupped by class here for easier orientation. 22099 22100 @cvar INTERPOLATION_NONE: No interpolation at all, resulting values are not 22101 defined, it must not be used for interpolation. 22102 It can be used in resize operations discarding 22103 original data. 22104 @cvar INTERPOLATION_ROUND: Round interpolation (more precisely symmetric 22105 nearest neighbour interpolation). 22106 @cvar INTERPOLATION_LINEAR: Linear interpolation. 22107 @cvar INTERPOLATION_BILINEAR: Old name for B{C{INTERPOLATION_LINEAR}}. This 22108 is a misnomer because it in fact denotes linear 22109 interpolation of arbitrary dimension. Use 22110 B{C{INTERPOLATION_LINEAR}} instead. 22111 @cvar INTERPOLATION_KEY: Cubic Key's interpolation (with a=-1/2). 22112 @cvar INTERPOLATION_BSPLINE: B-spline interpolation. 22113 @cvar INTERPOLATION_OMOMS: Omoms interpolation. 22114 @cvar INTERPOLATION_NNA: Nearest neighbour approximation. 22115 @cvar INTERPOLATION_SCHAUM: Cubic Schaum interpolation. 22116 """ 22117 pass
22118
22119 -class PlaneFitQuantity:
22120 """ 22121 Local plane fitting quantity to request from L{DataField.area_fit_local_planes}() and similar functions. 22122 22123 @note: All the enumerated values are defined at the module level, I{not} the 22124 class level. The are just groupped by class here for easier orientation. 22125 22126 @cvar PLANE_FIT_A: Constant coefficient (mean value). 22127 @cvar PLANE_FIT_BX: Linear coefficient in B{C{x}}, where B{C{x}} is in pixel coordinates. 22128 @cvar PLANE_FIT_BY: Linear coefficient in B{C{y}}, where B{C{y}} is in pixel coordinates. 22129 @cvar PLANE_FIT_ANGLE: Slope orientation in (x,y) plane (in radians). 22130 @cvar PLANE_FIT_SLOPE: Absolute slope value (that is sqrt(bx*bx + by*by)). 22131 @cvar PLANE_FIT_S0: Residual sum of squares. 22132 @cvar PLANE_FIT_S0_REDUCED: Slope-reduced residual sum of squares. 22133 """ 22134 pass
22135
22136 -class WindowingType:
22137 """ 22138 Frequency windowing type. 22139 22140 @note: All the enumerated values are defined at the module level, I{not} the 22141 class level. The are just groupped by class here for easier orientation. 22142 22143 @cvar WINDOWING_NONE: No windowing is applied. 22144 @cvar WINDOWING_HANN: Hann window. 22145 @cvar WINDOWING_HAMMING: Hamming window. 22146 @cvar WINDOWING_BLACKMANN: Blackmann window. 22147 @cvar WINDOWING_LANCZOS: Lanczos window. 22148 @cvar WINDOWING_WELCH: Welch window. 22149 @cvar WINDOWING_RECT: Rectangular window. 22150 @cvar WINDOWING_NUTTALL: Nuttall window (Since 2.7). 22151 @cvar WINDOWING_FLAT_TOP: Flat-top window (Since 2.7). 22152 @cvar WINDOWING_KAISER25: Kaiser window with β=2.5 (Since 2.7). 22153 """ 22154 pass
22155
22156 -class TipType:
22157 """ 22158 Type of tip shape presets. 22159 22160 @note: All the enumerated values are defined at the module level, I{not} the 22161 class level. The are just groupped by class here for easier orientation. 22162 22163 @cvar TIP_PYRAMID: N-sided pyramidal tip. 22164 @cvar TIP_PYRAMIDE: Legacy name for B{C{TIP_PYRAMID}}. 22165 @cvar TIP_CONTACT: Four-sided pyramidal tip. 22166 @cvar TIP_NONCONTACT: Three-sided pyramidal tip. 22167 @cvar TIP_DELTA: Delta function (single-pixel tip). 22168 @cvar TIP_PARABOLA: Parabolic tip. (Since 2.45) 22169 @cvar TIP_CONE: Conical tip. (Since 2.45) 22170 @cvar TIP_ELLPARABOLA: Elliptical parabola tip. (Since 2.47) 22171 @cvar TIP_BALL_ON_STICK: Spherical tip at the end of almost-cyliner. (Since 2.50) 22172 """ 22173 pass
22174
22175 -class TipParamType:
22176 """ 22177 Type of tip model preset parameter. 22178 22179 This enum is used with the new tip preset functions L{gwy_tip_model_get_preset_params}(), 22180 L{gwy_tip_model_preset_create}(), L{gwy_tip_model_preset_create_for_zrange}(). 22181 22182 @since: 2.47 22183 22184 @note: All the enumerated values are defined at the module level, I{not} the 22185 class level. The are just groupped by class here for easier orientation. 22186 22187 @cvar TIP_PARAM_HEIGHT: Total tip height. This is used only in the delta function tip; for all others it is 22188 implied. 22189 @cvar TIP_PARAM_RADIUS: Radius of curvature of the tip apex. 22190 @cvar TIP_PARAM_ROTATION: Rotation angle. 22191 @cvar TIP_PARAM_NSIDES: Number of sides for pyramidal tips. 22192 @cvar TIP_PARAM_SLOPE: Half-angle of the apex (complement of the side slope for straight sides). 22193 @cvar TIP_PARAM_ANISOTROPY: Ratio between larger and smaller tip width in two orthotonal directions. 22194 """ 22195 pass
22196
22197 -class CorrelationType:
22198 """ 22199 @note: All the enumerated values are defined at the module level, I{not} the 22200 class level. The are just groupped by class here for easier orientation. 22201 22202 @cvar CORRELATION_NORMAL: 22203 @cvar CORRELATION_FFT: 22204 @cvar CORRELATION_POC: 22205 """ 22206 pass
22207
22208 -class CorrSearchType:
22209 """ 22210 Type of correlation search output. 22211 22212 @since: 2.50 22213 22214 @note: All the enumerated values are defined at the module level, I{not} the 22215 class level. The are just groupped by class here for easier orientation. 22216 22217 @cvar CORR_SEARCH_COVARIANCE_RAW: Raw average of data values multiplied by kernel values. 22218 @cvar CORR_SEARCH_COVARIANCE: Local mean value is subtracted from data before kernel multiplication. 22219 @cvar CORR_SEARCH_COVARIANCE_SCORE: In addition, result is normalised by dividing by the local variance. 22220 @cvar CORR_SEARCH_HEIGHT_DIFF_RAW: Raw mean square difference between data and kernel values. 22221 @cvar CORR_SEARCH_HEIGHT_DIFF: Mean values of data and kernel are adjusted before summing the squared differences. 22222 @cvar CORR_SEARCH_HEIGHT_DIFF_SCORE: In addition, result is normalised by dividing by the local variance. 22223 """ 22224 pass
22225
22226 -class GrainQuantity:
22227 """ 22228 Grain quantity to request from L{DataField.grains_get_distribution}() and similar functions. 22229 22230 @note: All the enumerated values are defined at the module level, I{not} the 22231 class level. The are just groupped by class here for easier orientation. 22232 22233 @cvar GRAIN_VALUE_PROJECTED_AREA: Projected (flat) grain area. 22234 @cvar GRAIN_VALUE_EQUIV_SQUARE_SIDE: Side of a square with the same area as the grain. 22235 @cvar GRAIN_VALUE_EQUIV_DISC_RADIUS: Radius of a disc with the same area as the grain. 22236 @cvar GRAIN_VALUE_SURFACE_AREA: Surface area. 22237 @cvar GRAIN_VALUE_MAXIMUM: Minimum value. 22238 @cvar GRAIN_VALUE_MINIMUM: Maximum value. 22239 @cvar GRAIN_VALUE_MEAN: Mean value. 22240 @cvar GRAIN_VALUE_MEDIAN: Median value. 22241 @cvar GRAIN_VALUE_PIXEL_AREA: Flat grain area measured in pixels. This value is redundant but it is useful for 22242 filtering (Since 2.37). 22243 @cvar GRAIN_VALUE_HALF_HEIGHT_AREA: Projected area of the part of grain that is above the half-height, i.e. the 22244 height between the minimum and maximum (Since 2.8). 22245 @cvar GRAIN_VALUE_FLAT_BOUNDARY_LENGTH: Length of projected grain boundary. Note for grains not topologically 22246 equivalent to disc, only the length of the outer boundary is calculated. 22247 @cvar GRAIN_VALUE_RMS: Standard deviation of grain values. (Since 2.51) 22248 @cvar GRAIN_VALUE_MINIMUM_BOUND_SIZE: Minimum lateral bounding size, in other words the minimum length of grain 22249 projection to any line in the horizontal plane. 22250 @cvar GRAIN_VALUE_MINIMUM_BOUND_ANGLE: Direction of the minimum lateral bounding size (arbitrary one if the minimum 22251 is not unique). 22252 @cvar GRAIN_VALUE_MAXIMUM_BOUND_SIZE: Maximum lateral bounding size, in other words the maximum length of grain 22253 projection to any line in the horizontal plane. 22254 @cvar GRAIN_VALUE_MAXIMUM_BOUND_ANGLE: Direction of the maximum lateral bounding size (arbitrary one if the maximum 22255 is not unique). 22256 @cvar GRAIN_VALUE_CENTER_X: Grain centre horizontal position, i.e. the mean value of its physical x-coordinates. 22257 (Since 2.7) 22258 @cvar GRAIN_VALUE_CENTER_Y: Grain centre vertical position, i.e. the mean value of its physical y-coordinates. 22259 (Since 2.7) 22260 @cvar GRAIN_VALUE_VOLUME_0: Grain volume calculated with grain basis at B{C{z}}=0 (therefore it is just an integral it can 22261 be negative). (Since 2.3) 22262 @cvar GRAIN_VALUE_VOLUME_MIN: Grain volume calculated with grain basis at grain minimum value. This value is 22263 a lower bound. (Since 2.3) 22264 @cvar GRAIN_VALUE_VOLUME_LAPLACE: Grain volume calculated with grain basis calculated by laplacian interpolation of 22265 surrounding values. (Since 2.3) 22266 @cvar GRAIN_VALUE_SLOPE_THETA: Spherical angle theta of grain normal (0 is upwards). (Since 2.7) 22267 @cvar GRAIN_VALUE_SLOPE_PHI: Spherical angle phi of grain normal (0 is in positive x direction). (Since 2.7) 22268 @cvar GRAIN_VALUE_BOUNDARY_MAXIMUM: Maximum value in the grain inner boundary. (Since 2.12) 22269 @cvar GRAIN_VALUE_BOUNDARY_MINIMUM: Minimum value on the grain inner boundary. (Since 2.12) 22270 @cvar GRAIN_VALUE_CURVATURE_CENTER_X: Grain curvature centre horizontal position. For too small or flat grains it 22271 reduces to the horizontal position of geometrical centre. (Since 2.22) 22272 @cvar GRAIN_VALUE_CURVATURE_CENTER_Y: Grain curvature centre vertical position. For too small or flat grains it 22273 reduces to the vertical position of geometrical centre. (Since 2.22) 22274 @cvar GRAIN_VALUE_CURVATURE_CENTER_Z: The value at curvature centre. Note this is the value in the origin of the 22275 fitted quadratic surface, not at the real surface. (Since 2.22) 22276 @cvar GRAIN_VALUE_CURVATURE1: Smaller grain curvature. (Since 2.22) 22277 @cvar GRAIN_VALUE_CURVATURE2: Larger grain curvature. (Since 2.22) 22278 @cvar GRAIN_VALUE_CURVATURE_ANGLE1: Direction of the smaller grain curvature radius. If the grain is flat or too 22279 small the angle is reported as 0. (Since 2.22) 22280 @cvar GRAIN_VALUE_CURVATURE_ANGLE2: Direction of the larger grain curvature radius. If the grain is flat or too 22281 small the angle is reported as π/2. (Since 2.22) 22282 @cvar GRAIN_VALUE_INSCRIBED_DISC_R: Radius of maximum disc that fits inside the grain (Since 2.30) 22283 @cvar GRAIN_VALUE_INSCRIBED_DISC_X: Real X-coordinate of the centre of the maximum inscribed disc. (Since 2.30) 22284 @cvar GRAIN_VALUE_INSCRIBED_DISC_Y: Real Y-coordinate of the centre of the maximum inscribed disc. (Since 2.30) 22285 @cvar GRAIN_VALUE_CONVEX_HULL_AREA: Projected (flat) area of grain convex hull. (Since 2.30) 22286 @cvar GRAIN_VALUE_CIRCUMCIRCLE_R: Radius of minimum circle containing the grain. (Since 2.30) 22287 @cvar GRAIN_VALUE_CIRCUMCIRCLE_X: Real X-coordinate of the centre of the minimum circumcircle. (Since 2.30) 22288 @cvar GRAIN_VALUE_CIRCUMCIRCLE_Y: Real Y-coordinate of the centre of the minimum circumcircle. (Since 2.30) 22289 @cvar GRAIN_VALUE_MEAN_RADIUS: Mean distance from boundary to the grain centre as defined by 22290 B{C{GRAIN_VALUE_CENTER_X}} and B{C{GRAIN_VALUE_CENTER_Y}}. (Since 2.30) 22291 @cvar GRAIN_VALUE_EQUIV_ELLIPSE_MAJOR: Length of major semiaxis of equivalent ellipse. (Since 2.36) 22292 @cvar GRAIN_VALUE_EQUIV_ELLIPSE_MINOR: Length of minor semiaxis of equivalent ellipse. (Since 2.36) 22293 @cvar GRAIN_VALUE_EQUIV_ELLIPSE_ANGLE: Orientation of the major axis of equivalent ellipse. (Since 2.36) 22294 @cvar GRAIN_VALUE_MINIMUM_MARTIN_DIAMETER: Minimum value of Martin diameter. (Since 2.50) 22295 @cvar GRAIN_VALUE_MINIMUM_MARTIN_ANGLE: Direction corresponding to minimum Martin diameter. (Since 2.50) 22296 @cvar GRAIN_VALUE_MAXIMUM_MARTIN_DIAMETER: Maximum value of Martin diameter. (Since 2.50) 22297 @cvar GRAIN_VALUE_MAXIMUM_MARTIN_ANGLE: Direction corresponding to maximum Martin diameter. (Since 2.50) 22298 """ 22299 pass
22300
22301 -class DataCompatibilityFlags:
22302 """ 22303 Data line, field, brick and lawn compatibility flags. 22304 22305 It is not recommended to pass B{C{DATA_COMPATIBILITY_ALL}} to checking functions since not all flags are meaningful 22306 for all data objects (even though meaningless flags are generally silently ignored). 22307 22308 @note: All the enumerated values are defined at the module level, I{not} the 22309 class level. The are just groupped by class here for easier orientation. 22310 22311 @cvar DATA_COMPATIBILITY_RES: Pixel sizes. 22312 @cvar DATA_COMPATIBILITY_REAL: Real (physical) dimensions. 22313 @cvar DATA_COMPATIBILITY_MEASURE: Real to pixel ratios. 22314 @cvar DATA_COMPATIBILITY_LATERAL: Units of lateral dimensions. 22315 @cvar DATA_COMPATIBILITY_VALUE: Units of values (for all curves in the case of lawns). 22316 @cvar DATA_COMPATIBILITY_AXISCAL: Axis calibrations. At present it only makes sense for B{C{Brick}} which can have 22317 Z-calibrations. (Since 2.51) 22318 @cvar DATA_COMPATIBILITY_NCURVES: Number of lawn curves. (Since 2.60) 22319 @cvar DATA_COMPATIBILITY_CURVELEN: Lengths of curves in all lawn pixels. (Since 2.60) 22320 @cvar DATA_COMPATIBILITY_ALL: Mask of all defined flags. 22321 """ 22322 pass
22323
22324 -class LineStatQuantity:
22325 """ 22326 Line statistical quantities to be requested with L{DataField.area_get_line_stats}(). 22327 22328 @since: 2.2 22329 22330 @note: All the enumerated values are defined at the module level, I{not} the 22331 class level. The are just groupped by class here for easier orientation. 22332 22333 @cvar LINE_STAT_MEAN: Mean value. 22334 @cvar LINE_STAT_MEDIAN: Median. 22335 @cvar LINE_STAT_MINIMUM: Minimum value. 22336 @cvar LINE_STAT_MAXIMUM: Maximum value. 22337 @cvar LINE_STAT_RMS: Root mean square of deviations from the mean value. 22338 @cvar LINE_STAT_LENGTH: Line length. 22339 @cvar LINE_STAT_SLOPE: Overall line slope. 22340 @cvar LINE_STAT_TAN_BETA0: Root mean square slope. 22341 @cvar LINE_STAT_RA: Arithmetic mean surface roughness. 22342 @cvar LINE_STAT_RZ: Maximum height of the roughness profile. 22343 @cvar LINE_STAT_RT: Total height of the roughness profile. 22344 @cvar LINE_STAT_SKEW: Line skew. 22345 @cvar LINE_STAT_KURTOSIS: Line excess kurtosis (which is 0 for a Gaussaian distrubution, not 3). 22346 @cvar LINE_STAT_RANGE: Difference between maximum and minimum value (Since 2.42). 22347 @cvar LINE_STAT_VARIATION: Variation (integral of absolute value) (Since 2.42). 22348 @cvar LINE_STAT_MINPOS: Minimum position along the line (Since 2.48). 22349 @cvar LINE_STAT_MAXPOS: Maximum position along the line (Since 2.48). 22350 """ 22351 pass
22352
22353 -class ExteriorType:
22354 """ 22355 Methods to handle pixels outside data. 22356 22357 Many methods currently use a fixed metod of handling of exterior pixels, for example area calculation uses 22358 extension (border and mirror coincide), convolution uses mirror extension, rotation fills exterior with a fixed 22359 value. 22360 22361 @since: 2.2 22362 22363 @note: All the enumerated values are defined at the module level, I{not} the 22364 class level. The are just groupped by class here for easier orientation. 22365 22366 @cvar EXTERIOR_UNDEFINED: The values corresponding to or calculated from exterior data values are undefined, they 22367 may be left unset or set to bogus values. The caller must handle them itself afterwards, 22368 for instance by resizing the result to consist of valid data only. 22369 @cvar EXTERIOR_BORDER_EXTEND: Values of exterior pixels are considered to be equal to the values of the nearest 22370 interior pixels. 22371 @cvar EXTERIOR_MIRROR_EXTEND: The data is considered to be periodically repeated, with odd instances reflected (the 22372 total period is thus twice the size of the data). 22373 @cvar EXTERIOR_PERIODIC: The data is considered to be periodically repeated. 22374 @cvar EXTERIOR_FIXED_VALUE: Values of exterior pixels are considered to be all equal to a user-specified value. 22375 @cvar EXTERIOR_LAPLACE: Values of exterior pixels are extended using Laplace interpolation (actually extrapolation) 22376 like L{DataField.laplace_solve}(). Only some functions implement this method. (Since 22377 2.50) 22378 """ 22379 pass
22380
22381 -class DistanceTransformType:
22382 """ 22383 Type of distance transform. 22384 22385 @since: 2.41 22386 22387 @note: All the enumerated values are defined at the module level, I{not} the 22388 class level. The are just groupped by class here for easier orientation. 22389 22390 @cvar DISTANCE_TRANSFORM_CITYBLOCK: City-block distance (sum of horizontal and vertical distances). 22391 @cvar DISTANCE_TRANSFORM_CONN4: Four-connectivity distance; another name for city-block distance. 22392 @cvar DISTANCE_TRANSFORM_CHESS: Chessboard distance (maximum of horizontal and vertical distance). 22393 @cvar DISTANCE_TRANSFORM_CONN8: Eight-connectivity distance; another name for chessboard distance. 22394 @cvar DISTANCE_TRANSFORM_OCTAGONAL48: Octagonal distance beginning from city-block. 22395 @cvar DISTANCE_TRANSFORM_OCTAGONAL84: Octagonal distance beginning from chess. 22396 @cvar DISTANCE_TRANSFORM_OCTAGONAL: Average octagonal distance, i.e. the mean of the 48 and 84 distances (Since 22397 2.43). 22398 @cvar DISTANCE_TRANSFORM_EUCLIDEAN: True Euclidean distance (Since 2.43). 22399 """ 22400 pass
22401
22402 -class MinMaxFilterType:
22403 """ 22404 Type of operation based on morphological filters with flat structuring 22405 elements. 22406 22407 @since: 2.43 22408 22409 @note: All the enumerated values are defined at the module level, I{not} the 22410 class level. The are just groupped by class here for easier orientation. 22411 22412 @cvar MIN_MAX_FILTER_MINIMUM: Minimum filter, i.e. minimum of the surrounding values. 22413 @cvar MIN_MAX_FILTER_EROSION: Another name for the minimum filter. 22414 @cvar MIN_MAX_FILTER_MAXIMUM: Maximum filter, i.e. maximum of the surrounding values. 22415 @cvar MIN_MAX_FILTER_DILATION: Another name for the maximum filter. 22416 @cvar MIN_MAX_FILTER_OPENING: Morphological opening filter. 22417 @cvar MIN_MAX_FILTER_CLOSING: Morphological closing filter. 22418 @cvar MIN_MAX_FILTER_RANGE: Difference between maximum and minimum. 22419 @cvar MIN_MAX_FILTER_NORMALIZATION: Data value rescaled to the range between minimum and maximum. 22420 """ 22421 pass
22422
22423 -class RotateResizeType:
22424 """ 22425 Type of rotated data field size determination method. 22426 22427 @since: 2.46 22428 22429 @note: All the enumerated values are defined at the module level, I{not} the 22430 class level. The are just groupped by class here for easier orientation. 22431 22432 @cvar ROTATE_RESIZE_SAME_SIZE: The result has the same area as the original. 22433 @cvar ROTATE_RESIZE_EXPAND: The result is sufficiently large so that all original data are present (usually meaning 22434 that there will be also lot of exterior). 22435 @cvar ROTATE_RESIZE_CUT: The result is optimally cut to interior data only. 22436 """ 22437 pass
22438
22439 -class AffineScalingType:
22440 """ 22441 Type of lattice vector scaling in affine transform preparation. 22442 22443 @since: 2.49 22444 22445 @note: All the enumerated values are defined at the module level, I{not} the 22446 class level. The are just groupped by class here for easier orientation. 22447 22448 @cvar AFFINE_SCALING_AS_GIVEN: Correct lattice vectors lengths are taken as given. 22449 @cvar AFFINE_SCALING_PRESERVE_AREA: Correct lattice vectors are scaled to make the transformation area-preserving. 22450 @cvar AFFINE_SCALING_PRESERVE_X: Correct lattice vectors are scaled to preserve the scale along B{C{x}}-axis. 22451 """ 22452 pass
22453
22454 -class BrickTransposeType:
22455 """ 22456 Type of volume data transposition. 22457 22458 The enum values names spell which old axis becomes which new axes. 22459 22460 @since: 2.51 22461 22462 @note: All the enumerated values are defined at the module level, I{not} the 22463 class level. The are just groupped by class here for easier orientation. 22464 22465 @cvar BRICK_TRANSPOSE_XYZ: No change (useful with axis flipping). 22466 @cvar BRICK_TRANSPOSE_XZY: Axes Z and Y are swapped. 22467 @cvar BRICK_TRANSPOSE_YXZ: Axes Y and Z are swapped. 22468 @cvar BRICK_TRANSPOSE_YZX: Axis X becomes Y, Y becomes Z and Z becomes X. 22469 @cvar BRICK_TRANSPOSE_ZXY: Axes X and Z are swapped. 22470 @cvar BRICK_TRANSPOSE_ZYX: Axis X becomes Z, Y becomes X and Z becomes Y. 22471 """ 22472 pass
22473
22474 -class MFMProbeType:
22475 """ 22476 Type of probe for calculation of force in magnetic field microscopy. 22477 22478 @since: 2.51 22479 22480 @note: All the enumerated values are defined at the module level, I{not} the 22481 class level. The are just groupped by class here for easier orientation. 22482 22483 @cvar MFM_PROBE_CHARGE: Magnetic point charge probe. 22484 @cvar MFM_PROBE_BAR: Finite rectangular bar. 22485 """ 22486 pass
22487
22488 -class MFMComponentType:
22489 """ 22490 Type of field component calculated in magnetic field microscopy. 22491 22492 @since: 2.51 22493 22494 @note: All the enumerated values are defined at the module level, I{not} the 22495 class level. The are just groupped by class here for easier orientation. 22496 22497 @cvar MFM_COMPONENT_HX: X-component of magnetic field H. 22498 @cvar MFM_COMPONENT_HY: Y-component of magnetic field H. 22499 @cvar MFM_COMPONENT_HZ: Z-component of magnetic field H. 22500 @cvar MFM_COMPONENT_DHZ_DZ: Z-derivative of Z-component of magnetic field H. 22501 @cvar MFM_COMPONENT_D2HZ_DZ2: Second Z-derivative of Z-component of magnetic 22502 field H. 22503 """ 22504 pass
22505
22506 -class MFMGradientType:
22507 """ 22508 @note: All the enumerated values are defined at the module level, I{not} the 22509 class level. The are just groupped by class here for easier orientation. 22510 22511 @cvar MFM_GRADIENT_FORCE: 22512 @cvar MFM_GRADIENT_MFM: 22513 @cvar MFM_GRADIENT_MFM_AREA: 22514 """ 22515 pass
22516
22517 -class PeakBackgroundType:
22518 """ 22519 Type of background available in graph peak analysers. 22520 22521 @since: 2.46 22522 22523 @note: All the enumerated values are defined at the module level, I{not} the 22524 class level. The are just groupped by class here for easier orientation. 22525 22526 @cvar PEAK_BACKGROUND_ZERO: The background is fixed at zero value. 22527 @cvar PEAK_BACKGROUND_MMSTEP: The background is a step function connecting the nearest minima on the left and right 22528 side. 22529 """ 22530 pass
22531
22532 -class PeakOrderType:
22533 """ 22534 Type of peak ordering by in the graph peak analyser results. 22535 22536 @since: 2.46 22537 22538 @note: All the enumerated values are defined at the module level, I{not} the 22539 class level. The are just groupped by class here for easier orientation. 22540 22541 @cvar PEAK_ORDER_ABSCISSA: Peaks are ordered by abscissa values, from left to right. 22542 @cvar PEAK_ORDER_PROMINENCE: Peaks are ordered by prominence, from most to least prominent. 22543 """ 22544 pass
22545
22546 -class PeakQuantity:
22547 """ 22548 Type of characteristics graph peak analysers can provide. 22549 22550 @since: 2.46 22551 22552 @note: All the enumerated values are defined at the module level, I{not} the 22553 class level. The are just groupped by class here for easier orientation. 22554 22555 @cvar PEAK_PROMINENCE: Compound quantity characteristing the overall peak prominence (taking into account height, 22556 area, distance from other peaks, ...). 22557 @cvar PEAK_ABSCISSA: Position of peak maximum. 22558 @cvar PEAK_HEIGHT: Peak height (with respect to the chosen background function). 22559 @cvar PEAK_AREA: Peak area (with respect to the chosen background function). 22560 @cvar PEAK_WIDTH: Peak width, more or less corresponding to standard deviation. 22561 """ 22562 pass
22563
22564 -class RenderingTarget:
22565 """ 22566 Type of target where selections can be rendered. 22567 22568 The pixmap image target is rarely used now. 22569 22570 @note: All the enumerated values are defined at the module level, I{not} the 22571 class level. The are just groupped by class here for easier orientation. 22572 22573 @cvar RENDERING_TARGET_SCREEN: Selection is being rendered to screen 22574 @cvar RENDERING_TARGET_PIXMAP_IMAGE: Selection is geing rendered to 22575 a pixbuf. 22576 """ 22577 pass
22578
22579 -class AxisScaleFormat:
22580 """ 22581 Labeled axis tick mark format. 22582 22583 @note: All the enumerated values are defined at the module level, I{not} the 22584 class level. The are just groupped by class here for easier orientation. 22585 22586 @cvar AXIS_SCALE_FORMAT_AUTO: Automatical format. 22587 @cvar AXIS_SCALE_FORMAT_EXP: Exponential (`scienfitic') format. 22588 @cvar AXIS_SCALE_FORMAT_INT: Integer format. 22589 """ 22590 pass
22591
22592 -class UnitsPlacement:
22593 """ 22594 Units placement on a B{C{Ruler}}. 22595 22596 @note: All the enumerated values are defined at the module level, I{not} the 22597 class level. The are just groupped by class here for easier orientation. 22598 22599 @cvar UNITS_PLACEMENT_NONE: Units are omitted. 22600 @cvar UNITS_PLACEMENT_AT_ZERO: Units are placed to major tick at zero, or 22601 to the leftmost position of zero is not 22602 present. 22603 """ 22604 pass
22605
22606 -class HScaleStyle:
22607 """ 22608 Options controlling L{gwy_table_attach_adjbar}() and L{gwy_table_attach_hscale}() 22609 behaviour. 22610 22611 @note: All the enumerated values are defined at the module level, I{not} the 22612 class level. The are just groupped by class here for easier orientation. 22613 22614 @cvar HSCALE_DEFAULT: Default label, hscale, spinbutton, and units widget 22615 row. Note that the default mapping is linear for 22616 hscales but signed square root for adjust bars. 22617 @cvar HSCALE_LOG: The scale mapping is logarithmic. 22618 @cvar HSCALE_SQRT: The scale mapping is signed square root. 22619 @cvar HSCALE_LINEAR: The scale mapping is linear. (Since 2.49) 22620 @cvar HSCALE_NO_SCALE: There is no hscale/adjust bar. 22621 @cvar HSCALE_WIDGET: An user-specified widget is used in place of the 22622 adjustment control(s). 22623 @cvar HSCALE_WIDGET_NO_EXPAND: An user-specified widget is used in place of 22624 hscale and spinbutton, and it is left-aligned 22625 instead of taking all the alloted space. 22626 @cvar HSCALE_CHECK: The label is actually a check button that controls 22627 sensitivity of the row. This is a flag, to be bitwise 22628 or-ed with other values. 22629 @cvar HSCALE_SNAP: The adjust bar snaps to ticks (hscales cannot snap). 22630 This is a flag, to be bitwise or-ed with other values. 22631 (Since 2.49) 22632 """ 22633 pass
22634
22635 -class GraphStatusType:
22636 """ 22637 @note: All the enumerated values are defined at the module level, I{not} the 22638 class level. The are just groupped by class here for easier orientation. 22639 22640 @cvar GRAPH_STATUS_PLAIN: 22641 @cvar GRAPH_STATUS_XSEL: 22642 @cvar GRAPH_STATUS_YSEL: 22643 @cvar GRAPH_STATUS_POINTS: 22644 @cvar GRAPH_STATUS_ZOOM: 22645 @cvar GRAPH_STATUS_XLINES: 22646 @cvar GRAPH_STATUS_YLINES: 22647 """ 22648 pass
22649
22650 -class GraphGridType:
22651 """ 22652 @note: All the enumerated values are defined at the module level, I{not} the 22653 class level. The are just groupped by class here for easier orientation. 22654 22655 @cvar GRAPH_GRID_NONE: 22656 @cvar GRAPH_GRID_AUTO: 22657 @cvar GRAPH_GRID_USER: 22658 """ 22659 pass
22660
22661 -class GraphPointType:
22662 """ 22663 @note: All the enumerated values are defined at the module level, I{not} the 22664 class level. The are just groupped by class here for easier orientation. 22665 22666 @cvar GRAPH_POINT_SQUARE: 22667 @cvar GRAPH_POINT_CROSS: 22668 @cvar GRAPH_POINT_CIRCLE: 22669 @cvar GRAPH_POINT_STAR: 22670 @cvar GRAPH_POINT_TIMES: 22671 @cvar GRAPH_POINT_TRIANGLE_UP: 22672 @cvar GRAPH_POINT_TRIANGLE_DOWN: 22673 @cvar GRAPH_POINT_DIAMOND: 22674 @cvar GRAPH_POINT_FILLED_SQUARE: 22675 @cvar GRAPH_POINT_DISC: 22676 @cvar GRAPH_POINT_FILLED_CIRCLE: 22677 @cvar GRAPH_POINT_FILLED_TRIANGLE_UP: 22678 @cvar GRAPH_POINT_FILLED_TRIANGLE_DOWN: 22679 @cvar GRAPH_POINT_FILLED_DIAMOND: 22680 @cvar GRAPH_POINT_TRIANGLE_LEFT: 22681 @cvar GRAPH_POINT_FILLED_TRIANGLE_LEFT: 22682 @cvar GRAPH_POINT_TRIANGLE_RIGHT: 22683 @cvar GRAPH_POINT_FILLED_TRIANGLE_RIGHT: 22684 @cvar GRAPH_POINT_ASTERISK: 22685 """ 22686 pass
22687
22688 -class GraphCurveType:
22689 """ 22690 Graph curve plotting type. 22691 22692 @note: All the enumerated values are defined at the module level, I{not} the 22693 class level. The are just groupped by class here for easier orientation. 22694 22695 @cvar GRAPH_CURVE_HIDDEN: Curve is invisible. 22696 @cvar GRAPH_CURVE_POINTS: Curve data is plotted with symbols. 22697 @cvar GRAPH_CURVE_LINE: Curve data is plotted with a line. 22698 @cvar GRAPH_CURVE_LINE_POINTS: Curve data is plotted with symbols and a line. 22699 """ 22700 pass
22701
22702 -class GraphLabelPosition:
22703 """ 22704 @note: All the enumerated values are defined at the module level, I{not} the 22705 class level. The are just groupped by class here for easier orientation. 22706 22707 @cvar GRAPH_LABEL_NORTHEAST: 22708 @cvar GRAPH_LABEL_NORTHWEST: 22709 @cvar GRAPH_LABEL_SOUTHEAST: 22710 @cvar GRAPH_LABEL_SOUTHWEST: 22711 @cvar GRAPH_LABEL_USER: 22712 """ 22713 pass
22714
22715 -class GraphModelExportStyle:
22716 """ 22717 Graph ASCII export style. 22718 22719 @note: All the enumerated values are defined at the module level, I{not} the 22720 class level. The are just groupped by class here for easier orientation. 22721 22722 @cvar GRAPH_MODEL_EXPORT_ASCII_PLAIN: White-space separated data values, 22723 plain description lines and column 22724 headers, missing data represented with 22725 dashes. 22726 @cvar GRAPH_MODEL_EXPORT_ASCII_GNUPLOT: White-space separated data values, 22727 curves serialised, 22728 description lines and column headers 22729 prefixed with C{#}. 22730 @cvar GRAPH_MODEL_EXPORT_ASCII_CSV: Semicolon separated data values and 22731 column headers, missing 22732 data represented as empty columns. 22733 @cvar GRAPH_MODEL_EXPORT_ASCII_ORIGIN: Presently, the same as the plain 22734 format. 22735 @cvar GRAPH_MODEL_EXPORT_ASCII_IGORPRO: Text wave format of Igor Pro (.itx). 22736 (Since 2.36) 22737 @cvar GRAPH_MODEL_EXPORT_ASCII_POSIX: Flag that can be combined with the 22738 other formats, meaning 22739 locale-independent C/POSIX format of 22740 floating point numbers. (Since 2.26) 22741 @cvar GRAPH_MODEL_EXPORT_ASCII_MERGED: Flag that can be combined with the 22742 other formats (except Igor Pro), 22743 requesting multi-column output with 22744 a single merged abscissa in the first 22745 column. (Since 2.46) 22746 """ 22747 pass
22748
22749 -class LayerBasicRangeType:
22750 """ 22751 Types of color gradient mapping in B{C{LayerBasic}}. 22752 22753 @note: All the enumerated values are defined at the module level, I{not} the 22754 class level. The are just groupped by class here for easier orientation. 22755 22756 @cvar LAYER_BASIC_RANGE_FULL: Color gradient is uniformly mapped to range 22757 from data minimum to maximum. 22758 @cvar LAYER_BASIC_RANGE_FIXED: Color gradient is uniformly mapped to a fixed 22759 range, independent on data. 22760 @cvar LAYER_BASIC_RANGE_AUTO: Color gradient is uniformly mapped to a range 22761 inside which most of data points lie, that is 22762 height distribution tails are cut off. 22763 @cvar LAYER_BASIC_RANGE_ADAPT: Color range is mapped nonuniformly, 22764 see L{gwy_pixbuf_draw_data_field_adaptive}(). 22765 """ 22766 pass
22767
22768 -class CurveType:
22769 """ 22770 Curve drawing type in B{C{Curve}}. 22771 22772 @note: All the enumerated values are defined at the module level, I{not} the 22773 class level. The are just groupped by class here for easier orientation. 22774 22775 @cvar CURVE_TYPE_LINEAR: Linear interpolation. 22776 @cvar CURVE_TYPE_SPLINE: Spline interpolation. 22777 @cvar CURVE_TYPE_FREE: Free form curve. 22778 """ 22779 pass
22780
22781 -class CurveChannel:
22782 """ 22783 @note: All the enumerated values are defined at the module level, I{not} the 22784 class level. The are just groupped by class here for easier orientation. 22785 22786 @cvar CURVE_CHANNEL_RED: 22787 @cvar CURVE_CHANNEL_GREEN: 22788 @cvar CURVE_CHANNEL_BLUE: 22789 """ 22790 pass
22791
22792 -class MarkerOperationType:
22793 """ 22794 B{C{MarkerBox}} operation type (for validation). 22795 22796 @note: All the enumerated values are defined at the module level, I{not} the 22797 class level. The are just groupped by class here for easier orientation. 22798 22799 @cvar MARKER_OPERATION_MOVE: Marker is being moved. 22800 @cvar MARKER_OPERATION_ADD: Marker is being added. 22801 @cvar MARKER_OPERATION_REMOVE: Marker is being removed. 22802 """ 22803 pass
22804
22805 -class DataViewLayerType:
22806 """ 22807 B{C{DataView}} layer identification. 22808 22809 @note: All the enumerated values are defined at the module level, I{not} the 22810 class level. The are just groupped by class here for easier orientation. 22811 22812 @cvar DATA_VIEW_LAYER_BASE: Base (bottom) layer. 22813 @cvar DATA_VIEW_LAYER_ALPHA: Alpha (mask) layer. 22814 @cvar DATA_VIEW_LAYER_TOP: Top (vector, interactive) layer. 22815 """ 22816 pass
22817
22818 -class TicksStyle:
22819 """ 22820 Axis ticks style (used in B{C{ColorAxis}}). 22821 22822 @note: All the enumerated values are defined at the module level, I{not} the 22823 class level. The are just groupped by class here for easier orientation. 22824 22825 @cvar TICKS_STYLE_NONE: Ticks are not drawn. 22826 @cvar TICKS_STYLE_CENTER: One tick is drawn at center. 22827 @cvar TICKS_STYLE_AUTO: A number of automatically chosen ticks are drawn at 22828 `round' values. 22829 @cvar TICKS_STYLE_UNLABELED: Only edge ticks are labelled, interior ticks 22830 are drawn but not labelled. (Since 2.44) 22831 @cvar TICKS_STYLE_UNLABELLED: Alias for B{C{TICKS_STYLE_UNLABELED}}. 22832 (Since 2.39) 22833 """ 22834 pass
22835
22836 -class FileOperationType:
22837 """ 22838 File type function file operations (capabilities). 22839 22840 The difference between save and export is that save is supposed to create 22841 a file containing fairly complete representation of the container, while 22842 export is the possibility to write some information to given file type. 22843 Generally only native file format module implements 22844 B{C{FILE_OPERATION_SAVE}}, all others implement B{C{FILE_OPERATION_EXPORT}}. 22845 22846 @note: All the enumerated values are defined at the module level, I{not} the 22847 class level. The are just groupped by class here for easier orientation. 22848 22849 @cvar FILE_OPERATION_DETECT: Posibility to detect files are of this file type, 22850 @cvar FILE_OPERATION_LOAD: Posibility to load files of this type. 22851 @cvar FILE_OPERATION_SAVE: Posibility to save files of this type. 22852 @cvar FILE_OPERATION_EXPORT: Posibility to export files of this type. 22853 @cvar FILE_OPERATION_MASK: The mask for all the flags. 22854 """ 22855 pass
22856
22857 -class ToolSwitchEvent:
22858 """ 22859 @note: All the enumerated values are defined at the module level, I{not} the 22860 class level. The are just groupped by class here for easier orientation. 22861 22862 @cvar TOOL_SWITCH_WINDOW: 22863 @cvar TOOL_SWITCH_TOOL: 22864 """ 22865 pass
22866
22867 -class RunType:
22868 """ 22869 Module function run-modes. 22870 22871 Note B{C{RUN_NONINTERACTIVE}} is only possible for file functions, processing functions do not have a truly 22872 non-interactive interface yet and therefore they should not claim they support it. The closest match for process 22873 functions is B{C{RUN_IMMEDIATE}}. 22874 22875 @note: All the enumerated values are defined at the module level, I{not} the 22876 class level. The are just groupped by class here for easier orientation. 22877 22878 @cvar RUN_NONE: None. 22879 @cvar RUN_NONINTERACTIVE: The function is run non-interactively, it must not present any GUI and touch application 22880 state. 22881 @cvar RUN_INTERACTIVE: The function presents a modal user interfaces where parameters can be adjusted, it returns 22882 after finishing all operations. 22883 @cvar RUN_IMMEDIATE: Function is run immediately and uses parameter values stored in the settings to reproduce 22884 previous run. It can however present GUI error messages or display progress, create new 22885 windows, etc. 22886 @cvar RUN_MASK: The mask for all the run modes. 22887 """ 22888 pass
22889
22890 -class ModuleFileError:
22891 """ 22892 Error codes returned by file module operations. 22893 22894 File module functions can return any of these codes, except 22895 B{C{MODULE_FILE_ERROR_UNIMPLEMENTED}} which is normally only returned by 22896 high-level functions L{gwy_file_load}() and L{gwy_file_save}(). Module functions 22897 can return it only when they are called with a wrong function name. 22898 22899 @note: All the enumerated values are defined at the module level, I{not} the 22900 class level. The are just groupped by class here for easier orientation. 22901 22902 @cvar MODULE_FILE_ERROR_CANCELED: Interactive operation was cancelled by 22903 user. (Since 2.45) 22904 @cvar MODULE_FILE_ERROR_CANCELLED: Alias for B{C{MODULE_FILE_ERROR_CANCELED}}. 22905 @cvar MODULE_FILE_ERROR_UNIMPLEMENTED: No module implements requested 22906 operation. 22907 @cvar MODULE_FILE_ERROR_IO: Input/output error occured. 22908 @cvar MODULE_FILE_ERROR_DATA: Data is corrupted or in an unsupported format. 22909 @cvar MODULE_FILE_ERROR_INTERACTIVE: Operation requires user input, but 22910 it was run as B{C{RUN_NONINTERACTIVE}}. 22911 @cvar MODULE_FILE_ERROR_SPECIFIC: Specific module errors that do not fall 22912 into any other category (such as the 22913 failure to initialize a library used to 22914 read the data). Seldom used. 22915 """ 22916 pass
22917
22918 -class ModuleError:
22919 """ 22920 Type of module loading and registration error. 22921 22922 @note: All the enumerated values are defined at the module level, I{not} the 22923 class level. The are just groupped by class here for easier orientation. 22924 22925 @cvar MODULE_ERROR_NAME: Module has an invalid name. It is recommended that module names are valid C identifiers, 22926 possibly with dashes instead of underscores, but only really broken names are rejected. 22927 @cvar MODULE_ERROR_DUPLICATE: A module of the same name has already been registered. 22928 @cvar MODULE_ERROR_OPEN: Calling g_module_open() on the module failed. 22929 @cvar MODULE_ERROR_QUERY: Module does not contain any query function. 22930 @cvar MODULE_ERROR_ABI: Module has different ABI version than expected/supported; or required info field are 22931 missing. 22932 @cvar MODULE_ERROR_INFO: Module query function provided B{C{None}} info. 22933 @cvar MODULE_ERROR_REGISTER: The registration function returned B{C{False}}; or the module did not register any function. 22934 @cvar MODULE_ERROR_NESTING: Nested module bundle found. (Since 2.49) 22935 """ 22936 pass
22937
22938 -class AppWhat:
22939 """ 22940 Types of current objects that can be requested with L{gwy_app_data_browser_get_current}(). 22941 22942 @note: All the enumerated values are defined at the module level, I{not} the 22943 class level. The are just groupped by class here for easier orientation. 22944 22945 @cvar APP_CONTAINER: Data container (corresponds to files). 22946 @cvar APP_DATA_VIEW: Data view widget (shows a channel). 22947 @cvar APP_GRAPH: Graph widget (shows a graph model). 22948 @cvar APP_DATA_FIELD: Data field (image). 22949 @cvar APP_DATA_FIELD_KEY: Quark corresponding to the data field (image). 22950 @cvar APP_DATA_FIELD_ID: Number (id) of the data field (image) in its container. 22951 @cvar APP_MASK_FIELD: Mask data field. 22952 @cvar APP_MASK_FIELD_KEY: Quark corresponding to the mask field. 22953 @cvar APP_SHOW_FIELD: Presentation data field. 22954 @cvar APP_SHOW_FIELD_KEY: Quark corresponding to the presentation field. 22955 @cvar APP_GRAPH_MODEL: Graph model. 22956 @cvar APP_GRAPH_MODEL_KEY: Quark corresponding to the graph model. 22957 @cvar APP_GRAPH_MODEL_ID: Number (id) of the graph model in its container. 22958 @cvar APP_SPECTRA: Single point spectra. (Since 2.7) 22959 @cvar APP_SPECTRA_KEY: Quark corresponding to the single point spectra. (Since 2.7) 22960 @cvar APP_SPECTRA_ID: Number (id) of the the single point spectra in its container. (Since 2.7) 22961 @cvar APP_VOLUME_VIEW: Data view widget (shows preview of volume data) (Since 2.32). 22962 @cvar APP_BRICK: Data brick (volume data) (Since 2.32). 22963 @cvar APP_BRICK_KEY: Quark corresponding to the data brick (Since 2.32). 22964 @cvar APP_BRICK_ID: Number (id) of the the data brick in its container (Since 2.32). 22965 @cvar APP_CONTAINER_ID: Numeric id of data container (Since 2.41). 22966 @cvar APP_XYZ_VIEW: Data view widget (shows preview of surface XYZ data) (Since 2.45). 22967 @cvar APP_SURFACE: Surface data (XYZ) (Since 2.45). 22968 @cvar APP_SURFACE_KEY: Quark corresponding to the surface data (Since 2.45). 22969 @cvar APP_SURFACE_ID: Number (id) of the the surface data in its container (Since 2.45). 22970 @cvar APP_PAGE: Currently selected data browser page as a B{C{AppPage}} (Since 2.45). 22971 @cvar APP_LAWN: Lawn (curve map) (Since 2.60). 22972 @cvar APP_LAWN_KEY: Quark corresponding to the curve map (Since 2.60). 22973 @cvar APP_LAWN_ID: Number (id) of the lawn (curve map) in its container (Since 2.60). 22974 @cvar APP_CURVE_MAP_VIEW: Data view widget (shows preview of curve map lawn data) (Since 2.60). 22975 """ 22976 pass
22977
22978 -class AppPage:
22979 """ 22980 Data browser page, corresponding to one of possible data types. 22981 22982 @since: 2.45 22983 22984 @note: All the enumerated values are defined at the module level, I{not} the 22985 class level. The are just groupped by class here for easier orientation. 22986 22987 @cvar PAGE_NOPAGE: No page. This value is returned when no data are active in the browser. 22988 @cvar PAGE_CHANNELS: Channel (image data). 22989 @cvar PAGE_GRAPHS: Graph. 22990 @cvar PAGE_SPECTRA: Single point spectra. 22991 @cvar PAGE_VOLUMES: Volume data. 22992 @cvar PAGE_XYZS: XYZ data. 22993 @cvar PAGE_CURVE_MAPS: Curve map data. (Since 2.60) 22994 """ 22995 pass
22996
22997 -class DataItem:
22998 """ 22999 Type of auxiliary channel data. 23000 23001 @note: All the enumerated values are defined at the module level, I{not} the 23002 class level. The are just groupped by class here for easier orientation. 23003 23004 @cvar DATA_ITEM_GRADIENT: Color gradient. 23005 @cvar DATA_ITEM_PALETTE: An alias of B{C{DATA_ITEM_GRADIENT}}. 23006 @cvar DATA_ITEM_MASK_COLOR: Mask color components. 23007 @cvar DATA_ITEM_TITLE: Channel title. 23008 @cvar DATA_ITEM_RANGE: Range type and range boundaries. 23009 @cvar DATA_ITEM_RANGE_TYPE: Range type. 23010 @cvar DATA_ITEM_REAL_SQUARE: Physical/pixel aspect ratio mode. 23011 @cvar DATA_ITEM_SELECTIONS: Data selections. 23012 @cvar DATA_ITEM_META: Metadata. 23013 @cvar DATA_ITEM_CALDATA: Calibration and uncertainty data. (Since 2.23) 23014 @cvar DATA_ITEM_PREVIEW: Volume data preview. (Since 2.51) 23015 """ 23016 pass
23017
23018 -class VisibilityResetType:
23019 """ 23020 Data object visibility reset type. 23021 23022 The precise behaviour of B{C{VISIBILITY_RESET_DEFAULT}} may be subject of further changes. It indicates the wish to 23023 restore saved visibilities and do something reasonable when there are no visibilities to restore. 23024 23025 @note: All the enumerated values are defined at the module level, I{not} the 23026 class level. The are just groupped by class here for easier orientation. 23027 23028 @cvar VISIBILITY_RESET_DEFAULT: Restore visibilities from container and if nothing would be visible, make an 23029 arbitrary data object visible. 23030 @cvar VISIBILITY_RESET_RESTORE: Restore visibilities from container. 23031 @cvar VISIBILITY_RESET_SHOW_ALL: Show all data objects. 23032 @cvar VISIBILITY_RESET_HIDE_ALL: Hide all data objects. This normally makes the file inaccessible. 23033 """ 23034 pass
23035
23036 -class DataWatchEventType:
23037 """ 23038 Type of event reported to B{C{AppDataWatchFunc}} watcher functions. 23039 23040 @since: 2.21 23041 23042 @note: All the enumerated values are defined at the module level, I{not} the 23043 class level. The are just groupped by class here for easier orientation. 23044 23045 @cvar DATA_WATCH_EVENT_ADDED: A new data object has appeared. 23046 @cvar DATA_WATCH_EVENT_CHANGED: A data object has changed. 23047 @cvar DATA_WATCH_EVENT_REMOVED: A data object has been removed. 23048 """ 23049 pass
23050
23051 -class TextHeaderError:
23052 """ 23053 Error codes returned by text header parsing. 23054 23055 Some errors, in particular B{C{TEXT_HEADER_ERROR_KEY}} and 23056 B{C{TEXT_HEADER_ERROR_VALUE}} are expected to be raised by user callbacks 23057 (they are not restricted to these codes though). 23058 23059 @since: 2.18 23060 23061 @note: All the enumerated values are defined at the module level, I{not} the 23062 class level. The are just groupped by class here for easier orientation. 23063 23064 @cvar TEXT_HEADER_ERROR_SECTION_NAME: Section name is invalid. It is raised 23065 by the parser only for an empty section 23066 name. 23067 @cvar TEXT_HEADER_ERROR_SECTION_END: Section ended when a different section 23068 or no section was open. Note that 23069 L{gwy_text_header_context_get_section}() 23070 returns the section being closed at the 23071 time this error is raised. 23072 @cvar TEXT_HEADER_ERROR_SECTION_START: Section started before the previous 23073 ended. This is raised only if 23074 B{C{endsection_template}} is set. 23075 @cvar TEXT_HEADER_ERROR_PREFIX: Line lacks the mandatory prefix. 23076 @cvar TEXT_HEADER_ERROR_GARBAGE: Line cannot be parsed into a key-value pair. 23077 @cvar TEXT_HEADER_ERROR_KEY: Key name is invalid, namely empty. 23078 @cvar TEXT_HEADER_ERROR_VALUE: Value is invalid. This is never raised by 23079 the parser. 23080 @cvar TEXT_HEADER_ERROR_TERMINATOR: The text header has ended without being 23081 terminated by specified terminator. 23082 """ 23083 pass
23084
23085 -class PreviewSurfaceFlags:
23086 """ 23087 Type of behaviour modifying flags that can be passed to 23088 L{gwy_preview_surface_to_datafield}(). 23089 23090 @since: 2.46 23091 23092 @note: All the enumerated values are defined at the module level, I{not} the 23093 class level. The are just groupped by class here for easier orientation. 23094 23095 @cvar PREVIEW_SURFACE_DENSITY: Render a point density map instead of the data. 23096 @cvar PREVIEW_SURFACE_FILL: Make the data field as large as the specified resolutions at least in one dimension (it 23097 can be prevented in the other by different aspect ratio). 23098 """ 23099 pass
23100
23101 -class PlainToolChanged:
23102 """ 23103 The type of pending changes that accumulated during tool inactivity. 23104 23105 @note: All the enumerated values are defined at the module level, I{not} the 23106 class level. The are just groupped by class here for easier orientation. 23107 23108 @cvar PLAIN_TOOL_CHANGED_DATA: Channel data field was changed. 23109 @cvar PLAIN_TOOL_CHANGED_MASK: Mask data field was changed. 23110 @cvar PLAIN_TOOL_CHANGED_SHOW: Presentation data field was changed. 23111 @cvar PLAIN_TOOL_CHANGED_SELECTION: Selection was changed. 23112 @cvar PLAIN_TOOL_FINISHED_SELECTION: Selection was finished (that is emitted B{C{Selection}}::finished). 23113 """ 23114 pass
23115
23116 -class HoldSelectionFlags:
23117 """ 23118 Flags controlling the selection holding behaviour of tools. 23119 23120 Although any combination of flags is valid, this is mainly so that user's choice is not reset. For any holding to 23121 be done at all the B{C{HOLD_SELECTION_HOLD}} flag must be set. If it is unset then B{C{HOLD_SELECTION_OVERWRITE}} 23122 and B{C{HOLD_SELECTION_CLEAR}} do not matter. Similarly, for B{C{HOLD_SELECTION_CLEAR}} has any effect only if 23123 overwriting is enabled by setting B{C{HOLD_SELECTION_OVERWRITE}}. 23124 23125 @since: 2.63 23126 23127 @note: All the enumerated values are defined at the module level, I{not} the 23128 class level. The are just groupped by class here for easier orientation. 23129 23130 @cvar HOLD_SELECTION_HOLD: Selections are held (transferred to the new image). 23131 @cvar HOLD_SELECTION_OVERWRITE: Existing selections on the new image is replaced. 23132 @cvar HOLD_SELECTION_CLEAR: If the current image has no selection the selection on the new image is cleared. 23133 """ 23134 pass
23135
23136 -class HelpFlags:
23137 """ 23138 Flags controlling help setup and behaviour. 23139 23140 @since: 2.38 23141 23142 @note: All the enumerated values are defined at the module level, I{not} the 23143 class level. The are just groupped by class here for easier orientation. 23144 23145 @cvar HELP_DEFAULT: No flags, the default behaviour. 23146 @cvar HELP_NO_BUTTON: Do not add a Help button, even to windows that are dialogs. 23147 """ 23148 pass
23149
23150 -class AppLoggingFlags:
23151 """ 23152 Flags controlling where program messages are written. 23153 23154 @since: 2.45 23155 23156 @note: All the enumerated values are defined at the module level, I{not} the 23157 class level. The are just groupped by class here for easier orientation. 23158 23159 @cvar APP_LOGGING_TO_FILE: Messages go to a log file, either gwyddion.log or 23160 given by environment variable GWYDDION_LOGFILE. 23161 @cvar APP_LOGGING_TO_CONSOLE: Messages go to standard output and standard 23162 error depending on message type (emulating 23163 where GLib sends them). 23164 """ 23165 pass
23166 23194
23195 -class AppSettingsError:
23196 """ 23197 Error codes returned by application settings functions. 23198 23199 @note: All the enumerated values are defined at the module level, I{not} the 23200 class level. The are just groupped by class here for easier orientation. 23201 23202 @cvar APP_SETTINGS_ERROR_FILE: Settings file is not readable or writable. 23203 @cvar APP_SETTINGS_ERROR_CORRUPT: Settings file contents is corrupted. 23204 @cvar APP_SETTINGS_ERROR_CFGDIR: User configuration directory is not readable or writable or it does not exist and 23205 its creation failed. 23206 @cvar APP_SETTINGS_ERROR_EMPTY: Settings file is empty (Since 2.45). This was previously reported as 23207 B{C{APP_SETTINGS_ERROR_CORRUPT}} but empty settings files can be overwritten without 23208 losing anything. 23209 """ 23210 pass
23211
23212 -class DataError:
23213 """ 23214 Type of data validation errors. 23215 23216 @since: 2.9 23217 23218 @note: All the enumerated values are defined at the module level, I{not} the 23219 class level. The are just groupped by class here for easier orientation. 23220 23221 @cvar DATA_ERROR_KEY_FORMAT: Key format is invalid (e.g. does not start with B{C{CONTAINER_PATHSEP}}). 23222 @cvar DATA_ERROR_KEY_CHARACTERS: Key contains unprintable characters or characters not representable in ASCII. 23223 @cvar DATA_ERROR_KEY_UNKNOWN: Key does not correspond to any data item known to this version of Gwyddion. 23224 @cvar DATA_ERROR_KEY_ID: Key corresponds to a data item with bogus id number. 23225 @cvar DATA_ERROR_ITEM_TYPE: Wrong item type (for instance an integer at key C{"/0/data"}). 23226 @cvar DATA_ERROR_NON_UTF8_STRING: String value is not valid UTF-8. 23227 @cvar DATA_ERROR_REF_COUNT: Reference count is higher than 1. 23228 @cvar DATA_ERROR_STRAY_SECONDARY_DATA: Secondary data item (e.g. mask, selection or visibility) without 23229 a corresponding valid primary data item. 23230 """ 23231 pass
23232
23233 -class DataValidateFlags:
23234 """ 23235 Flags controlling L{gwy_data_validate}() behaviour. 23236 23237 Note passing B{C{DATA_VALIDATE_NO_REPORT}} is allowed only if B{C{DATA_VALIDATE_CORRECT}} is present too. 23238 23239 @since: 2.9 23240 23241 @note: All the enumerated values are defined at the module level, I{not} the 23242 class level. The are just groupped by class here for easier orientation. 23243 23244 @cvar DATA_VALIDATE_UNKNOWN: Report all unknown keys as B{C{DATA_ERROR_KEY_UNKNOWN}} errors. Note while a data item 23245 unknown to the current version of Gwyddion can come from a newer version therefore it 23246 can be in certain sense valid. 23247 @cvar DATA_VALIDATE_REF_COUNT: Report all object items with reference count higher than 1 as 23248 B{C{DATA_ERROR_REF_COUNT}} errors. Obviously this makes sense only with `fresh' data 23249 containers. 23250 @cvar DATA_VALIDATE_ALL: All above flags combined. 23251 @cvar DATA_VALIDATE_CORRECT: Attempt to correct problems. 23252 @cvar DATA_VALIDATE_NO_REPORT: Do not report problems. 23253 """ 23254 pass
23255
23256 -class CWT2DWaveletType:
23257 """ 23258 @note: All the enumerated values are defined at the module level, I{not} the 23259 class level. The are just groupped by class here for easier orientation. 23260 23261 @cvar 2DCWT_GAUSS: 23262 @cvar 2DCWT_HAT: 23263 """ 23264 pass
23265