matcal.full_field.data_importer
The classes and functions in this module are intended to import data into MatCal from external sources for use in MatCal studies.
Functions
|
A function used to import a MatCal |
|
This will load a mesh file and return a data structure containing the mesh cloud points, connectivity and side set information. |
Classes
|
Class used to import a series of field data from file sources. |
|
|
|
- matcal.full_field.data_importer.FieldSeriesData(global_filename, series_directory='./', position_names=['X', 'Y'], state=<matcal.core.state.SolitaryState object>, file_type=None, n_cores=1)[source]
A function used to import a MatCal
Dataobject from series field data. The user needs to use this function to load experimental data from a file or series of files into MatCal- Parameters:
global_filename – the name of the file or primary file to be loaded.
series_directory (str) – the name of the directory where all files are located. Defaults to current working directory.
position_names (list(str)) – optional names of the fields that store point/nodal coordinates. Defaults to [‘X’, ‘Y’].
state (
State) – optional state to be assigned to the data being importedfile_type (str) – optional file type passed by the user. MatCal will attempt to guess the file type based on the file prefix. MatCal recognizes “csv”, “e” file types.
n_cores – the number of cores to be used to load the data. This is only active when reading file data from separate files such as DIC data saved as CSV files.
- Returns:
a populated
FieldDataobject.
- class matcal.full_field.data_importer.FieldDataParserBase(data_file, series_directory, n_cores=1)[source]
- class matcal.full_field.data_importer.CSVFieldDataSeriesParser(global_data_file, series_directory, n_cores=1, file_type=None)[source]
Class used to import a series of field data from file sources. The file must contain a field called “file”, which lists the filenames for the field data files.
- Parameters:
global_data_filename – path to a csv file containing the series filenames_list, and respective global variables.
series_directory – path to directory containing the field data snapshots described in the global data file.
- property number_of_frames
Get the number of frames present in the data series. Frames align with the different time steps, if applicable.
- property global_field_names
get a list of the imported global field names
- Returns:
the field names
- Return type:
list
- property state
- Returns:
The physical state of the data corresponding to the experimental conditions.
- Return type:
- property node_field_names
get a list of the imported node field names
- Returns:
the field names
- Return type:
list
- get_frame(frame_index)[source]
Return an instance of the appropriate field data object.
- Parameters:
frame_index (int) – index of frame data desired. (0 indexed)
- Returns:
frame data
- Return type:
- class matcal.full_field.data_importer.MeshFileScraperSelector(default=None)[source]
- register(key, value)
Register a virtual subclass of an ABC.
Returns the subclass, to allow usage as a class decorator.