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 passed

x

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 - int

No

No

'r'

vertex.r - int

No

No

'species_index'

vertex.species_index - int

No

No

'species_variant'

vertex.species_variant - int

No

No

'advanced_category_index'

vertex.advanced_category_index - int

Yes

No

'alpha_angles'

vertex.alpha_angles - [float]

No

No

'alpha_max'

vertex.alpha_max - float

Yes

Yes

'alpha_min'

vertex.alpha_min - float

Yes

Yes

'theta_angles'

vertex.theta_angles - [float]

No

No

'theta_max'

vertex.theta_max - float

Yes

Yes

'theta_min'

vertex.theta_min - float

Yes

Yes

'theta_angle_variance'

vertex.theta_angle_variance - float

No

No

'theta_angle_mean'

vertex.theta_angle_mean - float

Yes

Yes

'peak_gamma'

vertex.peak_gamma

No

No

'avg_gamma'

vertex.avg_gamma

No

No

'normalized_peak_gamma'

vertex.normalized_peak_gamma - float

Yes

Yes

'normalized_avg_gamma'

vertex.normalized_avg_gamma - float

Yes

Yes

'redshift'

vertex.redshift - float

No

No

'avg_central_separation'

vertex.avg_central_separation - float

Yes

Yes

'zeta'

vertex.zeta - bool

No

No

'im_coor_x'

vertex.im_coor_x - float

No

No

'im_coor_y'

vertex.im_coor_y - float

No

No

'im_coor_z'

vertex.im_coor_z - float

No

No

'spatial_coor_x'

vertex.spatial_coor_x - float

No

No

'spatial_coor_y'

vertex.spatial_coor_y - float

No

No

'spatial_coor_z'

vertex.spatial_coor_z - float

No

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>