Nested Cylinder Data
The nested*cylinder*data module contains functions that process data from the nested cylinder experiment.
Table of Contents:
Data Processing (nestedcylinderdata.process)
Contains functions to process the data from the nested cylinder experiments.
- fns.nestedcylinderdata.process.listkeys(sample_list)
Function that makes lists of unique variable indexes in a given directory
- Parameters
sample_list (list[str]) – list of file paths to .npz samples
- Returns
unq_tpls (list[str]) – list of unique keys that fix the strength model scaling factor (ptw)
unq_idxs (list[str]) – list of unique keys that fix a time stamp (idx)
- fns.nestedcylinderdata.process.findkey(sample_list)
Function that finds the fixed key given a list of samples
- Parameters
sample_list (list[str]) – list of file paths to .npz samples
- Returns
fixed_key (str) – the fixed key found in the samples
- fns.nestedcylinderdata.process.npz2key(npz_file)
Function to extract study information from the name of an .npz file
- Parameters
npz_file (str) – file path from working directory to .npz file
- Returns
key (str) – the study information for the simulation that generated the .npz file; of the form “# ncyl_sclPTW_###”
- fns.nestedcylinderdata.process.npz2idx(npz_file)
Function to extract the time stamp from the name of an .npz file
- Parameters
npz_file (str) – file path from working directory to .npz file
- Returns
idx (str) – the idx component of the file name; of the form “idx#####”
- fns.nestedcylinderdata.process.csv2scalePTW(csv_file, key)
Function to extract the dcj value from the design .csv file given the study key
- Parameters
csv_file (str) – file path from working directory to the .csv design file
key (str) – the study information for a given simulation; of the form “# ncyl_sclPTW_###”
- Returns
ptw (float) – the PTW scaling value used to a given simulation
- fns.nestedcylinderdata.process.remove_fields(npz, fields, NoneValid=False)
Function to extract a normalized field “picture” array from an .npz file
- Parameters
npz (np.lib.npyio.NpzFile) – a loaded .npz file
fields (list[str]) – list of fields supplied by user
NoneValid (bool) – indicates if the blank field “none” is a valid selection for the program
- Returns
file_fields (list[str]) – list of fields that are valid for correlation purposes
n_fields (int) – number of valid fields
- fns.nestedcylinderdata.process.get_field(npz, field)
Function to extract a field “picture” array from an .npz file
- Parameters
npz (np.lib.npyio.NpzFile) – a loaded .npz file
field (str) – name of field to extract
- Returns
pic (np.ndarray[(1700, 250), float]) – field
- fns.nestedcylinderdata.process.get_ticks(npz)
Function to generate axis tick markers and labels from the .npz file
- Parameters
npz (np.lib.npyio.NpzFile) – a loaded .npz file
- Returns
Rlabels (np.ndarray[(any), floar]) – Array of labels for radial axis; looks like [max –> 0 –> max], in increments of 0.5cm
Rticks (np.ndarray[(any), float]) – Array of pixel locations where tick marks go, corresponding to Rlabels
Zlabels (np.ndarray[(any), float]) – Array of labels for vertical axis; looks like [0 –> max], in increments of 1cm
Zticks (np.ndarray[(any), float]) – Array of pixel locations where tick marks go, corresponding to Zlabels
Data Prints (nestedcylinderdata.prints)
Contains functions to print out lists of options for input arguments
- fns.nestedcylinderdata.prints.print_keys(search_dir)
Function that prints a list of unique variable indexes for a given fixed variable
- Parameters
search_dir (str) – file path to directory to search for samples in
- Returns
No Return Objects