Field Sensitivity

Collapse Tensorflow Coupon Figure

Standard Deviation of Coupon pRad Field on idx001100 Data

Standard Deviation of Coupon pRad Field on idx001100 Data

Collapse Pytorch Nested Cylinder Figure

Standard Deviation of Nested Cylinder Density (rho) Field on idx00112 Data

Standard Deviation of Nested Cylinder Density (rho) Field on idx00112 Data


Code Documentation

Plots the average and standard deviation of fields from a set of samples
  • Averages each pixel across multiple inputs

  • Plots each field on its own plot

Fixed key (-XK) specifies what subset of data to consider
  • ‘None’ can be passed to consider any input with no restrictions

  • For coupon data, fixed keys must be in the form ‘tpl###’ or ‘idx#####’

  • For nested cylinder data, fixed keys must be in the form ‘id####’ or ‘idx#####’

Saves all averages and standard deviations to a .npz file.

Samples can be preselected and listed in a .txt file (-FL filepath) OR
Number of samples can be specified and a random selection satisfying the fixed key requirement will be made (-FL MAKE -NS #)

Input Line for Coupon Data: python field_sensitivity.py -E coupon -ID ../examples/tf_coupon/data/ -F All -S ../examples/tf_coupon/figures/

Input Line for Nested Cylinder Data: python field_sensitivity.py -E nestedcylinder -ID ../examples/pyt_nestedcyl/data/ -F All -S ../examples/pyt_nestedcyl/figures/

Arguments

Plots the average and standard deviation of hydrodynamic fields extracted from a set of related inputs

usage: python field_sensitivity.py [-h] [--EXPERIMENT] [--INPUT_DIR]
                                   [--FILE_LIST] [--PRINT_FIELDS]
                                   [--PRINT_KEYS] [--PRINT_SAMPLES]
                                   [--FIELDS  [...]] [--FIXED_KEY]
                                   [--NUM_SAMPLES] [--ALPHA1] [--ALPHA2]
                                   [--COLOR1] [--COLOR2] [--SAVE_FIG]

Named Arguments

--EXPERIMENT, -E

Possible choices: coupon, nestedcylinder

Which experiment the model was trained on

Default: “coupon”

--INPUT_DIR, -ID

Directory path where all of the .npz files are stored

Default: “../examples/tf_coupon/data/”

--FILE_LIST, -FL

The .txt file containing a list of .npz file paths; use “MAKE” to generate a file list given an input directory (passed with -ID) and a number of samples (passed with -NS).

Default: “MAKE”

--PRINT_FIELDS, -PF

Prints list of hydrodynamic/radiographic fields present in a given .npz file (passed with -IN) and quits program

Default: False

--PRINT_KEYS, -PK

Prints list of choices for the fixed key avialable in a given input dirrectory (passed with -ID) and quits program

Default: False

--PRINT_SAMPLES, -PS

Prints number of samples in a directory (passed with -ID) matching a fixed key (passed with -XK) and quits program

Default: False

--FIELDS, -F

List of fields to be included; pass “none” to use an all-zero field; pass “All” to use all valid fields.

Default: [‘rho’, ‘eqps’, ‘eqps_rate’, ‘eff_stress’, ‘porosity’]

--FIXED_KEY, -XK

The identifying string for some subset of all data samples; pass “None” to consider all samples

Default: “None”

--NUM_SAMPLES, -NS

Number of samples to use; pass “All” to use all samples in a given input dirrectory (passed with -ID)

Default: “All”

--ALPHA1, -A1

Opacity of colormap at value 0

Default: 0.25

--ALPHA2, -A2

Opacity of colormap at value 1

Default: 1.0

--COLOR1, -C1

Possible choices: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgreen, darkgrey, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, green, greenyellow, grey, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgreen, lightgrey, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, rebeccapurple, red, rosybrown, royalblue, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen

Color of colormap at value 0; Choose from matplotlib CSS4 color list.

Default: “yellow”

--COLOR2, -C2

Possible choices: aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgreen, darkgrey, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, green, greenyellow, grey, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgreen, lightgrey, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, rebeccapurple, red, rosybrown, royalblue, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen

Color of colormap at value 1; Choose from matplotlib CSS4 color list.

Default: “red”

--SAVE_FIG, -S

Directory to save the outputs to.

Default: “../examples/tf_coupon/figures/”