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

Minor bug in radmc3dPy dust mass calculations #31

Open
j6626 opened this issue Feb 6, 2023 · 0 comments
Open

Minor bug in radmc3dPy dust mass calculations #31

j6626 opened this issue Feb 6, 2023 · 0 comments

Comments

@j6626
Copy link

j6626 commented Feb 6, 2023

In the getDustMass function in the data.py file in the radmc3dPy package, one has the option of either calculating the total dust mass or calculating the dust mass of individual species. The first code block, which calculates the dust mass of individual species, currently reads

        if idust > 0:
            #
            # I'm not sure if this is the right way of doing it but right now I don't have a better idea
            #
            if isinstance(self.grid, radmc3dOctree):
                dmass = (vol * self.rhodust[:, idust]).sum()
            else:
                dmass = (vol * self.rhodust[:, :, :, idust]).sum()

However, this does not allow calculation of the dust mass of species 0. The first line should be changed to something like if idust > -1 or if idust != -1 to get the intended behavior.

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

1 participant