Skip to content

Commit

Permalink
fixed last commit.
Browse files Browse the repository at this point in the history
-removed obsolete seaborn dependencies
- reverted changes that might be a (?bug)
  • Loading branch information
AnonymousCodes911 committed Feb 16, 2024
1 parent 28ec156 commit f9c5ac5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 17 deletions.
14 changes: 2 additions & 12 deletions LombScargle/LombScargleCrossspectrum_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,6 @@
"This tutorial shows how to make and manipulate a Lomb Scargle cross spectrum of two light curves using Stingray."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# we can see the new Valid seaborn Styles by running: \n",
"#plt.style.available "
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand All @@ -31,9 +21,9 @@
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"import matplotlib.font_manager as font_manager\n",
"plt.style.use('seaborn-v0_8-talk')# removed the earlier seaborn-talk dependency\"\n",
"plt.style.use('seaborn-v0_8-talk')\n",
"%matplotlib inline\n",
"from matplotlib.font_manager import FontProperties #Not importing this was causing Import error\n",
"from matplotlib.font_manager import FontProperties\n",
"font_prop = font_manager.FontProperties(size=16)"
]
},
Expand Down
1 change: 1 addition & 0 deletions LombScargle/LombScarglePowerspectrum_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"import matplotlib.font_manager as font_manager\n",
"%matplotlib inline\n",
"plt.style.use('seaborn-v0_8-talk')\n",
"\n",
"font_prop = font_manager.FontProperties(size=16)"
]
},
Expand Down
6 changes: 2 additions & 4 deletions Modeling/ModelingExamples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2035,11 +2035,9 @@
],
"source": [
"plt.figure()\n",
"#ps.freq and ps.power have different lengths\n",
"#Truncating one of the arrays to match the length of the other array\n",
"plt.loglog(ps.freq[:1000], ps.power, ds=\"steps-mid\", lw=2, color=\"black\")\n",
"plt.figure()\n",
"plt.plot(ps.freq[:1000], res.mfit, lw=3, color=\"red\")"
"plt.loglog(ps.freq, ps.power, ds=\"steps-mid\", lw=2, color=\"black\")\n",
"plt.plot(ps.freq, res.mfit, lw=3, color=\"red\")"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion Window Functions/window_functions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
],
"source": [
"nfft = 2048\n",
"A = fft(window,nfft ) / (len(window)/2.0)\n",
"A = fft(uniform_window,nfft ) / (len(uniform_window)/2.0)\n",
"freq = fftfreq(nfft)\n",
"response = 20 * np.log10(np.abs(fftshift(A/(abs(A).max()))))\n",
"plt.plot(freq, response)\n",
Expand Down

0 comments on commit f9c5ac5

Please sign in to comment.