Skip to content

Instantly share code, notes, and snippets.

@jwise77
Created October 26, 2023 21:56
Show Gist options
  • Save jwise77/a822f0f6d007eae6ed20f3968114c6e2 to your computer and use it in GitHub Desktop.
Save jwise77/a822f0f6d007eae6ed20f3968114c6e2 to your computer and use it in GitHub Desktop.
Flux to brightness temperature
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 4,
"id": "cbdd03bd-b21b-415f-b5c7-eda8510e2919",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import astropy"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "176b22ab-b54a-4f81-9822-ffe8149807ed",
"metadata": {},
"outputs": [],
"source": [
"from astropy import units as u"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "71194c55-edba-4049-8c36-4b3a59871885",
"metadata": {},
"outputs": [],
"source": [
"freq = 1*u.MHz\n",
"equiv = u.brightness_temperature(freq)\n",
"\n",
"# angular size of source (Jupiter ranges from 30 to 60 arcsec)\n",
"# I'm just including a factor of 10 to include its magnetosphere\n",
"source_diameter = 10*u.arcmin\n",
"source_area = np.pi*(source_diameter/2)**2"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "f8cf9cf1-b19f-45ba-bb83-437cea4303e5",
"metadata": {},
"outputs": [],
"source": [
"# From Cassini at Jupiter (Figure 2 in https://www.nature.com/articles/415985a)\n",
"# Flux was integrated over 0.5-5.6 MHz\n",
"Delta_nu = 5.1 * u.MHz\n",
"flux = 1e-10 * u.W / u.m**2 / (4*np.pi*u.sr) / Delta_nu"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "3bd9e61c-2d45-47c2-8df9-e4cf35f61535",
"metadata": {},
"outputs": [
{
"data": {
"text/latex": [
"$5.0786477 \\times 10^{9} \\; \\mathrm{K}$"
],
"text/plain": [
"<Quantity 5.0786477e+09 K>"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"flux.to(u.K, equivalencies=equiv)"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "1d22f73f-e368-4d6b-a538-47c704d08483",
"metadata": {},
"outputs": [
{
"data": {
"text/latex": [
"$56586167 \\; \\mathrm{K}$"
],
"text/plain": [
"<Quantity 56586167.27900947 K>"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Numbers from Karl's code\n",
"# Cassini was at approximately 9.5e10 m from Jupiter\n",
"# Correct to the farthest distance between Moon and Jupiter (9.0e11 m)\n",
"dist_ratio = 9e11 / 9.5e10\n",
"flux_at_moon = flux / dist_ratio**2\n",
"flux_at_moon.to(u.K, equivalencies=equiv)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6b8712c6-36bd-4225-9437-20b510d7324e",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment