for j in range(nbins_m): mask = (mass_long > mass_bins[j]) & (mass_long < mass_bins[j + 1]) plot_data[f'minT_{minT[i]}_med'][j] = np.nanmedian( np.log10(ew_no_uvb[mask]) - np.log10(ew_with_uvb[mask])) plot_data[f'minT_{minT[i]}_per25'][j] = np.nanpercentile( np.log10(ew_no_uvb[mask]) - np.log10(ew_with_uvb[mask]), 25.) plot_data[f'minT_{minT[i]}_per75'][j] = np.nanpercentile( np.log10(ew_no_uvb[mask]) - np.log10(ew_with_uvb[mask]), 75.) write_dict_to_h5(plot_data, median_file) for i in range(len(minT)): ax[l].plot(plot_data['mass'], plot_data[f'minT_{minT[i]}_med'], ls='-', c=colors[i], label=r'$T_{{\rm min}} = {{{}}}$'.format(minT[i])) if i == len(minT) - 2: ax[l].fill_between(plot_data['mass'], plot_data[f'minT_{minT[i]}_per25'], plot_data[f'minT_{minT[i]}_per75'], color=colors[i], alpha=0.4) if l == 0:
f'ew_wave_{fr200[j]}r200'].flatten() plot_data[f'minT_{minT[i]}_{bin_label}_med'][ j] = np.nanmedian( np.log10(ew_no_uvb[mask]) - np.log10(ew_with_uvb[mask])) plot_data[f'minT_{minT[i]}_{bin_label}_per25'][ j] = np.nanpercentile( np.log10(ew_no_uvb[mask]) - np.log10(ew_with_uvb[mask]), 25.) plot_data[f'minT_{minT[i]}_{bin_label}_per75'][ j] = np.nanpercentile( np.log10(ew_no_uvb[mask]) - np.log10(ew_with_uvb[mask]), 75) write_dict_to_h5(plot_data, profile_file) for i in range(len(minT)): ax[l].plot(plot_data['fr200'], plot_data[f'minT_{minT[i]}_{bin_label}_med'], ls='-', c=colors[i], label=r'$T_{{\rm min}} = {{{}}}$'.format(minT[i]), lw=1.5) if minT[i] == '5.0': ax[l].fill_between( plot_data['fr200'], plot_data[f'minT_{minT[i]}_{bin_label}_per75'], plot_data[f'minT_{minT[i]}_{bin_label}_per25'], alpha=0.3,