pymast 0.0.2__tar.gz → 0.0.4__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.4}/PKG-INFO +1 -1
- {pymast-0.0.2 → pymast-0.0.4}/pymast/formatter.py +12 -8
- {pymast-0.0.2 → pymast-0.0.4}/pymast/parsers.py +10 -10
- {pymast-0.0.2 → pymast-0.0.4}/pymast.egg-info/PKG-INFO +1 -1
- {pymast-0.0.2 → pymast-0.0.4}/setup.py +1 -1
- {pymast-0.0.2 → pymast-0.0.4}/LICENSE.txt +0 -0
- {pymast-0.0.2 → pymast-0.0.4}/README.md +0 -0
- {pymast-0.0.2 → pymast-0.0.4}/pymast/__init__.py +0 -0
- {pymast-0.0.2 → pymast-0.0.4}/pymast/fish_history.py +0 -0
- {pymast-0.0.2 → pymast-0.0.4}/pymast/naive_bayes.py +0 -0
- {pymast-0.0.2 → pymast-0.0.4}/pymast/overlap_removal.py +0 -0
- {pymast-0.0.2 → pymast-0.0.4}/pymast/predictors.py +0 -0
- {pymast-0.0.2 → pymast-0.0.4}/pymast/radio_project.py +0 -0
- {pymast-0.0.2 → pymast-0.0.4}/pymast/table_merge.py +0 -0
- {pymast-0.0.2 → pymast-0.0.4}/pymast.egg-info/SOURCES.txt +0 -0
- {pymast-0.0.2 → pymast-0.0.4}/pymast.egg-info/dependency_links.txt +0 -0
- {pymast-0.0.2 → pymast-0.0.4}/pymast.egg-info/not-zip-safe +0 -0
- {pymast-0.0.2 → pymast-0.0.4}/pymast.egg-info/requires.txt +0 -0
- {pymast-0.0.2 → pymast-0.0.4}/pymast.egg-info/top_level.txt +0 -0
- {pymast-0.0.2 → pymast-0.0.4}/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']
|
|
@@ -79,7 +79,7 @@ def ares(file_name,
|
|
|
79
79
|
|
|
80
80
|
telem_dat = telem_dat.astype({'power':'float32',
|
|
81
81
|
'freq_code':'object',
|
|
82
|
-
'time_stamp':'datetime64',
|
|
82
|
+
'time_stamp':'datetime64[ns]',
|
|
83
83
|
'scan_time':'float32',
|
|
84
84
|
'channels':'int32',
|
|
85
85
|
'rec_type':'object',
|
|
@@ -175,7 +175,7 @@ def orion_import(file_name,
|
|
|
175
175
|
|
|
176
176
|
telem_dat = telem_dat.astype({'power':'float32',
|
|
177
177
|
'freq_code':'object',
|
|
178
|
-
'time_stamp':'datetime64',
|
|
178
|
+
'time_stamp':'datetime64[ns]',
|
|
179
179
|
'scan_time':'float32',
|
|
180
180
|
'channels':'int32',
|
|
181
181
|
'rec_type':'object',
|
|
@@ -293,7 +293,7 @@ def vr2_import(file_name,db_dir,study_tags, rec_id):
|
|
|
293
293
|
|
|
294
294
|
telem_dat = telem_dat.astype({'power':'float32',
|
|
295
295
|
'freq_code':'object',
|
|
296
|
-
'time_stamp':'datetime64',
|
|
296
|
+
'time_stamp':'datetime64[ns]',
|
|
297
297
|
'scan_time':'float32',
|
|
298
298
|
'channels':'int32',
|
|
299
299
|
'rec_type':'object',
|
|
@@ -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,
|
|
@@ -520,7 +520,7 @@ def srx1200(file_name,
|
|
|
520
520
|
|
|
521
521
|
telem_dat = telem_dat.astype({'power':'float32',
|
|
522
522
|
'freq_code':'object',
|
|
523
|
-
'time_stamp':'datetime64',
|
|
523
|
+
'time_stamp':'datetime64[ns]',
|
|
524
524
|
'scan_time':'int32',
|
|
525
525
|
'channels':'int32',
|
|
526
526
|
'rec_type':'object',
|
|
@@ -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,
|
|
@@ -596,7 +596,7 @@ def srx1200(file_name,
|
|
|
596
596
|
|
|
597
597
|
telem_dat = telem_dat.astype({'power':'float32',
|
|
598
598
|
'freq_code':'object',
|
|
599
|
-
'time_stamp':'datetime64',
|
|
599
|
+
'time_stamp':'datetime64[ns]',
|
|
600
600
|
'scan_time':'float32',
|
|
601
601
|
'channels':'int32',
|
|
602
602
|
'rec_type':'object',
|
|
@@ -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)
|
|
@@ -1129,7 +1129,7 @@ def srx600(file_name,
|
|
|
1129
1129
|
|
|
1130
1130
|
telem_dat_sub = telem_dat_sub.astype({'power':'float32',
|
|
1131
1131
|
'freq_code':'object',
|
|
1132
|
-
'time_stamp':'datetime64',
|
|
1132
|
+
'time_stamp':'datetime64[ns]',
|
|
1133
1133
|
'scan_time':'float32',
|
|
1134
1134
|
'channels':'int32',
|
|
1135
1135
|
'rec_type':'object',
|
|
@@ -1204,7 +1204,7 @@ def srx600(file_name,
|
|
|
1204
1204
|
|
|
1205
1205
|
telem_dat_sub = telem_dat_sub.astype({'power':'float32',
|
|
1206
1206
|
'freq_code':'object',
|
|
1207
|
-
'time_stamp':'datetime64',
|
|
1207
|
+
'time_stamp':'datetime64[ns]',
|
|
1208
1208
|
'scan_time':'float32',
|
|
1209
1209
|
'channels':'int32',
|
|
1210
1210
|
'rec_type':'object',
|
|
@@ -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.4',
|
|
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
|