Skip to main content

Python interface to SyncroSim

Project description

pysyncrosim

The Python interface to SyncroSim

Installation

pysyncrosim can be installed using either the conda or pip package managers. conda is a general package manager capable of installing packages from many sources, but pip is strictly a Python package manager. While the installation instructions below are based on a Windows 10 operating system, similar steps can be used to install pysyncrosim for Linux.

Before beginning the installation of pysyncrosim, make sure you have the latest release of SyncroSim installed.

Dependencies

pysyncrosim v2.0 was tested and developed using Python 3.12 and SyncroSim 3.0.9. Because pysyncrosim uses rasterio for integrating spatial data, it also requires a C library dependency: GDAL >=3.7.

python=3.12

pandas=2.2.2

numpy=2.1.0

rasterio=1.3.10

Using conda

Follow these steps to get started with conda and use conda to install pysyncrosim.

  1. Install conda using the Miniconda or Anaconda installer (in this tutorial we use Miniconda). To install Miniconda, follow this link and under the Latest Miniconda Installer Links, download Miniconda for your operating system. Open the Miniconda installer and follow the default steps to install conda. For more information, see the conda documentation.

  2. To use conda, open the command prompt that was installed with the Miniconda installer. To find this prompt, type "anaconda prompt" in the Windows Search Bar. You should see an option appear called Anaconda Prompt (miniconda3). Select this option to open a command line window. All code in the next steps will be typed in this window.

  3. You can either install pysyncrosim and its dependencies into your base environment, or set up a new conda environment (recommended). Run the code below to set up and activate a new conda environment called "myenv" that uses Python 3.12.

# Create new conda environment
conda create -n myenv python=3.12

# Activate environment
conda activate myenv

You should now see that "(base)" has been replaced with "(myenv)" at the beginning of each prompt.

  1. Set the package channel for conda. To be able to install the dependencies for pysyncrosim, you need to access the conda-forge package channel. To configure this channel, run the following code in the Anaconda Prompt.
# Set conda-forge package channel
conda config --add channels conda-forge
  1. Install pysyncrosim using conda install. Installing pysyncrosim will also install its dependencies: pandas, numpy, and rasterio.
# Install pysyncrosim
conda install pysyncrosim

pysyncrosim should now be installed and ready to use!

Using pip

Use pip to install pysyncrosim to your default python installation. You can install Python from https://www.python.org/downloads/. You can also find information on how to install pip from the pip documentation.

Install pysyncrosim using pip install. Installing pysyncrosim will also install its dependencies: pandas, numpy, and rasterio.

# Make sure you are using the latest version of pip
pip install --upgrade pip

# Install pysyncrosim
pip install pysyncrosim

Usage

Getting Started

For a basic usage example with the helloworldSpatialPy package, see the spatial_demo.py and input-raster.tif in the examples folder. To download the spatial_demo.py file, view the file on GitHub and select Raw. From the raw view, right-click and select Save As.... To run the spatial demo, you will also need to install the matplotlib Python package. You can install this package using the following code.

# Install matplotlib
conda install matplotlib

SyncroSim Package Development

If you wish to design SyncroSim packages using python and pysyncrosim, you can follow the Creating a Package and Enhancing a Package tutorials on the SyncroSim documentation website. Note that SyncroSim v2.3.10 is required to develop python-based SyncroSim packages.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysyncrosim-2.1.1.tar.gz (42.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pysyncrosim-2.1.1-py3-none-any.whl (45.9 kB view details)

Uploaded Python 3

File details

Details for the file pysyncrosim-2.1.1.tar.gz.

File metadata

  • Download URL: pysyncrosim-2.1.1.tar.gz
  • Upload date:
  • Size: 42.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for pysyncrosim-2.1.1.tar.gz
Algorithm Hash digest
SHA256 83f656f342d5301f6d4b78d88b283477bb896a7a9b02afdb7f840a393d94771d
MD5 f9e50563b589b2e8b3e6710f31f06c18
BLAKE2b-256 75277c7a9a1721396ff69aac10c34bf74687f3902d57050ece7ffb16f5bb3de9

See more details on using hashes here.

File details

Details for the file pysyncrosim-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: pysyncrosim-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 45.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for pysyncrosim-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d5ef1d5e021c4ef18294443b9bcde9e4e170dd101e67748b0c06f7c0e6ffb7bc
MD5 05ac6476be2089d0824ea71d8c26056b
BLAKE2b-256 6c767c02818c1077786f6096850bd9350e812c39f8c6ff8b6ebb8920795be27a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page