Open
Description
Currently, the Download spectrum
button on the SpectrumWidget downloads a csv file that only contains total cross section.
We need to add cross-sections of individual conformers as well so that they can be plotted externally.
This should be implemented in the _prepare_payload()
method of the SpectrumWidget.
aiidalab-ispg/aiidalab_ispg/app/spectrum.py
Line 361 in 2c17cf9
The conformer spectra should be accessible with something like:
f = self.figure.get_figure()
y_conf = []
for conf_id in range(n_conformer):
label = f"conformer_{conf_id}"
line = f.select_one({"name": label})
y_conf.append(line.data_source.data["y"])
y_conf
array should then be added to the writerows()
call
writer.writerows(zip(x, y, *y_conf))