Commit d5a80757 authored by Alex Nunes's avatar Alex Nunes

Merge branch 'hotfix' into 'master'

Fixed bug in compress_detections

See merge request otndc/resonate!20
parents a3da48d2 e114e04c
......@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [1.0.3]
### Fixed
- Correct latitudes and longitudes are now coming back from `compressed_detections `
### Changed
- All analysis and documentation now uses seconds and not minutes as a timedelta unit
## [1.0.2]
### Changed
......
package:
name: resonate
version: "1.0.2"
version: "1.0.3"
source:
git_rev: master
......
......@@ -76,9 +76,9 @@ copyright = u'2017 Ocean Tracking Network. All Rights Reserved.'
# built documents.
#
# The short X.Y version.
version = 'v1.0.2'
version = 'v1.0.3'
# The full version, including alpha/beta/rc tags.
release = 'v1.0.2'
release = 'v1.0.3'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
__author__ = "Alex Nunes"
__credits__ = ["Alex Nunes", "Jon Pye", "Brian Jones", "Marta Mihoff"]
__license__ = "GPL"
__version__ = "1.0.2"
__version__ = "1.0.3"
__maintainer__ = "Alex Nunes"
__email__ = "anunes@dal.ca"
__status__ = "Production"
......@@ -21,7 +21,7 @@ def compress_detections(detections, timefilter=3600):
['datecollected', 'catalognumber', 'unqdetecid', 'latitude', 'longitude'])
if mandatory_columns.issubset(detections.columns):
stations = detections.groupby('catalognumber').agg(
stations = detections.groupby('station').agg(
'mean')[['latitude', 'longitude']].reset_index()
# Get unique list of animals (not tags), set indices to respect animal and date of detections
......@@ -70,7 +70,7 @@ def compress_detections(detections, timefilter=3600):
out_df = out_df[['catalognumber', 'station', 'seq_num']].drop_duplicates(
).merge(stat_df, on=['catalognumber', 'seq_num'])
out_df = out_df.merge(stations, on='catalognumber')
out_df = out_df.merge(stations, on='station')
return out_df
else:
......
......@@ -12,7 +12,7 @@ with open('LICENSE') as f:
setup(
name='resonATe',
version='1.0.2',
version='1.0.3',
description='resonate data analysis package',
long_description=readme,
author='Alex Nunes',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment