Package firetools :: Module Study
[hide private]
[frames] | no frames]

Module Study

source code

Functions associated with the study as a whole

Classes [hide private]
  CreateStudy
Object Representing the whole study.
Functions [hide private]
 
LoadStudy(workingdir)
Load an Existing study by specifying the study directory
source code
 
CreatePointGrid(study, studyshp, cellsize, startdate, enddate, dateinterval)
Creates the geographic base data for a study.
source code
 
ExtractData(study)
Call the type-specific Case History Extraction Functions
source code
 
SampleSubset(study, outdir, n, copy=True)
Create a randomly sampled subset of study points to export to easily readable comma separated format (.csv).
source code
 
CopyResults(studydir, srcdir, dbox='C:\\My Dropbox\\Data')
Copy a results folder to the dropbox while making necessary parent directories
source code
Function Details [hide private]

CreatePointGrid(study, studyshp, cellsize, startdate, enddate, dateinterval)

source code 
Creates the geographic base data for a study. These include a 
study area polygon shapefile, a point grid and a raster each 
representing the study area. The study sample dates are defined. 
Index variables are initialized (via Static.Import and 
TimeSeries.import for the PointID and dates respectivly)

Inputs
        study                   study object
        studyshp                input study area shapefile
        cellsize                study cellsize
        startdate               starting date of the study
        enddate                 ending date of the study
        dateinterval    max length of sampled intervals

Procedure
        assign study parameters
        copy and format study area polygon
        create study area raster 
        Import index variables 
                PID             point id number
                SDATE   sample interval start date
                EDATE   sample interval end date

Outputs
        studyarea.shp   study area shapefile
        studyraster             study area raster
        pointgrid.shp   study area point grid
        
        

SampleSubset(study, outdir, n, copy=True)

source code 
Create a randomly sampled subset of study points to export to 
    easily readable comma separated format (.csv).

Inputs
    study       study object (after a call to ExtractData() )
    outdir      subset folder to be created in the study directory
    n           number of sample points (large n for all points)

Outputs

Variable data tables ( [varname].csv )
    For each study output variable a table is produced which is 
    organized with study sample points in rows and study sample 
    dates in columns.

Combined case history table ( casedata.csv )
    Additionally, a second data table is produced which is a 
    combination of all the data in the variable data tables. In this 
    file each row corresponds to a single point at a single date 
    with each study variable in columns. This table is simply a 
    combined reorganization of the individual tables