Skip to main content

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

Release files for sleuth-automation 3.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sleuth-automation 3.0.3
File Size Uploaded
sleuth_automation-3.0.3.tar.gz 10.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sleuth-automation 3.0.3
File Interpreter ABI Platform
sleuth_automation-3.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 34.8 kB

Release files / sleuth_automation-3.0.3.tar.gz

Download URL sleuth_automation-3.0.3.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
54aff5ee37fabbbbd21271a36067ef6c108ca52d648a127292d337910e8eb866
BLAKE2b-256 checksum
How to use checksums
db8b095c18f519bca4696cba1abd2ece3b2dcf34f3ebf05e8e2d119164a835c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.6

Release files / sleuth_automation-3.0.3-py3-none-any.whl

Download URL sleuth_automation-3.0.3-py3-none-any.whl
Size 24.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c2f4965c807017b81673b3081e2df28a84f7168fcba740669835972771223ef
BLAKE2b-256 checksum
How to use checksums
351bbacbada4a88e45df3da9a2b9f40ef64c5d2e51e07288b5af2f88b5e683d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.6

Release history Release notifications | RSS feed

This release

3.0.3 This release

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

1 release file

2.0.2

2 release files

2.0.1

2 release files

2.0.0

1 release file

1.0.2

2 release files

1.0.1

1 release file

1.0

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page