Skip to content

Commit

Permalink
update the intro, and getting-started.md -> quick-start.md; plus seve…
Browse files Browse the repository at this point in the history
…ral pre-PR updates
  • Loading branch information
zoghbi-a committed Feb 28, 2024
1 parent b9eee10 commit fb0c26d
Show file tree
Hide file tree
Showing 13 changed files with 107 additions and 78 deletions.
6 changes: 3 additions & 3 deletions _files/template.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jupyter:
---

# Descriptive Title of the Content of the Notebook
---
<hr style="border: 2px solid #fadbac" />
Header Section: include the following information.

- **Description:** A template on how to write a notebook tutorial on sciserver.
Expand All @@ -24,7 +24,7 @@ Header Section: include the following information.
- **Support:** How to get help.
- **Last verified to run:** (00/00/000) When was this last tested.

---
<hr style="border: 2px solid #fadbac" />


## 1. Introduction
Expand All @@ -45,7 +45,7 @@ When running this notebook inside Sciserver, make sure the HEASARC data drive is
<b>Running Outside Sciserver:</b><br>
This notebook runs in the heasoftpy conda environment on Sciserver.
If running outside Sciserver, some changes will be needed, including:<br>
&bull; Make sure heasoftpy and heasoft are correctly installed (<a herf='https://heasarc.gsfc.nasa.gov/docs/software/lheasoft/'>Download and Install heasoft</a>).<br>
&bull; Make sure heasoftpy and heasoft are correctly installed (<a href='https://heasarc.gsfc.nasa.gov/docs/software/lheasoft/'>Download and Install heasoft</a>).<br>
&bull; Unlike on Sciserver, where the data is available locally, you will need to download the data to your machine.<br>
</div>

Expand Down
4 changes: 2 additions & 2 deletions analysis-ixpe-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jupyter:
- **Requirements:** `heasoftpy`, `xspec`, `matplotlib`
- **Credit:** Kavitha Arur (Jun 2023).
- **Support:** Contact the [IXPE Guest Observer Facility (GOF)](https://heasarc.gsfc.nasa.gov/cgi-bin/Feedback?selected=ixpe) or the [HEASARC helpdesk](https://heasarc.gsfc.nasa.gov/cgi-bin/Feedback).
- **Last verified to run:** 01/26/2024.
- **Last verified to run:** 02/28/2024.

<hr style="border: 2px solid #fadbac" />

Expand All @@ -40,7 +40,7 @@ Also, this notebook requires <code>heasoftpy</code>, which is available in the (

<b>Running Outside Sciserver:</b><br>
If running outside Sciserver, some changes will be needed, including:<br>
&bull; Make sure heasoftpy and heasoft are installed (<a herf='https://heasarc.gsfc.nasa.gov/docs/software/lheasoft/'>Download and Install heasoft</a>).<br>
&bull; Make sure heasoftpy and heasoft are installed (<a href='https://heasarc.gsfc.nasa.gov/docs/software/lheasoft/'>Download and Install heasoft</a>).<br>
&bull; Unlike on Sciserver, where the data is available locally, you will need to download the data to your machine.<br>
</div>

Expand Down
24 changes: 13 additions & 11 deletions analysis-nicer-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jupyter:
- **Requirements:** `heasoftpy`, `xspec`, `astropy`, `matplotlib`
- **Credit:** Mike Corcoran / Abdu Zoghbi (May 2022).
- **Support:** Contact the [HEASARC helpdesk or NICER Guest Observer Facility (GOF)](https://heasarc.gsfc.nasa.gov/cgi-bin/Feedback).
- **Last verified to run:** 01/26/2024.
- **Last verified to run:** 02/28/2024.

<hr style="border: 2px solid #fadbac" />

Expand All @@ -43,7 +43,7 @@ Heasoft higher than v6.31 is required in order to be able to run <code>nicerl3</

<b>Running Outside Sciserver:</b><br>
If running outside Sciserver, some changes will be needed, including:<br>
&bull; Make sure heasoftpy and heasoft (higher than v6.31) are installed (<a herf='https://heasarc.gsfc.nasa.gov/docs/software/lheasoft/'>Download and Install heasoft</a>).<br>
&bull; Make sure heasoftpy and heasoft (higher than v6.31) are installed (<a href='https://heasarc.gsfc.nasa.gov/docs/software/lheasoft/'>Download and Install heasoft</a>).<br>
&bull; Unlike on Sciserver, where the data is available locally, you will need to download the data to your machine.<br>
</div>
<!-- #endregion -->
Expand All @@ -52,7 +52,7 @@ If running outside Sciserver, some changes will be needed, including:<br>
We need the following python modules:

<div style='color: #333; background: #ffffdf; padding:20px; border: 4px solid #fadbac'>
Note that for heasoftpy < 1.4, <code>nicerl2</code> is accessed via <code>heasoftpy.nicerl2</code>. For heasoftpy >= 1.4, it is available under a separate module called <code>nicer</code> that needs to be imported explicitly with <code>from heasoftpy import nicer</code>
Note that for heasoftpy < 1.4, <code>nicerl2</code> is accessed via <code>heasoftpy.nicerl2</code>. For heasoftpy >= 1.4, it is available under a separate module called <code>nicer</code> that needs to be imported explicitly.
</div>

```python
Expand All @@ -67,11 +67,13 @@ import matplotlib.pylab as plt
import heasoftpy as hsp
import xspec as xs

from packaging import version
if version.parse(hsp.__version__) < version.parse('1.4'):
nicer = hsp
else:
from heasoftpy import nicer
# import nicer tools from heasoftpy
# for heasoftpy version >= 1.4, they are under heasoftpy.nicer.*
# for heasoftpy version < 1.4, they are under heasoftpy.*
try:
from heasoftpy.nicer import nicerl2, nicerl3_lc, nicerl3_spect
except (ModuleNotFoundError, ImportError):
from heasoftpy import nicerl2, nicerl3_lc, nicerl3_spect
```

## 3. Set up the NICER obsid directory
Expand Down Expand Up @@ -108,7 +110,7 @@ inPars = {
}

# run the task
out = nicer.nicerl2(inPars)
out = nicerl2(inPars)

# check that everything run correctly
if out.returncode == 0:
Expand Down Expand Up @@ -160,7 +162,7 @@ inPars = {
}

# run the spectral extraction task
out = nicer.nicerl3_spect(inPars)
out = nicerl3_spect(inPars)

# check that the task run correctly
if out.returncode == 0:
Expand Down Expand Up @@ -202,7 +204,7 @@ inPars = {
}

# run the light curve task
out = nicer.nicerl3_lc(inPars)
out = nicerl3_lc(inPars)

# check the task runs correctly
if out.returncode == 0:
Expand Down
21 changes: 12 additions & 9 deletions analysis-nustar-lightcurve.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jupyter:
- **Requirements:** `heasoftpy`, `numpy`, `matplotlib`
- **Credit:** Abdu Zoghbi (Jan 2023).
- **Support:** Contact the [HEASARC helpdesk](https://heasarc.gsfc.nasa.gov/cgi-bin/Feedback).
- **Last verified to run:** 01/26/2024.
- **Last verified to run:** 02/28/2024.

<hr style="border: 2px solid #fadbac" />

Expand All @@ -42,7 +42,7 @@ Also, this notebook requires <code>heasoftpy</code>, which is available in the (

<b>Running Outside Sciserver:</b><br>
If running outside Sciserver, some changes will be needed, including:<br>
&bull; Make sure heasoftpy and heasoft are installed (<a herf='https://heasarc.gsfc.nasa.gov/docs/software/lheasoft/'>Download and Install heasoft</a>).<br>
&bull; Make sure heasoftpy and heasoft are installed (<a href='https://heasarc.gsfc.nasa.gov/docs/software/lheasoft/'>Download and Install heasoft</a>).<br>
&bull; Unlike on Sciserver, where the data is available locally, you will need to download the data to your machine.<br>
</div>

Expand All @@ -51,7 +51,7 @@ If running outside Sciserver, some changes will be needed, including:<br>
We need the following python modules:

<div style='color: #333; background: #ffffdf; padding:20px; border: 4px solid #fadbac'>
Note that for heasoftpy < 1.4, <code>nupipeline</code> is accessed via <code>heasoftpy.nupipeline</code>. For heasoftpy >= 1.4, it is available under a separate module called <code>nustar</code> that needs to be imported explicitly with <code>from heasoftpy import nustar</code>
Note that for heasoftpy < 1.4, <code>nupipeline</code> is accessed via <code>heasoftpy.nupipeline</code>. For heasoftpy >= 1.4, it is available under a separate module called <code>nustar</code> that needs to be imported explicitly.
</div>

```python
Expand All @@ -62,11 +62,14 @@ import matplotlib.pyplot as plt

import heasoftpy as hsp

from packaging import version
if version.parse(hsp.__version__) < version.parse('1.4'):
nustar = hsp
else:
from heasoftpy import nustar
# import nupipeline from heasoftpy
# for heasoftpy version >= 1.4, it is under heasoftpy.nustar.nupipeline
# for heasoftpy version < 1.4, it is under heasoftpy.nupipeline
try:
from heasoftpy.nustar import nupipeline
except ModuleNotFoundError:
from heasoftpy import nupipeline

```

## 3. Run the Reprocessing Pipeline
Expand Down Expand Up @@ -107,7 +110,7 @@ outdir = obsid + '_p/event_cl'
stem = 'nu' + obsid

# call the tasks
out = nustar.nupipeline(indir=indir, outdir=outdir, steminputs=stem, instrument='FPMA',
out = nupipeline(indir=indir, outdir=outdir, steminputs=stem, instrument='FPMA',
clobber='yes', noprompt=True, verbose=True)
```

Expand Down
4 changes: 2 additions & 2 deletions analysis-rxte-lightcurve.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jupyter:
- **Requirements:** `heasoftpy`, `pyvo`, `matplotlib`, `tqdm`
- **Credit:** Tess Jaffe (Sep 2021). Parallelization by Abdu Zoghbi (Jan 2024)
- **Support:** Contact the [HEASARC helpdesk](https://heasarc.gsfc.nasa.gov/cgi-bin/Feedback).
- **Last verified to run:** 01/26/2024.
- **Last verified to run:** 02/28/2024.

<hr style="border: 2px solid #fadbac" />

Expand All @@ -44,7 +44,7 @@ Also, this notebook requires <code>heasoftpy</code>, which is available in the (

<b>Running Outside Sciserver:</b><br>
If running outside Sciserver, some changes will be needed, including:<br>
&bull; Make sure heasoftpy and heasoft are installed (<a herf='https://heasarc.gsfc.nasa.gov/docs/software/lheasoft/'>Download and Install heasoft</a>).<br>
&bull; Make sure heasoftpy and heasoft are installed (<a href='https://heasarc.gsfc.nasa.gov/docs/software/lheasoft/'>Download and Install heasoft</a>).<br>
&bull; Unlike on Sciserver, where the data is available locally, you will need to download the data to your machine.<br>
</div>

Expand Down
2 changes: 1 addition & 1 deletion analysis-rxte-ml.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Also, the required python modules are available in the (heasoft) conda environme

<b>Running Outside Sciserver:</b><br>
If running outside Sciserver, some changes will be needed, including:<br>
&bull; Make sure heasoftpy and heasoft are installed (<a herf='https://heasarc.gsfc.nasa.gov/docs/software/lheasoft/'>Download and Install heasoft</a>).<br>
&bull; Make sure <code>pyxspec</code> and heasoft are installed (<a href='https://heasarc.gsfc.nasa.gov/docs/software/lheasoft/'>Download and Install heasoft</a>).<br>
&bull; Unlike on Sciserver, where the data is available locally, you will need to download the data to your machine.<br>
</div>

Expand Down
5 changes: 2 additions & 3 deletions analysis-rxte-spectra.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jupyter:
- **Description:** Finding standard spectral products from RXTE.
- **Level:** Intermediate.
- **Data:** RXTE observations of **eta car** taken over 16 years.
- **Requirements:** `heasoftpy`, `pyvo`, `matplotlib`, `pyxspec`
- **Requirements:** `pyvo`, `matplotlib`, `pyxspec`
- **Credit:** Tess Jaffe (Sep 2021).
- **Support:** Contact the [HEASARC helpdesk](https://heasarc.gsfc.nasa.gov/cgi-bin/Feedback).
- **Last verified to run:** 01/26/2024.
Expand All @@ -37,11 +37,10 @@ We first find all of the standard spectra, then use `pyxspec` to do some basic a
<b>Running On Sciserver:</b><br>
When running this notebook inside Sciserver, make sure the HEASARC data drive is mounted when initializing the Sciserver compute container. <a href='https://heasarc.gsfc.nasa.gov/docs/sciserver/'>See details here</a>.
<br>
Also, this notebook requires <code>heasoftpy</code>, which is available in the (heasoft) conda environment. You should see (heasoft) at the top right of the notebook. If not, click there and select it.

<b>Running Outside Sciserver:</b><br>
If running outside Sciserver, some changes will be needed, including:<br>
&bull; Make sure heasoftpy and heasoft are installed (<a herf='https://heasarc.gsfc.nasa.gov/docs/software/lheasoft/'>Download and Install heasoft</a>).<br>
&bull; Make sure <code>pyxspec</code> and heasoft are installed (<a href='https://heasarc.gsfc.nasa.gov/docs/software/lheasoft/'>Download and Install heasoft</a>).<br>
&bull; Unlike on Sciserver, where the data is available locally, you will need to download the data to your machine.<br>
</div>

Expand Down
12 changes: 6 additions & 6 deletions data-access.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jupyter:
name: heasoft
---

# HEASARC data access on SciServer
# HEASARC Data Access on SciServer
<hr style="border: 2px solid #fadbac" />

- **Description:** A general overview on accessing data on Sciserver.
Expand All @@ -21,7 +21,7 @@ jupyter:
- **Requirements:** `pyvo`.
- **Credit:** Tess Jaffe (Sep 2021).
- **Support:** Contact the [HEASARC helpdesk](https://heasarc.gsfc.nasa.gov/cgi-bin/Feedback).
- **Last verified to run:** 01/26/2024.
- **Last verified to run:** 02/28/2024.

<hr style="border: 2px solid #fadbac" />

Expand All @@ -30,14 +30,14 @@ jupyter:
## 1. Introduction
This notebook presents a tutorial of how to access HEASARC data using the virtual observatory (VO) python client `pyvo`.

We handle the general case of using the Tabel Access Protocol (TAP) to query any information about the HEASARC tables. A more specific data access tutorial when the table is known is give in the [Finding and Downloading Data notebook](data-find-download.md).
We handle the general case of using the Tabel Access Protocol (TAP) to query any information about the HEASARC tables. A more specific data access tutorial when the table is known, is given in the [notebook on Finding and Downloading Data](data-find-download.md).

The case will be illustrated by querying for XTE observations of **Eta Car** .


<div style='color: #333; background: #ffffdf; padding:20px; border: 4px solid #fadbac'>
<b>Running On Sciserver:</b><br>
The notebook requires `pyvo`, and on Sciserver, it is available on the `heasoft` conda kernel. Make sure you run the notbeook using that kernel by selecting it in the top right.
The notebook requires <code>pyvo</code>, and on Sciserver, it is available on the <code>heasoft</code> conda kernel. Make sure you run the notbeook using that kernel by selecting it in the top right.
</div>

<!-- #endregion -->
Expand Down Expand Up @@ -66,7 +66,7 @@ We start with the Registry of all VO services. The HEASARC table service is usi


```python
tap_services = pyvo.regsearch(servicetype='tap',keywords=['heasarc'])
tap_services = pyvo.regsearch(servicetype='tap', keywords=['heasarc'])
```

We then ask the service for all of the tables that are available at the HEASARC:
Expand All @@ -86,7 +86,7 @@ for tablename in heasarc_tables.keys():

The `xtemaster` catalog is the one that we're interested in.

Let's see what this table has in it. Alternatively, we can google it and find the same information here:
Let's see what this table has in it. The same information is availabe in the table description in the website:

https://heasarc.gsfc.nasa.gov/W3Browse/all/xtemaster.html

Expand Down
8 changes: 4 additions & 4 deletions data-catalog-cross-match.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jupyter:
name: heasoft
---

# Searching a Large Catalog With a List of Sources
# Query a List of Sources in a Large Catalog
<hr style="border: 2px solid #fadbac" />

- **Description:** An example of cross-matching a list of sources to data in the archive.
Expand All @@ -21,7 +21,7 @@ jupyter:
- **Requirements:** [`pyvo`, `astropy`]".
- **Credit:** Tess Jaffe (May 2023).
- **Support:** Contact the [HEASARC helpdesk](https://heasarc.gsfc.nasa.gov/cgi-bin/Feedback).
- **Last verified to run:** 01/26/2024.
- **Last verified to run:** 02/28/2024.

<hr style="border: 2px solid #fadbac" />

Expand All @@ -37,7 +37,7 @@ This tutorial is a HEASARC-specific example of a more general workflow querying

<div style='color: #333; background: #ffffdf; padding:20px; border: 4px solid #fadbac'>
<b>Running On Sciserver:</b><br>
The notebook requires `pyvo`, and on Sciserver, it is available on the `heasoft` conda kernel. Make sure you run the notbeook using that kernel by selecting it in the top right.
The notebook requires <code>pyvo</code>, and on Sciserver, it is available on the <code>heasoft</code> conda kernel. Make sure you run the notbeook using that kernel by selecting it in the top right.
</div>


Expand Down Expand Up @@ -79,7 +79,7 @@ heasarc.describe()

To include our list of source with the query, VO protocols use the `VOTable`, which is both powerful and complicated. But `astropy` has easy tools to handle it.

As we will show, when submitting that query that includes table data (the list of source coordinates in our case), these can be passed to `pyvo` as either an `astropy` table, or as a file name of the VO table in XML format.
As we will show, when submitting a query that includes table data (the list of source coordinates in our case), these can be passed to `pyvo` as either an `astropy` table, or as a file name of the VO table in XML format.


Typically, you may start from a list of sources you want to query. In this tutorial, we first create this list in comma-separated value (CSV) format to be used as our input. The file `source_list.csv` contains a list of 10000 RA and DEC values.
Expand Down
8 changes: 5 additions & 3 deletions data-find-download.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jupyter:
name: heasoft
---

# Finding and Downloading Data From a Source Using Python
# Finding and Downloading Data For an Object Using Python
<hr style="border: 2px solid #fadbac" />

- **Description:** Tutorial on how to access HEASARC data using the Virtual Observatory client `pyvo`.
Expand All @@ -21,7 +21,7 @@ jupyter:
- **Requirements:** `pyvo`.
- **Credit:** Abdu Zoghbi (May 2022).
- **Support:** Contact the [HEASARC helpdesk](https://heasarc.gsfc.nasa.gov/cgi-bin/Feedback).
- **Last verified to run:** 01/26/2024
- **Last verified to run:** 02/28/2024

<hr style="border: 2px solid #fadbac" />

Expand All @@ -39,7 +39,7 @@ This notebook searches the NuSTAR master catalog `numaster` using pyvo. We speci

<div style='color: #333; background: #ffffdf; padding:20px; border: 4px solid #fadbac'>
<b>Running On Sciserver:</b><br>
The notebook requires `pyvo`, and on Sciserver, it is available on the `heasoft` conda kernel. Make sure you run the notbeook using that kernel by selecting it in the top right.
The notebook requires <code>pyvo</code>, and on Sciserver, it is available on the <code>heasoft</code> conda kernel. Make sure you run the notbeook using that kernel by selecting it in the top right.
</div>

<!-- #endregion -->
Expand All @@ -62,6 +62,8 @@ from astropy.coordinates import SkyCoord
## 3. Finding and Downloading the data
This part assumes we know the ID of the VO service. Generally these are of the form: `ivo://nasa.heasarc/{table_name}`.

If you don't know the name of the table, you can search the VO registry, as illustrated in the [data access notebook](data-access.md).

### 3.1 The Search Serivce
First, we create a cone search service:

Expand Down
Loading

0 comments on commit fb0c26d

Please sign in to comment.