-We can either search by bibcode (1970MmRAS..73..125E) or "Eichhorn" to get the access_urls that will allow us to work with the data.
+We can either search by bibcode (1970MmRAS..73..125E) or "Eichhorn" to get the access_urls that will allow us to work with the data.
-Before this step, if may help to see the names of the fields available to use. Notice the following fields:
+Before this step, if may help to see the names of the fields available to use. Notice the following fields:
-"source_value" contains the bibcode information that we want; "creator_seq" lists the authors;
+"source_value" contains the bibcode information that we want; "creator_seq" lists the authors;
-and
+and
-"access_url" provides the url from where the data can be accessed.
+"access_url" provides the url from where the data can be accessed.
```{code-cell} ipython3
## You already have this from above:
-# tap_services = registry.search(servicetype='tap', keywords=['star pleiades'],
+# tap_services = registry.search(servicetype='tap', keywords=['star pleiades'],
# ucd = ['phot.mag%'], includeaux=True)
print(tap_services.fieldnames)
```
-First, Try using bibcode:
+First, Try using bibcode:
```{code-cell} ipython3
bibcode = '1970MmRAS..73..125E' # Eichhorn
@@ -207,11 +207,11 @@ for s in tap_services:
if bibcode in s['source_value']:
myidx=idx
print(f"{s.short_name}, {s.source_value}, {s.access_url}")
- break
-# Note that using the to_table() lets you search the result
+ break
+# Note that using the to_table() lets you search the result
# easily using all columns. But in the end, you want to get
# back not an astropy table row, which you cannot use, but the
-# original RegistryResult that has the callable TAP service.
+# original RegistryResult that has the callable TAP service.
myTAP=tap_services[myidx]
```
@@ -219,42 +219,40 @@ Note that the URL is a generic TAP url for Vizier. All of its tables can be acc
+++
-Next, try using Author name:
+Next, try using Author name:
```{code-cell} ipython3
:tags: [output_scroll]
author = 'Eichhorn'
-for record in tap_services:
+for record in tap_services:
names=record.creators
- if 'Eichhorn' in names[0]:
+ if 'Eichhorn' in names[0]:
print("For %s: " %record.short_name)
- print(" Access URL: %s" %record['access_urls'][0])
+ print(" Access URL: %s" %record['access_urls'][0])
print(" Reference URL: %s" %record.reference_url)
```
-In the code above, the record is a Registry Resource. You can access the attribute, "creators", from the resource, which is relevant for our example here since this is a direct way to get the author names. The other attributes, "access_url" and "reference_url", provides two types of URLs. The former can be used to access the service resource (as described above) and the latter points to a human-readable document describing this resource.
+In the code above, the record is a Registry Resource. You can access the attribute, "creators", from the resource, which is relevant for our example here since this is a direct way to get the author names. The other attributes, "access_url" and "reference_url", provides two types of URLs. The former can be used to access the service resource (as described above) and the latter points to a human-readable document describing this resource.
If you click on the Reference URL links, you can find the abstract, Readme file, Vizier table, and much more information associated with this catalog.
-Additional information about PyVO Registry Resource and its attributes is available from this page.
-
+Additional information about PyVO Registry Resource and its attributes is available from this page.
***
+++
-These examples provide a few ways to access the information of interest.
+These examples provide a few ways to access the information of interest.
-Below are a few other ways to see what the tap_service table contains.
+Below are a few other ways to see what the tap_service table contains.
-1. To view the column information: tap_services.to_table().columns() shows the metadata contained in the tap service. We will reference some of this columns below as we try to find the appropriate table.
+1. To view the column information: tap_services.to_table().columns() shows the metadata contained in the tap service. We will reference some of this columns below as we try to find the appropriate table.
-2. tap_services[index].describe(): The table with the tap_services output has, in our case, 83 tables listed and each includes metadata containing some human readable description. You can get the description for one case or for all the records by iterating through the resource. In the former case, we show the description for the Eichhorn data, whose index is uniq_ind[1]. The latter case also follows.
-
+2. tap_services[index].describe(): The table with the tap_services output has, in our case, 83 tables listed and each includes metadata containing some human readable description. You can get the description for one case or for all the records by iterating through the resource. In the former case, we show the description for the Eichhorn data, whose index is uniq_ind[1]. The latter case also follows.
```{code-cell} ipython3
:tags: [output_scroll]
@@ -265,21 +263,22 @@ print( tap_services.to_table().columns )
```{code-cell} ipython3
:tags: [output_scroll]
-tap_services[uniq_ind[1]].describe() # For Eichhorm+1970 example.
+tap_services[uniq_ind[1]].describe() # For Eichhorm+1970 example.
```
```{code-cell} ipython3
:tags: [output_scroll]
-# To iterate over all the tables:
-for tapsvc in tap_services:
+# To iterate over all the tables:
+for tapsvc in tap_services:
print("--------------------------------------------- \n")
tapsvc.describe()
```
+++ {"tags": ["output_scroll"]}
-## Step 2: Acquire the relevant data and make a plot!
+## Step 2: Acquire the relevant data and make a plot
+
In order to query the table, we need the table name, note this is NOT the same as the short name we found above:
```{code-cell} ipython3
@@ -288,24 +287,24 @@ In order to query the table, we need the table name, note this is NOT the same a
tables = tap_services[uniq_ind[1]].service.tables
short_name = "I/90"
-# find table name:
+# find table name:
for name in tables.keys():
- if short_name in name:
+ if short_name in name:
print(name)
```
+++ {"tags": ["output_scroll"]}
-We can write code to eliminate the other cases (e.g., VI or VIII...) but we wanted to keep this cell to illustrate that the table name (which is required for the query) will likely include the short_name appended to "/catalog" (or "/table").
+We can write code to eliminate the other cases (e.g., VI or VIII...) but we wanted to keep this cell to illustrate that the table name (which is required for the query) will likely include the short_name appended to "/catalog" (or "/table").
-But the other roman numeral catalogs are obviously different catalogs. Therefore try the below for a better match:
+But the other roman numeral catalogs are obviously different catalogs. Therefore try the below for a better match:
```{code-cell} ipython3
:tags: [output_scroll]
-# find (more restricted) table name:
+# find (more restricted) table name:
for name in tables.keys():
- if name.startswith(short_name):
+ if name.startswith(short_name):
print(name)
tablename=name
```
@@ -319,15 +318,16 @@ results = tap_services[short_name].search(query)
results.to_table()
```
-We can access the column data as array using the .getcolumn(colname) attribute, where the colname is given in the table above. In particular the "CI" is the color index and "Ptm" is the photovisual magnitude. See [here](https://vizier.u-strasbg.fr/viz-bin/VizieR?-source=I/90) for details about the columns.
+We can access the column data as array using the .getcolumn(colname) attribute, where the colname is given in the table above. In particular the "CI" is the color index and "Ptm" is the photovisual magnitude. See [here](https://vizier.u-strasbg.fr/viz-bin/VizieR?-source=I/90) for details about the columns.
```{code-cell} ipython3
color = results.getcolumn('CI')
-mag = results.getcolumn('Ptm')
+mag = results.getcolumn('Ptm')
```
-### Plotting...
-Note: The magnitudes here are apparent and therefore in plotting, the color-magnitude diagram is typically brightness increasing upwards (higher y-axis) so we will flip the y-axis here.
+### Plotting
+
+Note: The magnitudes here are apparent and therefore in plotting, the color-magnitude diagram is typically brightness increasing upwards (higher y-axis) so we will flip the y-axis here.
```{code-cell} ipython3
plt.ylim(15, 0)
@@ -337,13 +337,13 @@ plt.xlabel("B-V")
plt.plot(color, mag, 'o', color='black')
```
-## Step 3. Compare with other color-magnitude diagrams for Pleiades:
+## Step 3. Compare with other color-magnitude diagrams for Pleiades
-There is nice discussion here: http://www.southastrodel.com/Page03009a.htm about the color-magnitude diagram. Their Fig 4 looks slightly cleaner because part of this investigation was to select the 270 stars that are vetted members and restricted to stellar types more massive than K0.
+There is nice discussion here: about the color-magnitude diagram. Their Fig 4 looks slightly cleaner because part of this investigation was to select the 270 stars that are vetted members and restricted to stellar types more massive than K0.
The dataset is from Raboud+1998 (1998A&A...329..101R)
-Therefore in this next step, we will use the bibcode to select this data and overplot with the previous data to compare.
+Therefore in this next step, we will use the bibcode to select this data and overplot with the previous data to compare.
```{code-cell} ipython3
bibcode = '1998A&A...329..101R' # Raboud
@@ -352,7 +352,7 @@ all_shortnames = tap_services.getcolumn('short_name')
match = np.where(all_bibcodes == bibcode)
-# Show relevant short_name (for Raboud paper):
+# Show relevant short_name (for Raboud paper):
short_name = all_shortnames[match][0]
print(short_name)
print("----------")
@@ -366,21 +366,21 @@ tap_services[ind].describe()
# Doing steps above to view table from Raboud+1998
-# This 'tables' will return the same service tables as the 'tables' defined
-# ealier in Step 2, since both the Eichhorn+1970 and Raboud+1998 come from the
+# This 'tables' will return the same service tables as the 'tables' defined
+# ealier in Step 2, since both the Eichhorn+1970 and Raboud+1998 come from the
# same service. Therfore, we did not need to redefine 'tables', but we kept it
-# for completion, as different tables don't always use the same service.
-tables = tap_services[ind].service.tables
+# for completion, as different tables don't always use the same service.
+tables = tap_services[ind].service.tables
-# find table name:
+# find table name:
for name in tables.keys():
- if short_name in name:
+ if short_name in name:
tablename = name
-
+
# Another way to find the table name:
# Raboud_table = tap_services[short_name].get_tables()
# tablename = [name for name in Raboud_table.keys()][0]
-
+
query = 'SELECT * FROM "%s"' %tablename
print(query)
results = tap_services[ind].search(query)
@@ -389,7 +389,7 @@ results.to_table()
```{code-cell} ipython3
R98_color = results.getcolumn('B-V')
-R98_mag = results.getcolumn('Vmag')
+R98_mag = results.getcolumn('Vmag')
plt.ylim(15, 0)
plt.ylabel("V [apparent mag]")
@@ -398,16 +398,16 @@ plt.plot(color, mag, 'o', markersize=4.0, color='black') ## This is Eichhorn dat
plt.plot(R98_color, R98_mag, 's', markersize=5.0, color='red') ## This is new data from Raboud+98
```
-## BONUS: Step 4: The CMD as a distance indicator!
+## BONUS: Step 4: The CMD as a distance indicator
-Since the y-axis above is apparent magnitude, we can use the obvious features (e.g., main sequence curve) to translate the apparent magnitudes to absolute magnitudes (by comparing to published H-R diagrams given in absolute magnitudes) and measure the distance to Pleiades!
+Since the y-axis above is apparent magnitude, we can use the obvious features (e.g., main sequence curve) to translate the apparent magnitudes to absolute magnitudes (by comparing to published H-R diagrams given in absolute magnitudes) and measure the distance to Pleiades!
```{code-cell} ipython3
R98_color = results.getcolumn('B-V')
-R98_mag = results.getcolumn('Vmag')
+R98_mag = results.getcolumn('Vmag')
sun_color = 0.65 # from http://www.astro.ucla.edu/~wright/magcolor.htm
-sun_mag = 10.4 # Played with this value until it looked centered in relation at the B-V color above (yellow star!)
+sun_mag = 10.4 # Played with this value until it looked centered in relation at the B-V color above (yellow star!)
plt.ylim(15, 0)
plt.ylabel("V [apparent mag]")
@@ -418,13 +418,13 @@ plt.plot(sun_color, sun_mag, '*', markersize=15.0, color='yellow') ## This is ou
```
```{code-cell} ipython3
-# Another measure... use the Sun:
+# Another measure... use the Sun:
Vabs = 4.8 ## Sun @ B-V = 0.65 (taken from Wikipedia)
Vapp = 10.4 ## Based on rough reading of plot above at B-V = 0.65
-dm= Vapp - Vabs # distance module = 5log d / 10pc.
+dm= Vapp - Vabs # distance module = 5log d / 10pc.
dist = 10. ** (dm / 5. + 1.)
print("%10.1f pc " %dist)
```
-True distance to Pleaides is 136.2 pc ( https://en.wikipedia.org/wiki/Pleiades ). Not bad!
+True distance to Pleaides is 136.2 pc ( ). Not bad!
diff --git a/content/use_case_notebooks/proposal_prep_exercise.md b/content/use_case_notebooks/proposal_prep_exercise.md
index a19ef2a..986f4a1 100644
--- a/content/use_case_notebooks/proposal_prep_exercise.md
+++ b/content/use_case_notebooks/proposal_prep_exercise.md
@@ -36,18 +36,18 @@ toc:
toc_window_display: true
---
-# Preparing a proposal
+# Proposal Preparation Exercise
-The Story: Suppose that you are preparing to write a proposal on NGC1365, aiming to investigate the intriguing black hole spin this galaxy with Chandra grating observations (see: https://www.space.com/19980-monster-black-hole-spin-discovery.html )
+The Story: Suppose that you are preparing to write a proposal on NGC1365, aiming to investigate the intriguing black hole spin this galaxy with Chandra grating observations (see: )
-In writing proposals, there are often the same tasks that are required: including finding and analyzing previous observations of the proposal, and creating figures that include, e.g., multiwavelength images and spectrum for the source.
+In writing proposals, there are often the same tasks that are required: including finding and analyzing previous observations of the proposal, and creating figures that include, e.g., multiwavelength images and spectrum for the source.
```{code-cell} ipython3
-# As a hint, we include the code block for Python modules that you will likely need to import:
+# As a hint, we include the code block for Python modules that you will likely need to import:
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
-%matplotlib inline
+%matplotlib inline
# For downloading files
from astropy.utils.data import download_file
@@ -55,52 +55,53 @@ from astropy.io import fits
import pyvo as vo
-## There are a number of relatively unimportant warnings that
+## There are a number of relatively unimportant warnings that
## show up, so for now, suppress them:
import warnings
warnings.filterwarnings("ignore", module="astropy.io.votable.*")
warnings.filterwarnings("ignore", module="pyvo.utils.xml.*")
```
-## Step 1: Find out what the previously quoted Chandra 2-10 keV flux of the central source is for NGC 1365.
+## Step 1: Find out what the previously quoted Chandra 2-10 keV flux of the central source is for NGC 1365
Hint: Do a Registry search for tables served by the HEASARC (where high energy data are archived) to find potential table with this information
```{code-cell} ipython3
# Start with a Registry query to find table services for the HEASARC.
# Then get the list of tables that this service serves.
-#
+#
# Hint: the QuickReference has this example:
#services = vo.regsearch(servicetype='tap', keywords=['heasarc'])
-#tables = services[0].service.tables
+#tables = services[0].service.tables
#
# Hint2: the QuickReference also has this example:
#for c in tables['zcat'].columns:
# print(f'{c.name:30s} - {c.description}')
```
-Hint: The Chansngcat ( https://heasarc.gsfc.nasa.gov/W3Browse/chandra/chansngcat.html ) table is likely the best table. Create a table with ra, dec, exposure time, and flux (and flux errors) from the public.chansngcat catalog for Chandra observations matched within 0.1 degree.
+Hint: The Chansngcat ( ) table is likely the best table. Create a table with ra, dec, exposure time, and flux (and flux errors) from the public.chansngcat catalog for Chandra observations matched within 0.1 degree.
```{code-cell} ipython3
-# Get the coordinate for NGC 1365 with astropy.
+# Get the coordinate for NGC 1365 with astropy.
```
```{code-cell} ipython3
-# Construct a query that will get the ra, dec, exposure time, flux, and flux errors
-# from this catalog in the region around this source and submit the query.
+# Construct a query that will get the ra, dec, exposure time, flux, and flux errors
+# from this catalog in the region around this source and submit the query.
# (See the CS_Catalog_queries.md )
# Hint: the QuickReference has this example:
#coord = SkyCoord.from_name("m83")
#query = f'''
-#SELECT ra, dec, Radial_Velocity, radial_velocity_error, bmag, morph_type FROM public.zcat as cat where
+#SELECT ra, dec, Radial_Velocity, radial_velocity_error, bmag, morph_type FROM public.zcat as cat where
#contains(point('ICRS',cat.ra,cat.dec),circle('ICRS',{coord.ra.deg},{coord.dec.deg},1.0))=1
#'''
#results = services[0].service.run_async(query)
```
-## Step 2: Make Images
+## Step 2: Make Images
### Create ultraviolet and X-ray images
+
Hint: Start by checking what UV image services exist (e.g., GALEX?)
```{code-cell} ipython3
@@ -116,10 +117,10 @@ The keyword search for 'galex' returned a bunch of things that may have mentione
Though using the result as an Astropy Table makes it easier to look at the contents, to call the service itself, we cannot use the row of that table. You have to use the entry in the service result list itself. So use the table to browse, but select the list of services itself using the properties that have been defined as attributes such as short_name and ivoid:
```{code-cell} ipython3
-# You may find more than one service. Look at both.
+# You may find more than one service. Look at both.
```
-Hint: Next create a UV image for the source
+Hint: Next create a UV image for the source
```{code-cell} ipython3
# Do an image search for NGC 1365 in the UV services found above
@@ -129,21 +130,22 @@ Hint: Next create a UV image for the source
```
```{code-cell} ipython3
-# Get a FITS file and visualize the image
+# Get a FITS file and visualize the image
#
# Hint: the QuickReference has this example:
-#file_name = download_file(results[0].getdataurl())
+#file_name = download_file(results[0].getdataurl())
```
-Hint: Repeat steps for X-ray image. (Note: Ideally, we would find an image in the Chandra 'cxc' catalog)
+Hint: Repeat steps for X-ray image. (Note: Ideally, we would find an image in the Chandra 'cxc' catalog)
```{code-cell} ipython3
```
-## Step 3: Make a spectrum
+## Step 3: Make a spectrum
+
+### Find what Chandra spectral observations exist already for this source
-### Find what Chandra spectral observations exist already for this source.
Hint: try searching for X-ray spectral data tables using the registry query
```{code-cell} ipython3
@@ -156,7 +158,7 @@ Hint 2: Take a look at what data exist for our candidate, NGC 1365.
```
-Hint 3: Download the data to make a spectrum. Note: you might end here and use Xspec to plot and model the spectrum. Or ... you can also try to take a quick look at the spectrum.
+Hint 3: Download the data to make a spectrum. Note: you might end here and use Xspec to plot and model the spectrum. Or ... you can also try to take a quick look at the spectrum.
```{code-cell} ipython3
# Get it and look at it:
@@ -169,10 +171,10 @@ Hint 3: Download the data to make a spectrum. Note: you might end here and use X
Extension: Making a "quick look" spectrum. For our purposes, the 1st order of the HEG grating data would be sufficient.
```{code-cell} ipython3
-# Hint: You'll have to look into the details of the spectra.
+# Hint: You'll have to look into the details of the spectra.
```
-This can then be analyzed in your favorite spectral analysis tool, e.g., [pyXspec](https://heasarc.gsfc.nasa.gov/xanadu/xspec/python/html/index.html). (For the winter 2018 AAS workshop, we demonstrated this in a [notebook](https://github.com/NASA-NAVO/aas_workshop_2018/blob/master/heasarc/heasarc_Spectral_Access.md) that you can consult for how to use pyXspec, but the pyXspec documentation will have more information.)
+This can then be analyzed in your favorite spectral analysis tool, e.g., [pyXspec](https://heasarc.gsfc.nasa.gov/xanadu/xspec/python/html/index.html). (For the winter 2018 AAS workshop, we demonstrated this in a [notebook](https://github.com/NASA-NAVO/aas_workshop_2018/blob/master/heasarc/heasarc_Spectral_Access.md) that you can consult for how to use pyXspec, but the pyXspec documentation will have more information.)
+++
diff --git a/content/use_case_notebooks/proposal_prep_solution.md b/content/use_case_notebooks/proposal_prep_solution.md
index da865f9..a00bcf2 100644
--- a/content/use_case_notebooks/proposal_prep_solution.md
+++ b/content/use_case_notebooks/proposal_prep_solution.md
@@ -39,18 +39,18 @@ widgets:
version: 1.1.1
---
-# Preparing a proposal
+# Proposal Preparation Solution
-The Story: Suppose that you are preparing to write a proposal on NGC1365, aiming to investigate the intriguing black hole spin this galaxy with Chandra grating observations (see: [Monster Blackhole Spin Revealed](https://www.space.com/19980-monster-black-hole-spin-discovery.html))
+The Story: Suppose that you are preparing to write a proposal on NGC1365, aiming to investigate the intriguing black hole spin this galaxy with Chandra grating observations (see: [Monster Blackhole Spin Revealed](https://www.space.com/19980-monster-black-hole-spin-discovery.html))
-In writing proposals, there are often the same tasks that are required: including finding and analyzing previous observations of the proposal, and creating figures that include, e.g., multiwavelength images and spectrum for the source.
+In writing proposals, there are often the same tasks that are required: including finding and analyzing previous observations of the proposal, and creating figures that include, e.g., multiwavelength images and spectrum for the source.
```{code-cell} ipython3
-# As a hint, we include the code block for Python modules that you will likely need to import:
+# As a hint, we include the code block for Python modules that you will likely need to import:
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
-%matplotlib inline
+%matplotlib inline
# For downloading files
from astropy.utils.data import download_file
@@ -58,14 +58,14 @@ from astropy.io import fits
import pyvo as vo
-## There are a number of relatively unimportant warnings that
+## There are a number of relatively unimportant warnings that
## show up, so for now, suppress them:
import warnings
warnings.filterwarnings("ignore", module="astropy.io.votable.*")
warnings.filterwarnings("ignore", module="pyvo.utils.xml.*")
```
-## Step 1: Find out what the previously quoted Chandra 2-10 keV flux of the central source is for NGC 1365.
+## Step 1: Find out what the previously quoted Chandra 2-10 keV flux of the central source is for NGC 1365
Hint: Do a Registry search for tables served by the HEASARC (where high energy data are archived) to find potential table with this information
@@ -80,7 +80,7 @@ Hint: The [Chansngcat](https://heasarc.gsfc.nasa.gov/W3Browse/chandra/chansngcat
```{code-cell} ipython3
for tablename in heasarc_tables.keys():
- if "chansng" in tablename:
+ if "chansng" in tablename:
print("Table {} has columns={}\n".format(
tablename,
sorted([k.name for k in heasarc_tables[tablename].columns ])))
@@ -93,10 +93,10 @@ pos=coord.SkyCoord.from_name("ngc1365")
```
```{code-cell} ipython3
-# Construct a query that will get the ra, dec, exposure time, flux, and flux errors
+# Construct a query that will get the ra, dec, exposure time, flux, and flux errors
# from this catalog in the region around this source:
-query="""SELECT ra, dec, exposure, flux, flux_lower, flux_upper FROM public.chansngcat as cat
- where contains(point('ICRS',cat.ra,cat.dec),circle('ICRS',{},{},0.1))=1
+query="""SELECT ra, dec, exposure, flux, flux_lower, flux_upper FROM public.chansngcat as cat
+ where contains(point('ICRS',cat.ra,cat.dec),circle('ICRS',{},{},0.1))=1
and cat.exposure > 0 order by cat.exposure""".format(pos.ra.deg, pos.dec.deg)
# Submit the query. (See the CS_Catalog_queries.md for
# information about these two search options.)
@@ -106,9 +106,10 @@ results=tap_services[0].service.run_async(query)
results.to_table()
```
-## Step 2: Make Images:
+## Step 2: Make Images
### Create ultraviolet and X-ray images
+
Hint: Start by checking what UV image services exist (e.g., GALEX?)
```{code-cell} ipython3
@@ -132,7 +133,7 @@ galex_stsci=[s for s in uv_services if 'GALEX' in s.short_name and 'stsci' in s.
galex_heasarc=[s for s in uv_services if 'GALEX' in s.short_name and 'heasarc' in s.ivoid][0]
```
-Hint: Next create a UV image for the source
+Hint: Next create a UV image for the source
```{code-cell} ipython3
# Do an image search for NGC 1365 in the UV service found above
@@ -141,7 +142,7 @@ im_table_stsci.to_table()
```
```{code-cell} ipython3
-# Let's see what HEASARC offers, and this time limit it to FITS
+# Let's see what HEASARC offers, and this time limit it to FITS
# this option doesn't currently work for STScI's service)
im_table_heasarc=galex_heasarc.search(pos=pos,size=0.1,format='image/fits')
im_table_heasarc.to_table()
@@ -151,8 +152,8 @@ im_table_heasarc.to_table()
## If you only run this once, you can do it in memory in one line:
## This fetches the FITS as an astropy.io.fits object in memory
#dataobj=im_table_heasarc[0].getdataobj()
-## But if you might run this notebook repeatedly with limited bandwidth,
-## download it once and cache it.
+## But if you might run this notebook repeatedly with limited bandwidth,
+## download it once and cache it.
file_name = download_file(im_table_heasarc[0].getdataurl(), cache=True, timeout=600)
dataobj=fits.open(file_name)
print(type(dataobj))
@@ -165,7 +166,7 @@ from matplotlib.colors import LogNorm
plt.matshow(dataobj[0].data, origin='lower', cmap=cm.gray_r, norm=LogNorm(vmin=0.005, vmax=0.3))
```
-Hint: Repeat steps for X-ray image. (Note: Ideally, we would find an image in the Chandra 'cxc' catalog)
+Hint: Repeat steps for X-ray image. (Note: Ideally, we would find an image in the Chandra 'cxc' catalog)
```{code-cell} ipython3
x_services=vo.regsearch(servicetype='image',keywords=['chandra'], waveband='x-ray')
@@ -177,7 +178,7 @@ print(x_services.to_table()['short_name','ivoid'])
xim_table=x_services[0].search(pos=pos,size=0.2)
## Some of these are FITS and some JPEG. Look at the columns:
print( xim_table.to_table().columns )
-first_fits_image_row = [x for x in xim_table if 'image/fits' in x.format][0]
+first_fits_image_row = [x for x in xim_table if 'image/fits' in x.format][0]
```
```{code-cell} ipython3
@@ -193,9 +194,10 @@ plt.xlim(460, 560)
plt.ylim(460, 560)
```
-## Step 3: Make a spectrum:
+## Step 3: Make a spectrum
+
+### Find what Chandra spectral observations exist already for this source
-### Find what Chandra spectral observations exist already for this source.
Hint: try searching for X-ray spectral data tables using the registry query
```{code-cell} ipython3
@@ -211,7 +213,7 @@ spec_tables=xsp_services[0].search(pos=pos,radius=0.2,verbose=True)
spec_tables.to_table()
```
-Hint 3: Download the data to make a spectrum. Note: you might end here and use Xspec to plot and model the spectrum. Or ... you can also try to take a quick look at the spectrum.
+Hint 3: Download the data to make a spectrum. Note: you might end here and use Xspec to plot and model the spectrum. Or ... you can also try to take a quick look at the spectrum.
```{code-cell} ipython3
# Get it and look at it:
@@ -253,7 +255,7 @@ for i in range(len(spectra)):
j=j+1
```
-This can then be analyzed in your favorite spectral analysis tool, e.g., [pyXspec](https://heasarc.gsfc.nasa.gov/xanadu/xspec/python/html/index.html). (For the winter 2018 AAS workshop, we demonstrated this in a [notebook](https://github.com/NASA-NAVO/aas_workshop_2018/blob/master/heasarc/heasarc_Spectral_Access.md) that you can consult for how to use pyXspec, but the pyXspec documentation will have more information.)
+This can then be analyzed in your favorite spectral analysis tool, e.g., [pyXspec](https://heasarc.gsfc.nasa.gov/xanadu/xspec/python/html/index.html). (For the winter 2018 AAS workshop, we demonstrated this in a [notebook](https://github.com/NASA-NAVO/aas_workshop_2018/blob/master/heasarc/heasarc_Spectral_Access.md) that you can consult for how to use pyXspec, but the pyXspec documentation will have more information.)
+++
diff --git a/index.md b/index.md
index 8c7d8ca..2ffc05c 100644
--- a/index.md
+++ b/index.md
@@ -1,28 +1,46 @@
# NASA-NAVO notebooks
-## Content
+## Reference Notebooks
```{toctree}
---
maxdepth: 2
---
-content/reference_notebooks/catalog_queries
+content/reference_notebooks/basic_reference
content/reference_notebooks/image_access
+content/reference_notebooks/catalog_queries
content/reference_notebooks/spectral_access
-content/reference_notebooks/ucds_unified_content_descriptors
content/reference_notebooks/votables
+content/reference_notebooks/ucds_unified_content_descriptors
+
+```
+
+## Use Case Exercises
+
+```{toctree}
+---
+maxdepth: 2
+---
+
content/use_case_notebooks/candidate_list_exercise
content/use_case_notebooks/proposal_prep_exercise
content/use_case_notebooks/hr_diagram_exercise
-content/reference_notebooks/basic_reference
+```
+
+## Use Case Solutions
+
+```{toctree}
+---
+maxdepth: 2
+---
+
content/use_case_notebooks/candidate_list_solution
content/use_case_notebooks/proposal_prep_solution
content/use_case_notebooks/hr_diagram_solution
```
-
-## Additional resources
+## Additional Resources
```{toctree}
---
@@ -31,4 +49,4 @@ maxdepth: 1
00_SETUP
KNOWN_ISSUES
-```
\ No newline at end of file
+```