Graph_discrete_dist


Download program files. program.
Download the 2D distribution computed by calc_discrete_dist. all_segments_Ni_gbpd.txt
Download the 5D distribution computed by calc_discrete_dist. all_segments_Ni_gbcd.txt
Download the result for the 2D graph.
all_segments_Ni_gbpd_2d_gmt1.gpf
Download the result for the axis-angle graph. all_segments_Ni_gbcd_sig3_AA_gmt_1.gpf
Download the result for the 5D graph at 60°/[111]. all_segments_Ni_gbcd_sig3_gmt_1.dat


This program produces graphs of grain boundary distributions (axis-angle distributions, the grain boundary plane distribution irrespective of disorientation, and grain boundary plane distributions at fixed misorientations) using discrete distributions that were calculated by calc_discrete_dist.


Example:
As examples to show how the program works, we will make three graphs, using the distributions calculated as examples in for calc_discrete_dist. First, we will use the GBPD to graph the the grain boundary plane distribution irrespective of disorientation. This graph is plotted in the crystal reference frame. After you download file all_segments_Ni_gbpd.txt, it must be moved to the folder graph_discrete_dist.
The next step is to configure the parameters in input.txt for the run. These parameters are described in the lower part of the input.txt file.
In this case, change the name of the file labeled input_2d.txt to input.txt. This file has been preconfigured to work, so do not change anything other than the file name.
Next, open a terminal window in the graph_discrete_dist folder. From here, you simply compile and run the program, as follows:
(base) gr20macmin:graph_discrete_dist gr20$ make clean
rm -f main.o sub.o sub2.o symmetry.o
(base) gr20macmin:graph_discrete_dist gr20$ make
gfortran -O3 -c -ffixed-line-length-none main.f
gfortran -O3 -c -ffixed-line-length-none sub.f
gfortran -O3 -c -ffixed-line-length-none sub2.f
gfortran -O3 -c -ffixed-line-length-none symmetry.f
gfortran main.o sub.o sub2.o symmetry.o -o graph_discrete_dist
(base) gr20macmin:graph_discrete_dist gr20$ graph_discrete_dist
=================================================
PROGRAM TO GRAPH 2D OR 5D GRAIN BOUNDARY PLANE
DISTRIBUTIONS FROM DISCRETIZED DATA
rohrer@cmu.edu
version 04/09/2022
=================================================
you have specified the symmetry as cubic
I am graphing data in the file labeled: all_segments_Ni_gbpd.txt
The [001] direction will be normal to the plane of the drawing.
The stereogram will be plotted in the fundamental zone
File all_segments_Ni_gbpd.txt has 362 lines.
There are 38 lines in the header
The average value is 0.90 MRD.
The minimum value is 0.49 MRD.
The maximum value is 2.60 MRD.
to initiate the gmt script, enter ./Draw_stereograms 1 [filename]_2d_gmt IF rainbow [min] [max] [interval] stereo CUBIC
For example: ./Draw_stereograms 1 all_segments_Ni_gbpd_2d_gmt IF rainbow 0.49 2.60 0.21 stereo CUBIC
Program complete

After the program has run, it has written the file all_segments_Ni_gbpd_2d_gmt1.gpf. This is simply a text file with the values to plot. We use GMT to plot it. GMT is controlled by the script: ./Draw_stereograms.
Just before the program completed, it provided guidance on the parameters needed for GMT. If you copy and paste the suggested line:
./Draw_stereograms 1 all_segments_Ni_gbpd_2d_gmt IF rainbow 0.49 2.60 0.21 stereo CUBIC
into the terminal, it will draw the graph. However you can make a better graph by editing the minimum, maximum, and interval values so that they are 'round' numbers. Instead of "0.49 2.60 0.21," I used "0.2 2.60 0.3," which leads to:
(base) gr20macmin:graph_discrete_dist gr20$ ./Draw_stereograms 1 all_segments_Ni_gbpd_2d_gmt IF rainbow 0.2 2.60 0.3 stereo CUBIC
Draw_stereograms: Last Revised 19 Feb 2019
Checking for the GMT executable....
Checking for the 'convert' executable...
Script for drawing stereograms from 5-parameter GB analysis, or pole figures
Note that the input files (data) must have longitude, latitude, intensity
Tony Rollett, CMU, with thanks to Sven Vogel, Los Alamos
filename base: all_segments_Ni_gbpd_2d_gmt
z = .030000000
You requested 1 stereograms to be drawn

Working on stereogram number 1
current input file: all_segments_Ni_gbpd_2d_gmt1.gpf
1st line = 0.0 0.0 0.0 0.0
psclip: Restore 1 polygon clip levels
psclip: Done!
Figure creation Complete
Converting Postscript file to tif graphic file
Removing Temp Files

At the end of this process, you should have two files:
all_segments_Ni_gbpd_2d_gmt.tif
and
all_segments_Ni_gbpd_2d_gmt.ps
They should be exactly the same, it just gives you a choice of format. The *.ps file is recommended because it has scalable resolution. This is illustrated below.


Next, we will plot the distribution of misorientation axes at the 60° misorientation.
To do this, we need the GBCD file. After you download file all_segments_Ni_gbcd.txt, it must be moved to the folder graph_discrete_dist. The next step is to configure the parameters in input.txt for the run. These parameters are described in the lower part of the input.txt file.
In this case, change the name of the file labeled input_aa.txt to input.txt. This file has been preconfigured to work, so do not change anything other than the file name.
Next, open a terminal window in the graph_discrete_dist folder. From here, you simply compile and run the program, as follows:
(base) gr20macmin:graph_discrete_dist gr20$ graph_discrete_dist
=================================================
PROGRAM TO GRAPH 2D OR 5D GRAIN BOUNDARY PLANE
DISTRIBUTIONS FROM DISCRETIZED DATA

rohrer@cmu.edu
version 04/09/2022
=================================================
you have specified the symmetry as cubic
I am graphing data in the file labeled: all_segments_Ni_gbcd.txt
File all_segments_Ni_gbcd.txt has 236234 lines.
There are 38 lines in the header
I am planning to make 1 plots
plot number= 1
now plotting: 60.00
For this misorientation, the average value is 1.74 MRD.
For this misorientation, the maximum value is 52.97 MRD.
For this misorientation, the minimum value is 0.42 MRD.

to initiate the gmt script, enter ./Draw_stereograms 1 [filename]_AA_gmt IF rainbow [min] [max] [interval] stereo CUBIC
For example: ./Draw_stereograms 1 all_segments_Ni_gbcd_sig3_AA_gmt_ IF rainbow 0.42 52.97 5.25 stereo CUBIC
Program complete

As above, we have been provided with a suggestion for ./Draw_stereograms. Again, I round the numbers of the limits and intervals by changing "0.42 52.97 5.25" to "0 50 10"

(base) gr20macmin:graph_discrete_dist gr20$ ./Draw_stereograms 1 all_segments_Ni_gbcd_sig3_AA_gmt_ IF rainbow 0 50 10 stereo CUBIC
Draw_stereograms: Last Revised 19 Feb 2019
Checking for the GMT executable....
Checking for the 'convert' executable...
Script for drawing stereograms from 5-parameter GB analysis, or pole figures
Note that the input files (data) must have longitude, latitude, intensity
Tony Rollett, CMU, with thanks to Sven Vogel, Los Alamos
filename base: all_segments_Ni_gbcd_sig3_AA_gmt_
z = 1.000000000
You requested 1 stereograms to be drawn

Working on stereogram number 1
current input file: all_segments_Ni_gbcd_sig3_AA_gmt_1.gpf
1st line = 60.0
psclip: Restore 1 polygon clip levels
psclip: Done!
Figure creation Complete
Converting Postscript file to tif graphic file
Removing Temp Files

As before, the graph is produced in two formats:
all_segments_Ni_gbcd_sig3_AA_gmt_.tif
and
all_segments_Ni_gbcd_sig3_AA_gmt_.ps
The results is shown below:


The third and last graph we make will be a grain boundary plane distribution at a fixed misorientation (60° around [111]). To do this, we will use the same GBCD file that we used to plot the axis distribution. After you download file all_segments_Ni_gbcd.txt, it must be moved to the folder graph_discrete_dist. The next step is to configure the parameters in input.txt for the run. These parameters are described in the lower part of the input.txt file.
In this case, change the name of the file labeled input_5d.txt to input.txt. This file has been preconfigured to work, so do not change anything other than the file name.
Next, open a terminal window in the graph_discrete_dist folder. From here, you simply compile and run the program, as follows:
(base) gr20macmin:graph_discrete_dist gr20$ graph_discrete_dist
=================================================
PROGRAM TO GRAPH 2D OR 5D GRAIN BOUNDARY PLANE
DISTRIBUTIONS FROM DISCRETIZED DATA

rohrer@cmu.edu
version 04/09/2022
=================================================
you have specified the symmetry as cubic
I am graphing data in the file labeled: all_segments_Ni_gbcd.txt
a single stereographic projection will be plotted
The [001] direction will be normal to the plane of the drawing.
File all_segments_Ni_gbcd.txt has 236234 lines.
There are 38 lines in the header
plot number= 1
now plotting: 1.00 1.00 1.00 60.00
For this misorientation, the average value is 45.55 MRD.
For this misorientation, the maximum value is 770.02 MRD.
For this misorientation, the minimum value is 0.00 MRD.
to initiate the gmt script, enter ./Draw_stereograms_1 [Number of plots] [filename]_gmt_ 5d rainbow [min] [max] [interval]
For example: ./Draw_stereograms_1 1 all_segments_Ni_gbcd_sig3_gmt_ 5d rainbow 0.00 770.02 77.00 stereo CUBIC
Program complete

As above, we have been provided with a suggestion for ./Draw_stereograms. Again, I adjust the limits and intervals by changing "0.00 770.02 77.00" to "-0.5 805 100 "

(base) gr20macmin:graph_discrete_dist gr20$ ./Draw_stereograms_1 1 all_segments_Ni_gbcd_sig3_gmt_ 5d rainbow -0.5 805 100 stereo CUBIC
Draw_stereograms: Last Revised 3 Feb 2014
Checking for the GMT executable....
Checking for the 'convert' executable...
Script for drawing stereograms from 5-parameter GB analysis, or pole figures
Note that the input files (data) must have longitude, latitude, intensity
Tony Rollett, CMU, with thanks to Sven Vogel, Los Alamos
filename base: all_segments_Ni_gbcd_sig3_gmt_
z = 10.000000000
You requested 1 stereograms to be drawn

Working on stereogram number 1
current input file: all_segments_Ni_gbcd_sig3_gmt_1.dat
1st line = 1.0 1.0 1.0 60.0
./Draw_stereograms_1: line 935: EOF: command not found
Figure creation Complete
Converting Postscript file to tif graphic file
Removing Temp Files

As before, the graph is produced in two formats:
all_segments_Ni_gbcd_sig3_gmt_.tif
and
all_segments_Ni_gbcd_sig3_gmt_.ps
The results is shown below:




Return To Main Page