Esempio n. 1
0
def main():

    args = runlibs_2d.parse_args()
    im_name = IM_NAME
    run_script = os.path.join(SCRIPT_LOCATION, "Run_script.tcl")

    runlibs_2d.main(args, im_name, run_script)
Esempio n. 2
0
        value_dict[recorder_name] = im_value
    value_dict = {component: value_dict}
    result_df = pd.DataFrame.from_dict(value_dict, orient="index")
    result_df.index.name = "component"
    cols = list(result_df.columns)
    cols.sort()
    #    if os.path.isfile(im_csv_fname):
    #        print_header = False
    # result_df = result_df.append(value_dict, ignore_index=True)
    # print(result_df)
    result_df.to_csv(im_csv_fname, header=print_header, columns=cols)


def read_out_file(file, success=True):
    if success:
        with open(file) as f:

            lines = f.readlines()

            value = lines[-1].split()[1]

            return value
    else:
        return float("NaN")


if __name__ == "__main__":

    args = runlibs_2d.parse_args()
    main(args.comp_000, args.comp_090, args.output_dir, args.OpenSees_path)