Loading 2_offset_hierarchical_struct/parse_iv_data.py +3 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,8 @@ import mechnet as mn import numpy as np import matplotlib.pyplot as plt import h5py sys.path.append("/home/lpyka/hierarchical_interface") from lib.push_data import push_data_to, push_ivcat def get_iv_data(filepath): grouppaths = mn.datman.bundle_all_sub_groups(filepath, ["simulationdata"]) Loading Loading @@ -38,4 +40,5 @@ if __name__ == "__main__": iv_data = get_iv_data(full_path) #plot_iv_curve(iv_data) append_data_to_txt(iv_data, seed) push_ivcat(base_path) print("cutoff prev") No newline at end of file lib/push_data.py +19 −1 Original line number Diff line number Diff line Loading @@ -28,3 +28,21 @@ def push_data_to(destination): write_metadata() hash_file_name = "git_hash.txt" shutil.move(hash_file_name, f'{destination_dir}/{hash_file_name}') def push_ivcat(destination): current_path = Path(os.getcwd()) destination_dir = Path(destination) if not destination_dir.exists(): raise AssertionError(f"dir {destination} not found") ivcat_filename = "ivcat.txt" cpp_script_filename = "fs_strength" shutil.move(ivcat_filename, f'{destination_dir}/{ivcat_filename}') shutil.move(cpp_script_filename, f'{destination_dir}/{cpp_script_filename}') def copy_py_file_to(destination): current_path = Path(os.getcwd()) destination_dir = Path(destination) if not destination_dir.exists(): raise AssertionError(f"dir {destination} not found") run_file = "hierarchical_offset.py" shutil.copy(run_file, destination_dir) Loading
2_offset_hierarchical_struct/parse_iv_data.py +3 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,8 @@ import mechnet as mn import numpy as np import matplotlib.pyplot as plt import h5py sys.path.append("/home/lpyka/hierarchical_interface") from lib.push_data import push_data_to, push_ivcat def get_iv_data(filepath): grouppaths = mn.datman.bundle_all_sub_groups(filepath, ["simulationdata"]) Loading Loading @@ -38,4 +40,5 @@ if __name__ == "__main__": iv_data = get_iv_data(full_path) #plot_iv_curve(iv_data) append_data_to_txt(iv_data, seed) push_ivcat(base_path) print("cutoff prev") No newline at end of file
lib/push_data.py +19 −1 Original line number Diff line number Diff line Loading @@ -28,3 +28,21 @@ def push_data_to(destination): write_metadata() hash_file_name = "git_hash.txt" shutil.move(hash_file_name, f'{destination_dir}/{hash_file_name}') def push_ivcat(destination): current_path = Path(os.getcwd()) destination_dir = Path(destination) if not destination_dir.exists(): raise AssertionError(f"dir {destination} not found") ivcat_filename = "ivcat.txt" cpp_script_filename = "fs_strength" shutil.move(ivcat_filename, f'{destination_dir}/{ivcat_filename}') shutil.move(cpp_script_filename, f'{destination_dir}/{cpp_script_filename}') def copy_py_file_to(destination): current_path = Path(os.getcwd()) destination_dir = Path(destination) if not destination_dir.exists(): raise AssertionError(f"dir {destination} not found") run_file = "hierarchical_offset.py" shutil.copy(run_file, destination_dir)