Skip to content

Conversation

@canavarrete01
Copy link
Contributor

Short description: Moved from secret simple, two notebooks for querying the database and another for visualizing spectra and data.

@canavarrete01
Copy link
Contributor Author

@kelle QueryDemo.ipynb needs comments / notes on how to further improve the notebook!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR creates demonstration notebooks for the SIMPLE database project, specifically adding a visualization demo notebook that shows users how to visualize spectra and data from the database.

  • Adds a new Jupyter notebook focused on visualizing spectra with SIMPLE
  • Provides a structured template for demonstration purposes with placeholder sections
  • Includes necessary imports for spectral data visualization and database querying

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

QueryDemo.ipynb Outdated
Comment on lines 2842 to 3140
" ('CFBDS J022644.65-062522.0', 36.686, -6.4228, None, '2000', None, 'Albe11', None, None),\n",
" ('2MASS J05574102-1333264', 89.420954, -13.557334, None, None, None, 'Cruz18', None, 'not M'),\n",
" ('2MASS J09393548-2448279', 144.897834, -24.80775, None, None, '0939-2448', 'Tinn05.2326', None, None),\n",
" ('2MASS J22590210+1156035', 344.758944, 11.933929, None, None, None, 'Zhan18.2054', None, 'Discovery reference from t
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not have this cell. You've shown how to use the Astrodbkit query methods and how to use sql_query, but now you're going into low-level API for SQLAlchemy itself. While useful, it probably doesn't belong in a notebook demonstrating quick/useful queries of SIMPLE.

QueryDemo.ipynb Outdated
" ('CFBDS J022644.65-062522.0', 36.686, -6.4228, None, '2000', None, 'Albe11', None, None),\n",
" ('2MASS J05574102-1333264', 89.420954, -13.557334, None, None, None, 'Cruz18', None, 'not M'),\n",
" ('2MASS J09393548-2448279', 144.897834, -24.80775, None, None, '0939-2448', 'Tinn05.2326', None, None),\n",
" ('2MASS J22590210+1156035', 344.758944, 11.933929, None, None, None, 'Zhan18.2054', None, 'Discovery reference from t
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for this cell and the rest of the notebook. This is not a SQLAlchemy notebook, it is a SIMPLE notebook. It's also not a visualization notebook. I recommend removing the cells with the low-level sqlalchemy aspects and moving the visualization stuff to the other notebook (I haven't taken a look at that one yet).

@canavarrete01
Copy link
Contributor Author

Notes from SIMPLE Coworking:

  1. Simplify the query notebook
  2. Fix typos in markdown
  3. Add further markdown information instead of print() statements
  4. Use specutils/astropy/astrodb-utils as much as possible to avoid making the notebook too pandas-y and non-intuitive
  5. Stop after three visualization examples (plot one object's single spectra, plot various spectra from the single source, plot a spectra from various sources)

@canavarrete01 canavarrete01 marked this pull request as ready for review September 5, 2025 18:25
Copy link
Collaborator

@kelle kelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the QueryDemo notebook should be shorter. Move everything after "Have a more complex query? Let use astrodb_utils.sql_query to run a SQL query directly" to a separate notebook.

Copy link
Collaborator

@kelle kelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new flow in the spectra notebook is good! It should stop after the nicely formatted figure with the three spectra. Everything after "Now lets try plotting spectra from multiple sources using a couple different metrics we can decide on within SIMPLE" should go into a separate notebook.

Copy link
Collaborator

@kelle kelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@canavarrete01 canavarrete01 merged commit 98492ec into SIMPLE-AstroDB:main Sep 16, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants