Skip to content

Commit 0f6d68c

Browse files
authored
Merge pull request #264 from abostroem/fix_episode7
Small fixes to episode 7
2 parents 40006f6 + 556aa7d commit 0f6d68c

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

episodes/07-photo.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -468,9 +468,7 @@ defined, to verify that the results are as expected.
468468
```python
469469
test_points = [(0.4, 20),
470470
(0.4, 16)]
471-
```
472471

473-
```python
474472
test_inside_mask = polygon.contains_points(test_points)
475473
test_inside_mask
476474
```
@@ -511,7 +509,7 @@ Here is how we can save it in an HDF5 file.
511509

512510
```python
513511
filename = 'gd1_data.hdf'
514-
loop_df.to_hdf(filename, 'loop_df')
512+
loop_df.to_hdf(filename, key='loop_df')
515513
```
516514

517515
## Selecting based on photometry
@@ -568,7 +566,7 @@ inside_mask.sum()
568566
```
569567

570568
```output
571-
486
569+
np.int64(486)
572570
```
573571

574572
:::::::::::::::::::::::::
@@ -612,8 +610,8 @@ x = winner_df['phi1']
612610
y = winner_df['phi2']
613611
plt.plot(x, y, 'ko', markersize=0.7, alpha=0.9)
614612

615-
plt.xlabel('$\phi_1$ [deg]')
616-
plt.ylabel('$\phi_2$ [deg]')
613+
plt.xlabel(r'$\phi_1$ [deg]')
614+
plt.ylabel(r'$\phi_2$ [deg]')
617615
plt.title('Proper motion + photometry selection', fontsize='medium')
618616

619617
plt.axis('equal');
@@ -650,8 +648,8 @@ def plot_cmd_selection(df):
650648

651649
plt.plot(x, y, 'ko', markersize=0.7, alpha=0.9)
652650

653-
plt.xlabel('$\phi_1$ [deg]')
654-
plt.ylabel('$\phi_2$ [deg]')
651+
plt.xlabel(r'$\phi_1$ [deg]')
652+
plt.ylabel(r'$\phi_2$ [deg]')
655653
plt.title('Proper motion + photometry selection', fontsize='medium')
656654

657655
plt.axis('equal')
@@ -676,7 +674,7 @@ Finally, we will write the selected stars to a file.
676674

677675
```python
678676
filename = 'gd1_data.hdf'
679-
winner_df.to_hdf(filename, 'winner_df')
677+
winner_df.to_hdf(filename, key='winner_df')
680678
```
681679

682680
```python

0 commit comments

Comments
 (0)