Skip to content

Feature: Downloading spectra of individual conformers #236

Open
@danielhollas

Description

@danielhollas

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.

# TODO: Download multiple spectra if available

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))

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or enhancement

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions