Skip to content
Snippets Groups Projects
Commit 84d08f31 authored by am0ebe's avatar am0ebe
Browse files

peanutz

parent 388cd961
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ import sys, os
COL_TIMESTAMP=0
COL_TAG=7
COL_INDIV=9
HEADER="#timestamp, milliseconds, date, time, unit, x, y, tagID, species, speciesnumber, weight_without_tag[mg], moon_real[mLux], moon_eco[mLux], skyglow[Lux])\n"
HEADER="#timestamp, milliseconds, date, time, unit, x, y, tagID, species, speciesnumber, weight_without_tag_mg, moon_real_mLux, moon_eco_mLux, skyglow_Lux\n"
def main():
......
......@@ -3,7 +3,7 @@
# output should be one huge table with all necessary fields for further processing/vizualization
#
############################
# TODO *most important
# TODO
############################
# parse moonmap and skyglowdict from skyglow Project sources (submodule ... ?)
#
......@@ -25,9 +25,7 @@
# * calc indices of data dependent on numThreads
#
# 2. rewrite animalmerge for loops
# 3. Consider using Pandas, NumPy, Cython, Pypy, Koalas, ...
# 4. inline C++/C/Bash
# 5. sql (SQLAlchemy)
# 3. Consider using Pandas, NumPy, Cython, Pypy, Koalas, inline C++/C/Bash, sql (SQLAlchemy)
#
# how to profile to find bottlenecks?
#
......@@ -42,10 +40,9 @@
# Block2: 15.9 - 13.10
#
import sys, getopt, os, re, datetime, string
import sys, getopt, os, re, datetime, string, time
from pprint import pprint as pp
from datetime import datetime as dt
import time
PROJ = "ecotron"
# PROJ = "schrebatron"
......@@ -138,7 +135,7 @@ moonMap = [ 1.409,
187,
192.067,
196.433,
201.467, #42 > max-moon is 201.9mlx
201.467,
206.5,
211.733,
216.4,
......@@ -297,7 +294,7 @@ class Data:
""" merge AnimalData into TrackData on TagID """
pp("merging animal data into track data (this might take a while)")
#TODO SPEED UP!!! 8Mio lines take 16Minutes... 32mins
#TODO SPEED UP!!!
# ttags_not_found=[]
dflt=f'{DELIM}X{DELIM}X00{DELIM}0'
......@@ -472,12 +469,12 @@ def main():
if __name__ == "__main__" :
if len(sys.argv) == 1:
this = os.path.basename(__file__)
sys.exit(f' {this} <dir> - search for "skyglow.log"/"tags" and trackfiles in dir and write processed file to dir'
f'or\n {this} <indir> <outdir> - search files in <indir> and write to <outdir>')
sys.exit(f' {this} <dir> - search for "skyglow.log"/"tags" and trackfiles in dir and write processed file to dir\n'
f'{this} <indir> <outdir> - search files in <indir> and write to <outdir>')
elif len(sys.argv) == 2:
INPUTDIR = sys.argv[1]
OUTPUTDIR = INPUTDIR
elif len(sys.argv) >= 3:
else:
INPUTDIR = sys.argv[1]
OUTPUTDIR = sys.argv[2]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment