Source Code Documentation
tathu.io
tathu.io.icsv
tathu.io.vector
- class tathu.io.vector.GeoJSON(path, options=[], compact=True)
Bases:
OutputterAuxiliary class that can be used to export tracking results to GeoJSON files.
- output(systems)
- class tathu.io.vector.KML(path, options=[])
Bases:
OutputterAuxiliary class that can be used to export tracking results to Google Keyhole Markup Language file (KML).
tathu.io.spatialite
- class tathu.io.spatialite.Loader(database, table)
Bases:
objectThis class can be used to load tracking results from SQLite/SpatiaLite Database.
- execute(cmd)
- getDates(format='%Y%m%d%H%M')
- getLastDate(format='%Y%m%d')
- load(name, attrs)
- loadByDate(format, date, attrs)
- loadByDay(day, attrs)
- loadByDuration(hours, operator='>=')
- loadByInterval(start, end)
- loadLastSystems(attrs)
- loadNames()
- query(query)
- class tathu.io.spatialite.Outputter(database, table, attrs, outputRaster=True, raster2int=True)
Bases:
objectThis class can be used to export tracking results to SQLite/SpatiaLite Database.
- output(systems)
- tathu.io.spatialite.adapt_array(arr)
http://stackoverflow.com/a/31312102/190597 (SoulNibbler)
- tathu.io.spatialite.adapt_list(list)
- tathu.io.spatialite.adapt_tuple(tuple)
- tathu.io.spatialite.convert_array(text)
tathu.io.pgis
- class tathu.io.pgis.Loader(host, database, user, pwd, table)
Bases:
objectThis class can be used to load tracking results from Postgres/PostGIS Database.
- load(name, attrs)
- loadDates()
- loadNames()
- loadSystem(name, attrs, date=None)
- loadSystemsByDate(date)
- query(query)
- class tathu.io.pgis.Outputter(host, database, user, pwd, table, attrs, outputRaster=True, raster2int=True)
Bases:
objectThis class can be used to export tracking results to Postgres/PostGIS Database.
- output(systems)
- tathu.io.pgis.bytea2nparray(bytea)
Converts Numpy Array from Postgres to python.
tathu.tracking
tathu.tracking.detectors
- class tathu.tracking.detectors.GreaterThan(value, minarea=None)
Bases:
ThresholdDetectorAuxiliary class that can be used to detect system GreaterThan (>) operator.
- class tathu.tracking.detectors.GreaterThanOrEqualTo(value, minarea=None)
Bases:
ThresholdDetectorAuxiliary class that can be used to detect system GreaterThanOrEqualTo (>=) operator.
- class tathu.tracking.detectors.LessThan(value, minarea=None)
Bases:
ThresholdDetectorAuxiliary class that can be used to detect system LessThan operator.
- class tathu.tracking.detectors.LessThanOrEqualTo(value, minarea=None)
Bases:
ThresholdDetectorAuxiliary class that can be used to detect system LessThanOrEqualTo (<=) operator.
- class tathu.tracking.detectors.MultiThresholdDetector(thresholds, op, minareas=None)
Bases:
objectThis class implements a convective system detector that uses multi-thresholding operations.
- detect(image)
- class tathu.tracking.detectors.RangeThresholdDetector(min, max, minarea=None)
Bases:
objectThis class implements a convective system detector that uses thresholding operation based on a given range [min, max].
- detect(image)
- class tathu.tracking.detectors.ThresholdDetector(value, op, minarea=None)
Bases:
objectThis class implements a convective system detector that uses thresholding operation.
- detect(image)
tathu.tracking.descriptors
- class tathu.tracking.descriptors.ConvectiveCellsDescriptor(cellTemp, minarea=None)
Bases:
objectThis class implements a convective system descriptor that computes the number of convectives cells.
- describe(image, systems)
- class tathu.tracking.descriptors.DBZStatisticalDescriptor(stats=['max', 'mean', 'std', 'count'], prefix='', rasterOut=False)
Bases:
objectThis class implements a convective system descriptor that defines a set of statistical attributes for each system. Note: This class uses dBZ radar calculations.
- describe(image, systems)
- class tathu.tracking.descriptors.MaxValueGeolocationDescriptor
Bases:
objectThis class implements a descriptor that calculates geolocation (i.e. latitude and longitude coordinates) of the maximum value found within the system boundaries.
- describe(image, systems)
- class tathu.tracking.descriptors.MovementDescriptor
Bases:
objectThis class implements a convective system descriptor that computes the movement parameters (velocity, u, v and direction).
- describe(previous, current)
- class tathu.tracking.descriptors.NormalizedAreaExpansionDescriptor(scale=None)
Bases:
objectThis class implements a convective system descriptor that computes the normalized area expansion.
- describe(previous, current)
- class tathu.tracking.descriptors.OpticalFlowDescriptor(previousImage)
Bases:
objectThis class implements a descriptor that computes the median optical flow for each system.
- describe(image, systems)
- class tathu.tracking.descriptors.StatisticalDescriptor(stats=['min', 'mean', 'std', 'count'], prefix='', rasterOut=False, all_touched=False)
Bases:
objectThis class implements a convective system descriptor that defines a set of statistical attributes for each system.
- describe(image, systems)
- class tathu.tracking.descriptors.StatisticalDescriptorMT(stats=['min', 'mean', 'std', 'count'], prefix='', rasterOut=False)
Bases:
object* Note: Experimental multithread version. * This class implements a convective system descriptor that defines a set of statistical attributes for each system.
- describe(image, systems)
- tathu.tracking.descriptors.chunks(data, n)
Yield successive n-sized chunks from a slice-able iterable.
tathu.tracking.trackers
- class tathu.tracking.trackers.AbsoluteOverlapAreaStrategy(threshold)
Bases:
OverlapAreaStrategyAbsolute value strategy: it computes the intersection area and compares with the given area threshold.
- hasRelationship(current_system, previous_system)
- class tathu.tracking.trackers.EdgeTracker(previous)
Bases:
objectThis class implements a convective system tracker that verifies topology at edges. It can be used on global data, e.g. mosaic of satellite images covering the Earth territory.
- track(current)
- class tathu.tracking.trackers.IntersectsStrategy
Bases:
OverlapAreaStrategy- hasRelationship(current_system, previous_system)
- class tathu.tracking.trackers.OverlapAreaStrategy
Bases:
object- hasIntersection(current_system, previous_system)
- hasRelationship(current_system, previous_system)
- class tathu.tracking.trackers.OverlapAreaTracker(previous, strategy, picker=<function pick_system_by_max_area>)
Bases:
objectThis class implements a convective system tracker that uses the overlap area criterion.
- track(current)
- class tathu.tracking.trackers.RelativeOverlapAreaStrategy(threshold)
Bases:
OverlapAreaStrategy‘Relative value strategy: it computes the intersection area and compares with the area of current system using percent relation.
- hasRelationship(current_system, previous_system)
- class tathu.tracking.trackers.TitanStrategy(threshold=0.5)
Bases:
OverlapAreaStrategyTITAN Strategy: Thunderstorm Identification, Tracking, Analysis and Nowcasting. More info: http://www.rap.ucar.edu/projects/titan/home/storm_tracking.php
- hasRelationship(current_system, previous_system)
- tathu.tracking.trackers.pick_system_by_max_area(systems)
- tathu.tracking.trackers.pick_system_by_max_intensity(systems)
tathu.tracking.forecasters
- class tathu.tracking.forecasters.Conservative(previous, intervals, applyScale=False)
Bases:
objectThis class implements a conservative forecaster.
- forecast(current)
- tathu.tracking.forecasters.compute_distance(p1, p2)
- tathu.tracking.forecasters.compute_elapsed_time(sys)
- tathu.tracking.forecasters.compute_last_centroid(sys)
- tathu.tracking.forecasters.compute_scale_factor(sys, elapsed_time=1.0)
- tathu.tracking.forecasters.delta(p1, p2, elapsed_time=1.0)