From b196c813faa5e16029bef113880fe638762a8a57 Mon Sep 17 00:00:00 2001 From: Phil Rosenfield Date: Mon, 5 Sep 2016 17:28:22 -0400 Subject: [PATCH] minor --- fileio/fileIO.py | 16 +--------------- preprocessing/ptcri_hb.py | 1 + tracks/track_set.py | 2 +- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/fileio/fileIO.py b/fileio/fileIO.py index e3a1fa5..b982ab2 100644 --- a/fileio/fileIO.py +++ b/fileio/fileIO.py @@ -10,20 +10,7 @@ __all__ = ['ensure_dir', 'ensure_file', 'get_files', 'load_input', 'get_dirs', 'load_eepdefs', 'replace_ext', 'tfm_indict', 'ts_indict', - 'find_ptcri', 'save_ptcri'] - - -def find_ptcri(prefix, ptcrifile_loc=os.getcwd()): - search_term = 'p2m*{0:s}*Y*dat'.format(prefix.split('Y')[0]) - ptcris = get_files(ptcrifile_loc, search_term) - print(search_term, ptcris) - try: - ptcri_file, = [p for p in ptcris if 'hb' not in p] - hbptcri_file, = [p for p in ptcris if 'hb' in p] - retv = [ptcri_file, hbptcri_file] - except: - retv = [] - return retv + 'save_ptcri'] def save_ptcri(line, loc=None, prefix=None): @@ -31,7 +18,6 @@ def save_ptcri(line, loc=None, prefix=None): import operator from ..eep.critical_point import Eep print('fileio.save_ptcri is broken.') - return loc == loc or os.getcwd() prefix = prefix or '' if len(prefix) > 0: diff --git a/preprocessing/ptcri_hb.py b/preprocessing/ptcri_hb.py index 00270cf..d8d6519 100644 --- a/preprocessing/ptcri_hb.py +++ b/preprocessing/ptcri_hb.py @@ -57,6 +57,7 @@ def format_ptcriHB(filename, nptcri=5): def main(argv): + """main function for format_ptcriHB""" parser = argparse.ArgumentParser( description="convert a dbert HB file to a data HB file") diff --git a/tracks/track_set.py b/tracks/track_set.py index 2af8d09..ded78c4 100644 --- a/tracks/track_set.py +++ b/tracks/track_set.py @@ -9,7 +9,7 @@ import pandas as pd import scipy -from ..fileio import get_files, get_dirs, ts_indict, find_ptcri +from ..fileio import get_files, get_dirs, ts_indict from ..utils import sort_dict, filename_data from .track import Track