4.7. data_module.py¶
This module contains the different statistical models used in the column characterization algorithm. It also has methods that can gather model parameters from sets of overlay files. See automal.org for more details.
- class data_module.VertexDataManager(files, attr_keys, filter_=None, category_key='advanced_species', save_filename='model', recalc=False)¶
A class designed to gather, handle, transform, plot, model and export data from multiple images for AutomAl 6000
The
filter_
argument can be used to access particular sub-sets of the available data. The filter is passed as a list of 7 boolean values. The table below shows the effect of each value togheter with the default behavior if no filter is passedx
default
filter_[x]
Effect
0
False
Include edge columns
1
True
Include matrix columns
2
True
3
True
4
True
5
True
6
True
The
keys
argument is a list of strings that determine which of the data attributes that the data manager should include. The available keys are displayed in the table below, as well as an indication of which attributes will be included if no keys are passed. Only attributes that are singular real-valued will be used for statistical analysis, indicated by the ‘physical’ column.Key
Attribute - type
Included by default
Physical
'i'
vertex.i
- intNo
No
'r'
vertex.r
- intNo
No
'species_index'
vertex.species_index
- intNo
No
'species_variant'
vertex.species_variant
- intNo
No
'advanced_category_index'
vertex.advanced_category_index
- intYes
No
'alpha_angles'
vertex.alpha_angles
- [float]No
No
'alpha_max'
vertex.alpha_max
- floatYes
Yes
'alpha_min'
vertex.alpha_min
- floatYes
Yes
'theta_angles'
vertex.theta_angles
- [float]No
No
'theta_max'
vertex.theta_max
- floatYes
Yes
'theta_min'
vertex.theta_min
- floatYes
Yes
'theta_angle_variance'
vertex.theta_angle_variance
- floatNo
No
'theta_angle_mean'
vertex.theta_angle_mean
- floatYes
Yes
'peak_gamma'
vertex.peak_gamma
No
No
'avg_gamma'
vertex.avg_gamma
No
No
'normalized_peak_gamma'
vertex.normalized_peak_gamma
- floatYes
Yes
'normalized_avg_gamma'
vertex.normalized_avg_gamma
- floatYes
Yes
'redshift'
vertex.redshift
- floatNo
No
'avg_central_separation'
vertex.avg_central_separation
- floatYes
Yes
'zeta'
vertex.zeta
- boolNo
No
'im_coor_x'
vertex.im_coor_x
- floatNo
No
'im_coor_y'
vertex.im_coor_y
- floatNo
No
'im_coor_z'
vertex.im_coor_z
- floatNo
No
'spatial_coor_x'
vertex.spatial_coor_x
- floatNo
No
'spatial_coor_y'
vertex.spatial_coor_y
- floatNo
No
'spatial_coor_z'
vertex.spatial_coor_z
- floatNo
No
Note
This dataManager is designed to handle vertex-based data. To analyse Arc-centered data, use the ‘ArcDataManager’ class
- Parameters
files (string) – String of full filenames separated by newline character. Data will be gathered from each of the files.
filter ([bool]) – (Optional, default: None) Filter inclusion of data by the tokens in the above table.
attr_keys ([string]) – (Optional, default: None) The keys of the data attributes to include
save_filename (string) – (Optional, default: ‘model’) Pickle the model data with this filename
categorization (string) – (Optional, default: ‘advanced’) Categorization keyword
- Returns DataManager object
:rtype
<statistics.DataManager>
- static load(filename_full)¶
Load a DataManager instance from a pickle-file.
- Parameters
filename_full (string) – Path-name of the file to be loaded.
- Returns DataManager object
:rtype
<data_module.VertexDataManager>