Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Downloading spectra of individual conformers #236

Open
danielhollas opened this issue Mar 13, 2024 · 0 comments
Open

Feature: Downloading spectra of individual conformers #236

danielhollas opened this issue Mar 13, 2024 · 0 comments
Labels
feature New feature or enhancement
Milestone

Comments

@danielhollas
Copy link
Member

danielhollas commented Mar 13, 2024

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))
@danielhollas danielhollas added the Enhancement Improvements to existing functionality label Mar 13, 2024
@danielhollas danielhollas added this to the v0.2.0 milestone Mar 13, 2024
@danielhollas danielhollas added feature New feature or enhancement and removed Enhancement Improvements to existing functionality labels Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant