add info files

This commit is contained in:
2024-05-24 17:31:52 +02:00
parent b3ba30ced6
commit 32c0a65c58
5 changed files with 58 additions and 8 deletions

View File

@@ -206,7 +206,10 @@ class Region(object):
return indices
def time_in_region(self, x, y, time, analysis_type=AnalysisType.Full):
"""Returns the entering and leaving times at which the animal entered and left a region. In case the animal was not observed after entering this region (for example when hidden in a tube) the leaving time is the maximum time entry.
"""Returns the entering and leaving times at which the animal entered
and left a region. In case the animal was not observed after entering
this region (for example when hidden in a tube) the leaving time is
the maximum time entry.
Parameters
----------
@@ -223,6 +226,7 @@ class Region(object):
-------
_type_
_description_
"""
indices = self.points_in_region(x, y, analysis_type)
if len(indices) == 0:

10
etrack/info.json Normal file
View File

@@ -0,0 +1,10 @@
{
"VERSION": "0.5.0",
"STATUS": "Release",
"RELEASE": "0.5.0 Release",
"AUTHOR": "Jan Grewe",
"COPYRIGHT": "2024, University of Tuebingen, Neuroethology, Jan Grewe",
"CONTACT": "jan.grewe@g-node.org",
"BRIEF": "Efish tracking helpers for handling tracking data.",
"HOMEPAGE": "https://github.com/G-Node/nixpy"
}

26
etrack/info.py Normal file
View File

@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# Copyright © 2024, Jan Grewe
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted under the terms of the BSD License. See
# LICENSE file in the root of the Project.
import os
import json
here = os.path.dirname(__file__)
with open(os.path.join(here, "info.json")) as infofile:
infodict = json.load(infofile)
VERSION = infodict["VERSION"]
STATUS = infodict["STATUS"]
RELEASE = infodict["RELEASE"]
AUTHOR = infodict["AUTHOR"]
COPYRIGHT = infodict["COPYRIGHT"]
CONTACT = infodict["CONTACT"]
BRIEF = infodict["BRIEF"]
HOMEPAGE = infodict["HOMEPAGE"]
~