Skip to content

Add instructions for how to use spectrum_plottable #496

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

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions documentation/Spectra.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Columns marked with an asterisk (*) may not be empty.
| *reference | Primary Reference | | String(30) | primary and foreign: Publications.reference |
| other_references | Other References | | String(100) | |

Relevant functions: `spectra.ingest_spectrum`, `spectra.spectrum_plottable`, `spectra.find_spectra`
Relevant functions: `spectra.ingest_spectrum`, `spectra.find_spectra`

If the spectrum provided has been modified from the author-provided one,
a link to the original spectrum can be provided in the `original_spectrum` column.
Expand All @@ -34,4 +34,15 @@ For example: `$ASTRODB_SPECTRA/infrared/filename.fits`
- Data based on data from multiple observation dates has 'Multiple observation dates'
indicated in the *comments* field.
One of the dates should be used for the *observation_date*.
- Spectra for companions should be associated with individual sources and not grouped with the primary source.
- Spectra for companions should be associated with individual sources and not grouped with the primary source.

# Check if spectra are plottable by the website
Use the [`check_spectrum_plottable`](https://astrodb-utils.readthedocs.io/en/latest/pages/using_existing_db/ingesting/ingesting_spectra.html#astrodb_utils.spectra.check_spectrum_plottable) function from `astrodb_utils`. The `matplotlib` package needs to be installed to display the spectrum using `show_plot=True`.
```Python
from astrodb_utils.spectra import check_spectrum_plottable
file = <path to file>
plottable = check_spectrum_plottable(file, show_plot=True)
print plottable
> True
```