Skip to content
Snippets Groups Projects
Commit 0ef25a9c authored by Sylvia Biscoveanu's avatar Sylvia Biscoveanu
Browse files

Add label to output file name with the frequency domain strain for each IFO.

parent 7eefa38f
No related branches found
No related tags found
No related merge requests found
......@@ -1580,17 +1580,20 @@ class Interferometer(object):
label: str
The name of the output files
"""
np.savetxt('{}/{}_frequency_domain_data.dat'.format(outdir, self.name),
if label is None:
filename_psd = '{}/{}_psd.dat'.format(outdir, self.name)
filename_data = '{}/{}_frequency_domain_data.dat'.format(outdir, self.name)
else:
filename_psd = '{}/{}_{}_psd.dat'.format(outdir, self.name, label)
filename_data = '{}/{}_{}_frequency_domain_data.dat'.format(outdir, self.name, label)
np.savetxt(filename_data,
np.array(
[self.frequency_array,
self.frequency_domain_strain.real,
self.frequency_domain_strain.imag]).T,
header='f real_h(f) imag_h(f)')
if label is None:
filename = '{}/{}_psd.dat'.format(outdir, self.name)
else:
filename = '{}/{}_{}_psd.dat'.format(outdir, self.name, label)
np.savetxt(filename,
np.savetxt(filename_psd,
np.array(
[self.frequency_array,
self.amplitude_spectral_density_array]).T,
......
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