Skip to content
Snippets Groups Projects
Commit 414afbc5 authored by David Verelst's avatar David Verelst
Browse files

prepost: optional prefix when saving SS H2 power curve

parent bfccf6d2
No related branches found
No related tags found
No related merge requests found
...@@ -771,12 +771,12 @@ class MappingsH2HS2(object): ...@@ -771,12 +771,12 @@ class MappingsH2HS2(object):
def _body_structure_modes_hs(self, fname): def _body_structure_modes_hs(self, fname):
self.body_freq_hs = hs2.results().load_cmb_df(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 """Save all the HAWC2 mappings created to fixed width text files
similar to HAWCStab2. 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 = self.pwr_h2_mean.copy()
tmp.set_index('windspeed', inplace=True) tmp.set_index('windspeed', inplace=True)
tmp.index.name = 'windspeed' tmp.index.name = 'windspeed'
...@@ -785,7 +785,7 @@ class MappingsH2HS2(object): ...@@ -785,7 +785,7 @@ class MappingsH2HS2(object):
np.savetxt(os.path.join(fpath, fname), tmp.to_records(), header=header, np.savetxt(os.path.join(fpath, fname), tmp.to_records(), header=header,
fmt='% 01.06e ') 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 = self.pwr_h2_mean.copy()
tmp.set_index('windspeed', inplace=True) tmp.set_index('windspeed', inplace=True)
tmp.index.name = 'windspeed' tmp.index.name = 'windspeed'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment