# Path: pergola/parsers.py
# PATH = abspath(split(realpath(__file__))[0])
# def parse_num_range(string):
# def read_track_actions (tracks, track_action = "split_all"):
# def read_colors (path_color_file):
# 
# Path: pergola/jaaba_parsers.py
# def jaaba_scores_to_csv(input_file, name_file="JAABA_scores", mode="w", delimiter="\t", path_w=None, norm=False, data_type="a"):
# def jaaba_scores_to_intData(input_file, map_jaaba, name_file="JAABA_scores", delimiter="\t", norm=False, data_type="a"):
# def extract_jaaba_features(dir_perframe,  output="csv", map_jaaba=False, delimiter="\t", feature="velmag", path_w=""):


from pergola  import parsers
from pergola import jaaba_parsers
#!/usr/bin/env python

# from scipy.io  import loadmat
# from numpy     import hstack, ndenumerate#, mean, divide
# from os.path   import join, exists, abspath, split, realpath
# from pergola.mapping   import MappingInfo, check_path #del change
# from shutil    import copyfileobj
# from tempfile  import NamedTemporaryFile #del
# from pergola.intervals import IntData #del

# from mapping   import MappingInfo
# parsers.jaaba_features_to_intData(input_file='Users/jespinosa/JAABA_MAC_0.5.1/sampledata_v0.5/Chase1_TrpA_Rig1Plate15BowlA_20120404T141155/scores_chase.mat', 
#                             path_w='/Users/jespinosa/git/pergola/test', norm=True, data_type="chase")

# jaaba_features_to_intData(dir_perframe, map_jaaba,  delimiter="\t", feature="velmag", output="csv", path_w=""):
map_file_jaaba = "/Users/jespinosa/git/pergola/test/jaaba2pergola.txt"
 
jaaba_parsers.extract_jaaba_features(dir_perframe='/Users/jespinosa/JAABA_MAC_0.5.1/sampledata_v0.5/Chase1_TrpA_Rig1Plate15BowlA_20120404T141155/perframe/', map_jaaba="",
                               delimiter="\t", feature="velmag", output="csv", path_w='/Users/jespinosa/git/pergola/test')

# map_file_jaaba = "/Users/jespinosa/git/pergola/test/jaaba2pergola.txt"
# # int_data_jaaba = parsers.jaaba_scores_to_intData(input_file = input_jaaba_file, map_jaaba = map_file_jaaba, norm=True, data_type="chase")
# 

# Path: pergola/parsers.py
# PATH = abspath(split(realpath(__file__))[0])
# def parse_num_range(string):
# def read_track_actions (tracks, track_action = "split_all"):
# def read_colors (path_color_file):
# 
# Path: pergola/jaaba_parsers.py
# def jaaba_scores_to_csv(input_file, name_file="JAABA_scores", mode="w", delimiter="\t", path_w=None, norm=False, data_type="a"):
# def jaaba_scores_to_intData(input_file, map_jaaba, name_file="JAABA_scores", delimiter="\t", norm=False, data_type="a"):
# def extract_jaaba_features(dir_perframe,  output="csv", map_jaaba=False, delimiter="\t", feature="velmag", path_w=""):


# Path: test/extract_jaaba_features.py
from pergola  import parsers
from pergola import jaaba_parsers

#!/usr/bin/env python

# from scipy.io  import loadmat
# from numpy     import hstack, ndenumerate#, mean, divide
# from os.path   import join, exists, abspath, split, realpath
# from pergola.mapping   import MappingInfo, check_path #del change
# from shutil    import copyfileobj
# from tempfile  import NamedTemporaryFile #del
# from pergola.intervals import IntData #del

# from mapping   import MappingInfo
# parsers.jaaba_features_to_intData(input_file='Users/jespinosa/JAABA_MAC_0.5.1/sampledata_v0.5/Chase1_TrpA_Rig1Plate15BowlA_20120404T141155/scores_chase.mat', 
#                             path_w='/Users/jespinosa/git/pergola/test', norm=True, data_type="chase")

# jaaba_features_to_intData(dir_perframe, map_jaaba,  delimiter="\t", feature="velmag", output="csv", path_w=""):
map_file_jaaba = "/Users/jespinosa/git/pergola/test/jaaba2pergola.txt"
 
jaaba_parsers.extract_jaaba_features(dir_perframe='/Users/jespinosa/JAABA_MAC_0.5.1/sampledata_v0.5/Chase1_TrpA_Rig1Plate15BowlA_20120404T141155/perframe/', map_jaaba="",
                               delimiter="\t", feature="velmag", output="csv", path_w='/Users/jespinosa/git/pergola/test')

# map_file_jaaba = "/Users/jespinosa/git/pergola/test/jaaba2pergola.txt"
# # int_data_jaaba = parsers.jaaba_scores_to_intData(input_file = input_jaaba_file, map_jaaba = map_file_jaaba, norm=True, data_type="chase")
# 

int_data_jaaba = jaaba_parsers.extract_jaaba_features(dir_perframe='/Users/jespinosa/JAABA_MAC_0.5.1/sampledata_v0.5/Chase1_TrpA_Rig1Plate15BowlA_20120404T141155/perframe/', 