pymast 0.0.6__py3-none-any.whl → 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pymast/__init__.py +31 -2
- pymast/fish_history.py +59 -6
- pymast/formatter.py +886 -548
- pymast/logger.py +58 -0
- pymast/naive_bayes.py +116 -9
- pymast/overlap_removal.py +2327 -490
- pymast/parsers.py +1111 -239
- pymast/predictors.py +302 -116
- pymast/radio_project.py +1382 -512
- pymast/validation.py +224 -0
- pymast-1.0.0.dist-info/METADATA +636 -0
- pymast-1.0.0.dist-info/RECORD +15 -0
- {pymast-0.0.6.dist-info → pymast-1.0.0.dist-info}/WHEEL +1 -1
- pymast/table_merge.py +0 -154
- pymast-0.0.6.dist-info/METADATA +0 -19
- pymast-0.0.6.dist-info/RECORD +0 -14
- {pymast-0.0.6.dist-info → pymast-1.0.0.dist-info/licenses}/LICENSE.txt +0 -0
- {pymast-0.0.6.dist-info → pymast-1.0.0.dist-info}/top_level.txt +0 -0
pymast/__init__.py
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
# Import the submodules first that have no dependencies
|
|
2
2
|
from .predictors import *
|
|
3
3
|
from .overlap_removal import *
|
|
4
|
-
from .table_merge import *
|
|
4
|
+
#from .table_merge import *
|
|
5
5
|
from .formatter import *
|
|
6
6
|
|
|
7
|
+
# Import utilities
|
|
8
|
+
from .logger import setup_logging, logger
|
|
9
|
+
from .validation import (
|
|
10
|
+
validate_tag_data,
|
|
11
|
+
validate_receiver_data,
|
|
12
|
+
validate_nodes_data,
|
|
13
|
+
validate_project_dir,
|
|
14
|
+
validate_file_exists,
|
|
15
|
+
ValidationError
|
|
16
|
+
)
|
|
17
|
+
|
|
7
18
|
# Import the naive_bayes submodule next
|
|
8
19
|
from .naive_bayes import *
|
|
9
20
|
|
|
@@ -14,8 +25,26 @@ from .overlap_removal import *
|
|
|
14
25
|
from .parsers import *
|
|
15
26
|
|
|
16
27
|
# Finally, import the radio_project class, which depends on parsers, predictor, and naive_bayes
|
|
17
|
-
|
|
18
28
|
from .radio_project import *
|
|
19
29
|
|
|
30
|
+
# Version
|
|
31
|
+
__version__ = '1.0.0'
|
|
32
|
+
|
|
33
|
+
# Define what's available when using "from pymast import *"
|
|
34
|
+
__all__ = [
|
|
35
|
+
'radio_project',
|
|
36
|
+
'bout',
|
|
37
|
+
'overlap_reduction',
|
|
38
|
+
'fish_history',
|
|
39
|
+
'setup_logging',
|
|
40
|
+
'logger',
|
|
41
|
+
'validate_tag_data',
|
|
42
|
+
'validate_receiver_data',
|
|
43
|
+
'validate_nodes_data',
|
|
44
|
+
'validate_project_dir',
|
|
45
|
+
'validate_file_exists',
|
|
46
|
+
'ValidationError',
|
|
47
|
+
]
|
|
48
|
+
|
|
20
49
|
|
|
21
50
|
|
pymast/fish_history.py
CHANGED
|
@@ -27,12 +27,65 @@ rcParams['font.size'] = 6
|
|
|
27
27
|
rcParams['font.family'] = 'serif'
|
|
28
28
|
|
|
29
29
|
class fish_history():
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
"""
|
|
31
|
+
Interactive visualization of fish movement histories through space and time.
|
|
32
|
+
|
|
33
|
+
Provides 3D matplotlib plots showing fish tracks through receiver network,
|
|
34
|
+
helping identify remaining false positives, overlapping detections, and
|
|
35
|
+
movement anomalies before statistical analysis.
|
|
36
|
+
|
|
37
|
+
Attributes
|
|
38
|
+
----------
|
|
39
|
+
filtered : bool
|
|
40
|
+
If True, shows only filtered detections (test==0)
|
|
41
|
+
nodes : pandas.DataFrame
|
|
42
|
+
Node locations (X, Y, Node, Seconds)
|
|
43
|
+
receivers : pandas.DataFrame
|
|
44
|
+
Receiver metadata (rec_id, node, coordinates)
|
|
45
|
+
detections : pandas.DataFrame
|
|
46
|
+
Fish detections (time_stamp, rec_id, freq_code, power, etc.)
|
|
47
|
+
current_fish : str
|
|
48
|
+
Currently displayed freq_code
|
|
49
|
+
|
|
50
|
+
Methods
|
|
51
|
+
-------
|
|
52
|
+
__init__(projectDB, filtered=True, overlapping=False, rec_list=None, filter_date=None)
|
|
53
|
+
Initialize connection to project database and load detections
|
|
54
|
+
|
|
55
|
+
change_fish(freq_code)
|
|
56
|
+
Switch to different fish and update plots
|
|
57
|
+
|
|
58
|
+
plot_3d_trajectory()
|
|
59
|
+
Create 3D visualization of fish movement through network
|
|
60
|
+
|
|
61
|
+
Notes
|
|
62
|
+
-----
|
|
63
|
+
- Uses matplotlib 3D plotting (Axes3D)
|
|
64
|
+
- X/Y coordinates from node locations
|
|
65
|
+
- Time on Z-axis for temporal progression
|
|
66
|
+
- Color-coded by receiver or detection quality
|
|
67
|
+
- Useful for quality control before final analysis
|
|
68
|
+
|
|
69
|
+
Examples
|
|
70
|
+
--------
|
|
71
|
+
>>> from pymast.fish_history import fish_history
|
|
72
|
+
>>>
|
|
73
|
+
>>> # Load fish tracks (filtered only)
|
|
74
|
+
>>> fh = fish_history(
|
|
75
|
+
... projectDB='C:/project/study.h5',
|
|
76
|
+
... filtered=True,
|
|
77
|
+
... overlapping=False
|
|
78
|
+
... )
|
|
79
|
+
>>>
|
|
80
|
+
>>> # View specific fish
|
|
81
|
+
>>> fh.change_fish('166.380 7')
|
|
82
|
+
>>> fh.plot_3d_trajectory()
|
|
83
|
+
|
|
84
|
+
See Also
|
|
85
|
+
--------
|
|
86
|
+
overlap_removal.visualize_overlaps : Overlap analysis plots
|
|
87
|
+
formatter.time_to_event : Statistical model output
|
|
88
|
+
"""
|
|
36
89
|
|
|
37
90
|
def __init__(self,projectDB,filtered = True, overlapping = False, rec_list = None,filter_date = None):
|
|
38
91
|
''' when this class is initialized, we connect to the project databae and
|