Installation¶
Note
TelescopeML requires python >= 3.9.
Step 1: Create your directory structure¶
Let’s start by creating the folder structure as follow, named TelescopeML_project. While you are inside this parent TelescopeML_project directory, download the reference_data folder which include the following sub-directories: training_datasets, tutorials, observational_datasets, figures, trained_ML_models.
Download link for reference_data folder is: Link
Step 2: Set input file environment variables¶
Note
Navigate to the reference_data directory in your terminal and use the pwd command to find its path.
Replace PATH_TO_YOUR_REFERENCE_DATA with the actual path to your reference_data folder.
To confirm that your variable has been defined properly, use the command echo $TelescopeML_reference_data.
For Mac OS¶
Follow the following steps to set the link to the input data:
Check your default shell in your terminal:
echo $SHELL
This command will display the path to your default shell, typically something like /bin/bash or /bin/zsh, or /bin/sh.
Set the environment variables :
If your shell is /bin/zsh:
echo 'export TelescopeML_reference_data="/PATH_TO_YOUR_REFERENCE_DATA/" ' >>~/.zshrc source ~/.zshrc echo $TelescopeML_reference_data
if your shell is /bin/bash:
echo 'export TelescopeML_reference_data="/PATH_TO_YOUR_REFERENCE_DATA/"' >>~/.bash_profile source ~/.bash_profile echo $TelescopeML_reference_data
if your sell is /bin/sh:
echo 'export TelescopeML_reference_data="/PATH_TO_YOUR_REFERENCE_DATA/"' >>~/.profile source ~/.profile echo $TelescopeML_reference_data
For Linux¶
In Linux, the choice between ~/.bashrc and ~/.bash_profile depends on your specific use case and how you want environment variables to be set, but ~/.bashrc is a common and practical choice for modern Linux system.
echo 'export TelescopeML_reference_data="/PATH_TO_YOUR_REFERENCE_DATA/" ' >>~/.bashrc
source ~/.bashrc
echo $TelescopeML_reference_data
Step 3: Install the Package¶
Note
You need to first have Anaconda distribution installed on your machine, before proceed to the next steps.
Method 1: Install through Git (Recommended)¶
If you want to access the latest features or modify the code and contribute, we suggest that you clone the source code from GitHub by following steps:
Note
For best practise, it is recommended to be inside the TelescopeML_project parent directory and then clone the github repository.
Clone the repo and Create Conda environment named TelescopeML:
git clone https://github.com/ehsangharibnezhad/TelescopeML.git
cd TelescopeML
conda env create -f environment.yml
Activate the new environment:
conda activate TelescopeML
Install the library via the setup.py file inside TelescopeML directory:
python3.9 setup.py develop
Now, you should have the latest version of the package installed alongside the reference data.
Test the package by going to the docs/tutorials/ directory and run all notebooks there using jupyter-lab.
Test the package by going into the reference_data/tutorials/ directory and run all notebooks there using jupyter-lab.