Module 01 - Micromine Basics Rev 05
Module 01 - Micromine Basics Rev 05
Notes:
Lesson 1 – Preparing the
Project Data
Duration: 45 minutes
In MICROMINE, the project is the fundamental means of storing and organising
your data. This lesson introduces you to projects and how you can use them.
• Create a project;
Working with Projects
Projects
Normally you’ll store all the data from an area in a project. This includes
surface samples, drilling data, tenement outlines, aerial surveys, photography,
and any other related information. In addition to information about an area,
other information such as macros and form sets are also stored as part of a
project.
Once several projects have been created, you’re able to select a project you
want to work with. When you select a project, all the files, macros and forms
sets stored with that project are made available to you.
Since you’re working in the project folder, there’s no need to enter a file path
(i.e. C:\projects\tenement1\...) when you create or open files. The only time
you’ll “leave” the project is when you need to access external data.
When you create a project, you enter a project name, a path, and a project
title. The project name becomes a new folder on that path. A project may be
located locally on the computer you’re using, or on a remote computer
network. In either case, MICROMINE recommends that you save all your
projects under a single parent folder.
You must also set the units for a project to Metric or Imperial when you first
create it. The default is Metric. Imperial is only used when rock densities are
measured with a tonnage factor and plot scales like 20":1’ are required.
Notes:
When you create a new project, you can use file structures, form sets and
macros from a similar project. This is a good approach because it means that
you can re-use existing work and promote consistency between projects. In
fact, many MICROMINE users create a template project and save any re-usable
file structures, macros and form sets within it. This approach is demonstrated
in the following exercise.
You can also rename, move, delete and attach projects. Renaming simply
changes the project name. Moving a project manages the entire process of
moving all the project files from one location to another.
Because project data files are stored in different folders you can use the same
file names in each project. For example, the projects “Demo” and “Training”
can both have files named collar.dat, survey.dat and assay.dat.
By default, MICROMINE will load the last project you were using.
Creating a New Project
Because the data for this training course have already been prepared, you’ll
attach to a project where the data are stored. However, you still need to know
how to create a new project. Since it’s good practice to learn how to create and
use a template project, this is a good opportunity to do so.
Exercise 1.1: Create a new project
To create a new project:
3. Fill-in the dialog box as shown below. When you define the Project path,
use the browse […] button to navigate to the H:\MmData folder; once
you’ve done this you can type the remaining \Templates text yourself.
Notes:
4. Click OK to create the project. The program will open in the new project.
Under normal circumstances you’d now begin creating files and loading data
into the project. When you next create a project you can select Use existing
project as template and then enter its name. You can then nominate which
items you want to re-use from the template project by selecting from the
options shown in the group at the bottom of the dialog box.
Attaching an Existing Project
Attaching a project is a convenient way of working with existing projects and
external data such as old projects and data created using other applications.
Once you’ve attached a project, you can select it as though you had created it.
This procedure assumes you’ve accepted the default settings when you
installed from the Training CD.
If you changed the location of the installed data set, you’ll need to substitute
the project folder name and path you used in the instructions that follow.
Exercise 1.2: Attach an existing project
To attach an existing project:
2. Enter the Project name. This is the name of the folder containing the
project data. In this case, enter: Training
3. Click the Browse […] button next to the Project path response and
navigate to the folder H:\MmData\Training. Click OK on the Browse
dialog.
You’re now attached to the Training project. Note how the MICROMINE window
title bar (at the top of the screen) displays the new project’s name.
Deleting a Project
Deleting a project means removing the reference to the project (the folder
where the project data is located) from a special MICROMINE file. There are
two methods of deleting projects. The first method is to delete the link to the
project folder. This is like deleting a shortcut from your Windows Desktop. The
reference to the folder is removed but the folder and its contents remain
untouched. The second method is to remove the link and delete the project
folder and all the files within it.
Exercise 1.3: Delete an existing project
To delete a project:
4. Click OK.
From now on, the Examples project won’t appear in the list when you select
File | Project | Open from the main menu.
To delete a project and all the files it contains, follow the same procedure but
clear Detach only (remove the tick).
Notes:
Lesson One Summary
These are the key points of this lesson:
• You can set the project units to metric or imperial when you create it.
• When you create a new project, you can use the file structures, form sets
and macros from a similar project as a template.
To delete a project:
Select File | Project | Delete and choose the project. Set the Detach
only switch as appropriate.
Good Practice
Use existing projects as templates when you create a new project. Doing so
will:
• Encourage consistency in the way you store and process your data, and in
the appearance of output.
• Reduce set-up time because you won’t have to re-create data file
structures, colour sets, macro files and form sets.
Help Topics
For information on: See:
User access Forms: Defining personal, local, and global form sets
Notes:
Lesson 2 – Micromine User
Interface
Duration: 30 minutes
MICROMINE Version 10 has been modified to incorporate all functions into one
interface. In this lesson, you will learn about the MICROMINE user interface
and how to work with it.
• Customise a toolbar;
MICROMINE User Interface
• Vizex is the main interface in MICROMINE. By default, when MICROMINE
is opened, Vizex and a number of standard interfaces and toolbars are
opened. The display and all toolbars can be hidden, moved around, turned
off and on and customised to suit personal preference.
• Formsets Pane – Allows you to open form sets and objects in the graphic
display windows. Formsets are discussed further in Lesson 4 and in
Modules 2 and 3.
Main Menu
The Main Menu is always available within MICROMINE. From the main menu
any of the functions within MICROMINE can be accessed. If an item under the
main menu is unavailable in any particular view or function, it will be greyed
out.
Notes:
When 3D Viewer is opened, some extra menu items will appear. These are
discussed in Module 3 – 3D Viewer.
Main Toolbar
The Main toolbar gives shortcut buttons for several common tasks.
Formsets – Click the Forms Sets button to toggle the display of the Form
Sets pane on and off. Use the Form Sets Pane to define what data will be
included in the active display. This button will be highlighted whenever the
Form Sets pane is open.
Object Manager - Click the Object Manager button (or select View |
Object Manager) to toggle the display of the Object Manager pane on and
off. Use the Object Manager to change the drawing order of your display layers
and turn display layers on and off. This button will be highlighted whenever the
Object Manager is open.
Open Project – Click the Open Project button to open a project. In the Open
Project dialog, select the name of the project you want to set as the current
project. Click OK, or double-click on the project name. The project will be
loaded and operations can commence. The Project Name and Title appear on
the title bar.
File Utilities – Click the File Utilities button to invoke the File Utilities dialog.
Use File Utilities to perform various file operations such as Copy, Delete,
Rename, and View.
New File – Click the Create file button to create a new file. In the Create File
dialog, type in the name for the new file, choose a Type, and enter its Title.
Unless you are creating a file from a template, you will need to define the file
structure. Click the OK button and enter the name and type of each field in the
file
File Open – Click the Open file button to open a MICROMINE file. The Select
File dialog defaults to the current project folder.
Save – Click the Save button to save the changes you have made in the active
display or editor window.
Undo – Click the Undo button (or Ctrl-Z) to undo the last edit performed on a
string or outline in the graphic display. The Undo function records the edits
made in the display window and will undo those edits in reverse order.
Redo - Following an Undo, click the Redo button (or Ctrl-Y) to re-apply the
last edit performed in the graphic display.
Vizex – Click the Vizex button to open the Visual Explorer display window. Notes:
You can open multiple instances of Vizex. Each display window is available for
selection in the Object Manager. Note: You can tile different instances of the
Vizex and the 3D Viewer display windows.
Plot Editor – Click the Plot Editor button to edit a plot file or generate a hard
copy plot.
Run Macro – Click the Run Macro button to run a macros process. In the
Run Macro dialog, You can include up to 42 macro files in one run (with each
file containing several instructions). This allows you to create smaller files,
which are easier to test, and then combine them to create complex operations.
Context Help – Click the Help button to display context-level help. Use the
help cursor to click on the active dialog or display window to invoke a hint or
online help topic.
Exercise 2.1: Using the Main Toolbar
To view the functionality of each toolbar button:
1. Slowly move your mouse over each button on the toolbar and observe
the tool-tip bubble on each button showing it’s functionality.
4. Close the dialogue box using the cross in the top right hand corner of
the box.
9. Click within the white square next to East min, and observe the help tip
given.
10. Close the dialogue box using the cross in the top right hand corner of
the display.
View Toolbar
The View toolbar is used for manipulation of displays within the graphic display
windows.
Items on the View toolbar are available for use in both Vizex and 3D Viewer. Notes:
The use of each item on the toolbar is discussed for Vizex in Module 2, and for
3D Viewer in Module 3.
Form Sets Pane
The Form Sets Pane is used to open data into the graphic display panes in
Vizex
To open the Form Sets pane select the View | Form Sets menu option, or
click the Form Sets button on the main toolbar. When the Form Sets pane is
open, the Form Sets button is highlighted on the main toolbar You can easily
turn the Form Sets pane on and off using this button.
The Form Sets pane is a dockable window which is docked (by default) to the
left of the display window. When you click and highlight the Form Sets button,
the Form Sets pane is displayed. You can dock the Form Sets pane window to
the right, top, or bottom of the application window, or move it to an undocked Notes:
position over the display.
To dock a window, you position the cursor over the title bar of the window and
drag and drop it with the mouse. Before you release the mouse button, an
outline is displayed which previews the new position and extent of the window.
When the Form Sets pane has been docked to the left, right, top, or bottom of
the display, click the Auto-Hide icon to maximize the work area and
automatically hide the Form Sets pane when it is not in use. The Form Sets
pane is hidden and a tab is displayed instead. The tab is positioned to the left,
right, top, or bottom of the display, depending on where the Form sets pane
was docked:
Display Pane
Use the Display pane (Also called the Object Manager) to change the drawing
order of your display layers and turn display layers on and off. The Object
Manager is a table of contents which shows the display objects you have added
to Vizex and the 3D Viewer.
To open the Object Manager select the View | Object Manager menu
option, or click the Object Manager button on the main toolbar.
When the Object Manager (Display pane) is open, the Object Manager button is
highlighted on the main toolbar. You can easily turn the Object Manager on and
off using this button.
The Object Manager is a dockable window which is docked (by default) to the
left of the display window. You can dock this window to the left, right, top, or
bottom of the application window, or move it to an undocked position over the
display.
To dock a window, you position the cursor over the title bar of the window and
drag and drop it with the mouse. Before you release the mouse button, an
outline is displayed which previews the new position (and the extent) of the
window.
Exercise 2.2: Working with the Display and Form Sets Panes
1. Ensure both the Display and Form sets panes are docked to the left of
your screen. If they are showing, click on the drawing pin icon to
hide them to the left of the display.
Notes:
2. Move your mouse button over the Display and Form Sets tabs and
observe the floating panes.
3. Move your mouse button over the Form Sets pane, and while it is
showing, click on the Pin Down icon to pin it to the display.
4. Click on the top bar of the Form Sets pane, and holding your mouse
button down, drag it around the screen. Observe the outlines
displayed to preview the window location when you drag it close to one
of the edges of the display.
5. Try creating a floating Form Sets pane not pinned to one of the edges
of the display by dragging and dropping the pane to a location on the
graphic display.
6. Drag and drop the Form Sets pane to the left of the display window.
7. Move your mouse over the Display tab, and click on the Pin Down
icon to pin it to the display.
When the Form Sets or Display tabs are hidden, note that the Pin
Down icon is horizontal, and once the tabs are pinned to the
display, the icon rotates to a vertical display.
8. Experiment with moving the display tab around the display, and
observe different methods of displaying both the Form Sets and
Display panes.
9. Once you have completed this, follow the steps in step one to hide
both the Form Sets and Display panes to the left of the Display.
Graphic Display Windows
The Graphic Display Windows are used to display data in either Vizex or 3D
Viewer.
Multiple windows of each type can be opened at any time within MICROMINE,
and they will display in the Display Pane as separate windows.
2. Click on the Vizex Button on the Main Toolbar, and observe the new
icon appearing in the Display Pane.
3. Click on the 3D Viewer Button on the Main Toolbar, and observe the
new 3D Viewer icon appearing in the Display Pane.
4.
When you have data opened in any of these graphic display windows, the
objects loaded will be displayed as icons and titles under each object in the
display pane.
5. Select Window | Tile Horizontally from the main menu and observe
each window is now displayed on your screen.
6. Close one of the Vizex windows by clicking on the cross [X] in the top
right hand corner of the window. Repeat this for the 3D Viewer
window so that only one Vizex window remains.
7. Maximise the Remaining Vizex Window to the full screen using the
Maximise button on the top right hand corner of the window.
8. Click on the Pin Down icon on the Display Pane to hide the pane to
the left of the window.
Notes:
Customising Toolbars
Each toolbar in MICROMINE can be customised to your own personal
preferences.
Adding and removing toolbars
One or more toolbars can be displayed in the application window. To display
toolbars, select an option from the View | Toolbars menu. Alternatively,
right-click in an empty portion of the menu bar and select an option from the
toolbars menu:
To hide a toolbar, for example the Main or the View toolbar shown above,
right-click in an empty portion of the menu bar and unselect the appropriate
checkbox. Note: Some toolbars will be displayed automatically whenever the
right conditions apply. When a file is opened, for example, the Edit File toolbar
is displayed as part of the File Editor window. When you restart the
MICROMINE application, the toolbar selections you made in your last session
will be restored.
Creating a custom toolbar
To create your own toolbar, select the Customize... option from the Toolbars
menu.
When you click the New button and specify a toolbar name, a new toolbar is
initialised and displayed in the application window. You can add tools to the
new toolbar using the Commands tab.
Alternatively, you can move a tool from one toolbar to another by dragging
and dropping it with the mouse. To copy a tool from one toolbar to another,
hold down the CTRL key as you drag and drop it with the mouse.
Exercise 2.4: Create your own Customised Toolbar
To Create a customized ‘Drillholes’ Toolbar;
3. Select OK.
4. Note that a new, empty toolbar has been created in your display and a Notes:
new toolbar called Drillholes is listed in the toolbars list.
5. Click on the Commands tab and highlight the Dhole Menu item from
the Categories column.
7. Scroll down the Commands List and drag and drop Database to your
new toolbar as shown;
Notes:
8. Click on Close
9. Right click anywhere on the toolbar and click on the Drillholes toolbar
to switch it off.
Notes:
Lesson Two Summary
These are the key points of this lesson:
Main Menu
Main Toolbar
View Toolbar
Form Sets Pane
Display Pane
Graphic Display window
• All processes within MICROMINE can be accessed through the Main menu.
• The Form Sets Pane can be used to load Data into either Vizex or 3D
Viewer
• The Display pane will display each of the graphic editor windows, and any
data loaded into them
To create a toolbar:
Help Topics
For information on: See:
Notes:
Lesson 3 – Working with Data
Files
Duration: 45 minutes
Data files are the basic data container in MICROMINE. In this lesson you’ll learn
about the different types of data files and how to create and work with them.
Working with Data Files
Files in MICROMINE
Most files you’ll use as input to functions in MICROMINE have a tabular
structure. If you’re familiar with databases you’ll recognise this structure.
In each record there are Easting and Northing coordinates for a copper assay.
The copper assay is associated with a sample number.
There are several types of file used in MICROMINE. The main input files are
Data, Survey and String. These files are differentiated by file extension. The
data file has the extension DAT, the survey file SVY, and the string file STR.
There are no other fundamental differences between these types of file. In fact
a file with exactly the same structure could have any of these extensions.
The main reason for having the different extensions is so you can group like
files in a project. For example, geological data is often stored in DAT files; while
contour strings and other string type data is stored in STR files; and survey Notes:
information from total stations or theodolites is stored in SVY files.
There are other types of MICROMINE files, however MICROMINE itself handles
the creation and management of these.
You, as the user, must create the files needed for a project. To do this you give
the new file a name and then define its structure. That is, the names and
characteristics of the fields and the order in which they will be processed and
displayed.
There are two field types in files: Character and Numeric. In most cases it’s
easy to decide which type you should apply to a field. Data that’s essentially
numeric should be in fields with the Numeric type. Statistical functions will only
operate on numeric fields and colour and hatch sets are defined differently for
numeric and character fields. Note that you can still type non-numeric data into
numeric fields, for example, NS (not sampled) in an assay field. Alpha and
alphanumeric data is generally given the type Character. Some examples of
common Character type fields are Hole Name, Sample Number, and Lithology
Type.
In general, MICROMINE processes data files to create output. You must tell a
function (in MICROMINE) the name of a file and the fields it should use from
that file. The function can then load data, record by record, from the file and
perform its task. This is the fundamental operating paradigm of MICROMINE.
Notes:
The main file preparation and processing tool is the File Editor. The File Editor
has many features and data processing tools that are useful to the earth
scientist.
Before you begin the next lesson…
Make sure you’ve loaded the data on the Training CD onto your PC or some
location on your network. You’ll need this data throughout this training course.
See Installing the data set for details.
Creating a New Data File
Because you’ll be using the data set supplied as part of this course you’ll only
need to create a couple of new data files in later lessons. However, to reinforce
the idea of the template project, this task will show you how to create a collar
file that could be used as a template.
Exercise 3.1: Create a new data file
Before you begin, open the TEMPLATES project you created in the last lesson.
A project like this is where you should store all template files. To do this:
1. Select File| Project | Open from the main menu. Alternatively, you can
use the Open Project toolbar button.
3. Click OK.
1. Select File | New from the main menu. Alternatively, you can click the
New toolbar button.
2. Enter the following values into the New File dialog box:
Prompt Setting
File COLLAR_TEMPLATE
Type DATA
Title Collar Template
Notes:
3. Don’t select Use template?
4. Click OK and the New file window will appear.
In this window you create the file structure. To do this you must define:
Press the Tab key to move right from field to field and Shift+Tab to move to
the left. You can also use the arrow keys to move up and down, or just click on
a cell with the mouse. Press Enter to create a new row.
1. Once you’ve entered these values, click Close on the menu in the New
window.
3. The new file will open into a File Editor window. You could start entering
values immediately but since it’s intended to be a template file you’d
generally leave it empty.
4. Close the File Editor window, either by clicking the [X] at the top right of
the window, or by clicking the Close toolbar button.
Notes:
Finally, return to the Training project:
1. Select File | Project | Open from the main menu. Alternatively, you can
click the Open Project toolbar button.
3. Click OK to continue.
Creating a New File Using a Template
Once you have suitable files in the current project or have a template project or
locations containing files with suitable structures, you can begin using them
when you create new files.
Exercise 3.2: Create a new file using a template
To create a file using a template:
1. Select File | New from the main menu. Alternatively, you can click the
New toolbar button.
Prompt Setting
File TEST_COLLAR
Type DATA
Title From Template
8. Click Close to dismiss the Templates dialog, then click OK in the New
File dialog.
9. The New file window will open with a file structure identical to the one for
the COLLAR_TEMPLATE file.
10. Select Close and then click Yes when prompted. The new file will be
created and immediately displayed in the File Editor.
11. Select File | Close or press the ESC key to close the file editor.
You can see from this exercise how much time using templates can save,
especially when you’re creating files with many fields. Additionally, using
templates promotes consistent file structures both within and across projects.
You can copy the contents of a template file, and the parameters Notes:
in File | New can be saved as a form. This feature is extremely
useful when you’re writing macros. You can also create a file in
any form by right clicking on a file name, a field name, or by
pressing F5.
Modifying a File’s Structure
In MICROMINE you can add and delete fields from a file at any time. If a field
contains data when you delete it, the data will also be deleted. To add fields to
a file or delete fields from a file, use the Modify function.
Exercise 3.3: Modify a file’s structure
This task shows you how to prepare a file (containing the coordinates where
surface samples were taken) for merging with the assay results from the
laboratory.
Do the following:
2. Select MMI_NVG_GCM from the window that appears. If you can’t see it,
make sure that Files of type is set to DATA.
4. Press F6 to modify the file, or alternately, close the file, then Select File |
Modify from the File Editor menu and select MMI_NVG_GCM from the file
list.
5. Position the cursor in the EAST_GRID field and press Ctrl+I or select
Records | Insert Records from the menu.
When you’ve completed the process, the file structure should look like this:
9. Select File | Save As and save the file as NVG_GCM, if you have closed
the file, select File | Open and save the file as NVG_GCM.
10. Select File | Close or press the ESC key to close the file editor.
Notes:
Optional Exercise
If you have time add the following Fields:
Notes:
Lesson Three Summary
This lesson has illustrated the following points:
• When creating a file you must give the file a name and then define field
names, field types, field lengths and number of decimal places.
• You can use existing files as templates when creating new files. These
templates can be in the current project, in another project, or in a folder
on a local or shared drive. This promotes consistency and saves having to
repeat work.
Select File | New and enter the files’ name and type, then
Define the structure by specifying each field’s name, type, width, and
number of decimals.
To create a new data file using a template:
Select File | New and enter the file’s name and type, then
Set the Use template option and choose the template file.
Good Practice
Wherever possible use templates to create new file structures. You should
create a set of template files and store them in a folder that has been set aside
for that purpose. When you create a new file, retrieve a suitable template and
use it to define the file structure.
Help Topics
For information on: See:
Notes:
Lesson 4 – Data Entry and File
Processing
Duration: 90 minutes
The data that describes characteristics of a prospect or mine can be collected
and recorded in a variety of ways. They include: survey data from total
stations, rock sample data from geologists’ notebooks, drillhole data from
portable data entry equipment, compass traverse notes, data files from aerial
surveys and aerial photography.
The challenge is to get all of this information in different formats into a project
and into a coherent and useful state. This lesson describes some of the
processes that can be used to get data into a MICROMINE project.
• Merge assay results from the lab with their associated coordinates;
• Use Merge Lab Data to process a SIF file received from the laboratory;
Getting Data Into MICROMINE
The Different Ways of Entering Data
The File Editor is the primary tool you’ll use to create and maintain data files.
While you can key-in data into the File Editor, it would be tedious to have to re-
type data already in spreadsheets, external databases or in data files from
assay laboratories. For this reason MICROMINE includes three ways to get large
quantities of data into a project with a minimum of effort. These are:
• Importing
• Merging
• Linking
When you import data, all fields in the source file are included in the process.
You can control which fields from the source data are written to the
MICROMINE target file.
To merge data, you select fields in a source file and merge them to the correct
fields in the target file by matching values in a key field. You can also append
the data.
Notes:
When you link to a database you use ODBC to connect to an external data
source.
Generally Text Import is only used to transfer independent data sets into a
MICROMINE project. The Text Merge function is used to re-establish
relationships within data sets, for example, merging assay results with the
coordinates at which the samples were taken.
Before you begin using these techniques, it’s worth reviewing the different
types of file that you’ll meet when you undertake these processes.
Recognising Different File Types and Their Components
There are a numerous types of text file but in general the types that you’ll have
to deal with fall into two groups: delimited and fixed width. A delimited file
contains rows of values separated by commas, if it’s a comma-delimited file,
tabs if it’s a tab delimited file, and so on. Each row is terminated with a CR
(carriage return) character and a LF (line feed) character. Fixed width files,
sometimes known as column delimited files, contain values separated into
columns made up of a fixed number of characters. Delimited files are generally
more space-efficient, but human operators can more easily read fixed width
files.
Example: Fixed width file Notes:
Example: Comma delimited file
Before you continue...
Make sure you’ve completed Modifying a file’s structure.
Make sure you’re using the built-in file viewer. To ensure this is the case, select
Options | Editor from the main menu and check that Built-in is selected in
the Text Viewer group.
Notes:
Working with Dialogs and Forms
Before we explore the methods of bringing data into MICROMINE, let’s look at
the process of entering parameters into MICROMINE dialogs. So far, we’ve only
seen the simplest of dialogs, but as you continue to learn MICROMINE you’ll
encounter increasingly complex ones.
Dialogs
Some MICROMINE dialogs have over 50 individual controls arranged in
numerous groups. The best way to fill out such a complicated dialog is to work
through it as if you were reading down the columns of a newspaper: top down,
from left to right. In the case of a tabbed dialog, you can extend the analogy to
reading the pages of a magazine. Adopting a systematic approach like this
ensures that responses are made in the correct order, which is important
because other prompts on the dialog may change depending on your earlier
choices.
Some dialog prompts are highlighted in a different colour (usually red). These
are compulsory prompts: You must enter a value before proceeding. Other
prompts can be left blank if they’re not relevant.
Form Sets
MICROMINE provides an elegant way to save and re-use the parameters that
you’ve entered into a dialog: You simply save them as a Form Set, which can
be recalled for later reuse.
To save the contents of a dialog as a form set, click the Forms button on the
Dialogue form. Depending on the exact nature of the dialog, it may not have
its own Forms button. For dialogue forms without a forms button, you can
either click the Forms button under the Display menu, or use the Forms
toolbar button. Dialogue boxes for many of the graphical display options such
as Dhole | Normal sections do not have their own Forms buttons.
MICROMINE will display the Forms dialog, which gives you the opportunity to
save the parameters with a Title of your choice. The title can be any
descriptive, plain English text, since all that MICROMINE needs to internally
reference the form set is its Number, which must be unique. The Forms dialog
also allows you to recall a previously saved form set, and import or export form Notes:
sets for sharing with other users.
Some dialogs have buttons that open other dialogs. In MICROMINE, the
“parent” dialog is called a dialog form, and the “child” dialogs are known as
dialog boxes. All dialog boxes that belong to a dialog form are automatically
saved together with that particular dialog form.
Each MICROMINE function maintains its own independent list of form sets, so
there’s no risk of duplication. For example, more than one function could have
a form set Number 1, with the title “Testing”.
Even if you forget to save a dialog as a form set, every MICROMINE dialog is
automatically saved to a ‘default’ form set. Simply re-opening a particular dialog
will automatically recall the default set, so your previous settings are always
available, even after restarting the computer. As soon as you change a value,
however, the previous value will be lost.
Forms are a very useful facility. They promote consistency and save
you from re-entering values.
Exercise 4.1: Explore dialogs and form sets
In this exercise, we’ll use the Simple Display function to display some
geochemical sample locations and save the display parameters as a form set.
2. Before choosing any data, click the Display Limits… button and confirm
that the Display Limits dialog is empty. Close the Display Limits dialog.
3. Double-click the File response and choose NVG_GCM from the list.
4. Once you’ve chosen the file, re-click the Display Limits… button and
note that the coordinate fields and their minima and maxima have been
automatically set. Close the Display Limits dialog.
5. Double-click the small blank square next to the Symbol prompt and
choose a plus [+] symbol.
6. Click the first OK button on the toolbar to run the function and test your
settings.
7. Close the display window using File | Close, or the cross in the top right
corner of the window to return to the dialog.
Assuming you’re happy with the settings, you can now save them as a form
set.
3. When the Save Current Values dialog appears, type in the Title Notes:
Geochem Display and click OK. Both dialogs will disappear.
4. Click the Forms menu or toolbar button a second time, and note that your
newly saved form set appears in the list of saved form sets.
If you wanted to re-use those settings, you’d simply click the appropriate form
set to select it, and then click Open to load the settings.
Merging Assay Data
We added fields to the data file in Exercise 3.3 to prepare that file for the
merging process. The NVG_GCM file contains a sample number, co-ordinates
describing where the sample was taken, and some other information. A file
called MMI_ASSAY_RESULTS.TXT (for convenience in the Import folder in the
current project) contains the assay results and sample numbers that
correspond to the coordinates.
To successfully merge the records in two files, there must be a field with the
same values in both the target and source files. This is known as a key field. If
the key field in each file contains duplicate values, you must use two or more
fields in each file to differentiate each record.
The Merge function processes the target file record by record. It finds the key
field in each record and reads the value it contains. It then looks for the same
value in the key field in the source file. When it finds an equivalent value, it
takes the data from the fields you’ve nominated, and writes it to the
corresponding fields in the target file.
It’s important that you know the column order in which the sample
data has been returned if the assay file does not contain a header
row. In this case, the field order is: Au1, Au2, Au3, Ag, Cu, Pb, Zn,
Ba, Mo, Sb, As, Hg and Tl.
Exercise 4.2: Merge assay data into a sample locality file
In this exercise the sample identifiers are unique. This means you can use the
fields containing sample identifiers in each file as the key field in the merge. In
cases where there are duplicates in the key field in the target file you must use
multiple fields to form the key.
Do the following:
1. Select File | Merge | Text from the main menu (There’s also a Merge
function under the Edit | Tools menu of the File Editor but it doesn’t have
as many features as this one.)
2. Click the browse […] button beside the Text file path response and
navigate to the file MMI_ASSAY_RESULTS.TXT in the Import folder (this
file can be external to the project and is only here for convenience).
3. Double-click in the Target File response and select NVG_GCM from the
window that appears.
3. Position the cursor in the Start response on the first row, and then right-
click. The contents of the source file will be displayed in the built-in text
viewer.
4. Highlight the sample number (first column). Make sure that the highlight is
extended to immediately prior to the first character in the next column.
5. Release the mouse button, and then click on Post Values; A 1 will be
posted in Start and a 7 in Length.
6. Double-click in Target Field Name and select the SAMPLE field from the
list.
7. Choose CHARACTER from the Match list and close the Key Fields dialog.
Because we’re only using a single key field there’s no need to proceed to the
next row.
Defining the Merge Fields
You must now define the merge fields. This is a very similar process to defining Notes:
the key field. It involves defining:
• The name of the field in the target file where the merge value will be
written.
Do the following:
4. Highlight the second column on any row. Make sure that the highlight
extends to immediately prior to the first character in the next column.
6. Select the field in the target file where that data will be written.
7. Repeat this process for each column you want to merge. In this case we
want to merge them all.
Running the merge
9. The final stage of the process is to run the merge. Do this by clicking the
Run button on the dialog box.
When the process is complete, a report will appear describing the results of the
process, which is reproduced in the Merge_stats file. Right-click the Unmerged
and Duplicate files to check their contents. The Unmerged report will list the
records in the source file that were not merged. The Duplicate report will list
the records with duplicate keys.
Importing Text Files
A popular format for text data is CSV (comma separated values). Most
applications that can store and process tabular data can export in CSV format.
For example, field data recorded in a geologist’s notebook is often transcribed
from the notebook to a spreadsheet program such as MS EXCEL™ or Lotus™
before it’s imported into a MICROMINE project. CSV is generally used in these
cases.
If you use Field Marshal to collect field data, you can import or
merge files in native MM format. Field Marshal and the File Editor
contain many data entry and processing functions created
specifically for earth science data. It’s cheaper and easier to buy
Field Marshal or the File Editor than to try and write macros for MS
EXCEL or Lotus.
Exercise 4.3: Import a text file
In this exercise you’ll create a file and import the (distance, bearing) pairs that
were entered in an EXCEL spreadsheet and saved in CSV format. This exercise
will also illustrate another MICROMINE productivity tool: You can create a new
file virtually anywhere within MICROMINE.
Choose the Text File
2. Click the browse […] button next to the Text file path response and
navigate to the Import folder (within your project). Select the file
MMI_Tenement_Data.csv.
3. Right-click the text file name to display it in the text viewer. Confirm that Notes:
it’s in comma-delimited format, and determine which of the two fields is
bearing and which is distance.
Create the Target File
You can create a new file right within most MICROMINE functions by using the
right-click popup menu:
1. Right-click on the Output File response and choose New from the popup
menu.
2. Following the same procedure as you used in Exercise 2.1, create a new
file with the following parameters:
Prompt Setting
File TENEMENT_DATA
Type DATA
Title Tenement coordinates
Use template Disabled
4. Close the editor and answer Yes to save the file. Select File | Close or
press the ESC key to close the file editor. Note how MICROMINE
automatically places the name of the newly created file into the Output File
response.
Modify the Field Order
You’ll remember that the original text file contains data in Distance, Bearing
order, but our new file uses the opposite field order. However, with
MICROMINE we can easily control the order of the imported fields.
MICROMINE has no knowledge of what the fields in the CSV file represent,
so instead it refers to them simply by their position in the file. For example,
# 1 means the first field in the file, # 2 the second, and so on.
3. Repeat for # 2 and set it to BEARING. Close the Delimited Fields dialog. Notes:
4. Click the Run button on the dialog box to run the function.
5. Once the function has finished, right-click on the Output file and select
View from the popup menu. Confirm that the fields are in their correct
order.
Connecting to an External Database Using ODBC
ODBC is an acronym for the term Open Database Connectivity. It’s simply an
industry standard interface that allows data access from a variety of database
applications. ODBC isn’t tied to a particular operating system or database
program, but instead allows you to see your data in the same way irrespective
of the underlying software. You’re able to link to the database of your choice
simply by installing the desired drivers on your computer. Whenever you install
a database product, the appropriate drivers are usually installed along with it.
Setting up a new ODBC connection first involves creating a Data Source Name
(DSN). There are three types of DSN, so the choice of which to use seems
complex at first. In reality, they differ only in their degree of ‘visibility’ to the
rest of the users on your computer or network. You need only create the DSN
once; from then on it’s constantly re-used each time you reference the
database.
• File DSN, which is shared among all users on a network. It’s neither user-
dedicated nor local to a particular computer.
On most computers, the User and System DSN’s are grouped under Notes:
the category Machine Data Source.
You can use an ODBC connection two ways in MICROMINE: You can either
Import the data or Link to the database. When you Import, MICROMINE
creates a ‘snapshot’ of the data. The files created in the MICROMINE project
are ordinary data files, exactly the same as any other data file you’d create
yourself. Because of this, the newly created files are independent of the
database and can be used even if the connection to the database is lost.
However, you must re-import the data if anything in the database changes.
Exercise 4.4: Create an ODBC connection and import data
In most cases you’ll probably want to create an ODBC link (by using File |
Link | ODBC) so that MICROMINE always has access to the most up-to-date
data from your company’s database. However, because we need to edit these
files later, we’ll import the data instead.
The training database contains four tables of drillhole data (collars, downhole
surveys, assays, and lithologies), but we’re only interested in one of those: the
assay table. To import the other tables you’d simply repeat the steps on the
following page.
3. Select the Machine Data Source tab and click the New… button.
5. Choose Microsoft Access Driver from the list that appears and click
Next >.
10. Click OK on the ODBC setup dialogs, until you reach the Select Table
dialog, to complete the process.
You’ve just created a new ODBC connection! You need only complete
Steps 3 to 10 once, and from now on you’ll be able to reuse the same DSN
each time you connect to the database.
If you run into trouble with your ODBC settings, ask your system Notes:
administrator for assistance. Connection problems often stem from
not having the correct versions of ODBC drivers installed on your
computer. You should also ask your system administrator to remove
any unnecessary DSN’s.
Loading Data from the External Database
Whenever you want to re-use an existing DSN, you’ll need to complete the first
three shaded steps in addition to the rest of the following procedure. However,
because the Select Table dialog is already open, you don’t need to complete
them for this example. Instead, you should progress directly to Step 14.
13. Select the Machine Data Source tab and choose TRAINING (the DSN
you just created) from the list. Click OK.
14. The Select Table… dialog box will appear. You’ll see the names of the
four tables in the database: ASSAY, COLLAR, LITHOLOGY and SURVEY.
Prompt Setting
Preview Selected
Number of records 20
17. Click Import. The contents of the Collar table will be displayed. If you’d
like to change any of the characteristics of the file that MICROMINE will
create, you can do it here.
18. Click OK. MICROMINE will create the new file in your project and populate
it with the contents of the Collar table from the MS Access database.
19. Click Close once MICROMINE has finished importing the table.
Notes:
Using Merge Lab Data
Merge Lab Data is designed to process the SIF (Standard Interchange Files)
files favoured by assay laboratories. It’s a very flexible function that can
process most of the variations seen in SIF files. Merge Lab Data can:
• Merge or append data from lab files into files in your project;
• Create a target file in a project with the contents of the lab file;
• Replace below detection assay codes with a standard code or, if the
detection limit is specified in the SIF file, with the detection limit;
• Replace laboratory codes with ones that are used in your company.
Merge Lab Data can only merge on a single key field. If you need
to use multiple keys, use File | Merge | Text.
Exercise 4.5: Merge laboratory data into an assay file
Defining the Contents of the SIF File
To merge the contents of the SIF file:
2. Click the browse […] button next to the Lab file path response and Notes:
select the MMI_ NVG.SIF file (from the Import folder).
3. Back on the Merge Lab Data dialog, right-click the file name and view the
file. Take particular note of the format (column or comma delimited?) and
the particular codes found within the file. Close the text viewer window
once you’re done.
6. Because the sample numbers are in the first column, enter 1 in Start
column.
8. In the Assayed Element Names group, position the cursor in the Row
response and right-click. Highlight the first column of element names in the
header as shown in the preceding illustration. Click Post Values.
9. In the Data group, do the same for the first row in the column of assay
values.
The function assumes that the columns in the source file all have the same
width.
10. Select Replace lab codes and click More…
11. Type NS into the first row of Lab Code, but leave Replace With blank.
This will blank out all occurrences of the string ‘NS’ from the MICROMINE
file.
12. Select Replace lab code in the Below Detection group and choose the Notes:
Write <x.xx option.
13. Type LDL into the Lab code response.
14. Right-click in Detection limit row and highlight the first detection limit in
the file header. Click Post Values.
16. Type UM_report in the Unmerged file path response, and ML_stats in
the Report file response.
Defining the Characteristics of the Target File
We’re going to merge the laboratory data into the assay interval file that you
created in Exercise 4.4.
Do the following:
1. Double-click the Target File response and choose NVG_ASSY from the file
list.
2. Double-click the Sample field response and choose SAMPLE from the list.
This is the name of the key field in the target file.
3. Select Overwrite existing data in case there’s any residual data in the
target file.
4. Merge Lab Data uses the field names it finds given the information you
entered in the Assayed Element Names group. When you click Assay
Fields (1 - 65)… you’ll see the source file’s field names in the Source
column, and target file’s field names in the Target column.
8. Right-click the NVG_ASSY file name and check the contents of the assay
fields. Note how previously blank fields have now been populated with
data.
Data Entry
MICROMINE’s File Editor is an excellent data entry tool that’s specifically
designed to provide numerous tools for the rapid entry of spatial and drillhole
data. For example, by defining a series of rules, you can enter drillhole collar
coordinates and downhole sample data with a minimum of keystrokes.
Although many people use a spreadsheet application for data entry, you’ll find
that the File Editor provides a safer and more rapid data entry environment.
The File Editor has a Tools menu available under the Edit menu that contains Notes:
a collection of basic functions for importing, exporting and merging data;
sorting and validating files; and performing field-based calculations. Many of
these tools also have toolbar buttons.
MICROMINE files are presented on-screen in a familiar grid layout. You can
navigate up and down through the file by using the keyboard up and down
arrow keys, as well as Pg Up and Pg Dn to go one page at a time. Of course,
you can scroll using the mouse, too. To move from one field to the next, press
Tab or Shift+Tab, or click into the desired field with the mouse. To create a
new record, simply press Enter at the end of the file.
The File Editor supports standard Windows shortcuts for editing text, for
example:
• Ctrl+C (Copy)
• Ctrl+X (Cut)
• Ctrl+V (Paste)
Using these shortcuts, you can easily transfer blocks of data between
MICROMINE and, say, MS Excel, in either direction. However, the File Editor
also provides many other unique shortcuts that are designed to automate
repetitive geological data entry tasks. You can access these shortcuts by
opening the Records menu. Some of these are summarised in Table 1 below:
The add (Ctrl+A), replicate (Ctrl+R) and execute (Ctrl+T) tools also
operate on multiple records, by pressing Ctrl+Shift+[Letter] instead
of Ctrl+[Letter].
Exercise 4.6: Use the File Editor’s data entry tools
Let’s put some of these tools to work. This exercise always refers to the
keyboard shortcut for each function, but please feel free to experiment with the
menu or toolbar if you’d prefer to use the mouse.
Data Entry Field‐by‐Field
1. From the main MICROMINE menu, select File | Open and open the
NVG_ASSY file. Alternatively, you can click the Open File toolbar button.
2. Scroll to the bottom of the file and select (click) the last HOLE value, which
should read T17.
4. Now press Ctrl+R four or five times. Each time you choose this command
it replicates the T18 value to the record below.
Notes:
5. Select (click) the first blank FROM value in your new T18 hole and type in
a value of 0 (zero).
7. With the highlight still on the zero value, press Ctrl+Shift+A. The
Increment Many dialog will appear. Just click OK to accept the default
values.
8. Observe how MICROMINE has applied the new increment value to all
records below the selected cell.
9. Select the first blank TO value, type a 4 into that cell, and repeat the
Ctrl+Shift+A function. Your file should now resemble the following
diagram:
That was pretty quick, but wouldn’t it be good if you could perform all of those
actions simultaneously? Fortunately, there is a way.
Simultaneous Multiple Field Data Entry Notes:
3. Click the Replicate button. Note how MICROMINE changes the “rule” for
the HOLE field from IGNORE to REPLICATE.
5. The FROM field now becomes the selected field. It’s tempting to set an
increment value of, say, four, but there’s a much smarter way to handle
this field: Click the Copy button instead.
6. When the Copy Field dialog appears, select TO from the list and click OK.
This will take the TO value from the previous record and copy it into the
FROM field in the current record.
Copying the previous TO value into the FROM field is an excellent
way to ensure that your interval data has no gaps or overlaps.
Even if you manually edit a TO value, the next FROM value will
always be correct.
7. With the TO field selected, click the Increment button and set the
increment value to 4. Your Execute Parameters dialog should now look like
this:
Notes:
8. Click OK to close the Execute Parameters dialog.
9. Select the last T18 value in the HOLE field and press Ctrl+A. This will start
a new hole.
Before you can use the execution parameters, you must always
have a “starter record” containing actual values. The cursor must
also be somewhere in this record before creating any new data.
11. Press Ctrl+T and observe the result: All of the rules have been applied
simultaneously. Press Ctrl+T a couple more times to add some more
records. Your file should now look like this:
If you know how many records you need to add (you might be
drilling a series of 100m Reverse Circulation holes, for instance), you
can scroll to the end of the file, press Ctrl+Shift+T, and type the
number of new records into the Execute Many dialog.
Calculator
You can use the Calculator to quickly fill out fields through out a file. You can
perform simple algebra or more complex data manipulation. The calculator
works by the following formula:
Both Input A and Input B can be field names, numbers or a temporary variable. Notes:
The result can be a new field, existing field or a temporary variable.
To access the Calculator you can either select the File | Fields | Calculate
menu or by clicking the Calculations button on the toolbar in the File Editor.
The File Editor Calculator is slightly different to the main calculator as it has
fewer fields.
Exercise 4.7: Using the Calculator
2. Double click the first Input response and select the TO field.
4. Double click the second Input response and select the FROM field.
5. Double click the Result response and select the INTERVAL field. The
dialog should resemble the following diagram.
Let’s perform an exercise to calculate the Mid Point of each sample interval.
8. Single click the Result response and clear the box (Shift+Space) and type
in #1 to create a temporary variable.
9. Click the first Input on the second row and type in #1 to reference the
temporary variable.
10. Click the Function field on the second row and select Divide By. Notes:
11. Click the second Input and type in 2.
12. In the second Result field type in MidPoint. This will create a new field in
the data called MidPoint, which will be populated by the mid point of the
hole interval.
13. Click OK to run the calculation. You’ll be prompted to create the new field;
answer OK to create it.
14. Close the File Editor once you’re satisfied with the result. Please answer
NO when prompted to save changes!
Notes:
Lesson Four Summary
The key points of this lesson are:
• The File Editor can be much more efficient than spreadsheet applications
for entering spatial data.
Select File | Import | Text and choose the input text file’s format, then
Define the input file’s format and identify the various fields, plus
Press Ctrl+A.
Press Ctrl+Shift+I.
Press Ctrl+R.
Press Ctrl+T.
Press Ctrl+Shift+P.
To insert a record:
Press Ctrl+I.
To delete a record:
Press Ctrl+D.
Good Practice
If you’re importing text files that have the same format, create a form set
containing the import parameters. This will save you re-entering the import
parameters every time you need to import data in the same format.
Help Topics
For information on: See:
The File Editor Projects: File Editor: (choose from many topics)
Notes:
Lesson 5 – Validating Data
Duration: 60 minutes
Validation is an essential processing task, with two primary objectives:
Before you continue...
Make sure you’ve completed Lesson 2 – Working with data files.
Validating Data in a Project
Validation
MICROMINE supports the validation of nearly all types of fielded data (with the
obvious exception of fields containing random comments) and can also perform
rigorous validation of drillhole data.
The first two validation options are designed to validate the contents of fields in
a file, whereas the last is designed to validate drillhole data.
Validating a Data File Notes:
You have two choices for validating fields in a file: Either Tools | Validate or
File | Fields | Validate. With Tools | Validate, you can only validate one field
at a time, but it’s easy to use because you can validate at the same time as
you’re editing the file.
The Validate function can check up to ten fields in a target file for correct
values. If it finds an incorrect value, it will write an error message to a report
file, along with the name of the field in which the error was found, and the
number of the record.
For character fields the function determines which values are correct or
incorrect by comparing them with entries in a validation file. You must have
previously created the validation file.
For numeric fields the function determines which values are valid by testing if
they fall within the ranges that you specify.
Exercise 5.1: Validate fields in a file
Validation is often used to check the consistency of lithology codes used to
describe sample data. In this exercise you’ll create a validation file that contains
a list of the valid lithological codes that are relevant to the lithology file. You’ll
then use it to validate the lithology file.
Creating the Validation File
Although you could create the validation file using the File Editor, there’s no
reason to re-type data that already exists in some form. In this exercise, the
lithology codes are already present – including errors – in the lithology file
itself. So, it makes sense to extract the codes from the file, remove the errors,
and then use the corrected codes as our validation file.
Notes:
Prompt Setting
File NVG_LITH
Type DATA
3. Click RUN to run the function. MICROMINE will immediately display a File
Editor window containing the results and counts of the extraction. You can
see that although there were over 400 records in the original file, fewer
than ten different codes were used.
4. Before you can use this file, you must remove the errors! We’ll consider
blank or un-logged intervals to be errors, so highlight the blank record and
press Ctrl+D to delete it.
5. Highlight the FAUT record and press Ctrl+D to delete it also. The
remaining codes are correct.
We now need to modify the file slightly to improve the clarity of the remaining
steps.
7. In the Modify window, double-click the LITH field name and change it to
LITHOLOGY.
8. Highlight the FREQUENCY field name, and pres Ctrl + I to insert a record
so that your Modify screen looks like this:
LITHOLOGY C 10 0
LITH_DESC C 50 0
FREQUENCY N 8 0
9. Close the Modify window when you’re done, and answer Yes to modify
the file.
10. Fill out the LITH_DESC values so that the file resembles this illustration:
Notes:
11. Finally, Close the File Editor window, answering Yes when prompted to
save the file, and close the Extract Unique Records dialog.
Validating the interval file
The check file is used to validate the contents of fields where there is a fixed
set of possible results. You can also use the validation function to determine if
the contents of numeric fields fall within a range of values you specify.
Range checking helps to eliminate typographical errors and other mistakes that
often occur in data entry. In the next exercise, we’ll check a field that contains
values that range between 0 (zero) and 75.
The Fields Validate dialog is split into two halves: The upper half allows
you to set up the input, validation, and report files, whereas you define the
various validation rules in the lower half.
2. Fill out the upper half of the Fields Validate dialog as listed:
Prompt Setting
Type DATA
Type DATA
When you select Case Sensitive, values in the file you’re validating must
match the case of your check file, otherwise they’ll be recorded as invalid. For
example, ANDS is seen as being different to ands or Ands.
5. Right-click in the Report file response and select View from the popup
menu.
6. The Report file will look something like this. From here you can go to each
of the records in the input file that have an error and correct them.
Notes:
Validating Drillhole Data
The drillhole validation function (Dhole | Validate) will detect a large number
of errors and inconsistencies in Collar, Interval and Downhole Survey files. It
detects:
As you can see, the drillhole data undergoes comprehensive testing. You
should always validate drillhole data to ensure trouble free operation in later
processes.
Interval files are drillhole or trench files containing From-To data. Notes:
You must perform a separate validation run for each interval file
that you’re checking, using the same collar and downhole survey
file in each case. For example, if you have interval files for assays,
lithologies, and oxidation, you must perform three separate runs of
Dhole | Validate.
Exercise 5.2: Validate drillhole data
To validate the drillhole data, do the following:
Prompt Setting
Prompt Setting
You can choose to ignore unsampled intervals for the interval Notes:
length check by selecting a grade field. Any intervals with a blank
for the grade field will be ignored for the validation check.
4. Click OK. A series of status messages will appear as Validate processes the
drillhole files. If an error is detected, an appropriate message will be
displayed and the error will be written to the Report file.
5. Right-click the Report file and select View from the popup menu. This file
contains a record of all errors encountered during the validation process.
In this exercise, Validate detected some downhole survey errors, caused by
consecutive surveys deviating by more than 5°, and some errors for sample
intervals greater than 5m. These downhole survey errors could in fact consist
of valid data, so it’s entirely up to you to determine whether or not corrections
are required. If you were to re-run the validation using the NVG_LITH interval
file, you’d discover some inconsistent data in the interval (lithology) file. These
interval errors will require attention before the data can be used. However, the
training dataset already contains a validated file (NVG_LITH_NO_ERR), so the
corrections won’t be necessary.
Using Lookup Tables
So far we’ve looked at validating pre-existing data, but it would be far better to
ensure those data were correct from the moment they were created. Using
MICROMINE’s Lookup Tables, you can establish a data entry environment
where this is possible.
Lookup tables serve two main purposes. Firstly, they act as a data entry tool,
minimising the amount of typing required. Instead of having to type a
particular code, for example, you can simply choose it from a list. When used in
conjunction with the other data entry shortcuts that we’ve already explored,
lookup tables make it possible to enter large quantities of data with few
keystrokes. This system works particularly well with pen-based devices such as
palmtops or PDA’s, which may not have a keyboard.
Secondly, and perhaps more importantly, lookup tables act as a data validation
tool. Keystrokes are validated as they occur, which ensures that your data are
correct from the start. There are numerous settings that control the way lookup
tables perform this validation task.
Types of Lookup Table Notes:
You can create two different types of lookup table: Either a Flat lookup table,
which consists of a single list of codes and descriptions, or a Hierarchical lookup
table, which consists of nested lists of code/description pairs. Each form of
lookup table is better suited to a particular type of data.
Flat Lookup Tables
Flat lookup tables are suited to simple lists of codes and descriptions, like the
logging geologists’ initials or simple geological codes. In fact, anything
consisting of a list of discrete values could be used.
Hierarchical Lookup Tables
Hierarchical lookup tables are best suited to more complex data where there is
a distinct hierarchy in the codes. Standard Geological Survey codes are an
excellent example, where they have nested levels for Age, Primary Rock Type,
and Lithology. Other examples include dates, with nested levels for Year,
Month, and Day, and tenements, with levels for type, mineral field, and
number.
Creating a Lookup Table
Creating a lookup table is a two-stage process. Firstly, the lookup table is
created as an ordinary MICROMINE file with an LDT file extension. Once the
codes have been entered or otherwise imported, the second stage involves
‘compiling’ the lookup table into a binary file with an LBN file extension. The
binary file can’t be viewed or edited by a user, and so is much more secure
than the text file version.
Exercise 4.3: Create and attach a new lookup table
Let’s create a lookup table that we’ll use on the NVG_LITH file.
Creating the MICROMINE File Notes:
Prompt Setting
File LITH_LOOKUP
Type LOOKUP
3. Click OK to create the new file. Because we defined the nesting levels,
MICROMINE has already set up the file structure for us.
At this point, we could manually enter the codes and descriptions, but it
makes sense to re-use the available data. The validation check file
VALID_LITH already contains the codes and descriptions we need, so let’s
save some time by using that file.
4. Keeping LITH_LOOKUP open, select File | Open from the File Editor
menu and open the data file VALID_LITH. (If you can’t see it, be sure to
set Files of type to DATA.) Both files are now open simultaneously.
5. Drag your mouse over all of the cells in the first two columns of
VALID_LITH to select them, and then press Ctrl+C to copy the selected
data.
6. Close the VALID_LITH file and ensure that the first cell of LITH_LOOKUP is
selected.
7. Press Ctrl+V to paste the data into the lookup table. It should look like
this:
Compiling the Binary File Notes:
The MICROMINE file version of the lookup table is what you’ll edit and maintain
as administrator of this project. However, it’s not the file that the geologists in
the field will use. You must compile this file into a binary LBN file before it can
be attached to an interval file.
1. With the file open in the editor, select File | Compile from the menu. The
Lookup Table Properties dialog will appear.
2. Set the Enable validation and Case sensitive options, but leave the
remaining options blank.
3. Click Compile to create the binary LBN file. A message will appear
indicating successful creation of this file.
Attaching the Lookup Table to a Field in the Data File
The final stage in this process is to attach the lookup table to the appropriate
field of the NVG_LITH file. Once this is done, we can start using it.
1. From the main menu, select File | Open and open the NVG_LITH file.
2. Click the LITH field to select it. It doesn’t matter if you click the field
heading or just a cell in that field.
3. From the File Editor menu, select Format | Lookup Tables | Attach.
4. Choose LITH_LOOKUP from the list and click Open. MICROMINE will add
the ellipsis buttons to the LITH field displayed in the File Editor.
5. Click one of the ellipsis […] buttons to open the lookup table. Your screen
should resemble the following diagram. From here, you can simply click
the desired code to select it.
6. Instead of clicking, try typing a code into one of the LITH cells. Even Notes:
though the lookup table is attached, you’re not prevented from using the
keyboard in the conventional manner.
7. Try typing an incorrect code, then moving the cursor to a different cell in
the file. The invalid code is accepted! There’s still one final stage we must
complete before the lookup table is fully set up as a validation tool.
Setting the Validation Behaviour
In addition to setting the Enable validation switch when you create a lookup
table, you must also inform the File Editor that it must support validation. You
can set this behaviour by selecting Options | Editor from the main menu.
2. From the main menu, select Options | Editor to display the Editor
Options dialog.
3. This comprehensive dialog has many settings on it, but we’re interested in
the lower half, which is dedicated to setting the validation options.
4. Set the Validate lookup fields option. This will activate the remaining
prompts.
5. In the Validation options group, set the Beep when validation fails
option.
6. Finally, in the Validation actions group, ensure that the Valid input
compulsory option is selected. Your dialog should look like this:
Notes:
8. From the main menu, select File | Open and re-open the NVG_LITH file.
Note how the lookup table is still attached.
9. Type an invalid code into one of the LITH cells and then move the cursor
on to a different cell.
10. Observe how MICROMINE now displays a message (and beeps!) informing
you that the entered value is incorrect.
Notes:
Lesson Five Summary
These are the key points of this lesson:
• To ensure consistent results you must validate data before using it.
• Lookup table serve dual roles as data entry and data validation tools.
Enter the lookup codes and descriptions in the File Editor, then
Select File | Compile from the editor to create a binary LBN file.
Good Practice Notes:
• If you’re processing many files containing similar codes, you can create
validation files and re-use them.
• You should always run drillhole validation after adding any new drilling
data or after importing it or reading it from other systems. Most problems
people have with drillhole displays are due to errors in the data that
Validate will identify.
Help Topics
For information on: See:
Lookup tables Projects: File Editor: Creating and using lookup tables
Notes:
Lesson 6 – Filters
Duration: 30 minutes
Filters in MICROMINE allow you to subset data of interest from a larger
dataset. This might prove useful, for instance, if you only wanted to work with
drillholes drilled during 2001. Most MICROMINE functions have a filter option,
and the filters themselves can be saved as form sets. As we’ve already seen,
form sets allow us to re-use previous settings.
Working with Filters
Setting up a Filter
If you’d like to work with filtered records instead of a complete dataset, simply
set (turn on) the filter option on the appropriate dialog:
Once you’ve activated the filter, you can edit the filter conditions by right
clicking (or pressing F4) on the filter number. In the illustration above, the
filter number is currently blank, but after you’ve saved the filter as a form set, a
number will appear in this response. To choose an existing filter, just double Notes:
click (or press F3) the filter number and choose the form set from the list.
The Filter Dialog
The Filter dialog is divided into two main areas: A variety of settings at the left
and bottom of the dialog, and up to 10 filter conditions in the Filter
Conditions group. If you open a filter from within another function, the filter
will automatically choose the correct file and place it into the appropriate
response. The remainder is up to you.
The Records group allows you to subset by record numbers (say, records 0 to
100). It’s very easy to accidentally leave this option set, so please remember to
clear it afterwards!
In the event that a filter gives you exactly everything you don’t want, simply
use the Reverse filter option to invert the filter result.
This filter condition will return the points whose easting is greater or equal to
24900. The field name is EAST_GRID (chosen by double-clicking), the operator
is >=, and the value is 24900 (entered by typing). Setting the Numeric switch
instructs MICROMINE to ignore any character values that may be in the field.
Matching Records
Once you’ve set up a filter, you can immediately preview the results in the File
Editor by right-clicking the file name, or any of the referenced field names, and
selecting View from the popup menu. The records on a white background are Notes:
those that matched the filter conditions. These are the ones that will be used
for further calculations. The records on a grey background did not match the
filter, and will be excluded from the calculation.
Multiple Filter Conditions
The Filter dialog allows you to define up to 10 filter conditions. In this event,
you must choose a Boolean operator such as AND or OR. As soon as you define
two or more conditions, the Combine Lines group becomes active, which
allows you to choose the desired Boolean operator.
Sometimes you need to might define a filter that’s too complex for a simple
AND/OR combination. Complex filters such as this require that you use the
Equation option instead. You write an equation by typing it into the Equation
response, referring to each filter condition by its line number. You then use a
combination of character codes (listed in Table 2) in conjunction with your line
numbers.
Let’s use an example. Suppose you had defined the filter conditions illustrated
in the screenshot earlier in this section, but wanted to combine them using an
equation. The conditions were:
To set up an equation relating these with the Boolean AND operator, you’d type Notes:
this into the Equation response:
• 1&2
• 1|2
Code Meaning
& AND
| (pipe) OR
* Any characters
() Set precedence
You can construct quite complex filters using this technique, but in order to use
it effectively you should have an understanding of the underlying Boolean
algebra.
Using Boolean Algebra
As we’ve seen, you create a filter equation by using combinations of your filter
conditions and the Boolean AND and OR operators. It’s therefore important to
understand how each operator works.
Imagine adding a third overlapping circle to each of the two diagrams above. Notes:
In the AND diagram, left, the area common to all three circles will be smaller
than the shaded area currently common to the existing two. The conditions are
becoming harder to satisfy. On the other hand, adding a third overlapping circle
to the OR diagram simply increases the shaded area, making the conditions
easier to satisfy.
Exercise 6.1: Create a multiple condition filter
Let’s put a filter to work. We’ll revisit the Simple Display function so that we
can graphically illustrate the results of our filters.
Our first task is to create a filter to subset all geochemical samples whose
coordinates fall within the following ranges:
• 15900 – 16000N
• 24900 – 25000E
1. From the main menu, select Display | Simple. The Simple Display dialog
should have retained our settings from Exercise 4.1. If it’s blank, you can
fill it out by referring to the first half of that exercise.
2. Click the Display Limits button and set the Grid type to FULL. Close the
Display Limits dialog.
4. Right-click (or press F4) the blank filter number to edit the filter. The
Filter dialog will appear.
5. The filter dialog may still contain settings from a previous filter. Simply
blank out any existing filter conditions before continuing.
8. Type 15900 into the first Value response and set the Numeric check box.
9. Repeat Steps 6 through 8 for the remaining filter conditions. Your filter
should now look like this:
12. Close the File Editor window and then click OK to close the filter.
13. Click OK on the toolbar to run the Simple Display function. Your display
should resemble the following diagram:
Exercise 5.2: Create a more complex filter
Let’s create a slightly more complex filter. This time, our task is to subset all
geochemical samples whose sample numbers fall within the following ranges:
• IV10680 – IV10691
• NV10295 – NV10314
2. Position the cursor in the first Field Name response and repeatedly press
Ctrl+Space until all of the filter conditions are empty.
3. Double-click the first Field Name response and choose SAMPLE from the
list.
5. Type the string IV10680 into the first Value response, and clear the
Numeric switch.
6. Repeat Steps 3 to 5 for the remaining filter conditions. You filter should Notes:
now resemble this:
(1&2)|(3&4)
10. To preview the filter, right-click the File response and choose View from
the popup menu. Confirm that the desired samples are indeed selected,
i.e. on a white background.
11. The graphical output of this function is meaningless so simply close all of
the dialogs once you’re satisfied with the result.
Notes:
Lesson Six Summary
These are the key points of this lesson:
• Filters are an extremely versatile way to subset only the data of interest
from a larger dataset.
Right-click the File response and choose View from the popup menu, then
Good Practice
• Saving common filters as form sets allows you to re-use them throughout
your project.
Help Topics
For information on: See:
LIST OF TABLES
TABLE 1: FILE EDITOR KEYBOARD SHORTCUTS .......................................................................................................................44
TABLE 2: FILTER EQUATION OPERATORS .................................................................................................................................71