In [1]:
import declus
import pygslib
In [2]:
parameters = {
'datafl' : '../pygslib/data/cluster.dat', # path to file, or none (to use '_xxx_.in') or numpy array (with columns [x,y])
'icolx' : 1, # -columns for X, Y, Z and variable
'icoly' : 2,
'icolz' : 0,
'icolvr' : 3,
'tmin' : -1.0e21, # trimming limits min and max (raws out of this range will be ignored)
'tmax' : 1.0e21,
'sumfl' : None, # path to the output summary file or None (to use '_xxs_.out')
'outfl' : None, # path to the output file or None (to use '_xxx_.out')
'anisy': 1.0, # Y and Z cell anisotropies (Ysize=size*Yanis)
'anisz': 1.0,
'minmax' : 0, # 0=look for minimum declustered mean (1=max)
'ncell' : 24, # number of cell sizes, min size, max size
'cmin' : 1.0,
'cmax' : 25.,
'noff' : 5} # number of origin offsets
In [3]:
result, sumary =declus.declus(parameters)
In [4]:
result.head()
Out[4]:
In [5]:
sumary.plot(x='Cell Size', y = 'Declustered Mean')
Out[5]:
In [6]:
parameters['ncell'] = 1
parameters['cmin'] = 5
parameters['cmax'] = 5
parameters['noff'] = 8
result, sumary =declus.declus(parameters)
result.head()
Out[6]:
In [7]:
result['Zlocation']=0
parameters = {
'datafl' : result[['Xlocation','Ylocation','Zlocation','Primary']].values,
'tmin' : -1.0e21,
'tmax' : 1.0e21,
'sumfl' : None,
'outfl' : None,
'anisy': 1.0,
'anisz': 1.0,
'minmax' : 0,
'ncell' : 24,
'cmin' : 1.0,
'cmax' : 25.,
'noff' : 5}
In [8]:
result, sumary =declus.declus(parameters)
result.head()
sumary.plot(x='Cell Size', y = 'Declustered Mean')
Out[8]:
In [ ]: