AstroGeoFit Results Visualisation

Below are the steps for the visualisations of the AstroGeoFit results. This is for all platforms as there are minimal changes from one platform to another. For more detailed instructions, refer to the online documentation.

For AstroGeoFit Version 1.x, we use Jupyter Notebook for the visualization of each analysis. It is recommended to use Jupyter Lab, that allows to work on multiple Jupyter notebooks for different analyses at the same time.

1- Open a terminal. For MacOS and Linux users, open a terminal. For Windows users, open the “Anaconda PowerShell Prompt” (attention, “Anaconda Prompt” is not suggested, please use “Anaconda PowerShell Prompt”).

2- Go to your working folder

For Windows, go to the Disk/Drive where you put the “.ipynb” files (e.g.  “AstroGeoFit_Analysis_Model_Fitting.ipynb” and “AstroGeoFit_Analysis_MCMC.ipynb”). For example, if you put the files in the D Drive, type the following command in the “Anaconda PowerShell Prompt”:

cd D:\

(Change the Drive as needed.) For MacOS and Linux, type the following command that brings you to your Home directory:

cd ~

Note: going to the root folder is not necessary. You can also go to your working directory, but on a Windows machine, you need to be on the same drive as your AstroGeoFit files.

3- Open Jupyter Lab. Hereafter, we refer to both “terminal” and “Anaconda PowerShell Prompt” collectively as the “terminal”. For all the operating system users, type the following command in the terminal:

conda activate astrogeofit
jupyter-lab

For Windows users, try the following command if errors occur on «jupyter-lab» :

python -m jupyter-lab

A web page will open automatically. You will see:

4-Find your “.ipynb” files in the content tree on the left, such as “AstroGeoFit_Analysis_Model_Fitting.ipynb”. Click it to open the notebook; you will see:

Tips: feel free to copy, paste and rename these “.ipynb” files under the folder of your dataset, which is more convenient especially when you need to analyze multiple data series. Note that in the figure, it is written “astrogeofitx” instead of “astrogeofit” this is just because several environments were constructed. You need to use the name you gave to your conda environment.

5- Select the right kernel for Jupyter Lab.
Since JupyterLab has already been launched within the “astrogeofit” virtual environment (assuming you have followed previous steps well), there is no need to change the kernel; you can simply use the default “Python 3” kernel. If you have several environments, you need to be sure to have selected the proper kernel. If you need to switch between multiple kernels, this step will be necessary. There are two ways to switch to the “astrogeofit” kernel

Option 1

Option 2

6- Run the cells. Click the cell you want to run, and the boundary of this cell will turn blue (as shown below). There are two ways to run the cells.

Option 1: Click the little triangle sign on the top left of the notebook. (Its function is to run this cell and advance)

Option 2: use shortcut “Shift+Enter”

You will then see a number on the top left of the cell, indicating that you have run/executed it.

7- Input information about your configuration file and outputs. Change the “configuration_file_path” as needed. Choose the figure format you want to save (e.g., here “pdf” is chosen). Run this cell.

8- Run the cell of “OBTENTION OF THE RESULTS”. It looks like this:

9- Run the cell of “METRIC RESULT PER EACH SOLUTION AND EACH NUMBER OF GENS”. It looks like this:

Congratulations! You have generated your first figure using AstroGeoFit. Following the same approach, you will be able to generate the remaining figures on your own. Don’t forget to read the hints before each cell carefully to understand how to adjust the parameters if needed.

Scroll to Top