You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know where the problem is exactly, but I think the default of alpha=0.5 is plotted regardless of the user input alpha. If I try to interpolate the distribution on my own, it doesn't work unless I include fill_value='extrapolate' on interp1d:
x = np.linspace(0.01,0.08,num=int(nsamp))
y = x**(1.-0.6)
y2 = x**(1.-100)
f = interp1d(y,x, fill_value='extrapolate')
f2 = interp1d(y2,x, fill_value='extrapolate')
masses = f(np.random.uniform(size=nsamp))
masses2 = f2(np.random.uniform(size=nsamp))
Now, those are definitely different distributions!
The text was updated successfully, but these errors were encountered:
Any alpha value for the powerlaw distribution of masses returns the exact same distribution.
nsamp = 100000
mass = simulate.simulateMasses(nsamp,distribution='power-law', parameters={'alpha':0.6},mass_range=[0.01,0.08])
mass2 = simulate.simulateMasses(nsamp,distribution='power-law', parameters={'alpha':-0.6},mass_range=[0.01,0.08])
mass3 = simulate.simulateMasses(nsamp,distribution='power-law', parameters={'alpha':100},mass_range=[0.01,0.08])
mass4 = simulate.simulateMasses(nsamp,distribution='power-law', parameters={'alpha':-100},mass_range=[0.01,0.08])
I don't know where the problem is exactly, but I think the default of alpha=0.5 is plotted regardless of the user input alpha. If I try to interpolate the distribution on my own, it doesn't work unless I include fill_value='extrapolate' on interp1d:
x = np.linspace(0.01,0.08,num=int(nsamp))
y = x**(1.-0.6)
y2 = x**(1.-100)
f = interp1d(y,x, fill_value='extrapolate')
f2 = interp1d(y2,x, fill_value='extrapolate')
masses = f(np.random.uniform(size=nsamp))
masses2 = f2(np.random.uniform(size=nsamp))
Now, those are definitely different distributions!
The text was updated successfully, but these errors were encountered: