source: trunk/UTIL/PYTHON/powerlaw/ddstat.py @ 1242

Last change on this file since 1242 was 1197, checked in by aslmd, 11 years ago

PYTHON. updated analysis tools for dust devil analysis.

  • Property svn:executable set to *
File size: 1.1 KB
Line 
1#! /usr/bin/env python
2import ppplot
3import numpy as np
4
5### STATDD
6def statdd(namefile):
7
8    # load data
9    data = np.loadtxt(namefile,delimiter=";")
10    t = data[:,0] ; n = data[:,1] ; s = data[:,2] ; d = data[:,3]
11   
12    # remove size and drop point when no vortex detected
13    d[np.where(n==0)] = np.nan ; s[np.where(n==0)] = np.nan
14   
15    ## PLOTS
16    number = ppplot.plot1d()
17    number.f = n
18    number.x = t
19    number.linestyle = ''
20    number.marker = '.'
21    number.color = 'b'
22    number.xlabel = "Local time (hour)"
23    number.ylabel = "Detected vortices"
24    number.makeshow()
25   
26    drop = ppplot.plot1d()
27    drop.f = d
28    drop.x = t
29    drop.linestyle = ''
30    drop.marker = '.'
31    drop.color = 'r'
32    drop.fmt = "%.1f"
33    drop.xlabel = "Local time (hour)"
34    drop.ylabel = "Maximum drop of detected vortices (Pa)"
35    drop.makeshow()
36   
37    size = ppplot.plot1d()
38    size.f = s
39    size.x = t
40    size.linestyle = ''
41    size.marker = '.'
42    size.color = 'g'
43    size.xlabel = "Local time (hour)"
44    size.ylabel = "Maximum size of detected vortices (m)"
45    size.makeshow()
Note: See TracBrowser for help on using the repository browser.