Skip to main content

Python wrapper for SLEUTH urban growth model.

Project description

This library is an object-oriented wrapper for the SLEUTH urban growth model.

It will automatically create scenario files from directories containing data layers and it can run simulations through MPI and HT-Condor.

Installation

You may install this library and helper scripts using pip.

$ pip install sleuth_automation

Application Programming Interface

import sleuth_automation as sa

# the library must be configured at least with the path to SLEUTH
sa.configure(sleuth_path='/opt/sleuth',
             use_mpi=True, mpi_cores=32)


# a directory containing input layers is given to a location instance
l = sa.Location('my_location',
                '/path/to/my_location')

l.calibrate_coarse()
l.calibrate_fine()
l.calibrate_final()

l.sleuth_predict(end=2050)

Command Line Interface

A single run may be achieved using the included sleuth_run.py script.

$ sleuth_run.py --sleuth_path /opt/sleuth/ \
                --location_dir /path/to/location/ \
                --location_name my_location \
                --mpi_cores 40 \
                --montecarlo_iterations 50 \
                --predict_end 2060

This will create scenario files for coarse, fine and final stages of calibration, extracting parameters from the control_stats.log files, and run predict.

If one wants to predict for several locations, one may group them in a directory and run them as a batch. Using the create_sleuth_condor_batch.py one may create a batch run for the HT-Condor queue management system.

$ create_sleuth_condor_batch.py --sleuth_path /opt/sleuth/ \
                                --region_dir /path/to/locations_group/ \
                                --mpi_cores 32 \
                                --predict_end 2060

This will create a submit.condor file in the locations directory, setup with the appropiate sleuth_run.py commands.

Documentation

https://readthedocs.org/projects/sleuth-automation/badge/?version=latest

Full documentation at http://sleuth-automation.readthedocs.io

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

sleuth_automation-2.0.1.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

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

sleuth_automation-2.0.1-py2-none-any.whl (24.0 kB view details)

Uploaded Python 2

File details

Details for the file sleuth_automation-2.0.1.tar.gz.

File metadata

  • Download URL: sleuth_automation-2.0.1.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/2.7.13

File hashes

Hashes for sleuth_automation-2.0.1.tar.gz
Algorithm Hash digest
SHA256 f860eb29d1ccffa4f6eaaccf3ef6d0c79f245e2305400915196be7e44e6afcdd
MD5 3f55f78e6a2bef0ef5e233491fd4f9b2
BLAKE2b-256 745fd8d8b5b456704a7f2bac62f9179d4cc4d4f6180ea265487965c739b7b7ce

See more details on using hashes here.

File details

Details for the file sleuth_automation-2.0.1-py2-none-any.whl.

File metadata

  • Download URL: sleuth_automation-2.0.1-py2-none-any.whl
  • Upload date:
  • Size: 24.0 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/2.7.13

File hashes

Hashes for sleuth_automation-2.0.1-py2-none-any.whl
Algorithm Hash digest
SHA256 dce755cce66507af47194059cced48d7e05c3e43d2447964f7d5f4d6b498fd62
MD5 663b650545b06cf89475cfe12f1bf363
BLAKE2b-256 16507100e08285602fa0288db2802294d1c1017614ed7674bc87b28d87d9736f

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