Skip to content

2. Installation

Jake Diamond edited this page Jun 11, 2024 · 5 revisions

Installation

For users that are familiar with python you can simply clone the repo, create a virtual environment, and install the requirements in the file requirements.txt. I recommend using VS Code because the Jupyter extension allows for nice in-line plotting. If you use a different IDE the figures may not format correctly out of the box depending on your IDE settings. In that case, you may have to make adjustments to your IDE settings or the matplotlib backend.

For users who are not familiar with Python, you can follow the steps below.

Getting Started

  1. If you do not already have Python installed, begin by installing Miniconda.

  2. Install VS Code.

  3. Install the Python and Jupyter extensions in VS Code. Installation instructions can be found here.

  4. Clone the ALPSS repo to the directory of your choice using the link https://github.com/Jake-Diamond-9/ALPSS.git. Instructions on cloning a repo can be found here.

  5. Create a virtual environment and install the packages in requirements.txt by copying the following line into the terminal. Instructions on creating a virtual environment can be found here.

pip install -r requirements.txt

Running ALPSS

Running a Single Signal

Open the file alpss_run.py. In the file there is a docstring that describes the input variables followed by the function alpss_main. No input parameters need to be changed from the original repository file to run the demo. The program will run the example file in the input_data folder.

In the alpss_run file there is a section that reads

# %%
from alpss_main import *
import os

Just above these lines there should be small font options that read "Run Cell | Run Below | Debug Cell" (see image below). Click the "Run Cell" button and the program will execute in an interactive notebook window. Note that this "Run Cell" option is only available through VS Code with the Jupyter extension, which is the recommended method.

Additional example data files are available through the paper by DiMarco et al. and can be accessed here.

Instructions on how to run your own data can be found in the repository wiki here.

Running a Signal with Automatic File Detection

  1. Move example_file.csv out of the input_data directory and into some other temporary directory of your choosing. It does not matter where this temporary directory is located on your machine.
  2. Open the alpss_auto_run.py file and click "Run Cell", similar to the example above. This will open an interactive notebook and the program will execute. The program is now waiting for a file to be moved into the directory that it is monitoring, the input_data directory.
  3. Click and drag example_file.csv out of your temporary directory and into the input_data directory. The program will automatically detect that a file has been added and run it through the ALPSS program.