From 414afbc500944517c5669ef38353dabef24e3c7c Mon Sep 17 00:00:00 2001 From: dave <dave@dtu.dk> Date: Wed, 25 May 2016 13:54:05 +0200 Subject: [PATCH] prepost: optional prefix when saving SS H2 power curve --- wetb/prepost/h2_vs_hs2.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wetb/prepost/h2_vs_hs2.py b/wetb/prepost/h2_vs_hs2.py index 5f5b0b7..5f69fca 100644 --- a/wetb/prepost/h2_vs_hs2.py +++ b/wetb/prepost/h2_vs_hs2.py @@ -771,12 +771,12 @@ class MappingsH2HS2(object): def _body_structure_modes_hs(self, fname): self.body_freq_hs = hs2.results().load_cmb_df(fname) - def save(self, fpath): + def save(self, fpath, fname_prefix): """Save all the HAWC2 mappings created to fixed width text files similar to HAWCStab2. """ - fname = 'hawc2_ss_mean_power_curve.txt' + fname = '%shawc2_ss_mean_power_curve.txt' % fname_prefix tmp = self.pwr_h2_mean.copy() tmp.set_index('windspeed', inplace=True) tmp.index.name = 'windspeed' @@ -785,7 +785,7 @@ class MappingsH2HS2(object): np.savetxt(os.path.join(fpath, fname), tmp.to_records(), header=header, fmt='% 01.06e ') - fname = 'hawc2_ss_std_power_curve.txt' + fname = '%shawc2_ss_std_power_curve.txt' % fname_prefix tmp = self.pwr_h2_mean.copy() tmp.set_index('windspeed', inplace=True) tmp.index.name = 'windspeed' -- GitLab