Skip to content

Releases: vikulin/OGK-Inspector

OGK-Inspector v1.1.3

24 Apr 07:33

Choose a tag to compare

📦 OGK-Inspector v1.1.3 Release Notes

🛠 Improvements

  • Fallback Peak Detection Strategy
    Introduced a two-pass detection mechanism:

    • First attempts peak detection on baseline-corrected data with strict SNR threshold
    • Falls back to raw data (with lower SNR threshold) if no peaks are found
    • Significantly improves detection reliability without increasing false positives.
  • Integrated Peak Storage
    Peaks are now stored directly in the EnergySpectrum.peaks list, simplifying UI refresh and persistence.

  • Updated drawPeakLimitLines()

    • Now automatically pulls peak data from the dataset’s EnergySpectrum.peaks
    • Dynamically updates limit lines on the chart based on available calibration

🐞 Fixes

  • Peak Detection Recovery on Screen Rotation
    ✅ Fixed an issue where peak detection and chart overlays (limit lines) were lost when the screen was rotated.
    ✅ Peak data is now retained in spectrumDataSet and re-rendered properly post-rotation via lifecycle-safe drawPeakLimitLines().

📲 Usability Note

This version ensures more consistent peak detection across screen states and noisy conditions, making it ideal for fieldwork and mobile diagnostics with OpenGammaKit-compatible spectrometers.


Full Changelog: 1.1.2...1.1.3


🔧 Thanks for supporting OGK-Inspector! If you find any issues or have suggestions, feel free to open an issue.

OGK-Inspector v1.1.2

23 Apr 14:24

Choose a tag to compare

📦 OGK-Inspector v1.1.2 Release Notes — Spectrum Enhancement Update

✨ New Features

🔍 SpectrumModifier Class (New)

A powerful utility object, SpectrumModifier, has been added to io.github.vikulin.opengammakit.math, bringing advanced signal processing and peak analysis tools into the library:

  • Savitzky-Golay Filter
    Smooths noisy gamma spectra while preserving peak features. A customizable polynomial filter is used with mirror padding and Vandermonde matrix inversion.

    • Method: applySavitzkyGolayFilter(entry: GammaKitEntry)
    • Internally uses a symmetric convolution for robust smoothing.
  • CWT Peak Detection
    Detects peaks using Continuous Wavelet Transform with Ricker (Mexican Hat) wavelets, and includes:

    • Optional baseline subtraction
    • Wavelet scale optimization
    • Signal-to-noise ratio (SNR) thresholding
    • Peak grouping by proximity
    • Method: detectCWTPeaks(...)
  • Noise Estimation & Normalization
    Estimates noise based on the first 10% of the spectrum for SNR-aware filtering. Wavelets are normalized for scale-consistent CWT analysis.

  • Utility Methods

    • groupPeaksByProximity(...): Clusters adjacent peaks.
    • getPeakScale(...): Returns the most responsive scale of a detected peak.
    • removeBaseline(...): Rolling median filter for baseline correction.
    • rickerWavelet(...) and convolve(...): Core signal processing methods.

🆕 UI Additions

  • Apply SG Filter button
    Applies or removes Savitzky-Golay smoothing interactively to the currently displayed spectrum.

  • Peak Detect button
    Launches CWT-based multi-scale peak detection with noise-aware filtering and grouping.


🛠 Enhancements

  • Introduced toggle method for applying/removing the Savitzky-Golay filter to GammaKitEntry objects.
  • Updated filters to support a MutableList<String> for dynamic tracking of applied filters.

Full Changelog: 1.1.1...1.1.2


🔧 Thanks for supporting OGK-Inspector! If you find any issues or have suggestions, feel free to open an issue.

OGK-Inspector v1.1.1

21 Apr 17:27

Choose a tag to compare

🚀 OGK-Inspector v1.1.1 – Spectrum Multi-Select & Save Update

✨ New Features

  • Spectrum Selection Dialog (Multi-Select Mode)
    Introduced a new dialog allowing users to select multiple spectra to save a NPESv2 JSON file.

  • Selectable List Items with Checkboxes
    Spectrum selection is now more intuitive with checkboxes for each entry in the list.

  • Chart legend appearance updated:

    • Spaced labels horizontally with improved readability.
    • Spectrum labels are color-coded and aligned to match the graph lines.

🧼 Bug Fixes & Validation

  • Dialog now shows an error if the Save button is clicked with no selected spectrum.
  • Internal refactoring for clearer separation between UI logic and data transformation.

Full Changelog: 1.1.0...1.1.1


🔧 Thanks for supporting OGK-Inspector! If you find any issues or have suggestions, feel free to open an issue.

OGK-Inspector v1.1.0

21 Apr 13:12

Choose a tag to compare

🚀 OGK-Inspector v1.1.0

✨ New Features

  • Multi-Spectrum Support
    spectrumDataSet is now of type OpenGammaKit, allowing multiple spectrum graphs to be displayed simultaneously on the same chart.

  • NPESv2 Multi-Spectrum Import
    Added support for importing multiple spectrum graphs from a single file in NPESv2 format. Each spectrum is added as a separate LineDataSet.

  • Spectrum Selection for FWHM Only
    When multiple spectrums are loaded, a selection dialog is shown exclusively for FWHM measurements to let users pick which spectrum to analyze.
    📌 Note: Calibration is not affected by this selection.

🧭 UI Improvements

  • Elapsed Time in Chart Legend
    The elapsed measurement time is now displayed in the chart legend label, making spectrum interpretation more intuitive.

  • Updated spectrum chart legend format to display more concise labels
    Old format: Channels 123 Counts 456 Time 10s
    New format: Ch $ch Ct $ct T $t
    This improves readability when multiple spectra are shown simultaneously.

  • Remaining Time Display
    A new TextView now displays the remaining measurement time during active acquisition sessions.

What's Changed

New Contributors

Full Changelog: 1.0.8...1.1.0


🔧 Thanks for supporting OGK-Inspector! If you find any issues or have suggestions, feel free to open an issue.

OGK-Inspector v1.0.8

20 Apr 07:32

Choose a tag to compare

🚀 OGK-Inspector v1.0.8

🚀 New Features

  • UsbDeviceManager: Hardware-related functionality has been implemented, enabling improved USB device management.

🛠️ Bug Fixes

  • Spectrum File Read Mode: Resolved an issue where activating Live Mode or Scheduled Mode would trigger an error.

Full Changelog: 1.0.7...1.0.8

OGK-Inspector v1.0.7

19 Apr 12:01

Choose a tag to compare

🚀 OGK-Inspector v1.0.7

Features Added

1. 🗂 Dialog for Choosing a Spectrum File

  • Feature Description:
    A DialogFragment has been added to enable users to choose a spectrum file in JSON format. The dialog includes:

    • 🖼 Selected File Name Display: A TextView to show the file name.
    • 🔘 File Chooser Button: An ImageButton to open the file picker dialog.
    • 🛑 Cancel and ✅ Open buttons for file actions.
  • Additional Enhancements:

    • 🧰 Modern File Picker: Leveraging ActivityResultLauncher API for streamlined file selection.
    • Error Handling: Notifications for parsing failures of invalid JSON files.

2. 📄 Handle File Selection and Parsing

  • Feature Description:
    Added functionality to:
    • 📜 Read File Contents: Converts file content to a string buffer for processing.
    • JSON Parsing: Utilizes Kotlinx Serialization for parsing spectrum files (decodeFromString).
    • 🛑 Error Notification: Alerts users upon parsing failure.

3. 🔗 SpectrumFragment Navigation

  • Feature Description:
    Allows seamless navigation from DialogFragment to SpectrumFragment when a spectrum file is selected:
    • 🔄 Pass File URI: Sends file URI via a Bundle.
    • 🧭 Controlled Navigation: Ensures proper transitions without leftover dialog interruptions.

4. 📊 Convert Data for Visualization

  • Feature Description:
    Enables conversion of data for numerical visualization.
    • 🧮 Input: Takes a List<Long> of data points.
    • 📈 Output: Produces a float[][] array for use in charting libraries.

5. ⚙️ Settings Feature

  • Feature Description:
    Introduced a settings screen to configure the default measure mode during app boot or device connection:

    • 🔘 Options: <None>, <Counter>, <Spectrum>
    • 🛠 Customizable Settings Layout: Features a dropdown menu and explanation text.
    • 🎯 Persist Settings: Stores preferences using SharedPreferences.
  • Logic for First App Run:

    • 🟡 First-Time Settings Prompt: Automatically shows the settings screen when the app is launched for the first time.
    • 🔒 Settings Memory: Saves default measure mode for subsequent sessions.

6. 🌎 Global App State with Flags

  • Feature Description:
    Introduced a global flag mechanism to manage app state across fragments:
    • 🚨 Persistent State: The flag resets only when the app terminates completely (not on pause).
    • 🧭 Access from Anywhere: The flag is accessible globally via a custom Application class.

7. 🎯 MainActivity Behavior on App Launch

  • Feature Description:
    Added logic to open the corresponding fragment based on selected measure mode and device connection:
    • 🟢 Counter Mode: Opens CounterFragment.
    • 🟣 Spectrum Mode: Opens SpectrumFragment.

8. 🧪 Isotope Database Screen

  • Added support for loading isotope data and display the list
  • Each isotope entry includes:
    • Name
    • Gamma Energies (keV)
    • Half-life, automatically converted from seconds into an appropriate human-readable format (years, months, days, hours, minutes, or seconds).

9. 🧮 Smart Half-life Display

  • Half-life values are shown with precision:
    • Automatically scaled to a readable unit based on duration.
    • Exponential format used for large values (e.g., >999 years).

10. 🧭 UI Improvements

  • Clean, horizontal layout: Each isotope is shown in a single row with its attributes clearly aligned.
  • Sorting support: Users can sort the list by:
    • Name
    • Energy
    • Half-life

🛠 Technical Highlights

  • Kotlin Fragment for UI with recycler view.
  • Smart formatting of half-life via formatHalfLife() function.
  • Sortable table-style list implemented using standard Android components.

Full Changelog: 1.0.6...1.0.7


Thank you for your feedback and contributions!

OGK-Inspector v1.0.6

18 Apr 18:40

Choose a tag to compare

📦 OGK-Inspector v1.0.6

🆕 What's New

🚀 New Features

  • Added time selection fields for Hours, Minutes, and Seconds in the UI:
    • Fields are aligned horizontally with Up and Down buttons for incrementing and decrementing values.
    • Default values: Hours = 0, Minutes = 1, Seconds = 0.

🛠️ Enhancements

  • Introduced functionality to:
  • Convert recording time (Int) to hours, minutes, and seconds, and auto-populate corresponding fields.
  • Convert field values back to recording time (Int) in seconds for seamless data handling.
  • Updated: Recording time must be between 1 and 259,200 seconds for clarity.

📖 Usage

  1. Use Up and Down buttons to adjust time fields for recording duration.
  2. Fields will only accept valid values (e.g., hours ≥ 0, minutes/seconds ≥ 0 and ≤ 59).
  3. Error message displayed if the recording time is invalid.

Thank you for your feedback and contributions!

OGK-Inspector v1.0.5

18 Apr 15:27

Choose a tag to compare

📦 OGK-Inspector v1.0.5

🆕 What's New

  • Measurement Modes Support
    Introduced structured spectrum measurement modes:
    • Live
    • Scheduled
    • Calibration
    • FWHM
      This provides a more consistent and flexible measurement experience.

✅ Improvements

  • Optimized Device Info Loading
    Faster and more efficient loading of connected device information.

  • Touch-Friendly UI Updates
    Replaced basic buttons with MaterialCardViews for better responsiveness and visual consistency.

🐛 Bug Fixes

  • Timer Handling on USB Disconnect
    Fixed issue where the running timer would continue after a USB device was disconnected. Timer now pauses correctly.

  • Persistent Calibration Points
    Calibration data is now preserved across screen rotations.

  • Stable Spectrum Graph
    The spectrum graph display is retained when the screen orientation changes.

Full Changelog: 1.0.4...1.0.5


🔧 Thanks for supporting OGK-Inspector! If you find any issues or have suggestions, feel free to open an issue.

OGK-Inspector v1.0.4

16 Apr 15:59

Choose a tag to compare

🚀 OGK-Inspector Release v1.0.4

✨ What's New

  • Smarter USB Hub Handling
    Unconnected USB ports in hubs are now gracefully skipped, ensuring faster and cleaner device discovery.

  • Per-Device Configuration
    Calibration data and counter threshold settings are now saved per device serial number (S/N). This allows seamless switching between devices without losing individual configurations.

Full Changelog: 1.0.3...1.0.4

OGK-Inspector v1.0.3

15 Apr 18:20

Choose a tag to compare

🆕 Release Notes: Version 1.0.3

Enhancements

  • Fixed ImageView layout spacing to maintain a consistent 25dp distance between elements.
  • Centered all ImageView elements vertically for a balanced UI design.

🐞 Bug Fixes

  • Resolved inconsistent spacing issues between ImageView elements.

Full Changelog: 1.0.2...1.0.3