Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The definition of cutoff radius of density #10

Open
yingxingcheng opened this issue May 19, 2023 · 5 comments
Open

The definition of cutoff radius of density #10

yingxingcheng opened this issue May 19, 2023 · 5 comments

Comments

@yingxingcheng
Copy link

yingxingcheng commented May 19, 2023

def get_cutoff_radius(self, density_cutoff):
if density_cutoff <= 0.0:
return np.inf
population, exponent = self.pars
return (np.log(population) - np.log(density_cutoff)) / exponent

Is the prefactor $\frac{\alpha^3_{Ai}}{8 \pi}$ missed in the definition of the cutoff radius of radial density?

$$\rho_{Ai}^0(\vec{r}) = N_{Ai} f_{Ai}(\vec{r}) = \frac{N_{Ai} \alpha^3_{Ai}}{8\pi}e^{-\alpha_{Ai}|\vec{r}-\vec{R}_A|}$$

@PaulWAyers
Copy link
Member

It's impossible to say because the function isn't documented.

The constant factor is not going to drastically affect the cutoff, but I agree that it would be sensible to include it.

@tovrstra
Copy link
Member

tovrstra commented May 30, 2023

I also agree it would be better to include it (and document the method). Something along the following lines would be more fitting:

$$R_\text{cut}=-\frac{1}{\alpha}\bigl(\ln(\rho_\text{cut}) + \ln 8\pi - \ln N - 3\ln \alpha\bigr)$$

@yingxingcheng
Copy link
Author

I think a minus sign is missing. $R_\text{cut}' = -R_\text{cut}$

@tovrstra
Copy link
Member

Thanks. I've fixed it by editing my comment.

@tovrstra
Copy link
Member

P.S. Long overdue, but I fixed it in 0182d1a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants