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='/path/to/sleuth',
             use_mpi=True, mpi_cores=32)


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

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

l.sleuth_predict(2017, 2050)

Command Line Interface

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

$ sleuth_run.py --sleuth_path /path/to/sleuth/ \
                --location_dir /path/to/my_location/ \
                --location_name my_location \
                --mpi_cores 40 \
                --predict_start 2017 \
                --predict_end 2050

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 /path/to/sleuth \
                                --locations_dir /path/to/locations_group \
                                --mpi_cores 32 \
                                --predict_start 2017 --predict_end 2050

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-1.0.2.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

sleuth_automation-1.0.2-py2.7.egg (17.3 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for sleuth_automation-1.0.2.tar.gz
Algorithm Hash digest
SHA256 ec1a6bdf6c89e64ab0313edc2c30ead082980377a178e248fd36b21d524f3590
MD5 b3526cb9b57900d73dc99e931876f832
BLAKE2b-256 cf2c72a89c8949398b9e79f29458ff2d636ad1cc1bfddb405df195ff30c38175

See more details on using hashes here.

File details

Details for the file sleuth_automation-1.0.2-py2.7.egg.

File metadata

  • Download URL: sleuth_automation-1.0.2-py2.7.egg
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.13

File hashes

Hashes for sleuth_automation-1.0.2-py2.7.egg
Algorithm Hash digest
SHA256 afd3824418a154642aa4e7b279abda031a38a20b84d5a171bd013b12890ef9c9
MD5 33fbf4c68ddfe870c24f67efbd6163ed
BLAKE2b-256 3a359dafc67c8ef3287021eed3b129c2dd837d0256bd6ddf3f65f65fa1d67ae9

See more details on using hashes here.

Supported by

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