Home

PetroPyQAPF 2.0.0 user manual

PPL stands for plane-polarized light and XPL for crossed polars. The two images can show the same field of a thin section. The example images and compositions are synthetic.

Español · What’s new

Installation and access

The installer and portable package are listed on the PetroPyQAPF 2.0.0 download page.

  1. Download and extract the entire PetroPyQAPF_Setup_2.0.0.zip. Keep its EXE and .bin files together and open the EXE. On Select Components, choose Full, Program only, or Custom. PetroPyQAPF is required. Select the mineral, rock, and texture atlases you want. Each component displays its size.
    • To change your selection, close PetroPyQAPF and run the same installer again. Clearing an atlas checkbox removes its package. Reinstalling or uninstalling preserves your projects and preferences.
    • For the complete portable version, extract PetroPyQAPF_2.0.0.zip and open PetroPyQAPF.exe from its folder. Keep the executable and the other files together. The portable includes all three atlases.
  2. Open the application with an Internet connection. Select OK in the access prompt. In the browser, select Sign in with Google and choose your account. Use the account authorized for PetroPyQAPF. If access is denied, use the academic access form.
  3. After a successful authorization, you can work offline for up to three days from the last successful check. Open the application online before taking the computer to the microscope if you plan to work offline. If the grace period expires, reconnect and reopen the application. It can renew the session in the background. If prompted again, sign in through the browser.
  4. The application rechecks authorization when launched from its cache, when it regains connectivity and every two hours while open. A successful check restarts the grace period. If access is revoked during a session, the usual save workflow runs before closing.
Simulated first-launch access prompt
Simulated first-launch access prompt
Start screen with project actions
Start screen with project actions

Projects, samples, thin sections and fields

  1. From Home, choose New project or Open project. You can also reopen a recent project. Clear list removes its entries. If a file has moved, select it in its new location.
  2. In Samples, use Add sample, New thin section and New field to build the hierarchy. Use distinct identifiers at each level. Edit modal composition and chemistry at sample level. Select the field before loading photographs or recording regions, measurements and counts. Open the viewer from the field thumbnail or the photomicrograph control.
  3. Use Import on the project toolbar to add samples from CSV or Excel. Review identifiers, recognized columns and the rows selected for import. Use Import file in the CIPW panel for geochemical tables. Confirm the sample row before interpreting its results. To add protocol photographs, use Import captured thin section in Samples and check the fields and image pairs it finds.
  4. Choose Save to write a .gisgeo project containing project.json and archived assets. Package opens the project ZIP export. Check the destination and included material before sharing.
  5. Use Enable recovery autosave every minute in Settings. If startup offers to recover the previous session, inspect the recovered project and save it to a file and location of your choice.
Project explorer with sample, thin section and field
Project explorer with sample, thin section and field

Manage the hierarchy and review imports

In Samples, select a sample to edit its details and expand its thin sections and fields. Use the deletion controls at the relevant level and read the confirmation before removing a section or field that contains saved work. Switch fields before opening the viewer to annotate a different image. Clear image acts on the image linked to the form. Clear list on the start page removes recent-project shortcuts.

In the project importer, choose the Excel sheet or CSV, inspect the preview, and confirm the valid rows to add to the active project. For geochemistry, use Manual to edit the oxide values directly or File to choose an analysis from a table. Check the sample identifier, units, and column mapping. Leave unmeasured values blank. Enter zero only when reported by the source.

On the start page, select a recent project and press Enter to open it. With an active project, Package opens the ZIP save dialog. Choose a destination and wait for confirmation before checking the archive.

In the Samples tree, select a thin section or field to rename it and enter Observations. Viewer notes displays the PPL/XPL notes saved in the viewer. Click a thumbnail or double-click the field to open it. Use Duplicate field or Move field to reorganize the hierarchy. To move a field, select the destination thin section first. Ctrl or Shift selects multiple rows, and Delete opens the deletion confirmation. Check which hierarchy levels the confirmation includes.

QAPF modal classification and auxiliary inputs

  1. Select a sample and its plutonic or volcanic domain. In QAPF modal classification, enter Q (quartz), A (alkali feldspar), P (plagioclase) and F (feldspathoids) on a common modal basis, in volume percent. Record how you estimated the mode, such as a representative point count. The diagram renormalizes Q+A+P or F+A+P. Review the phase identifications if Q and F are both present.
  2. Enter observations under Petrographic context and auxiliaries, including mafic minerals (M), amphibole (Amf), pyroxenes (Px, Opx and Cpx) and olivine (Ol) where applicable. Open Parameter reference to check units and ratios. Read the units beside each field. Modal volume percent, plagioclase anorthite content and a mineral ratio describe different quantities. Leave unmeasured values missing. For additional phases, enable Extended mineralogy and use Normalize to bring the visible composition to 100% when appropriate. Close composition to 100% keeps the edited value and adjusts the other entered phases.
  3. Review the diagram, the plotted point and the rock name. If the software suggests a specialized diagram, check the recommendation against the available auxiliary input. The formal name comes from the modal classification or the applicable specialized diagram.
  4. With whole-rock chemistry, enable Calculate CIPW projection and enter oxides in weight percent. Review the total, missing values and warnings before comparing the norm to the observed mode. Read ML support and the NIM/GPKE interpretation separately. Use How it is calculated to examine the evidence.
Modal classification and QAPF diagram for a synthetic sample
Modal classification and QAPF diagram for a synthetic sample

Read the modal diagram

The plot expresses each component as 100 × component / S, where S = Q + A + P for the quartz triangle or S = F + A + P for the feldspathoid triangle. For example, Q = 20, A = 30, and P = 30 give Q′ = 25, A′ = 37.5, and P′ = 37.5. Check the active domain and classification branch. When the application recommends a specialized ternary diagram, open the diagram selector and check its axes and criteria against Parameter reference. The required auxiliary inputs depend on the branch. With insufficient diagnostic data, classification may stop at a broader family. Le Maitre et al., 2002 · Streckeisen, 1976

Compare the mode with the CIPW norm

Enable Calculate CIPW projection and enter whole-rock chemistry in weight percent, or select the imported analysis. Check how the laboratory reported iron and inspect the oxide total. If you use Load preset to explore the interface, replace its example values with measurements before interpreting a sample. Click Recalculate (Ctrl + R). Open CIPW details to review normative minerals, silica saturation, residuals, and warnings.

GeoNormPy Legacy 1.0.0 converts the oxides to molar amounts, allocates them to normative phases through stoichiometric balances, and expresses the phases by mass. Available silica constrains phase allocation. The result describes an idealized composition. A usable projection requires a complete norm and a compatible modal branch. Review warnings about the analytical total, iron, volatiles, and alteration even when a normative point is plotted. Cross et al., 1902 · GeoNormPy

Review domain-specific ML support

Select the plutonic or volcanic domain and leave AI model on Automatic to use that domain’s default model. ML model documentation lists the available models and their required variables. The adopted volcanic model uses oxide chemistry. The plutonic model uses oxides, derived variables, and normative phases calculated internally with the GeoNormPy 1.1.0 Verma2003 profile and a fixed ferric fraction of 0.15. The model’s internal norm and the on-screen CIPW Legacy comparison use distinct settings. An available Legacy or diagnostic model can be selected for comparison. GeoNormPy · Verma et al., 2003

Open Official ML details to check the suggested class, alternatives, and limitations. Scores apply to the classes represented in training. Internal group-based validation leaves geographic transfer and probability calibration unverified. Coordinates and modal QAPF percentages alone provide none of the required chemistry. Check the support status if chemistry is incomplete or you disable CIPW.

Read and export the integrated interpretation

Open How it is calculated to follow the evidence through each stage. In Integrated interpretation, compare the modal name, supporting evidence, and warnings. In Geological rules and references (GPKE), check which rules can be evaluated and which agree or conflict with the sample data. Coverage is the evaluable weight divided by the total weight. Compatibility is the favorable weight divided by the evaluable weight, subject to profile safeguards. Both measures are heuristic. Because CIPW and ML share chemical inputs, their agreement provides no independent validation.

In How it is calculated, use Workflow to trace each component, NIM calculation to inspect its status, weight, and contribution, and GPKE calculation to review the rules and their inputs. Check for missing or conflicting evidence before writing the interpretation. The 0–100 support index describes the evaluated evidence. The applicable modal classification supplies the formal name.

If you use Optional assisted writing, check the provider, model, and key before generating text. Review the data you share with an external provider and edit the generated text before using it in a report. The writing tool runs separately from the classification.

In the main window, Export JSON (Ctrl + E) saves a structured interpretation and also offers TXT. Export PDF (Ctrl + Shift + E) saves a report for the current analysis or exports TXT. Review the sample, project, operator, locality, and linked images before sharing it. Load example (Ctrl + D) lets you rehearse the workflow with demonstration data.

Petrographic viewer

Open and align PPL and XPL

  1. Select a field and choose Open image in the viewer to load its photomicrograph. For individual files, select PPL or XPL and add the matching image of the same field. For a protocol pair, choose Open field and select the folder containing ppl_000.png and xpl_000.png, or open ppl_000.png itself.
  2. For individual files, follow the Center/align photomicrographs prompt. Draw an edge-to-edge line in PPL and the corresponding line in XPL. The line centers determine the translation. Calibrate the scale separately.
  3. Switch between PPL and XPL, or choose Vertical split or Horizontal split and drag the divider position slider. Check that grains match, especially near the edges and after changing the XPL angle.
PPL and XPL comparison in the viewer
PPL and XPL comparison in the viewer
Adjusting the PPL/XPL divider and applying the registration for XPL at 45°. Spanish interface.
Adjusting the PPL/XPL divider and applying the registration for XPL at 45°. Spanish interface.
  1. Scroll to zoom. Drag the image with the hand tool. Use Zoom to selection to frame an area and Fit image to window to see the whole image. F11 expands the image area.
  2. On a still image, use Polygon and click near the first vertex to close the outline. With Freehand, hold the left button while tracing the grain boundary. Review the Grains inventory. To restrict a quantitative analysis to a rectangle, set the region of interest in the workbench.
  3. If two outlines overlap, inspect their shared boundary. The newest outline takes precedence by default. In the mineral inventory, enable Respetar granos anteriores (respect earlier grains) to give older outlines priority. Changing a label preserves creation order.

Label grains and point markers

  1. Use Polygon or Freehand to outline one or more grains of a phase, or Point marker to mark a location. Right-click and choose Done to complete the group. Measure grain area from its outline. A point marker records a location.
  2. In Mineral name, choose a phase. The pending marks receive that label. The viewer keeps the last label active and applies it when you finish the next group. Check Active mineral before drawing a different phase. Choose Clear active to open the picker again when you finish the next group.
  3. To correct a particular region, right-click it and choose Change label. Use Select and click a grain to read its label in Selected grain and open Grain actions. The outlines and point markers are color-coded. Use Mineral inventory to match colors to labels, show or hide phases and switch between Borders only and Fill and borders. Undo and Redo in the annotation toolbar apply to annotation operations.
  4. Review totals, labels, coverage and percentages. In Mineral inventory, Percent uses the entire image area and Modal percent uses the annotated area. Check how much of the field is outlined before using these proportions as a composition. Save the project with the field active.
Quartz selected, plagioclase active and the color-coded mineral inventory
Quartz selected, plagioclase active and the color-coded mineral inventory

Mineral picker and visual grid

  1. Finish a group with no active label to open Mineral name. Select Full names for names or clear it for abbreviations. Hover over an abbreviation to see the full name. Choose other (otro in abbreviation mode) to type a custom label. Cancel if the identification needs more work.
  2. Select Show grid to overlay a visual reference while locating or labeling grains. Each click cycles through the current spacing, 2×2 grouping, 4×4 grouping and hidden. Use a plan in Count to obtain observations distributed according to a sampling design.
Mineral picker showing full names
Mineral picker showing full names
Mineral picker showing abbreviations
Mineral picker showing abbreviations
Visual grid at its original spacing
Visual grid at its original spacing
Visual grid grouped 2×2
Visual grid grouped 2×2
Visual grid grouped 4×4
Visual grid grouped 4×4

Measure lines and areas

  1. Open a still image and confirm the profile scale. Choose Measure, click the two endpoints or drag and release, and enter the measurement label. Press Esc to cancel an active line. Check the length in pixels, or in mm when a scale is available.
  2. For area, use Polygon or Freehand to outline a grain, label it and open Quantify. Review per-grain areas and perimeters in Grains and statistics. Confirm scale before interpreting µm and µm².
  3. Review grains clipped by the region boundary. Apply a consistent inclusion or exclusion rule when comparing fields.
Morphometry and the viewer with outlined grains
Morphometry and the viewer with outlined grains
Drawing a line and measuring an outlined area in the quantitative workbench. Spanish interface.
Drawing a line and measuring an outlined area in the quantitative workbench. Spanish interface.

Export images

  1. Open a still image. In Tools and settings, choose Save annotated view. Select Current view (zoom and framing) to save the visible area or Full image (native resolution) to export the entire image. Click Continue and choose a filename and folder.
  2. The PNG includes visible regions, labels, grid, measurements and scale bar. It uses the source image colors and excludes the window controls. The matching JSON identifies the source images, channel or comparison, angle when known, scale and its method, and date. If a physical scale is unavailable, the viewer saves both files and displays a warning. Save the .gisgeo project to keep editable annotations.
Options for saving the annotated view
Options for saving the annotated view
  1. Open a protocol field and select the XPL angle. In Tools and settings, choose Export aligned XPL. Select Include annotations to add the visible overlays. Click Continue and choose a filename and folder. The viewer remembers the last export folder.
  2. The PNG contains the XPL image transformed into the PPL frame at native resolution. The JSON records the angle, registration type, transform and original XPL photo. Nominal compensation triggers an approximate-alignment warning and may leave empty borders or residual offsets. The source photos are preserved. Use the point export for point coordinates on the original XPL photo.
Exporting aligned 45° XPL with optional annotations
Exporting aligned 45° XPL with optional annotations

With the camera live, use Capture photo to acquire a PNG. Check the capture folder in Tools and settings and find the shot with View photomicrographs.

Tool palette, inspector, and shortcuts

Control Operation
Hand and mouse wheel Drag to pan or scroll to zoom. Fit image to window restores the full frame.
Select and Selection lasso Click a grain outline or encircle several with the lasso. Review the selection before applying a batch action.
Zoom to selection Drag a rectangle around the area to enlarge. This changes the viewport while preserving the pixels and calibration.
Erase grains Click the grain to remove. Use Undo/Redo to correct an annotation edit.
Polygon, Freehand, and Point marker Outline grains or mark observations, then finish the group. During drawing, the right-click menu also offers Cancel.
Measure Draw and label a line, then read its length in the inspector. Select a measurement and press Delete or Backspace to remove it. Esc cancels the active measurement or calibration.
Brightness/contrast/gamma Adjust the display and reset the controls to compare with the original. Threshold analysis uses source pixels.
Show grid, Calibrate with line, Center/align photomicrographs Display the visual grid, measure a reference length, or register the pair. Translating a loose pair leaves rotation, unequal scales, and distortion uncorrected.
Inspector, Clear view, and F11 Toggle the contextual panel, temporarily hide overlays, or expand the image area. Press F11 again to restore the layout.
PPL, XPL, V, and split view Switch channels. V switches the primary channel of an image pair, including in split view. The angle selector uses the available XPL frames.
Quantify, Petrography guides, and Help Ctrl + Shift + Q opens the workbench for a still image, Ctrl + Shift + G opens the guides, and F1 opens help for the active window.

Under Selected grain → Grain actions, open its atlas entry when available, edit its label, reuse it as the active mineral, apply the active label, smooth its outline, delete the annotation, or record and inspect relationships between grains. Check the outline after smoothing before measuring it. Grain relationships are user observations. Use the inventory to show or hide all phases, remove labels, or clear outlines. Clear view is temporary. Deleting an annotation edits the stored data.

Use Visual notes in the inspector to record observations for PPL, XPL, or the pair, depending on the active view. Save the project to keep the notes with the field.

In Tools and settings → Histogram, compare the red, green, and blue distributions and the percentages of values at 0 and 255. Analysis graphs opens Line profile, Focus, and Intensity over time. Draw the yellow line over the dialog preview to inspect its profile. The other tabs plot the Laplacian variance as a relative focus metric and the mean RGB intensity over time. Use Pause, Reset history, Export series CSV, or Export RGB profile. The display sample is reduced to at most 256 × 256 and updates up to four times a second. Compare focus only under identical conditions and with the same scene. The profile reports relative distance and levels from 0 to 255. It provides neither a reflectance measurement nor autofocus.

Hold Shift while measuring or calibrating to snap the line to 45° increments. To transfer areas, choose the denominator and select Load when the viewer is linked to the modal form. In the main window, Train visual support prompts for a directory containing one subfolder per class, each with its labeled images. Select the domain first. Trainable visual support in the viewer enables use of an available model. Review results on independent images before interpreting a sample.

Live camera, calibration and usable field

  1. Connect the camera. Open Live camera in the viewer and use Refresh cameras if needed. Open Set up a new camera, choose the device and resolution, and start the live preview. Compare Smooth (prioritize FPS) and Maximum resolution (photos). Automatic resolution uses a negotiated format. Check the actual PNG dimensions before starting a series.
  2. Confirm Objective and adapter with the physical magnifications of the optical setup. The setup dialog shows the state for the camera, objective, adapter and resolution. Units with the same identity share a profile if Windows exposes no serial number to distinguish them. Reopen the dialog after each adjustment.
Set up a new camera using a simulated device
Set up a new camera using a simulated device

Calibrate the scale

  1. Use a stage micrometer first. Capture or open the reference at the working resolution. In Configure photomicrograph scale, choose Calibrate with micrometer, draw between known marks and enter the distance in millimeters. This method records the scale as calibrated.
  2. If you use the stage vernier, choose Calibrate scale (vernier)… while the camera is live. Capture A, move the stage a known distance along X or Y and capture B. Check the overlap, displacement and µm/px, then save and apply the session scale. The result is provisional.
  3. If you only have a ruler, choose Calibrate with line. Draw and confirm three distinct lengths in mm on a reference in the same conditions: short, medium and long. Read the three scales, mean and spread in the status bar after accepting the third distance. The viewer asks you to repeat if the spread exceeds 2%. The saved mean is provisional. Direct entry of a field diameter records a declared, provisional scale.
Entering the third known ruler distance
Entering the third known ruler distance
Tracing 500 µm on the micrometer, entering 0.500 mm and reading the scale in µm/px. Spanish interface.
Tracing 500 µm on the micrometer, entering 0.500 mm and reading the scale in µm/px. Spanish interface.
Provisional scale with three readings, mean and spread in the status bar
Provisional scale with three readings, mean and spread in the status bar

Define the usable field, profiles and blanks

  1. In the setup dialog, select Adjust square over a still image or the live preview. Drag inside the square to move it and use its lower-right corner to resize it. Press Esc when finished. You can also use Detect from blank PPL photo… with a same-resolution image that shows a complete circular edge. Adjust the square manually if detection fails. The optical profile keeps the usable area for new plans. Saved plans keep their points.
  2. In Camera controls…, adjust supported UVC settings such as exposure, gain or white balance and verify the driver readback. Save the UVC settings to JSON. Enable Apply PPL / XPL profiles per camera and select the JSON files with Load PPL… and Load XPL…. Move the polarizers physically when switching channels. If the profile is pending, choose Reapply camera profile and wait for confirmation. If UVC adjustment is unavailable, adjust the device manually and disable profile application.
  3. In Session startup…, capture a PPL blank of an empty field. For the XPL blank, keep the analyzer in place and set the polarizers parallel for maximum brightness. Review RGB levels and saturation. Return to crossed polars and confirm darkness before taking XPL images. Retake blanks when acquisition conditions change.
Editing the profile's usable square
Editing the profile's usable square
Editing the usable area and regenerating a centered grid of 25 points inside the new square. Spanish interface.
Editing the usable area and regenerating a centered grid of 25 points inside the new square. Spanish interface.
Blank capture controls at session startup
Blank capture controls at session startup

Check acquisition and calibration

In Live camera, select the device, resolution, target frame rate, and destination channel. Check the negotiated format in the preview and the saved file. Capture photo takes a still. Use Record video to start an MP4 in the directory selected under Tools and settings → Choose folder…. Choose Stop recording to finish it. View photomicrographs opens recent captures or returns to live view. UVC controls depend on the camera and driver. The application selects channels and color profiles. Move the polarizers and stage physically.

For a stage micrometer or ruler, the scale s in µm/px is 1000 × known distance in mm / length in pixels. Use the acquisition resolution and optical configuration. For the ruler, the spread is 100 × (maximum s − minimum s) / mean s. For the vernier, specify the distance, axis, and direction before taking A. Frame B must share enough texture with A. The application estimates the displacement by phase correlation and divides the physical distance by the displacement magnitude. If the pair lacks texture or overlap, or the match is ambiguous, repeat A/B with a shorter move or a field with more detail. Collect X/Y readings and check their spread before choosing Save and apply session scale. Both the vernier and ruler give provisional scales. Raith et al., 2012

Under Session optics, record the objective, adapter, and illumination. Use Diaphragms and notes to document optional settings. In Start session, check the levels and saturation for the PPL blank and for the XPL blank with parallel polarizers. Return the polarizers to the crossed position before acquiring XPL. The blanks document acquisition conditions. To use Measure XPL rotation center, select the camera used for the series and open or capture a field with XPL 0° and at least two more angles. The application estimates the center in pixels using OpenCV and asks for confirmation before saving it to the camera, objective, adapter, and resolution profile. Nominal registration remains approximate.

Twelve-field capture protocol

  1. In Samples, prepare twelve fields for the thin section. In Live camera, select a destination and enable naming by sample, thin section and field (Nombrar por muestra / lámina / campo). Verify those identifiers and the thin-section code (Código de lámina (semilla)). The code reproducibly selects three fields for a full series. The acquisition log records manual changes. Choose Restaurar sorteo to use the code-based selection for subsequent photographs.
  2. Set the stage to 0° and capture PPL followed by XPL at 0° without moving the stage. Capture XPL at 45°. In the three selected fields continue with 15°, 30°, 60° and 75°, in that order. Rotate the stage physically and follow the progress after each save. Return to 0°, prepare PPL and select the next field.
  3. Use Repeat to withdraw and retake the last field shot. Discard asks for confirmation before withdrawing it. Both retain the withdrawn file in _descartadas. Check the pending take and any version suffix. When opening a field folder, the viewer selects the unsuffixed base files.
  4. Keep the original PNGs with registro_capturas.jsonl and, if present, registro_rotacion.json. The project reuses originals if their content matches the archive. Otherwise, it opens the archived resources. At nonzero XPL angles, check whether the viewer applied a measured registration or an approximate nominal compensation.
Camera protocol panel with the thin-section code and field selection
Camera protocol panel with the thin-section code and field selection

Point counting

  1. Open a still image and choose Count in the inspector. Show and edit the usable area if needed. 12-field protocol · 5×5 grid places 25 points, one at each cell center. For another design, select the region, rows, columns and method. Increasing rows and columns increases density. Keep the seed for reproducible random designs.
  2. If you need image patches around points, check the scale and enter the patch side in mm. Enable Complete patches when the design requires a margin around each point. Click Create plan and check the distribution and edges. A later change to the usable area preserves the existing plan coordinates.
  3. Classify using the phase buttons or keys 1–9. Enable Labels on image for phase abbreviations next to count points and Point numbers for their order. Use Doubtful or Alt + 1–9 to mark uncertainty, and Exclude for points outside the inclusion criteria. Shift-click to select multiple points in the active rotation. Use Mark grain center to attach a second location to the selected count point. Directed points are tracked separately.
  4. In Manage templates, save, duplicate or load a JSON design. A template keeps plan parameters. Use Save session or save the project to recover the observations. Select the relevant field and angle to review saved observations.
  5. Choose Export points (CSV by angle). Look for puntos_conteo.csv in the capture folder. For a count at a nonzero angle, look for the angle suffix, for example puntos_conteo_xpl_045.csv. If the corresponding legacy-named CSV already exists, the exporter reuses it. For rotated XPL patches use x_xpl_px and y_xpl_px when available. Skip patch extraction if xpl_dentro_campo says the center is outside the image. Review doubt flags and provenance before sharing.
Point-count inspector and the sampling grid
Point-count inspector and the sampling grid
Labeling four points, flagging one as doubtful with Alt + 2 and checking the point-count panel. Spanish interface.
Labeling four points, flagging one as doubtful with Alt + 2 and checking the point-count panel. Spanish interface.
Phase abbreviations beside count points
Phase abbreviations beside count points

Design, review, and compare a point count

In Inspector → Point count, choose a centered grid, a randomly started grid, stratified sampling (one random point per cell), or uniform random sampling. Rows and columns determine the planned sample size, up to 10,000 points. Use visible field takes the current viewport. Full image restores the entire image. When requiring complete patches, check the margins and estimated spacing before creating the plan. The same region, method, and seed reproduce the layout. The protocol’s variable seed depends on the sample, thin section, and field identifiers. Sampling design and field representativeness govern modal inference. Van der Plas and Tobi, 1965

Point count shortcut Action
1–9 Assign other, qz, k-fdp, plg, f, bt, anf, cpx, or opx, in that order.
Alt + 1–9 Assign the phase and mark it doubtful. Doubtful also flags the next assignment.
← / →, X Move to the previous or next point, or exclude the current point.
Backspace, Alt + Backspace, Ctrl + Z Undo a count action. Use Alt + Backspace if a measurement is selected.
Shift + click, Ctrl + A, Delete, Esc Extend the selection, select all points, remove labels from the selection, or leave the selection mode.
D, H, Z Toggle directed-point mode, marker visibility, or zoom to point.
Enter in Other phase… Assign the entered label.

Point count shortcuts depend on keyboard focus. A directed point records a location deliberately chosen by the analyst. Keep it separate from the sampling estimate. To correct an observation, select its point and reassign the label. Use Clear center to remove a recorded grain center. The added center and the sampling position serve distinct purposes.

Under More, use Open session to load a count JSON against its image, Blind repeat annotation to save the original and repeat a plan whose points have all been assigned or excluded, and Compare with original to inspect agreement between sessions. Export ZIP opens the workbench export. Under Session and export, you can also Append to an existing point CSV. Preserve the sample, thin section, field, session, and angle identifiers when combining tables. A rotated XPL frame may put points outside the image or use approximate registration. Keep the provenance fields and verify patch coverage.

Quantitative workbench

  1. With a still image open, choose Quantify or press Ctrl + Shift + Q. Choose the full image, visible field or a region of interest. Update contour metrics in Grains and statistics. Review area, perimeter, equivalent diameter, Feret diameters and shape. These measurements describe two-dimensional sections.
  2. In Modal point count, review totals, pending points, exclusions and phase fractions. Choose Count beside the image to return to the viewer inspector. Review the denominator before transferring to QAPF. Marginal Wilson intervals assume independent observations.
  3. In Phase analysis, choose an RGB or grayscale channel and set the thresholds. Check the mask against the source image. Thresholding selects intensities. Mineral identification requires petrographic evidence.
  4. In Session and export, review sample, notes, region and method. Export the analysis ZIP for tables, provenance and warnings. If grains are outlined, grain_mask.png and grain_mask_index.csv link each mask value to the original contour.

Grains and statistics

In the workbench, enter X, Y, width, and height in source pixels and click Apply region, or use Full image / Use visible field. Check Selected grains only to restrict measurements to the selection. Exclude grains cut by region omits truncated sizes. If you include boundary grains, the application measures their clipped parts. Click Refresh measurements after changing the region, outlines, or selection.

Measurement Calculation and interpretation
Area A and perimeter P Polygon area and boundary length. With scale s in µm/px, multiply lengths by s and areas by s².
Equivalent diameter 2 × √(A / π), the diameter of a circle with the same area.
Maximum and minimum Feret Greatest distance between convex hull vertices and smallest separation of parallel lines enclosing the hull.
Circularity and solidity 4πA / P² and A divided by the convex hull area.
Orientation Maximum Feret direction from 0° to 180°. In image coordinates, 0° is right and 90° is down.
Per-mineral statistics Outline count, equivalent diameter mean and population standard deviation, and interpolated P10/P50/P90 with equal weight for each outline.

Confirm the image’s physical scale in the workbench before using µm and µm². A point marker provides a location. Degenerate outlines are omitted. Overlaps trigger a warning because per-mineral sums can count the same area more than once. Boundary exclusion can bias the size distribution, and 2D measurements depend on the plane of section and optical geometry.

Modal count and intervals

The Modal point count tab shares its plan with the inspector. For each phase, p = k/n uses k assignments to that phase and n classified points from the plan. Pending, excluded, and directed points remain outside the denominator. A doubtful assignment is recorded under its assigned phase. The 95% marginal Wilson interval has center (p + z²/(2n))/(1 + z²/n) and half-width z × √(p(1 − p)/n + z²/(4n²))/(1 + z²/n), with z ≈ 1.96 and n greater than zero. The table reports both bounds as percentages. The interval assumes independence and omits spatial correlation, between-field variation, and identification errors. Wilson, 1927

Use Transfer QAPF point count… after classifying or excluding pending points. Inspect the confirmation and the four phases qz, k-fdp, plg, and f used in the QAPF normalization. The transfer populates the modal form. Representativeness still depends on sampling.

Phase analysis and output files

In Phase analysis, select red, green, blue, or gray. Gray rounds 0.2126R + 0.7152G + 0.0722B from encoded RGB values. Set inclusive bounds from 0 to 255 and click Measure phase in region. The percentage is 100 × opaque pixels within the threshold / valid opaque pixels. The region accepts up to 50 million whole pixels. Overlay mask on viewer lets you inspect agreement with the measured channel. Save mask PNG saves selected pixels in white on black. Measure again after changing the channel or registration. The mask quantifies an optical response, and interpreting it as a mineral phase requires petrographic observation.

In Session and export, enter the sample, operator, and method notes. Save or open a count JSON linked to the image content. The ZIP contains analysis.json, annotations.json, grains.csv, mineral_statistics.csv, count_points.csv, count_summary.csv, and METHODS.txt. Where applicable, it includes grain_mask.png with its index and phase_mask.png. Check the warnings and units before reusing the tables.

Guides, atlases and help

  1. Choose Guides in the main window or Petrographic guides in the viewer. Choose a topic and consult its procedure and diagrams.
  2. Open Rock Atlas or Mineral Atlas from the main window. Search or filter by name and open an entry to see diagnostic criteria, images and credits when available. The texture atlas has its own catalog and detailed entries.
    • Buttons for missing atlases are disabled. Open About to see the installed atlases. The notice and F1 help explain how to add them by running the installer again. The guides are available with any selection.
  3. Press F1 or the question-mark button in the active window. Search for a control, task or shortcut. Use Locate on screen to locate visible controls and press Esc to clear the numbers.
English viewer showing interface help
English viewer showing interface help

Search the guides and atlases

In Petrography guides, search by title or text without matching accents and filter by source. Open an article to view its diagrams and references. The bundled guides are available locally. External links open when clicked. Consult the relief, extinction, and compensator guides to check a mineral identification. In an installed atlas, choose a catalog entry to review its properties and credits. Raith et al., 2012

Press Ctrl + F to focus the guide search box. In the guide reader, Reload refreshes the list and the chart button also opens the mineral chart. In the rock atlas, Sources and citations opens its references. In the texture atlas, use the category filters and Only with images. In an illustrated entry, choose PPL or XPL when available and use the arrows to browse its images. Select Back to catalog to change textures.

Michel-Lévy chart

In the viewer, open Tools and settings → Michel-Lévy chart: minerals. The chart works without an open image. The horizontal axis shows retardation R in nm, and the vertical axis shows thickness e from 0 to 50 µm. Each line represents a birefringence magnitude |Δn| according to R = 1000 × e × |Δn|. At 30 µm and Δn = 0.009, retardation is 270 nm. Michel-Lévy and Lacroix, 1888 · Sørensen, 2013

  1. Observe the grain in XPL near 45° from extinction. With a known thickness, visually match the interference color and order to estimate retardation. The chart does not read colors from the photomicrograph. The calculated colors use the CIE 1931 2° observer, D65 illuminant, and sRGB. Illumination, camera response, display settings, and anomalous colors affect the comparison. CIE, 2019 · Raith et al., 2012
  2. Click inside the plot to read retardation and thickness at that coordinate. For positive thickness, the application computes Δn and displays the three minerals whose tabulated maxima are closest. This ranking uses only the numerical distance. At zero thickness, Δn is undefined.
  3. Enter a localized name or identifier in Search for a mineral in any language…, or click a label. Hover over a line or label to see the corresponding range. A search highlights the line and range for numerical matches. Use the isotropic and opaque dropdown to look up entries without a plotted line. An anisotropic section near an optic axis may also show low retardation.
  4. Choose 1800 nm or 3000 nm. Scroll to zoom, drag with the middle mouse button to pan, and select Fit chart to restore the full view. Selecting a mineral with high birefringence reveals the line where the overview may show only an end segment.
  5. Use Export SVG for the vector chart or Export vector PDF with landscape A3/A4 for printing. Include side list controls the exported file. Check the retardation range and credits in the saved chart.

Use the chart as an optical reference. Actual thickness and section orientation affect the observed retardation. Check relief, extinction, twinning, and other properties against the guide and your observations before assigning a mineral.

Michel-Lévy chart: quartz selected in a demonstration catalog
Michel-Lévy chart: quartz selected in a demonstration catalog
Reading retardation, thickness and Δn on the Michel-Lévy chart with the quartz line highlighted. Spanish interface.
Reading retardation, thickness and Δn on the Michel-Lévy chart with the quartz line highlighted. Spanish interface.

Languages, preferences and backups

  1. Open Settings, choose the GUI language and select OK. Restart PetroPyQAPF to apply the change across the interface. The interface supports Spanish, English, French, Brazilian Portuguese, German and Filipino.
  2. On Windows, capture preferences and optical profiles are stored per user. Recovery files for the Windows distribution are under runtime/pc/autosave in the user’s local PetroPyQAPF data folder.
  3. Save the .gisgeo and copy it to your backup destination. To preserve the full acquisition, also back up the original images with their capture and calibration logs and any exported UVC profile or template JSON. Open a backup copy and check that the photographs and annotations are present.

Under Settings → Report details, check the project, operator, and locality or unit. The credits pane links to the legal documents and project support. Sign out clears local authorization and closes the application. Save your project before switching accounts, then reopen the application to sign in.

Compatibility with version 1.4.0

  1. Open a copy of the old project using Open project. The reader accepts GisGeo schemas 1–3 and legacy JSON. Save under a different name and check samples, thin sections, photographs, scale and annotations field by field.
  2. Load saved count templates in Manage templates and check region, density and method on a test image. For CSV input, choose the relevant importer and review recognized columns and missing values.
  3. If a legacy-named point CSV already exists at the destination, check whether the exporter reused it. Compare identifiers, labels, doubt flags and coordinates. Older patch readers need to account for the additional columns when using rotated XPL. Manual validation with real 1.4.0 projects is still pending.

Troubleshooting

  1. The camera is missing. Confirm that Windows recognizes it as a UVC camera, that access is allowed and that another application is not using it exclusively. Choose Refresh cameras and select it again.
  2. The image is dark. Check the microscope diaphragm, ND filters and illumination before adjusting exposure or gain. Verify the physical positions of the polarizers and the PPL/XPL profile in use.
  3. The scale is missing. Check scale-bar visibility and the profile for the camera, objective, adapter and resolution. Open the reference and calibrate if the corresponding profile is missing.
  4. The resolution differs. Compare the pixel dimensions of both channels and of the actual saved PNG. Select a common resolution and check the scale and usable field again. If the slide already has shots of a different geometry, start a separate series in a different destination.

Screenshots, diagrams and examples

Import examples

Practice importing oxides through the CIPW panel with synthetic data.

Workflow and calculation diagrams
Project, classification and results

References

  • Le Maitre, R. W. et al. (eds.). (2002). Igneous Rocks: A Classification and Glossary of Terms. 2nd ed. Cambridge University Press. DOI 10.1017/CBO9780511535581.
  • Streckeisen, A. (1976). To each plutonic rock its proper name. Earth-Science Reviews, 12(1), 1–33. DOI 10.1016/0012-8252(76)90052-0.
  • Cross, W., Iddings, J. P., Pirsson, L. V. & Washington, H. S. (1902). A quantitative chemico-mineralogical classification and nomenclature of igneous rocks. The Journal of Geology, 10(6), 555–690. DOI 10.1086/621030.
  • Zavaleta Reyes, J. A. L. (2026). GeoNormPy. v1.0.0 / v1.1.0. Python Package Index. 1.0.0 · 1.1.0.
  • Verma, S. P., Torres-Alvarado, I. S. & Velasco-Tapia, F. (2003). A revised CIPW norm. Schweizerische Mineralogische und Petrographische Mitteilungen, 83(2), 197–216. DOI 10.5169/seals-63145.
  • Raith, M. M., Raase, P. & Reinhardt, J. (2012). Guide to Thin Section Microscopy. 2nd ed. ISBN 978-3-00-037671-9. Mineralogical Society of America.
  • Michel-Lévy, A. & Lacroix, A. (1888). Les minéraux des roches. Baudry et Cie, Paris. Archives départementales de l’Eure.
  • Sørensen, B. E. (2013). A revised Michel-Lévy interference colour chart based on first-principles calculations. European Journal of Mineralogy, 25(1), 5–10. DOI 10.1127/0935-1221/2013/0025-2252.
  • International Commission on Illumination (CIE). (2019). Colour-matching functions of CIE 1931 standard colorimetric observer. CIE, Vienna. DOI 10.25039/CIE.DS.xvudnb9b.
  • Van der Plas, L. & Tobi, A. C. (1965). A chart for judging the reliability of point counting results. American Journal of Science, 263(1), 87–90. DOI 10.2475/ajs.263.1.87.
  • Wilson, E. B. (1927). Probable inference, the law of succession, and statistical inference. Journal of the American Statistical Association, 22(158), 209–212. DOI 10.1080/01621459.1927.10502953.