This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% 2D DIC strain analysis | |
% | |
% 1. Run handles_ncorr = ncorr | |
% 2. Save the data and load the MAT file | |
% 3. Run this | |
% | |
num_of_dic_images = numel(current_save); | |
% | |
% exx = 2D distribution of xx strain component in the ROI | |
exx = cell(num_of_dic_images,1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spec_file_dir = 'X:\stebner-252-1\HEA_tension'; | |
spec_log_file_name = 'spec.log'; | |
DIC_image_dir = 'X:\stebner-252-1\301lss_rams2t_1\dic_post\raw_images'; | |
cross_section_area = 1; | |
log_file = fopen(fullfile(spec_file_dir, spec_log_file_name), 'r'); | |
image_file_numbers = []; | |
force = []; | |
displacement = []; | |
newimages = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Where are ncorr result files located | |
strain_result_mat_directory = 'X:\stebner-252-1\HEA_tension\DIC_post'; | |
% List of ncorr result mat files in the correct order | |
strain_result_mat_files = { ... | |
'strain_2d_1', ... | |
'strain_2d_2' ... | |
}; | |
ignore_these_many_DIC_results_at_the_start = 2; | |
ignore_these_many_DIC_results_at_the_end = 0; | |
% Aggregate the strain stuff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Create an MP4 movie from the image sequence. | |
# Specify | |
# -framerate N = frames/sec | |
# -i FILENAMES = image file path and names. %04d says that the numbering for images is fixed width (width = 4) and zeros are used for padding | |
ffmpeg -framerate 11 -i image_directory/image_stem_%04d.png -c:v libx264 -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" movie_name.mp4 | |
# Ideally this should play well on OS X, Windows and Linux. Uploads to Youtube. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
analysis_name: NiTi_9 # defaults to analysis | |
multiprocessing: -1 # "all", or "half", or -1 means all but one, defaults to -1 | |
material: | |
definitions: material_niti | |
active: NiTi | |
image_series: | |
file: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
analysis_name: RUBY_SWEEP_0 # defaults to analysis | |
## working directory defaults to current working directory | |
## all relative paths specified herein are assumed to be in the working_dir | |
## any files not in working_dir should be specified with an absolute path | |
#working_dir: | |
multiprocessing: 1 # "all", or "half", or -1 means all but one, defaults to -1 | |
material: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Display files numbers from an ff directory | |
# Add this function to ~/.bashrc | |
function show_ff_data() { | |
# Find all directories with name ff and loop over them | |
find "$@" -not -empty -name "ff" -print | while read f; do | |
# Show directory name | |
echo "$f" | |
# Get size of all contents in the directory (in bytes) | |
tot_byte_size=$(du -b "$f") | |
# By default du prints the folder name too. Strip that. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% Moving diffraction patterns | |
% A MATLAB-based program to generate high energy x-ray diffraction inspired | |
% line art. | |
% | |
%% USAGE | |
% Enter various parameters in the INPUT section. The meaning of each | |
% parameter is described below. Then run this script. It will produce a | |
% plot with the line patterns. | |
% | |
% The basic concept behind the pattern generation is this - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Miscellaneous Diffraction Image Processing Commands | |
# This file defines aliases for several common image processing | |
# functions for GE2 diffraction images. This uses ImageMagick | |
# program, which is typically available on all Linux and Mac | |
# systems - http://www.imagemagick.org/script/index.php | |
# USAGE: | |
# Copy the contents of this file to the bottom of ~/.bashrc | |
# Run from terminal: source ~/.bashrc | |
# After this, following commands should be available | |
# 1. Convert TIFF to GE. Saves input.ge2 |