Documente Academic
Documente Profesional
Documente Cultură
Seminar functionality. In this paper we will be presenting two new MSDA modules:
• Custom Reports
• 3-D Variogram Modeling
Custom Reports
Custom Reports is a program which allows users to design and build their own reports
using any of the data sources supported by MSDA, ie., MineSight® assay, composite,
blasthole and block model files, ODBC compliant databases, and text files. Users have
complete control over the choice of fields, statistics, filters, layout, and style of the report.
Each report is an HTML file which may be viewed in a web browser, Microsoft® Word and
Microsoft® Excel. A sample is shown in Figure R-1
Figure R-1
Functional Overview
Custom Reports works in two stages, as shown in Figure R-2. The first stage is Report
Builder, which creates a report matrix file of values according to the user’s criteria. For
example, one may build a report matrix based on mean, median, and standard deviation
of cu, pb, zn. and mo data, by copper cutoff grade and rock type. The actual selection of
statistics, fields, and filters (criteria) is entirely up to the user. Report Builder computes
all combinations of these values. In other words, it computes all statistics of all fields
according to all filters (criteria) and stores the results in a report matrix file (.mrb)
in XML format. If the data source is large, e.g., a large block model, and the criteria
are complicated, this step may be quite time consuming due to the large number of
computations involved.
The second stage is Report Viewer, in which the user extracts data from the report file
and creates a readable HTML file. For example, using the report file mentioned in the
Figure R-2
A second option for Report Viewer is to display a chart rather than an HTML report.
For example, based on the same report matrix file, we could display a graph of copper
grade by cutoff with one series (curve) per rock type. This may be considered as just
another view of the report file. Like the HTML reports, charts are created pretty well
instantaneously.
Report Builder
In the Report Builder stage the user specifies the report content and builds a report
matrix file with an .mrb extension. This step is straightforward, but can be time
consuming to run if the data source is large and the filters are complicated.
There are two fundamental types of report which one may build: univariate and
bivariate. For univariate reports, one must specify:
• General info such as titles and chart style file (Figure R-3).
• Weighting info, used when you wish to weight statistics, e.g., by length or by tonnage.
When this option is used, the total weight (e.g., total tonnage) is available on the
report (Figure R-4).
• A list of fields and field expressions (Figure R-5).
• A list of statistics, such as mean and standard deviation (Figure R-6).
Figure R-3
Figure R-4
Figure R-5
Figure R-6
Figure R-7
Figure R-8
Figure R-9
Seminar designed to filter entire records. For example, if we specify a filter with a cutoff grade
of 0.35% cu, then a record would be wholly accepted if it had cu >= 0.35%, and wholly
rejected otherwise. This is probably the case with which most users are familiar. For
example, if your ore cutoff is 0.35% cu, and you want ore stats for several metals, this
is the approach you would use. This is also the approach used throughout MSDA and
MineSight® and most other mining programs.
• Cutoff Type II: In certain circumstances, a user may want a report with statistics for
multiple fields wherein each field has it’s own cutoff. This is the type we use in the
individual field specification as shown in Figure R-5. For example, if we say that cu
cutoff = 0.3% and pb cutoff = 0.4%, then mean cu would be mean cu above 0.3% cu,
and mean pb would be mean pb above 0.4% pb.
Ø Note: A useful by-product of Cutoff Type II is that we can filter out values from a
database or text file which are missing or too low to be useful. For example, suppose
we are reading a text file wherein all fields have many zero values which are
uninterpolated blocks that we want to exclude from our statistics. In such a case, we
can just enter cutoff values such as 0.001 to exclude zeros from the statistics. Note
that this is very different from setting cutoff values of 0.001 for fields in the filter
definition, which would reject the entire record whenever one field was below cutoff.
When defining a list of fields, please note that all of these fields will be included in the
report matrix file (.mrb) created by Report Builder. However, during the Report Viewer
stage, one can select any subset of the fields for inclusion in the final HTML file. Therefore,
it is usually prudent to include more fields rather than less. If you aren’t sure whether or
not you will need a field, it’s usually best to include it.
Defining Statistics
Selecting report statistics is a simple matter of checking the desired statistics from a list
of about twenty that are supported by Custom Reports (see Figure R-6). Certain statistics
are only relevant for bivariate reports, e.g., correlation coefficient (r), and these are
suppressed from the list when the user chooses the univariate report type. Some statistics
such as median and quartiles require that extended metadata be set in MSDA (*). These
statistics are suppressed from the list if they are not available.
(*) Note: Extended metadata includes results such as min. and max. of all fields. It is an
optional calculation performed elsewhere in MSDA.
Defining Filters
Filters refer to selection criteria such as rock type and cutoff grade. There are two ways
to define a filter:
• Basic: The user defines a list of categories, cutoffs, or bins on a specified field (see
Figures R-7 and R-8).
• Custom: The user enters an SQL statement to define a filter (see Figure R-9).
The basic filter is the preferred option wherever possible, since it is easier to work with
and the processing time is much faster. In this case, you choose a field on which to filter,
such as rock type, then list the values, cutoffs or bins. For example, to filter on rock types
3,6,10,11,12,13,14,21, you would choose the List option and enter 3,6,10:14,21. If you
wished to use cu cutoff grades of 0.1, 0.2, 0.3, and 0.4, you would choose Cutoffs and enter
0.1,0.2,0.3,0.4. If you choose Bins rather than Cutoffs, the previous example would
report bins 0.1 to 0.2, 0.2 to 0.3 and 0.3 to 0.4.
Figure R-10
Figure R-11
Note regarding Total and All: Custom Reports automatically adds two items to each
filter dimension, Total and All. The former is the total (union) of all specified filter items,
whereas the latter selects all records regardless of the value of the filter. For instance, if we
ask for rock types 1, 2, and 3, then Total would capture all records from rock types 1 + 2
+ 3, whereas All would capture all records regardless of rock type (including rock type 4,
5, etc., and even records with missing rock types). In other words, All basically collapses
the dimension. If you have a table of cutoff by rock type, then the row for rock type = All
would reflect data filtered on cutoff only.
The second tab in the HTML Report dialog is the Options tab. This tab allows one to
place headers, footers, etc., on the report. Headers may contain special fields such as [date]
and [page], which are replaced by the appropriate values when the report is created. This
tab is basically very straightforward.
The final tab is the Style tab, as shown in Figure R-12. To set the style of a particular
report component, such as Title, Cell Value, Row Label, Column Label, Footnote, etc.,
simply select the component in the combo box at the top of the page, then use the font
color and justification buttons to edit it. Standard Microsoft® Windows color and font
dialogs are used. When you have made the style the way you like it (a sample is shown)
click on the Set button beside the report component at the top of the dialog.
Figure R-12
Figure R-13
Figure R-14
Chart Mode
If you open the report file in Chart Mode, you are presented with a dialog similar to
that shown in Figure R-15. One can rapidly display charts using different combinations
of dimensions in the upper left corner. Each dimension in the report can be used in one of
four ways:
Page 10 MSDA Custom Reports and 3-D Variogram Modeling
• None: The dimension is ignored. Valid for filter fields only.
22nd • Points: The values of the dimension are laid out across the x-axis. In Figure R-15, we
lay out Elevation by points. Only one dimension can be assigned to Points.
Annual • Series: Each value of the dimension forms a series on the chart, ie. a curve or set of bars
or slices of pies, etc – depending on the chart type. In Figure R-15, we assigned Rock
Type by series. Note that the Legend shows each of the Rock Types (1,2,3,4,5). Only
Seminar one dimension can be assigned to Series.
• Chart: A specified value of the dimension is used for the chart. In Figure R-15, we
assigned Field = Copper, Statistic = Mean, and Ore Type = Ore to Chart. This means
that all of the chart statistics refer exclusively to mean grade of copper ore.
As with all MSDA charts, significant options are available to dress up the style and style
templates may be prepared, saved, and restored. For report charts, it is usually interesting
to explore different chart gallery types such as scatter, curve, bar, pie, and so on.
Figure R-15
Figure V-1
Figure V-2 shows Variogram 3D Manager in Rose View mode. The following key
features can be seen in this view:
Figure V-2
Figure V-3
When working with the Standard View, it is important to remember that it has all of the
properties and benefits of any other MSDA chart, e.g., there is extensive right-click support
to modify the appearance of the chart (colors, fonts, titles, etc.), add a legend box, copy to
bitmap, print, etc. In addition, if you hover over any lag point with your cursor, a box will
pop up showing the lag properties, e.g., lag distance, number of pairs, value, etc.
Figures V-4 through V-6 show the Standard View as it appears with a variety of settings
illustrating some of the features discussed above.
Figure V-4
Figure V-5
Figure V-6
Figure V-7
The current plane control for the Rose View is defined in the dialog shown in Figure
V-8. It is possible to define the current plane via three rotation angles in any of the
supported conventions (GSLIB, GSLIB-MS, MEDS, Sage), or by selecting one of the
principal directions (EN, EZ, NZ). One may assign a window by checking Use window
of and assigning an angle, e.g., in Figure V-8 we are using a window of 5 degrees. At any
time, one may also rotate the plane by setting a rotation angle and an axis about which to
rotate, then clicking Rotate, e.g., one could rotate the current plane by 10 degrees about
the Easting axis (E). The icon shows the orientation of the current plane, e.g., in Figure
V-8 the current plane is horizontal (Z is shown coming out of the view towards the user).
Figure V-8
When working with the Rose View, it is important to remember that it has all of the
properties and benefits of any other MSDA charts, e.g., there is extensive right-click
support to modify the appearance of the chart (colors, fonts, titles, etc.), add a legend box,
copy to bitmap, print, etc.
Figures V-9 through V-12 show the Rose View as it appears with a variety of settings,
illustrating some of the features discussed above.
Figure V-9
Figure V-10
Page 18 MSDA Custom Reports and 3-D Variogram Modeling
22nd
Annual
Seminar
Figure V-11
Figure V-12
When the auto-fit parameters have been entered, the next step is to initialize the
variogram model—the auto-fit needs a valid model with which to start. The easiest way to
do this is as follows:
Annual • On the Model tab, Structures sub-tabs #1, #2, #3, check the structures you want, and
the model type for each structure (see Figure V-16). E.g., you may say that you want
two structures; the first is spherical and the second is exponential.
Seminar • You now need to enter all of the ranges and sills to define a valid starting model.
You could enter each of these by hand, but in practice one generally uses one of the
following methods:
o Select Initialize Model from the 3D Model menu to set all of the ranges, sills, and
rotations to 0.0.
o After running auto-fit once, the parameters will be contained within the dialogs
shown in Figures V-15 and V-16. It is very common to keep these parameters
and re-run auto-fit again, perhaps with smaller tolerance, etc., in order to fine
tune the best fit model. In other words, your initial model for run #2 is the best fit
result from run #1.
• Var3D lets you pin (fix) any of the parameters by checking the adjacent checkbox
(see Figures V-15 and V-16). E.g., one could set the nugget to 0.1, check the adjacent
checkbox, then run auto-fit. The result would be the best fit 3-D variogram model,
subject to nugget = 0.1.
The final step is to simply run the auto-fit program. This is done by selecting Auto-Fit
from the 3D Model menu. As the auto-fit progresses, the progress, current RMS Error, and
number of iterations are shown at the bottom of the screen. A typical auto-fit takes about
10 seconds, though this depends on many variables and could be longer.
Examining and Editing the 3-D Variogram Model Parameters
When the auto-fit program finishes, the best fit model parameters are stored in the
dialog tabs shown in Figures V-15 and V-16. This model is also shown on the Standard
View (i.e., the intersection of model with current direction) and the Rose View (i.e., the
intersection of model with current plane). Users are free to change any of the parameters
by simply keying in the new value. The model will be updated in the Standard and Rose
Views as soon as you tab out of the field.
Figure V-17
Figure V-18