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¶
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
Note
Replace PATH_TO_YOUR_reference_data with the actual path to your reference_data folder that you downloaded in step 1.
echo command is used to check that your variable has been defined properly.
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.
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 TelescopeML Library
You can install the TelescopeML library using one of the following methods:
3.1 For Development Purposes:
If you plan to develop the code, navigate to the TelescopeML directory and install it using:
python3.9 setup.py develop
3.2 For General Use If you intend to use the code without making changes in the future, install the PyPI version:
pip install TelescopeML
Test the package by going to the docs/tutorials/ directory and run all notebooks there using jupyter-lab.