{ "cells": [ { "cell_type": "code", "execution_count": 35, "id": "7099f7b6-fa28-4ea0-9527-336af34cabdb", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\t\t\t\t\t\t\t\t\t\t\t\t
\"Output\"
\"Output\"
" ], "text/plain": [ "-Graphics-\n", "-Graphics-" ] }, "execution_count": 40, "metadata": { "text/html": [], "text/plain": [] }, "output_type": "execute_result" } ], "source": [ "Needs[\"ErrorBarLogPlots`\"]\n", "PantheonAll = Import[\"/Users/jamjang/Desktop/coscom/mathematica/tutorial/pantheon.txt\", \"Table\"];\n", "PantheonAll = PantheonAll[[2 ;; Length@PantheonAll]];\n", "\n", "listErrorPTdm = Table[{PantheonAll[[i, 2]], PantheonAll[[i, 5]], PantheonAll[[i, 6]]}, {i, 1, Length@PantheonAll, 1}];\n", "\n", "listErrorPTdL = Table[{PantheonAll[[i, 3]], 10^(1/5 *(-25 + (PantheonAll[[i, 5]] + 19.3))) *1/1000, \n", "10^(1/5* (-25 + (PantheonAll[[i, 6]] + 19.3))) *1/1000}, {i, 1, Length@PantheonAll, 1}];\n", "\n", "obserrordm = ErrorListLogLinearPlot[listErrorPTdm, PlotStyle -> RGBColor[0, 0, 0],Frame -> True, \n", " FrameLabel -> TraditionalForm /@ {\"z\", \"\\!\\(\\*SubscriptBox[\\(m\\), \\(B\\)]\\)\"}, \n", " BaseStyle -> {FontFamily -> \"Times\", FontSize -> 16}, \n", " PlotRange -> All]\n", " \n", "obserrordL = ErrorListPlot[listErrorPTdL, PlotStyle -> RGBColor[0, 0, 0], \n", " Frame -> True, FrameLabel -> TraditionalForm /@ {\"z\", \"\\!\\(\\*SubscriptBox[\\(d\\), \\(L\\)]\\) (Gpc)\"}, \n", " BaseStyle -> {FontFamily -> \"Times\", FontSize -> 16}, \n", " PlotRange -> All]" ] }, { "cell_type": "code", "execution_count": 53, "id": "50420471-5822-4299-bc3b-917f4c5abd0b", "metadata": {}, "outputs": [], "source": [ "paramsub = {c -> 3 10^8, H0 -> 73, Omegar0 -> 0.00009204227740000001,OmegaDE0 -> 0.692, Omegak0H02 -> 0};\n", "paramsubn1 = {c -> 3 10^8, H0 -> 73, Omegar0 -> 0.00009204227740000001, OmegaDE0 -> 0.692, Omegak0H02 -> 1};\n", "paramsubp1 = {c -> 3 10^8, H0 -> 73, Omegar0 -> 0.00009204227740000001, OmegaDE0 -> 0.692, Omegak0H02 -> -1};\n", "paramsubt = {c -> 3 10^8, H0 -> 73, Omegar0 -> 0.00009204227740000001, OmegaDE0 -> 0, Omegak0H02 -> 0};" ] }, { "cell_type": "code", "execution_count": 57, "id": "35de9866-8375-434e-b43d-10f59e794821", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\"Output\"
" ], "text/plain": [ "Legended[-Graphics-, Placed[PointLegend[{Directive[PointSize[0.00916667], \n", " \n", "> RGBColor[0.368417, 0.506779, 0.709798], AbsoluteThickness[1.6], \n", " \n", "> FontFamily -> Times, FontSize -> 16]}, {ΛCDM}, \n", " \n", "> LegendMarkers -> {{False, Automatic}}, Joined -> {True}, LabelStyle -> {}, \n", " \n", "> LegendLayout -> Column], After, Identity]]" ] }, "execution_count": 57, "metadata": { "text/html": [], "text/plain": [] }, "output_type": "execute_result" } ], "source": [ "dLΛCDM = ListPlot[Table[{i, (1 + i) (c /. paramsub)/(1000*1000 H0 /. paramsub)\n", " NIntegrate[1/(\\[Sqrt]((1 - OmegaDE0 - Omegar0 - Omegak0H02/H0^2) (1 + z)^3 + (OmegaDE0) \n", " + (Omegar0) (1 + z)^4 + (Omegak0H02/H0^2) (1 + z)^2) /. paramsub), \n", " {z, 0, i}]}, {i, 0., 2.3,0.01}], Frame -> True (*,PlotLabel\\[Rule]\"Evolution of density parameters\"*), \n", " FrameLabel -> TraditionalForm /@ {\"z\",\"\\!\\(\\*SubscriptBox[\\(d\\), \\(L\\)]\\) (Gpc)\"}, \n", " BaseStyle -> {FontFamily -> \"Times\", FontSize -> 16}, \n", " PlotLegends -> {\"ΛCDM\"}, PlotRange -> All(*,PlotRange\\[Rule]{{0,3.1},{60,100}}*), Joined -> True]" ] }, { "cell_type": "code", "execution_count": 48, "id": "94b64537-4893-49c5-b2a1-de53081c1580", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\"Output\"
" ], "text/plain": [ "Legended[-Graphics-, Placed[PointLegend[{Directive[PointSize[0.00916667], \n", " \n", "> AbsoluteThickness[1.6], FontFamily -> Times, FontSize -> 16, RGBColor[1, 0, 0]]}\\\n", " \n", "> , {ΛCDM}, LegendMarkers -> {{False, Automatic}}, Joined -> {True}, \n", " \n", "> LabelStyle -> {}, LegendLayout -> Column], After, Identity]]" ] }, "execution_count": 48, "metadata": { "text/html": [], "text/plain": [] }, "output_type": "execute_result" } ], "source": [ "dmΛCDM = ListLogLinearPlot[Table[{i,5 Log10[(1 + i) (c /. paramsub)/(1000 H0 /. paramsub)\n", " NIntegrate[1/(\\[Sqrt]((1 - OmegaDE0 - Omegar0 - Omegak0H02/H0^2) (1 + z)^3 + (OmegaDE0) \n", " + (Omegar0) (1 +z)^4 + (Omegak0H02/H0^2) (1 + z)^2 /. paramsub)), \n", " {z, 0, i}]] + 25 - 19.328}, {i, 0., 2.3, 0.01}], Frame -> True\n", " (*,PlotLabel\\[Rule]\"Evolution of density parameters\"*), \n", " FrameLabel -> TraditionalForm /@ {\"z\", \"\\!\\(\\*SubscriptBox[\\(m\\), \\(B\\)]\\)\"}, \n", " BaseStyle -> {FontFamily -> \"Times\", FontSize -> 16}, \n", " PlotLegends -> {\"ΛCDM\"}, PlotRange -> All(*,PlotRange\\[Rule]{{0,3.1},{60,100}}*), \n", " Joined -> True, PlotStyle -> {Red}]" ] }, { "cell_type": "code", "execution_count": 49, "id": "45b2a76a-b4d7-453e-9ac4-3e83f3259fc4", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\"Output\"
" ], "text/plain": [ "Legended[-Graphics-, Placed[PointLegend[{Directive[PointSize[0.00916667], \n", " \n", "> AbsoluteThickness[1.6], FontFamily -> Times, FontSize -> 16, RGBColor[0, 0, 1]]}\\\n", " \n", "> , {ΛCDM0DE}, LegendMarkers -> {{False, Automatic}}, Joined -> {True}, \n", " \n", "> LabelStyle -> {}, LegendLayout -> Column], After, Identity]]" ] }, "execution_count": 49, "metadata": { "text/html": [], "text/plain": [] }, "output_type": "execute_result" } ], "source": [ "dmΛCDMtrial = ListLogLinearPlot[Table[{i, 5 Log10[(1 + i) (c /. paramsubt)/(1000 H0 /. paramsubt)\n", " NIntegrate[1/(\\[Sqrt]((1 - OmegaDE0 - Omegar0 - Omegak0H02/(1000 H0)^2) (1 + z)^3 + (OmegaDE0) \n", " + (Omegar0) (1 + z)^4 + (Omegak0H02/(1000 H0)^2) (1 + z)^2) /. paramsubt), \n", " {z, 0, i}]] + 25 - 19.328}, {i, 0., 2.3, 0.01}], \n", " Frame -> True(*, PlotLabel\\[Rule]\"Evolution of density parameters\"*), \n", " FrameLabel -> TraditionalForm /@ {\"z\", \"\\!\\(\\*SubscriptBox[\\(m\\), \\(B\\)]\\)\"}, \n", " BaseStyle -> {FontFamily -> \"Times\", FontSize -> 16}, \n", " PlotLegends -> {\"ΛCDM0DE\"}, PlotRange -> All(*,PlotRange\\[Rule]{{0,3.1},{60,100}}*), \n", " Joined -> True, PlotStyle -> {Blue}]" ] }, { "cell_type": "code", "execution_count": 50, "id": "ed6ac580-df5b-43d1-8e21-69b756e58702", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\"Output\"
" ], "text/plain": [ "Legended[-Graphics-, Placed[PointLegend[{Directive[PointSize[0.00916667], \n", " \n", "> AbsoluteThickness[1.6], FontFamily -> Times, FontSize -> 16, \n", " \n", "> Dashing[{Small, Small}], RGBColor[0, 1, 0]]}, {ΛCDMk-1}, \n", " \n", "> LegendMarkers -> {{False, Automatic}}, Joined -> {True}, LabelStyle -> {}, \n", " \n", "> LegendLayout -> Column], After, Identity]]" ] }, "execution_count": 50, "metadata": { "text/html": [], "text/plain": [] }, "output_type": "execute_result" } ], "source": [ "dmΛCDMn1 = ListLogLinearPlot[Table[{i, 5 Log10[(1 + i) (c /. paramsubn1)/(1000 H0 /. paramsubn1)\n", " Sinh[NIntegrate[1/(\\[Sqrt]((1 - OmegaDE0 - Omegar0 - Omegak0H02/(1000 H0)^2) (1 + z)^3 + (OmegaDE0) \n", " + (Omegar0) (1 + z)^4 + (Omegak0H02/(1000 H0)^2) (1 + z)^2) /. paramsubn1), {z, 0, i}]]] + 25 - 19.328}, \n", " {i, 0., 2.3, 0.01}], Frame -> True(*,PlotLabel\\[Rule]\"Evolution of density parameters\"*), \n", " FrameLabel -> TraditionalForm /@ {\"z\", \"\\!\\(\\*SubscriptBox[\\(m\\), \\(B\\)]\\)\"}, \n", " BaseStyle -> {FontFamily -> \"Times\", FontSize -> 16}, \n", " PlotLegends -> {\"ΛCDMk-1\"}, PlotRange -> All(*,\n", " PlotRange\\[Rule]{{0,3.1},{60,100}}*), Joined -> True, \n", " PlotStyle -> {Dashed, Green}]" ] }, { "cell_type": "code", "execution_count": 51, "id": "2c066a99-96d3-47f1-8964-415be7c1f5a6", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\"Output\"
" ], "text/plain": [ "Legended[-Graphics-, Placed[PointLegend[{Directive[PointSize[0.00916667], \n", " \n", "> AbsoluteThickness[1.6], FontFamily -> Times, FontSize -> 16, \n", " \n", "> Dashing[{Small, Small}], RGBColor[1, 0.5, 0]]}, {ΛCDMk1}, \n", " \n", "> LegendMarkers -> {{False, Automatic}}, Joined -> {True}, LabelStyle -> {}, \n", " \n", "> LegendLayout -> Column], After, Identity]]" ] }, "execution_count": 51, "metadata": { "text/html": [], "text/plain": [] }, "output_type": "execute_result" } ], "source": [ "dmΛCDMp1 = ListLogLinearPlot[Table[{i, 5 Log10[(1 + i) (c /. paramsubp1)/(1000 H0 /. paramsubp1)\n", " Sin[NIntegrate[1/(\\[Sqrt]((1 - OmegaDE0 - Omegar0 - Omegak0H02/(1000 H0)^2) (1 + z)^3 + (OmegaDE0) \n", " + (Omegar0) (1 + z)^4 + (Omegak0H02/(1000 H0)^2) (1 + z)^2) /. paramsubp1), {z, 0, i}]]] + 25 - 19.328}, \n", " {i, 0., 2.3, 0.01}], Frame -> True(*,\n", " PlotLabel\\[Rule]\"Evolution of density parameters\"*), \n", " FrameLabel -> TraditionalForm /@ {\"z\", \"\\!\\(\\*SubscriptBox[\\(m\\), \\(B\\)]\\)\"}, \n", " BaseStyle -> {FontFamily -> \"Times\", FontSize -> 16}, \n", " PlotLegends -> {\"ΛCDMk1\"}, PlotRange -> All(*,\n", " PlotRange\\[Rule]{{0,3.1},{60,100}}*), Joined -> True, \n", " PlotStyle -> {Dashed, Orange}]" ] }, { "cell_type": "code", "execution_count": 52, "id": "ed9a20ca-57b0-4dbb-bee9-9df71d9e58bb", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\"Output\"
" ], "text/plain": [ "Legended[Legended[Legended[Legended[-Graphics-, \n", " \n", "> Placed[PointLegend[{Directive[PointSize[0.00916667], AbsoluteThickness[1.6], \n", " \n", "> FontFamily -> Times, FontSize -> 16, RGBColor[1, 0, 0]]}, {ΛCDM}, \n", " \n", "> LegendMarkers -> {{False, Automatic}}, Joined -> {True}, LabelStyle -> {}, \n", " \n", "> LegendLayout -> Column], After, Identity]], \n", " \n", "> Placed[PointLegend[{Directive[PointSize[0.00916667], AbsoluteThickness[1.6], \n", " \n", "> FontFamily -> Times, FontSize -> 16, Dashing[{Small, Small}], \n", " \n", "> RGBColor[0, 1, 0]]}, {ΛCDMk-1}, LegendMarkers -> {{False, Automatic}}, \n", " \n", "> Joined -> {True}, LabelStyle -> {}, LegendLayout -> Column], After, Identity]], \n", " \n", "> Placed[PointLegend[{Directive[PointSize[0.00916667], AbsoluteThickness[1.6], \n", " \n", "> FontFamily -> Times, FontSize -> 16, Dashing[{Small, Small}], \n", " \n", "> RGBColor[1, 0.5, 0]]}, {ΛCDMk1}, LegendMarkers -> {{False, Automatic}}, \n", " \n", "> Joined -> {True}, LabelStyle -> {}, LegendLayout -> Column], After, Identity]], \n", " \n", "> Placed[PointLegend[{Directive[PointSize[0.00916667], AbsoluteThickness[1.6], \n", " \n", "> FontFamily -> Times, FontSize -> 16, RGBColor[0, 0, 1]]}, {ΛCDM0DE}, \n", " \n", "> LegendMarkers -> {{False, Automatic}}, Joined -> {True}, LabelStyle -> {}, \n", " \n", "> LegendLayout -> Column], After, Identity]]" ] }, "execution_count": 52, "metadata": { "text/html": [], "text/plain": [] }, "output_type": "execute_result" } ], "source": [ "Show[obserrordm, dmΛCDM, dmΛCDMn1, dmΛCDMp1, dmΛCDMtrial]" ] }, { "cell_type": "code", "execution_count": null, "id": "a835ec24-8045-447f-bfeb-a88c4a1df1ea", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Wolfram Language 13.1", "language": "Wolfram Language", "name": "wolframlanguage13.1" }, "language_info": { "codemirror_mode": "mathematica", "file_extension": ".m", "mimetype": "application/vnd.wolfram.m", "name": "Wolfram Language", "pygments_lexer": "mathematica", "version": "12.0" } }, "nbformat": 4, "nbformat_minor": 5 }