Below are the steps for the installation of AstroGeoFit for the AstroGeoFit Workshop. If possible, participants can make these installations before the start of the workshop.
Windows install. Everything is in the documentation, and you can refer to it whenever you need additional information, but to make it more easy, we have described the essential steps below.
For a Windows user, follow the following steps
1-Install Miniconda. This is the Python environment. In the Miniconda webpage for installation, you have the choice of graphic install or terminal install. Use the one you feel the most comfortable with. The result will be the same. Choose just one.
2-Download the AstroGeoFit Package from the AstroGeo.eu website Here. Unzip the package. You will see a astrogeofit-1.x folder. (1.0 in the example below, but now 1.1, so replace everywhere 1.0 by 1.1 below).
3-From now, you need to use the “Anaconda PowerShell Prompt” tool of the Windows system. (Actually, there are two options for prompts: “Anaconda Prompt” and “Anaconda PowerShell Prompt”, the latter is more convenient for using shell commands). Open the Anaconda PowerShell Prompt, go to the astrogeofit-1.0 folder.

4-The simplest way is to type “cd” (without the “) on the Anaconda PowerShell Prompt. Use “cd [path]”, replace [path] with the path to the astrogeofit–1.0 folder. Then type “ls” to check what the folder contains. It should look like this

5. Next, create a virtual environment to avoid potential version compatibility issues.
In the Anaconda PowerShell Prompt write:
conda create --name astrogeofit python=3.9
Once the environment is created, activate it by writing:
conda activate astrogeofit
There should be “(astrogeofit)” on the left of the command line if it is successfully activated, as shown in the following figure:

6. Then register the “astrogeofit” environment as a Jupyter kernel by typing the following command in the Anaconda PowerShell Prompt:
python -m ipykernel install --user --name astrogeofit --display-name "astrogeofit"
If errors are raised about “pip”, try the following commands to fix it: (which command works depends on your computer setting.)
python -m ensurepip --upgrade
conda install pip
python.exe -m pip install --upgrade pip
python -m pip install --upgrade pip
py -m pip install --upgrade pip
If errors are raised about “ipykernel”, try the following commands to fix it:
pip install ipykernel
Then try the kernel registration again:
python -m ipykernel install --user --name astrogeofit --display-name "astrogeofit"
Check if you have successfully registered the kernel by typing:
jupyter kernelspec list

7. Next, install the AstroGeoFit package inside the “astrogeofit” environment. Type this command in the Anaconda PowerShell Prompt:
pip install astrogeofit-1.1-py3-none-any.whl
If it fails, try:
python -m pip install .\astrogeofit-1.1-py3-none-any.whl
If it fails again, try:
py -m pip install .\astrogeofit-1.1-py3-none-any.whl
8. Run your first example. In order to limit the runtime that can be large on a full scale job, we will limit this first example to the genetic algorithm fitting part, and will not run the MCMC part. We use the configuration files stored in the “example” folder. The command is then
python .\AstroGeoFit_tool.py -fit -p .\examples\synthetic_data\configuration_file\configuration_synthetic_data.yml -r
The output should look like

Congratulation, you have properly installed AstroGeoFit ! You have run your first AstroGeoFit job and are ready for the AstroGeoFit workshop !
Now you can go to the next step, that is the visualisation of the results : Here
