|
530 | 530 | "print(v_accr.cgs)\n", |
531 | 531 | "# Or in some really obscure unit?\n", |
532 | 532 | "from astropy.units import imperial\n", |
533 | | - "print(v_accr.to(imperial / u.hour))" |
| 533 | + "print(v_accr.to(imperial.yd / u.hour))" |
534 | 534 | ], |
535 | 535 | "language": "python", |
536 | 536 | "metadata": {}, |
|
691 | 691 | "cell_type": "code", |
692 | 692 | "collapsed": false, |
693 | 693 | "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))" |
695 | 695 | ], |
696 | 696 | "language": "python", |
697 | 697 | "metadata": {}, |
|
901 | 901 | "cell_type": "code", |
902 | 902 | "collapsed": false, |
903 | 903 | "input": [ |
904 | | - "delta_p = delta_t.val * u.day / period" |
| 904 | + "delta_p = delta_t.value * u.day / period" |
905 | 905 | ], |
906 | 906 | "language": "python", |
907 | 907 | "metadata": {}, |
|
964 | 964 | " f = np.zeros((flux.shape[0], indrange.sum()))\n", |
965 | 965 | " for i in range(flux.shape[0]):\n", |
966 | 966 | "# 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", |
968 | 968 | "# divide the flux by the polynomial and put the result in our\n", |
969 | 969 | "# 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", |
971 | 971 | " return w[indrange], f\n", |
972 | 972 | "\n", |
973 | | - " wcaII, fcaII = region_around_line(wavelength, flux,\n", |
| 973 | + "wcaII, fcaII = region_around_line(wavelength, flux,\n", |
974 | 974 | " [[3925*u.AA, 3930*u.AA],[3938*u.AA, 3945*u.AA]])" |
975 | 975 | ], |
976 | 976 | "language": "python", |
|
1052 | 1052 | "\n", |
1053 | 1053 | "datecol = Column(name = 'Obs Date', data = date)\n", |
1054 | 1054 | "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", |
1056 | 1056 | "tab = Table((datecol, pcol, ewcol))\n", |
1057 | 1057 | "# latexdicts['AA'] contains the style specifics for A&A (\\hline etc.)\n", |
1058 | 1058 | "tab.write('EWtab.tex', latexdict = ascii.latexdicts['AA'])" |
|
0 commit comments