Maintenance will be performed on git.ligo.org, chat.ligo.org, containers.ligo.org, and docs.ligo.org on Tuesday 26 May 2020 starting at approximately 10am CDT. It is expected to take around 30 minutes and will involve a short period of downtime, around 5 minutes, towards the end of the maintenance period. Please address any questions, comments, or concerns to uwm-help@cgca.uwm.edu.

Commit 0984d25d authored by Phil Jones's avatar Phil Jones

Correct finesse3 testing for multiple axes.

parent d34f8be4
......@@ -86,19 +86,34 @@ def runkat(katfile):
try:
print('Assembling data for comparison against Finesse2')
outfile = [out.x1]
axes = []
i = 1
while True:
try:
axes.append(getattr(out, f"x{i}"))
i += 1
except ValueError:
break
outfile = [[] for ax in axes]
for idx in np.ndindex(out.shape):
for ax, val in enumerate(idx):
outfile[ax].append(axes[ax][val])
for idx, ax in enumerate(outfile):
outfile[idx] = np.array(ax)
data = []
for name, el in ifo.model.elements.items():
if isinstance(el, finesse.detectors.Detector):
outfile.append(out[name])
data.append(np.array(out[name]).flatten())
outfile.extend(data)
katdir=path.dirname(katfile)
katname=str(path.basename(katfile)).split('.')[0]
out_file = path.join(katdir,katname+'.out')
np.savetxt(out_file,np.array(outfile).T)
np.savetxt(out_file, np.array(outfile).T)
except Exception:
print('Unable load ouputs!? Has finesse.detectors.Detector changed?')
print('Unable to load outputs!? Has finesse.detectors.Detector changed?')
traceback.print_exc()
sys.exit(16)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment