Skip to content

Commit

Permalink
Make minor fixes to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
AgenttiX committed Nov 28, 2024
1 parent 1f99543 commit 36cfb24
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 8 deletions.
2 changes: 2 additions & 0 deletions examples/entropy/p_s_scan_dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
Created on Wed Jun 23 15:53:31 2021
@author: hindmars
As of 2024, this file is unmaintained and the thermo module is not in this repository.
"""

# import sys
Expand Down
5 changes: 3 additions & 2 deletions examples/giese_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@
ax.set_ylabel(r"$\alpha_n$")
ax.grid()

save_and_show(fig, "giese_testing.png")
# plt.show()

if __name__ == "__main__":
save_and_show(fig, "giese_testing.png")
2 changes: 1 addition & 1 deletion examples/giese_testing2.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Giese testing 2
=============
===============
Compare Giese fluid profiles with PTtools
"""
Expand Down
7 changes: 7 additions & 0 deletions examples/noise.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
"""
LISA noise
==========
Plot LISA instrument and astrophysical noise as a function of frequency.
"""

from matplotlib import pyplot as plt
import numpy as np

Expand Down
6 changes: 3 additions & 3 deletions examples/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@


def main():
model = BagModel(g_s=123, g_b=120, V_s=0.9)
model = BagModel(a_s=1.5, a_b=1, V_s=1)

bubbles = create_bubbles(
model=model,
v_walls=np.linspace(0.05, 0.95, 20),
alpha_ns=np.linspace(model.alpha_n_min+0.01, 0.5, 20)
v_walls=np.linspace(0.1, 0.9, 3),
alpha_ns=np.linspace(model.alpha_n_min+0.01, 0.3, 3)
)

print(bubbles[0, 0].sol_type)
Expand Down
4 changes: 2 additions & 2 deletions examples/plot_spectra.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from examples import utils
from pttools.bubble import Bubble
from pttools.models import BagModel, ConstCSModel
from pttools.ssmtools import Spectrum
from pttools.ssmtools import SSMSpectrum


def main():
Expand All @@ -23,7 +23,7 @@ def main():
Bubble(model1, v_wall=0.5, alpha_n=0.2),
Bubble(model2, v_wall=0.5, alpha_n=0.2)
]
spectra = [Spectrum(bubble) for bubble in bubbles]
spectra = [SSMSpectrum(bubble) for bubble in bubbles]

return plot_spectra(spectra)

Expand Down

0 comments on commit 36cfb24

Please sign in to comment.