Documentation for Box.py
¶
Box
¶
Note: this module is still under development and might change significantly.
ArrayGrid
¶
ArrayGrid(min_rt, max_rt, rt_box_size, min_mz, max_mz, mz_box_size)
Bases: Grid
A dense, lossy implementation of the grid.
Source code in vimms/Box.py
348 349 350 351 352 353 354 355 356 |
|
BoxExact
¶
Bases: BoxGeometry
splitting_intensity_non_overlap
staticmethod
¶
splitting_intensity_non_overlap(
box, other_boxes, current_intensity, scoring_params
)
Will give nonsense results if other_boxes overlap each other.
Source code in vimms/Box.py
759 760 761 762 763 764 765 766 767 768 769 |
|
BoxGeometry
¶
Describes the interface for an abstract class which can do geometric operations on points, intervals and rectangles. Different subclasses use different data structures, and hence the choice of data structure matters for performance.
BoxLineSweeper
¶
BoxLineSweeper()
Bases: BoxExact
Source code in vimms/Box.py
966 967 968 |
|
non_overlap
¶
non_overlap(box)
NB: This won't work if the boxes are capable of moving between time updates.
Source code in vimms/Box.py
991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 |
|
DictGrid
¶
DictGrid(min_rt, max_rt, rt_box_size, min_mz, max_mz, mz_box_size)
Bases: Grid
A sparse, lossless implementation of the grid.
Source code in vimms/Box.py
348 349 350 351 352 353 354 355 356 |
|
GenericBox
¶
GenericBox(
x1,
x2,
y1,
y2,
parents=None,
min_xwidth=0,
min_ywidth=0,
intensity=0,
id=None,
roi=None,
round_digits=8,
)
Bases: Box
Makes no particular assumptions about bounding boxes.
Source code in vimms/Box.py
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
|
non_overlap_split
¶
non_overlap_split(other_box)
Finds 1 to 4 boxes describing the polygon of area of this box not overlapped by other_box. If one box is found, crops this box to dimensions of that box, and returns None. Otherwise, returns list of 2 to 4 boxes. Number of boxes found is equal to number of edges overlapping area does NOT share with this box.
Source code in vimms/Box.py
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 |
|
Grid
¶
Grid(min_rt, max_rt, rt_box_size, min_mz, max_mz, mz_box_size)
Partitions a 2D space into a number of rectangles of fixed size for faster lookup. If a query object and a saved object touch the same rectangle, then the saved object should be factored into the query.
Source code in vimms/Box.py
348 349 350 351 352 353 354 355 356 |
|
LocatorGrid
¶
LocatorGrid(min_rt, max_rt, rt_box_size, min_mz, max_mz, mz_box_size)
Bases: Grid
A dense, lossless implementation of the grid.
Source code in vimms/Box.py
348 349 350 351 352 353 354 355 356 |
|