Skip to content

Commit 8c065af

Browse files
committed
Correct errors uncovered by python prepare_deploy.py run convert
1 parent 0a3443f commit 8c065af

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tutorials/UVES/UVES.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@
530530
"print(v_accr.cgs)\n",
531531
"# Or in some really obscure unit?\n",
532532
"from astropy.units import imperial\n",
533-
"print(v_accr.to(imperial / u.hour))"
533+
"print(v_accr.to(imperial.yd / u.hour))"
534534
],
535535
"language": "python",
536536
"metadata": {},
@@ -691,7 +691,7 @@
691691
"cell_type": "code",
692692
"collapsed": false,
693693
"input": [
694-
"print(np.log10((G*M_MN_Lup/R_MN_Lup**2)/u.grams))"
694+
"print(np.log10((G*M_MN_Lup/R_MN_Lup**2)/u.cm*u.second**2))"
695695
],
696696
"language": "python",
697697
"metadata": {},
@@ -901,7 +901,7 @@
901901
"cell_type": "code",
902902
"collapsed": false,
903903
"input": [
904-
"delta_p = delta_t.val * u.day / period"
904+
"delta_p = delta_t.value * u.day / period"
905905
],
906906
"language": "python",
907907
"metadata": {},
@@ -964,13 +964,13 @@
964964
" f = np.zeros((flux.shape[0], indrange.sum()))\n",
965965
" for i in range(flux.shape[0]):\n",
966966
"# fit polynomial of second order to the continuum region\n",
967-
" linecoeff = np.polyfit(w[indcont], flux[i, indcont],2)\n",
967+
" linecoeff = np.polyfit(w[indcont], flux[i, indcont],2)\n",
968968
"# divide the flux by the polynomial and put the result in our\n",
969969
"# new flux array\n",
970-
" f[i,:] = flux[i,indrange]/np.polyval(linecoeff, w[indrange])\n",
970+
" f[i,:] = flux[i,indrange]/np.polyval(linecoeff, w[indrange])\n",
971971
" return w[indrange], f\n",
972972
"\n",
973-
" wcaII, fcaII = region_around_line(wavelength, flux,\n",
973+
"wcaII, fcaII = region_around_line(wavelength, flux,\n",
974974
" [[3925*u.AA, 3930*u.AA],[3938*u.AA, 3945*u.AA]])"
975975
],
976976
"language": "python",
@@ -1052,7 +1052,7 @@
10521052
"\n",
10531053
"datecol = Column(name = 'Obs Date', data = date)\n",
10541054
"pcol = Column(name = 'phase', data = delta_p, format = '{:.1f}')\n",
1055-
"ewcol = Column(name = 'EW', data = ew, format = '{:.1f}', units = '\\\\AA')\n",
1055+
"ewcol = Column(name = 'EW', data = ew, format = '{:.1f}', unit = '\\\\AA')\n",
10561056
"tab = Table((datecol, pcol, ewcol))\n",
10571057
"# latexdicts['AA'] contains the style specifics for A&A (\\hline etc.)\n",
10581058
"tab.write('EWtab.tex', latexdict = ascii.latexdicts['AA'])"

0 commit comments

Comments
 (0)