1
0
Fork 0
mirror of https://github.com/Findus23/halo_comparison.git synced 2024-09-19 16:03:50 +02:00

Adapted tabular output of cross spectra measurement to allow changing times more easily

This commit is contained in:
glatterf42 2022-07-20 13:36:28 +02:00
parent 36c1acfc13
commit 54263b41be

View file

@ -168,10 +168,7 @@ def create_plot(mode):
ics_data = spectra_data(waveform, res1, res2, Lbox, 'ics')
ics_k = ics_data["k [Mpc]"]
ics_pcross = ics_data["Pcross"]
smaller_res = min(res1, res2)
crossing_index = np.searchsorted(ics_k.to_list(), k0 * smaller_res)
crossing_value = ics_pcross[crossing_index]
crossings[i][j] = crossing_value
ax_ics.semilogx(ics_k, ics_pcross, color=colors[j + 3], label=f'{res1} vs {res2}')
z1_data = spectra_data(waveform, res1, res2, Lbox, 'z=1')
@ -186,6 +183,12 @@ def create_plot(mode):
ax_end.semilogx(end_k, end_pcross, color=colors[j + 3], label=f'{res1} vs {res2}')
# #Put this here to enable changing time of crossing measurement more easily
smaller_res = min(res1, res2)
crossing_index = np.searchsorted(end_k.to_list(), k0 * smaller_res) # change here
crossing_value = end_pcross[crossing_index] # and here
crossings[i][j] = crossing_value
ax_end.set_xlim(right=k0 * resolutions[-1])
ax_end.set_ylim(0.8, 1.02)
if bottom_row: