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 ...@@ -5,7 +5,7 @@ import sys, os
COL_TIMESTAMP=0 COL_TIMESTAMP=0
COL_TAG=7 COL_TAG=7
COL_INDIV=9 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(): def main():
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# output should be one huge table with all necessary fields for further processing/vizualization # 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 ... ?) # parse moonmap and skyglowdict from skyglow Project sources (submodule ... ?)
# #
...@@ -25,9 +25,7 @@ ...@@ -25,9 +25,7 @@
# * calc indices of data dependent on numThreads # * calc indices of data dependent on numThreads
# #
# 2. rewrite animalmerge for loops # 2. rewrite animalmerge for loops
# 3. Consider using Pandas, NumPy, Cython, Pypy, Koalas, ... # 3. Consider using Pandas, NumPy, Cython, Pypy, Koalas, inline C++/C/Bash, sql (SQLAlchemy)
# 4. inline C++/C/Bash
# 5. sql (SQLAlchemy)
# #
# how to profile to find bottlenecks? # how to profile to find bottlenecks?
# #
...@@ -42,10 +40,9 @@ ...@@ -42,10 +40,9 @@
# Block2: 15.9 - 13.10 # 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 pprint import pprint as pp
from datetime import datetime as dt from datetime import datetime as dt
import time
PROJ = "ecotron" PROJ = "ecotron"
# PROJ = "schrebatron" # PROJ = "schrebatron"
...@@ -138,7 +135,7 @@ moonMap = [ 1.409, ...@@ -138,7 +135,7 @@ moonMap = [ 1.409,
187, 187,
192.067, 192.067,
196.433, 196.433,
201.467, #42 > max-moon is 201.9mlx 201.467,
206.5, 206.5,
211.733, 211.733,
216.4, 216.4,
...@@ -297,7 +294,7 @@ class Data: ...@@ -297,7 +294,7 @@ class Data:
""" merge AnimalData into TrackData on TagID """ """ merge AnimalData into TrackData on TagID """
pp("merging animal data into track data (this might take a while)") 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=[] # ttags_not_found=[]
dflt=f'{DELIM}X{DELIM}X00{DELIM}0' dflt=f'{DELIM}X{DELIM}X00{DELIM}0'
...@@ -472,12 +469,12 @@ def main(): ...@@ -472,12 +469,12 @@ def main():
if __name__ == "__main__" : if __name__ == "__main__" :
if len(sys.argv) == 1: if len(sys.argv) == 1:
this = os.path.basename(__file__) 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' sys.exit(f' {this} <dir> - search for "skyglow.log"/"tags" and trackfiles in dir and write processed file to dir\n'
f'or\n {this} <indir> <outdir> - search files in <indir> and write to <outdir>') f'{this} <indir> <outdir> - search files in <indir> and write to <outdir>')
elif len(sys.argv) == 2: elif len(sys.argv) == 2:
INPUTDIR = sys.argv[1] INPUTDIR = sys.argv[1]
OUTPUTDIR = INPUTDIR OUTPUTDIR = INPUTDIR
elif len(sys.argv) >= 3: else:
INPUTDIR = sys.argv[1] INPUTDIR = sys.argv[1]
OUTPUTDIR = sys.argv[2] 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