A program that allows you to count, graph, and generate modal count tables for sandstones.
You can download the executable file using this link: Google Drive.
You might encounter an error when starting the installation, but just click "OK" (this happens if there’s a new version available). You can also visit the developer’s page: GitHub.
The program consists of three sections: defining a new count, the counting session, and generating charts with their associated tables. Each step corresponds to an option in the main menu: "Nueva muestra" to define a new count, "Cargar muestra" to continue a previously started counting session, and "Generar gráficos" to produce charts and tables.
Clicking on "Nueva muestra" opens a window where you can enter the sample parameters. Note that charts and tables are calculated for samples with the same locality name. The system distinguishes uppercase and punctuation. Additionally, the number of readings determines when the counting session will end automatically.
To perform the count, a key map is used, assigning a letter or number on the keyboard to a specific component type. The component name must begin with the abbreviation in parentheses. For example, "(Qmo) Cuarzo monocristalino onduloso." To create a new key map, click the "Crear nuevo mapa de teclas" button. The program will group all entries starting with "Q" in the Quartz vertex, those starting with "F" in the Feldspar vertex, and those starting with "L" in the Lithics vertex. Special care should be taken with the types of quartz and lithics you want to define, as this affects the diagram results. All other components start with the letter "O" for "Otros." When the map editing is complete, it is saved in a CSV file for later use during counting.
If you want ordered tables, it is important to assign keys alphabetically within each subtype. First, sort quartz types (Qmf, Qmo, Qp1), then feldspars using the same criteria, and finally lithics. For example, Lv (Lítico volcánico) should appear in the table after Lm (Lítico metamórfico) and Ls (Lítico sedimentario). To differentiate between several lithic types within the same group, it is recommended to use labels like Lv1, Lv2 or Lva, Lvb, etc. To use the discrimination diagram (Ls-Lv-Lm), ensure the initial keys are assigned correctly.
To start counting, after creating a new sample, click "Cargar mapa de teclas", where the map can either be edited or left as is.
Once the sample parameters are finalized, click "Guardar." A dialog window will open to save the sample in a .mtra file. After saving, the "Sesión" window will open.
The counting session is carried out in a window with three panels: on the left, the list of counted components in order of entry; in the center, the key map; and on the right, a list of the counted components along with the total count. To enter components, simply press the key corresponding to the component type. When the number of components defined in the sample parameters is reached, the session ends, and the count (in percentages) is saved in a file named after the locality. If a file with the same name already exists, a new row is added to the table with the new sample's data. The table also includes a final row with the average of all values.
If you need to undo an entered rock during counting, click the "Deshacer" button or press the "Delete" or "Backspace" key and then re-enter the correct key.
If you need to add a key during counting, click "Agregar tecla."
If the program crashes for any reason during counting, the progress is saved, and you only need to reopen the sample.
If the table is open in Excel while using the program, an error will occur, and the session will not be saved. It is essential to close all tables before restarting counts. Additionally, do not add descriptions to the table, as any additional text will cause an error in subsequent counts.
To generate charts, first load the desired locality table. Then, simply click on the desired chart, setting the option to include an average point or not. A new window will open with the image, which can be saved in different formats. Additionally, a new column is added to the table with the classification corresponding to the selected chart type.
The program is open source and available in this repository: GitHub. It is fully implemented in Python 3.8 and structurally consists of three sections: graphical interface, data processing, and chart generation. The graphical interface was built with PyQt5, data processing and table generation were done using Pandas, and the charts are based on an open-source repository (https://github.com/trqmorgan/QFL-Pettijohn-Ternary) specifically for generating QFL ternary diagrams.
The program has been tested on Windows 10, 11, and Ubuntu 20.04 and 22.04 (GNU/Linux) but should also work on other Linux distributions and Mac OS compatible with the libraries used.
Feedback or suggestions for improvement are greatly appreciated. Please contact us through GitHub: GitHub.
Dra. Maisa Tunik
Lic. Lucas Somacal
¡Invítanos un cafecito! ☕️
Our team works hard to maintain and improve Cont.Ar for the entire community. If you found it useful and want to collaborate, you can make a donation through Cafecito.
Every contribution helps us continue creating tools for modal count analysis.
¡Gracias por tu apoyo! 💙
Thank you for your support! 💙