Coupon Data

The coupon*data module contains functions that process data from the coupon experiment.

Data Processing (coupondata.process)

Contains functions to process the data from the HE driven coupon experiments.

fns.coupondata.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 experimental parameters (tpl)

  • unq_idxs (list[str]) – list of unique keys that fix a time stamp (idx)

fns.coupondata.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; returns ‘None’ if no fixed key is found

fns.coupondata.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 “r60um_tpl###”

fns.coupondata.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.coupondata.process.csv2dcj(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 “r60um_tpl###”

Returns

dcj (np.ndarray[(1), float]) – an array of size one with the dcj (explosive velocity) value for a given simulation

fns.coupondata.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]) – array of fields supplied by user

  • NoneValid (bool) – indicates if the blank field “none” is a valid selection for the program

Returns
  • fields (list[str]) – list of fields that are valid for correlation purposes

  • n_fields (int) – number of valid fields

fns.coupondata.process.get_field(npz, field)

Function to extract a normalized 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[(300, 1000), float]) – normalized field

fns.coupondata.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), float]) – Array of labels for radial axis; looks like [max –> 0 –> max], in increments of 1cm

  • 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 (coupondata.prints)

Contains functions to print out lists of options for data-related input arguments

fns.coupondata.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