Skip to content

Commit

Permalink
Fix post-processing and add __init__.py files
Browse files Browse the repository at this point in the history
  • Loading branch information
Bachibouzouk committed May 18, 2022
1 parent a2fd93e commit a402e17
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
Empty file added ramp/__init__.py
Empty file.
Empty file added ramp/core/__init__.py
Empty file.
Empty file added ramp/input_files/__init__.py
Empty file.
9 changes: 7 additions & 2 deletions ramp/post_process/post_process.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -*- coding: utf-8 -*-

#%% Import required libraries
import os.path

import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
Expand Down Expand Up @@ -64,6 +66,9 @@ def Profile_series_plot(stoch_profiles_series):

# Export Profiles

def export_series(stoch_profiles_series, j):
def export_series(stoch_profiles_series, j=None, fname=None):
series_frame = pd.DataFrame(stoch_profiles_series)
series_frame.to_csv('results/output_file_%d.csv' % (j))
if j is not None:
series_frame.to_csv('results/output_file_%d.csv' % (j))
if fname is not None:
series_frame.to_csv(f'results/output_file_{os.path.split(fname)[-1]}.csv')
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pandas
numpy
matplotlib

0 comments on commit a402e17

Please sign in to comment.