Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
TristanCantatGaudin authored May 6, 2024
1 parent 4beec3f commit 6f45db4
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions docs/notebooks/cube_galaxy_sky.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"cells": [
{
"cell_type": "markdown",
"id": "45dca41b",
"id": "5a5ae7c4",
"metadata": {},
"source": [
"# Toy model: infering the size of a cube galaxy from the inside\n",
"# :ice_cube: Toy model: infering the size of a cube galaxy from the inside\n",
"\n",
"written by Tristan Cantat-Gaudin - last edit 2023-10-27\n",
"\n",
Expand All @@ -17,7 +17,7 @@
{
"cell_type": "code",
"execution_count": 1,
"id": "350f4109",
"id": "9d422321",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -68,7 +68,7 @@
},
{
"cell_type": "markdown",
"id": "b61e8c5a",
"id": "6832587f",
"metadata": {},
"source": [
"Inside the box: the sky positions $(\\ell,b)$ are **observed quantities**: they are the pieces of information we have measured, and we will use to test our understanding of the Milky Way. The 3D positions $(X,Y,Z)$ are called **latent variables**: we don't know them for individual stars, and we are not even trying to calculate them.\n",
Expand All @@ -83,7 +83,7 @@
{
"cell_type": "code",
"execution_count": 2,
"id": "6fe9d064",
"id": "293cdef4",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -133,7 +133,7 @@
},
{
"cell_type": "markdown",
"id": "4dd1afd8",
"id": "65e451d7",
"metadata": {},
"source": [
"This is what our cube Galaxy would look like on the sky:"
Expand All @@ -142,7 +142,7 @@
{
"cell_type": "code",
"execution_count": 3,
"id": "326ad567",
"id": "77fef9ec",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -178,7 +178,7 @@
},
{
"cell_type": "markdown",
"id": "f39efca1",
"id": "9e8e10d0",
"metadata": {},
"source": [
"## Writing down the likelihood\n",
Expand All @@ -193,7 +193,7 @@
{
"cell_type": "code",
"execution_count": 4,
"id": "4d8457b7",
"id": "36c2294f",
"metadata": {
"scrolled": true
},
Expand Down Expand Up @@ -319,7 +319,7 @@
},
{
"cell_type": "markdown",
"id": "29d2afce",
"id": "56f8718e",
"metadata": {},
"source": [
"## Maximum likelihood estimation from positions $(\\ell,b)$\n",
Expand All @@ -345,7 +345,7 @@
{
"cell_type": "code",
"execution_count": 5,
"id": "6885111f",
"id": "7d9cf2c2",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -435,7 +435,7 @@
},
{
"cell_type": "markdown",
"id": "879fd000",
"id": "40b98b23",
"metadata": {},
"source": [
"## What if our data is incomplete?\n",
Expand All @@ -446,7 +446,7 @@
{
"cell_type": "code",
"execution_count": 6,
"id": "3e8ae650",
"id": "7540a860",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -508,7 +508,7 @@
},
{
"cell_type": "markdown",
"id": "b9a7a11a",
"id": "46356581",
"metadata": {},
"source": [
"The incompleteness distorted the apparent distribution of stars on the sky. If we apply the same maximum likelihood method as above, we will get the wrong answer!"
Expand All @@ -517,7 +517,7 @@
{
"cell_type": "code",
"execution_count": 7,
"id": "bdd7138d",
"id": "1073492e",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -590,7 +590,7 @@
},
{
"cell_type": "markdown",
"id": "a8d8a78e",
"id": "93dd8482",
"metadata": {},
"source": [
"The procedure is now returning incorrect results! We know the cube size is 40 kpc, but the incomplete data makes the stellar distribution more homogeneous on the sky (because it is more incomplete in the parts of the sky with a higher true density), which mimicks the effect of the cube being larger."
Expand All @@ -599,7 +599,7 @@
{
"cell_type": "code",
"execution_count": 8,
"id": "104c05ad",
"id": "b802d9cd",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -677,7 +677,7 @@
},
{
"cell_type": "markdown",
"id": "a36382c5",
"id": "f3172cfc",
"metadata": {},
"source": [
"## Can I use the selection function to correct the data?\n",
Expand All @@ -690,7 +690,7 @@
{
"cell_type": "code",
"execution_count": 9,
"id": "8a289976",
"id": "7906a720",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -778,7 +778,7 @@
},
{
"cell_type": "markdown",
"id": "caac99e0",
"id": "9b2f178a",
"metadata": {},
"source": [
"The correct way to select the best-fit model is to compare panel C to panel E, for different choices of cube size.\n",
Expand All @@ -803,7 +803,7 @@
{
"cell_type": "code",
"execution_count": 10,
"id": "e9a05c5e",
"id": "549c93d8",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -878,7 +878,7 @@
},
{
"cell_type": "markdown",
"id": "bd1705df",
"id": "3d44d8f9",
"metadata": {},
"source": [
"## Summary plot\n",
Expand All @@ -893,7 +893,7 @@
{
"cell_type": "code",
"execution_count": 11,
"id": "a22d2891",
"id": "3308a52b",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1000,7 +1000,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -1014,7 +1014,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.9"
"version": "3.7.6"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 6f45db4

Please sign in to comment.