pymast 0.0.2__tar.gz → 0.0.3__tar.gz
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-0.0.2 → pymast-0.0.3}/PKG-INFO +1 -1
- {pymast-0.0.2 → pymast-0.0.3}/pymast/formatter.py +12 -8
- {pymast-0.0.2 → pymast-0.0.3}/pymast/parsers.py +3 -3
- {pymast-0.0.2 → pymast-0.0.3}/pymast.egg-info/PKG-INFO +1 -1
- {pymast-0.0.2 → pymast-0.0.3}/setup.py +1 -1
- {pymast-0.0.2 → pymast-0.0.3}/LICENSE.txt +0 -0
- {pymast-0.0.2 → pymast-0.0.3}/README.md +0 -0
- {pymast-0.0.2 → pymast-0.0.3}/pymast/__init__.py +0 -0
- {pymast-0.0.2 → pymast-0.0.3}/pymast/fish_history.py +0 -0
- {pymast-0.0.2 → pymast-0.0.3}/pymast/naive_bayes.py +0 -0
- {pymast-0.0.2 → pymast-0.0.3}/pymast/overlap_removal.py +0 -0
- {pymast-0.0.2 → pymast-0.0.3}/pymast/predictors.py +0 -0
- {pymast-0.0.2 → pymast-0.0.3}/pymast/radio_project.py +0 -0
- {pymast-0.0.2 → pymast-0.0.3}/pymast/table_merge.py +0 -0
- {pymast-0.0.2 → pymast-0.0.3}/pymast.egg-info/SOURCES.txt +0 -0
- {pymast-0.0.2 → pymast-0.0.3}/pymast.egg-info/dependency_links.txt +0 -0
- {pymast-0.0.2 → pymast-0.0.3}/pymast.egg-info/not-zip-safe +0 -0
- {pymast-0.0.2 → pymast-0.0.3}/pymast.egg-info/requires.txt +0 -0
- {pymast-0.0.2 → pymast-0.0.3}/pymast.egg-info/top_level.txt +0 -0
- {pymast-0.0.2 → pymast-0.0.3}/setup.cfg +0 -0
|
@@ -43,15 +43,19 @@ class cjs_data_prep():
|
|
|
43
43
|
query_parts.append(f"rec_id == '{key}'")
|
|
44
44
|
qry = " & ".join(query_parts)
|
|
45
45
|
|
|
46
|
-
recap_data = pd.read_hdf(project.db,
|
|
47
|
-
'recaptures'
|
|
48
|
-
where = qry)
|
|
46
|
+
self.recap_data = pd.read_hdf(project.db,
|
|
47
|
+
'recaptures')#,
|
|
48
|
+
#where = qry)
|
|
49
49
|
|
|
50
|
-
self.recap_data.set_index('freq_code', inplace = True)
|
|
51
|
-
project.tags.
|
|
52
|
-
self.recap_data = pd.merge(recap_data,
|
|
50
|
+
#self.recap_data.set_index('freq_code', inplace = True)
|
|
51
|
+
project.tags.reset_index('freq_code', inplace = True)
|
|
52
|
+
self.recap_data = pd.merge(self.recap_data,
|
|
53
|
+
project.tags,
|
|
54
|
+
left_on = 'freq_code',
|
|
55
|
+
right_on = 'freq_code',
|
|
56
|
+
how = 'left')
|
|
53
57
|
self.recap_data.reset_index(drop = False, inplace = True)
|
|
54
|
-
project.tags.reset_index(drop = False, inplace = True)
|
|
58
|
+
#project.tags.reset_index(drop = False, inplace = True)
|
|
55
59
|
|
|
56
60
|
# filter out tag data we don't want mucking up our staistical model
|
|
57
61
|
if species != None:
|
|
@@ -102,7 +106,7 @@ class cjs_data_prep():
|
|
|
102
106
|
|
|
103
107
|
if fish not in start_times.index.values:
|
|
104
108
|
# fish never made it to the initial state
|
|
105
|
-
self.
|
|
109
|
+
self.recap_data.drop(self.recap_data[self.recap_data.freq_code == fish].index, inplace = True)
|
|
106
110
|
else:
|
|
107
111
|
# fish arrived at the initial state but their may be recaptures before arrival at initial state
|
|
108
112
|
t = start_times.at[fish,'first_recapture']
|
|
@@ -495,7 +495,7 @@ def srx1200(file_name,
|
|
|
495
495
|
# format frequency code
|
|
496
496
|
telem_dat['FreqNo'] = telem_dat['Freq [MHz]'].apply(lambda x: f"{x:.3f}" )
|
|
497
497
|
telem_dat = telem_dat[telem_dat['Tag/BPM'] != 999]
|
|
498
|
-
telem_dat['freq_code'] = telem_dat['FreqNo'] + ' ' + telem_dat['Tag/BPM'].astype(
|
|
498
|
+
telem_dat['freq_code'] = telem_dat['FreqNo'] + ' ' + telem_dat['Tag/BPM'].astype(str)
|
|
499
499
|
|
|
500
500
|
# calculate
|
|
501
501
|
telem_dat['noise_ratio'] = predictors.noise_ratio(600,
|
|
@@ -572,7 +572,7 @@ def srx1200(file_name,
|
|
|
572
572
|
telem_dat['FreqNo'] = telem_dat['Freq [MHz]'].apply(lambda x: f"{x:.3f}" )
|
|
573
573
|
telem_dat = telem_dat[telem_dat['TagID/BPM'] != 999]
|
|
574
574
|
|
|
575
|
-
telem_dat['freq_code'] = telem_dat['FreqNo'] + ' ' + telem_dat['TagID/BPM'].astype(
|
|
575
|
+
telem_dat['freq_code'] = telem_dat['FreqNo'] + ' ' + telem_dat['TagID/BPM'].astype(str)
|
|
576
576
|
|
|
577
577
|
# calculate
|
|
578
578
|
telem_dat['noise_ratio'] = predictors.noise_ratio(600,
|
|
@@ -741,7 +741,7 @@ def srx800(file_name,
|
|
|
741
741
|
split = setup_df['change_date'].str.split(' ', expand=True)
|
|
742
742
|
setup_df['day0'] = np.repeat(pd.to_datetime("1900-01-01"),len(setup_df))
|
|
743
743
|
setup_df['Date'] = setup_df['day0'] + pd.to_timedelta(split[1].astype(int), unit='d')
|
|
744
|
-
setup_df['change_date'] = setup_df.Date.astype(
|
|
744
|
+
setup_df['change_date'] = setup_df.Date.astype(str) + ' ' + split[2]
|
|
745
745
|
|
|
746
746
|
|
|
747
747
|
setup_df['change_date'] = pd.to_datetime(setup_df.change_date)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from setuptools import setup
|
|
2
2
|
|
|
3
3
|
setup(name = 'pymast',
|
|
4
|
-
version = '0.0.
|
|
4
|
+
version = '0.0.3',
|
|
5
5
|
description = '''Movement Analysis Software for Telemetry (MAST) for
|
|
6
6
|
use in removing false positive and overlap detections from radio telemetry
|
|
7
7
|
projects and assessing 1D movement patterns.''',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|