Dusty Forest Demo

To use the astrodust package, you can either predownload the two required models into a models directory in the current working directory, or the package will automatically download the models for you when you instaniate the class, from our repository at Zenodo [https://zenodo.org/record/4662910#.YHy7FmRue3I]. After defining your input parameters, call the predict function, and the result will be an array of predictions for 171 size bins.

Table of Parameters for predict method

Parameter Name Data Type Description
r float Distance from central star (AU)
alpha float Turbulence parameter
d2g float Dust-to-gas ratio in disk
sigma float Surface density of gas (g/cm^2)
tgas float Tempterature of gas (K)
t int Absolute time (seconds)
delta_t int Change in time at which prediction is being made (seconds)
input_bins list 171-length array of initial dust densities

Note that as of v.1.0.0 of astrodust, mstar (the mass of the central star) is not included, since in our training, we always had a stellar mass of 1. Future versions of the package may include this as a parameter if we train on variable stellar masses.

Use Case 1

Let's take a look at how to install and import this package, and make a simple prediction about the evolution of dust particles in a protoplanetary disk.

First, we use a pip install to fetch the package from the test pypi site where it's hosted. We include the --upgrade command to make sure we get the most up-to-date version of the package, if we already had a previous version.

Next, it's important to set the working directory correctly, since we need to make sure the code can find the directory which contains the pre-trained models. I have this in a higher directory, and this can and should be edited as needed.

Now we import the astrodust package

Next, we'll perform one prediction. First, set your input parameters. Then, we instantiate the DustModel class from the package, and finally we make our prediction using the predict method.

Use Case 2

We also want to be able to make a prediction about dust evolution, and know if the prediction is confident or not.

This package also contains a model that will predict whether the prediction is a good fit or not and will raise a warning if it may not be a good fit.

We see that we got a warning that this prediction might not be accurate, so we should likely return to more traditional means of investigating this particular set of parameters.