Skip to content

Commit

Permalink
clear all outputs, work with google colab
Browse files Browse the repository at this point in the history
  • Loading branch information
arahlin committed Jul 17, 2024
1 parent 6bbbde1 commit e2a3e1e
Show file tree
Hide file tree
Showing 12 changed files with 501 additions and 1,906 deletions.
565 changes: 104 additions & 461 deletions CMB_ACT_Likelihood.ipynb

Large diffs are not rendered by default.

23 changes: 20 additions & 3 deletions CMB_School_Part_03.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/jeffmcm1977/CMBAnalysis_SummerSchool/blob/master/CMB_School_Part_03.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -15,6 +22,18 @@
"We will now add noise and filter the map - so that we have a map with all astrophysical and instrumental effects."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!python -c \"import cmb_modules\" || ( \\\n",
" wget https://github.com/jeffmcm1977/CMBAnalysis_SummerSchool/raw/master/cmb_school.tar.gz && \\\n",
" tar xzvf cmb_school.tar.gz \\\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -29,11 +48,9 @@
"import matplotlib.pyplot as plt\n",
"import astropy.io.fits as fits\n",
"\n",
"#%cd /Users/reneehlozek/Dropbox/ACTSummerSchool ## put your directory where the maps and libraries live here\n",
"%matplotlib inline\n",
"import constants as cs # the constants module\n",
"\n",
"import cmb_modules # the module of functions\n",
"\n",
"N = int(cs.N)\n",
"c_min = cs.c_min\n",
"c_max = cs.c_max\n",
Expand Down
243 changes: 40 additions & 203 deletions CMB_School_Part_04.ipynb

Large diffs are not rendered by default.

209 changes: 42 additions & 167 deletions CMB_School_Part_05.ipynb

Large diffs are not rendered by default.

22 changes: 20 additions & 2 deletions CMB_School_Part_06.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/jeffmcm1977/CMBAnalysis_SummerSchool/blob/master/CMB_School_Part_06.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -18,6 +25,18 @@
"In this self study exercise, we are now going to use some public data from the ACT collaboration, compute power spectra and compare them to theory power spectra."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!python -c \"import cmb_modules\" || ( \\\n",
" wget https://github.com/jeffmcm1977/CMBAnalysis_SummerSchool/raw/master/cmb_school.tar.gz && \\\n",
" tar xzvf cmb_school.tar.gz \\\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -31,9 +50,8 @@
"import matplotlib.mlab as mlab\n",
"import matplotlib.pyplot as plt\n",
"import astropy.io.fits as fits\n",
"%matplotlib inline\n",
"import constants as cs # the constants module\n",
"\n",
"import constants as cs # the constants module\n",
"import cmb_modules # the module of functions\n",
"\n",
"N = cs.N\n",
Expand Down
334 changes: 41 additions & 293 deletions CMB_School_Part_07.ipynb

Large diffs are not rendered by default.

65 changes: 51 additions & 14 deletions CMB_School_Part_08.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/jeffmcm1977/CMBAnalysis_SummerSchool/blob/master/CMB_School_Part_08.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -23,19 +30,28 @@
"We will start by pulling CAMB python so that we can get it running. Get pycamb from https://pypi.python.org/pypi/camb/0.1.1."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!python -c \"import cmb_modules\" || ( \\\n",
" wget https://github.com/jeffmcm1977/CMBAnalysis_SummerSchool/raw/master/cmb_school.tar.gz && \\\n",
" tar xzvf cmb_school.tar.gz \\\n",
")\n",
"!python -c \"import camb\" || pip install camb"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Import CAMB\n",
"%matplotlib inline\n",
"import sys, platform, os\n",
"from matplotlib import pyplot as plt\n",
"import numpy as np\n",
"print('Using CAMB installed at '+ os.path.realpath(os.path.join(os.getcwd(),'..')))\n",
"sys.path.insert(0,os.path.realpath(os.path.join(os.getcwd(),'..')))\n",
"import camb\n",
"from camb import model, initialpower"
]
Expand Down Expand Up @@ -183,7 +199,10 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -376,7 +395,10 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -418,7 +440,10 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -450,7 +475,10 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [],
"source": [
Expand All @@ -461,7 +489,10 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [],
"source": [
Expand All @@ -486,7 +517,10 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [],
"source": [
Expand All @@ -504,7 +538,10 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [],
"source": []
Expand All @@ -513,7 +550,7 @@
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -527,9 +564,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "undefined.undefined.undefined"
"version": "3.12.3"
}
},
"nbformat": 4,
"nbformat_minor": 1
"nbformat_minor": 4
}
374 changes: 57 additions & 317 deletions CMB_School_Part_09.ipynb

Large diffs are not rendered by default.

178 changes: 30 additions & 148 deletions CMB_School_Part_10.ipynb

Large diffs are not rendered by default.

216 changes: 43 additions & 173 deletions CMB_School_Part_11_foregrounds_and_ILC.ipynb

Large diffs are not rendered by default.

59 changes: 26 additions & 33 deletions CMB_School_Part_12.ipynb

Large diffs are not rendered by default.

119 changes: 27 additions & 92 deletions CMB_School_Part_12_v2.ipynb

Large diffs are not rendered by default.

0 comments on commit e2a3e1e

Please sign in to comment.