Skip to content

Commit 099c527

Browse files
committed
modifying to remove gala dependence in episodes 1 and 2 and episode functions
1 parent eea1145 commit 099c527

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

episodes/02-coords.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ perpendicular to the direction of the stream (the y-axis in Figure 1).
395395
These are called the $\phi_1$ and $\phi_2$ coordinates, respectively.
396396

397397
```python
398-
from gala.coordinates import GD1Koposov10
398+
from gd1 import GD1Koposov10
399399

400400
gd1_frame = GD1Koposov10()
401401
gd1_frame
@@ -405,6 +405,21 @@ gd1_frame
405405
<GD1Koposov10 Frame>
406406
```
407407

408+
::::::::::::::::::::::::::::::::::::::::: callout
409+
410+
## GD1Koposov10 import
411+
412+
The `GD1Koposov10` reference frame is part of the `gala` package. For convience we provide
413+
the stand alone file as part of the `student_download` zip file you downloaded. If your notebook
414+
is not in your `student_download` directory, you will need to add the following before the import
415+
statement
416+
```python
417+
import sys
418+
sys.path.append(<path to student_download>)
419+
```
420+
Where `<path to student_download>` is the path to your `student_download` directory ending with `student_download`.
421+
::::::::::::::::::::::::::::::::::::::::::::::::::
422+
408423
We can use it to find the coordinates of Betelgeuse in the GD-1 frame,
409424
like this:
410425

episodes/03-transform.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,21 @@ Whether you are working from a new notebook or coming back from a checkpoint,
6363
reloading the data will save you from having to run the query again.
6464

6565
If you are starting this episode here or starting this episode in a new notebook,
66-
you will need to run the following lines of code.
66+
you will need to run the following lines of code. The last two lines of the import
67+
statements assume your notebook is being run in the `student_download` directory.
68+
If you are running it from a different directory you will need to add the path using
69+
`sys.path.append(<path to student download>)` where `<path to student_download>` is
70+
the path to your `student_download` directory ending with `student_download`.
6771

6872
This imports previously imported functions:
6973

7074
```python
7175
import astropy.units as u
7276
from astropy.coordinates import SkyCoord
73-
from gala.coordinates import GD1Koposov10
7477
from astropy.table import Table
7578

7679
from episode_functions import *
80+
from gd1 import GD1Koposov10
7781
```
7882

7983
The following code loads in the data (instructions for downloading data can be

student_download/episode_functions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77

88
import astropy.units as u
99
from astropy.coordinates import SkyCoord
10-
from gala.coordinates import GD1Koposov10, reflex_correct
10+
from gd1 import GD1Koposov10
11+
from reflex import reflex_correct
1112

1213
##########################
1314
# Episode 2

0 commit comments

Comments
 (0)