Skip to content

Releases

engiNIR 1.8.1

Choose a tag to compare

@TUstudents TUstudents released this 24 Nov 14:46

The viewer's widgets for other applications: a status window on a production
line can show a scan with its layout and the prediction maps of each layer
exactly as the viewer does. All additions; the format stays enginir-1.7.

Added

  • enginir.false_color_image(path): the false-color image the viewer
    shows for a scan (bands nearest 1650, 1300 and 1050 nm, 2-98 % stretch),
    read in blocks of frames from the file opened read-only; bands= for a
    file without wavelengths. Qt-free.
  • Public widgets in enginir.viewer, covered by semantic versioning:
    • apply_theme(app, dark=None), theme_tokens(), value_colormap(),
      heat_colormap(): the viewer's look. An explicit mode does not change
      the viewer user's saved choice.
    • PredictionMapWidget.show_maps(prediction, dmodx=, t2=, unit=, dcrit=, t2crit=, color_range=): maps given as arrays (e.g. read back from an
      application's own records), with the layer selector, the 0.95 limit
      overlay and the counts above the limits of the Predict workspace.
    • FalseColorCanvas.show_cells(cells, colors=, labels=),
      clear_cells(), cell_at(frame, row) and the cell_hovered signal:
      layout cells (GridCell) on the scan, colored per cell. The ROI grid
      dialog's preview draws its cells the same way.

engiNIR 1.8.0

Choose a tag to compare

@TUstudents TUstudents released this 24 Nov 10:34

Inline prediction of new scans, as a chemometric engine for production lines
(e.g. every printed layer of a tablet batch, per tablet): per-tablet
statistics of a layout on a scan that is never registered, the reference
choices of add_dataset in Model.predict, the model's wavelength axis for
band-number files, a check of a file before predicting it, and a public
surface for reading models and scans. The format stays enginir-1.7; nothing
needs refitting.

Added

  • Per-tablet statistics of a scan that is not registered:
    prediction.roi_statistics(layout) and prediction.roi_prediction(layout)
    apply a layout of cells (GridCell, e.g. from roi_grid) to a
    prediction, with the statistics, DModX exclusion and outside-the-model rule
    of Model.predict_rois, computed by the same function. For production
    lines that predict every new scan (a layer of a print job) per tablet.
  • Model.predict takes the reference choices of Project.add_dataset:
    dark_frames/white_frames of the scan and black_level/white_level,
    besides dark/white; levels exclude references. A registered scan given
    references or levels is corrected anew in memory instead of with its stored
    correction.
  • A new scan with band numbers only is predicted on the model's
    wavelength axis
    when the band counts match (or with
    wavelength_table=), without the "no wavelengths" warning for every file.
  • Model.check_file(path, ...) says why Model.predict would refuse a
    file with the same reference choices (its message), or None, reading the
    header but not the pixels: for checking a setup before scans arrive.
  • Model.id (the stable model run id) and Model.input_contract (a
    copy: band count, wavelength axis, signal unit, reference correction mode,
    binning).
  • GridCell, roi_grid, read_header and read_frames are exported from
    enginir; a layout is drawn on a scan read with the model's binning.
  • The package declares its type hints (py.typed).

engiNIR 1.7.8

Choose a tag to compare

@TUstudents TUstudents released this 23 Nov 22:42

A fix release: a band selection after a Savitzky-Golay filter used the wrong
bands. Models fitted with such a recipe by 1.4.0 to 1.7.7 must be fitted
again. The project format stays enginir-1.7.

Fixed

  • A band selection after a Savitzky-Golay filter kept the wrong bands
    (since 1.4.0). The selection was computed a second time on its own result,
    so a recipe with an SG filter and keep or exclude ranges used other bands
    than the ones named. The stored wavelength axis, the plots and the map
    showed the bands asked for. With Detrend as well, the fit failed ("wavelengths
    has … values but X has … features"). Models fitted with such a recipe by an
    earlier version must be fitted again: their predictions now use the bands
    their recipe names, not the ones they were trained on.
  • Explore: the Savitzky-Golay window goes up to the shown dataset's band
    count (it went to 101, and a longer window raised an error in every redraw).
    A recipe that does not fit the shown dataset (a band selection outside its
    axis) shows the frame without it and says why.
  • Welcome window: telling a project from a dataset in a recent file of
    unknown kind (entries written before 1.7.1) waits for the background
    imports, so two threads never import h5py at once.

engiNIR 1.7.7

Choose a tag to compare

@TUstudents TUstudents released this 23 Nov 11:17

Model and project housekeeping: rename and retire models, remove datasets,
compact a project. The format stays enginir-1.7; only retired models store
new fields (see Retire Model below for older engiNIR versions).

Added

  • Model > Retire Model… (Model.retire(reason)): a model is kept as a
    record that predicts no more (direction ICH Q14: a model is never removed).
    Its metrics and predictive core stay; its per-pixel diagnostics (the scores,
    T² and DModX of every calibration pixel, most of a model's size) are
    deleted. The optional reason is stored with the date and the engiNIR
    version. Retired models are listed under Retired models in the Project
    tree (project.retired_models), not in the Models panel or Predict's
    choices; a retired model stays retired, and refitting gives it again as a
    new model. Only retired models store the new fields; active models and the
    format enginir-1.7 are unchanged. engiNIR 1.7.6 and older ignore the
    fields (with a warning in the log, "Ignoring unknown field(s)") and treat a
    retired model as active: open a project with retired models in 1.7.7 or
    newer.
  • Model > Rename Model… (Model.rename(name)).
  • Project > Remove Dataset… (project.remove_dataset(dataset_id)): removes
    a dataset that no ROI, calibration set or stored prediction refers to, with
    its reference corrections; the data file is not touched and can be added
    again, e.g. with another binning.
  • File > Compact Project… (project.compact()): HDF5 never shrinks a file
    when data are deleted; compacting rewrites the project without the space
    that retired models, removed datasets and deleted ROIs left, with the same
    content.

Documentation

  • The API reference lists file_format, EnginirIOError and
    FILE_SCHEMA_VERSION; messages and docs say "already corrected" instead of
    "precalibrated" for floating-point data (stored projects are unchanged).

engiNIR 1.7.6

Choose a tag to compare

@TUstudents TUstudents released this 22 Nov 22:49
7863e70

A faster cold start on Windows and a fix for opening the example project while
the viewer is still loading. Projects and the format (enginir-1.7) are
unchanged; pandas is no longer installed with engiNIR.

Fixed

  • Open Example Project while the viewer was still loading (the first
    seconds after the welcome window appears) imported the library in a second
    thread at the same time as the start-up imports (seen on Windows). Two
    threads importing the same packages can deadlock; it now waits for them,
    like opening a project or a data file.

Changed

  • pandas is no longer installed with engiNIR. scikit-learn imports pandas
    whenever it is installed, so every start of the viewer read about 290 more
    modules; on a cold Windows start each file costs time. CSV and Excel files
    are read and written without it (load_csv, save_csv), with the same
    results: the files are byte for byte what pandas wrote, sample names as
    pandas read them. metrics_report(..., as_dataframe=True) needs pandas:
    install it with pip install "enginir[pandas]"; without it, an
    ImportError says so. Scripts that used pandas because engiNIR brought it
    install it themselves.
  • The launcher no longer loads NumPy before the welcome window (264
    modules instead of 349).
  • The log shows where a start's time goes: each step of the warm-up
    (NumPy, SciPy, scikit-learn, h5py, matplotlib, engiNIR, the Qt parts) logs
    its time, its number of modules and the size of its native files; the
    launcher logs how many modules were loaded before it ran.

engiNIR 1.7.5

Choose a tag to compare

@TUstudents TUstudents released this 22 Nov 21:52

Spatial pixel binning of a dataset and tidier menus. The format stays
enginir-1.7; projects without binned datasets are unchanged.

Added

  • Spatial pixel binning of a dataset. Add Dataset's Binning (2 × 2,
    3 × 3, 4 × 4) and Project.add_dataset(path, binning=k) average k × k
    blocks of frames and rows every time the file is read, before the reference
    correction. Counts stay counts (the mean is rounded and keeps the file's
    integer type), so levels, references, ROIs and models work unchanged on the
    binned pixels. Reference frames are frames of the file as stored. A file has
    one binning in a project, fixed when it is added. A model records its
    binning: a new scan is binned like the model to be predicted, a scan
    registered with another binning is refused, and a calibration set mixing
    binnings is refused. enginir.io.bin_blocks, bin_rows and
    bin_frame_chunks do the same on arrays. The format stays enginir-1.7;
    the binning is stored only for binned datasets. engiNIR 1.7.4 opens a
    project with a binned dataset and refits its models from the stored ROIs,
    but refuses its data file (the shape differs) rather than read it unbinned.

Changed

  • Menus tidied (plan plans/menu-polish.md):
    • File: Open Project is Ctrl+O; Open Data… and Add Dataset… left File
      (Project > Add Dataset…, now Ctrl+D); Close Window is gone (Quit
      stays); Open Recent lists projects first, then data files.
    • Edit: Paste (Ctrl+V) next to Copy; Preferences… moved here from
      Tools, which is gone.
    • View: Title Case items; Go To the five steps with Ctrl+1 to
      Ctrl+5; "Reset View" as on the image's button.
    • Project: Rename Dataset… (was Name Dataset…).
    • ROI: ROI Grid Defaults… (from Tools), Find ROI… (from Edit), and
      Delete deletes the selected ROI on the image or the mosaic.
    • Predict: Predict Map… on F7.
    • Help: User Guide, Keyboard Shortcuts and Report a Problem…;
      the log entries of Tools moved here.

Removed

  • The Band image panel (View > Band image): it showed no more than the
    Spatial image.

engiNIR 1.7.4

Choose a tag to compare

@TUstudents TUstudents released this 22 Nov 18:24
70f575e

Viewer fixes and a smaller, sharper test suite. Projects, scripts and the
format (enginir-1.7) are unchanged.

Fixed

  • Tooltips break into lines of at most 72 characters. The help of each
    plot (its ? button) and the other long tooltips were one wide line.
  • The ROI mosaic fills its frame: an empty message line took a dark strip
    under the mosaic, so it ended above the ROI mean spectra and Selected ROI
    pixels plots.
  • Sensor frame and Spatial profile without data show the panel colour,
    like the Spatial image beside them, not the darker window colour.

Changed

  • Tests: 1190 down to 694 test cases (830 to 578 test functions) with the
    same line coverage. Table-style cases are one test each; tests that detect
    nothing the others do not, and tests of layout and colours only, are gone;
    the model-run and prediction tests run without Qt (tests/_sessions.py);
    the kernel PLS timing test is in benchmarks/.
  • Viewer internals: members nothing called are removed
    (ProjectState.fit_model_run, build_sample_set, predict_dataset,
    get_target_assignment, ensure_model_run_artifact_refs,
    HSIViewer.show_project_rois, ViewerState.raw_roi_spectra, icon_names
    and others). The viewer fits and predicts through its jobs, as before.

Install or update on Windows

Paste into PowerShell (the script is attached below):

powershell -ExecutionPolicy ByPass -c "irm https://github.com/TUstudents/engiNIR/releases/latest/download/install-enginir-for-windows.ps1 | iex"

With Python: uv tool upgrade enginir, or pip install -U enginir.

engiNIR 1.7.3

Choose a tag to compare

@TUstudents TUstudents released this 19 Nov 22:46

Smaller and faster project files (Blosc), ROIs added from anywhere and named
after their dataset, the white level of the Helios setting, and the rest of
the 1.7.2 backlog. The format stays enginir-1.7.

Upgrading from 1.7.2:

  • Projects open as before. A project saved by 1.7.3 stores its new
    arrays with Blosc and needs engiNIR 1.7.3 or newer (or hdf5plugin) to be
    read: update every computer that opens it.
  • Scripts use DatasetRecord and .record (was DatasetRef and
    .ref); there are no aliases.
  • New datasets without levels get the white level 3100 (was 3500). Do
    not mix them into one calibration set with datasets of the same camera
    added at 3500; set the level in Tools > Preferences or pass
    white_level= to keep 3500.

Changed

  • DatasetRef is now DatasetRecord, and .ref is .record
    (dataset.record, model.record, stored_prediction.record). "Ref"
    read like the dark and white references; it meant the stored record of a
    dataset or model. The old names are gone, with no aliases: scripts must
    use the new ones (e.g. model.record.model_run_id). The project file is
    unchanged.
  • Project files store their arrays with Blosc (Zstandard, level 5,
    shuffle) instead of gzip. On a real tray's ROI pixels: 21 % smaller,
    writing 1.7 times and reading about 5 times as fast. Projects written
    before keep their gzip arrays and open as before; the format stays
    enginir-1.7. A project written by 1.7.3 needs engiNIR 1.7.3 or newer
    (or import hdf5plugin in Python, the Blosc plugin in HDFView or MATLAB):
    earlier engiNIR versions open it but cannot read its arrays.
    save_hdf5 keeps gzip and offers compression="blosc".
  • The default white level is 3100 (the EVK Helios white balance), not
    3500, and the viewer's Add Dataset starts from the levels set in Tools >
    Preferences
    (128 and 3100 by default). A file that states its levels
    keeps them, and stored datasets keep theirs; but a dataset added from now
    on without levels gets 3100, so do not mix it into one calibration set with
    datasets of the same camera added at 3500. Scripts can still pass
    white_level=3500.
  • Add Dataset's detector-level choice reads "Detector calibrated with dark
    and white reference levels"
    (it was "Detector levels, no references").
  • The component curve of PLS and PCR ends at 10 components (15
    before): A_max = max(n, min(10, G − 2, rank)). A fit asking for more
    still gets its count; Auto chooses within the curve. Stored curves keep
    their length.

Added

  • Add Dataset has a Name field, and Project.add_dataset a name=
    parameter: the dataset's short name, shown instead of its file name and
    used by {name} in ROI grid names.
  • ROI grids are named after the dataset's name. The new placeholder
    {name} gives the dataset's name (Project > Name Dataset), else its file
    name, and the default patterns use it: Kestreleye scans, all called
    stream_hsi.h5, no longer give every grid stream_hsi-A01. {folder}
    gives the file's folder. The grid dialog lists the placeholders.
  • Add ROI and Add ROI Grid work from anywhere. Pressed without an
    image shown (from the Settings, the ROI menu, the Checks tab's fix or the
    new buttons of the Project ROIs tab), they show a dataset first, then start
    drawing or open the grid dialog. They were disabled where a project with
    ROIs opens, and the fix only switched the step.
  • The About box cites engiNIR (with the concept DOI) and links its
    GitHub repository.
  • The domain model page is a short overview again: each object of a
    project with its term, its Python class and its place in the file.
  • The glossary gives Frame and Row their own entries and adds the terms
    the viewer and the guides use: the Explore plots (spatial image, sensor
    frame, band image, spatial profile, false-color image), dark and white
    references, detector levels, the wavelength table, the preprocessing
    steps, the figures of merit, scores, loadings, coefficients, VIP, the
    component curve, check and verdict.

Fixed

  • The Log tab shows the log level of Tools > Preferences (INFO by
    default) instead of every DEBUG line, and follows a change at once.
  • An image opens as Reset View shows it. It was fitted with a margin that
    depended on the view's size at that moment (up to 10 % while the page was
    not laid out yet).
  • A Kestreleye scan with a wavelength table is read without the warning
    that it has no wavelengths.
  • The Checks table's Where and Fix columns have room (they were fitted
    exactly to their contents) and can be widened by hand.
  • Typing an ROI grid's name pattern no longer logs an error per
    keystroke
    ({fol} while typing {folder}); the grid that is made is
    still checked.

Install or update on Windows

Paste into PowerShell (the script is attached below):

powershell -ExecutionPolicy ByPass -c "irm https://github.com/TUstudents/engiNIR/releases/latest/download/install-enginir-for-windows.ps1 | iex"

With Python: uv tool upgrade enginir, or pip install -U enginir.

engiNIR 1.7.2

Choose a tag to compare

@TUstudents TUstudents released this 19 Nov 19:04

Wavelengths for Kestreleye scans, which store none: a wavelength table gives
them, when a scan is added or later. Also a faster project window on Windows
and the welcome window's tagline. The format stays enginir-1.7.

Added

  • Wavelength tables for files without wavelengths. A Kestreleye
    stream_hsi.h5 stores band numbers only; the wavelengths of its camera
    setting (EVK-Helios-EC-32, 176 bands, 1041.75 to 1589.5 nm, taken from an
    .eiff the vendor software wrote with the same setting) now ship as the
    table "Kestreleye 176 bands". Project.add_dataset(path, wavelength_table=...) and the Wavelengths choice of Add Dataset...
    (preselected when one table fits) copy them into the project;
    Dataset.set_wavelengths and Project > Set Wavelengths... give them to a
    dataset added with band numbers and to its ROIs. Models fitted on band
    numbers predict as before. Your own tables are CSV files in
    ~/.enginir/wavelength_tables/ (enginir.io.wavelength_tables). The
    dataset records the table's name and id in two new optional attributes;
    the format stays enginir-1.7.

Fixed

  • The welcome window's tagline read "Reference correction models for NIR spectra and
    hyperspectral images", a wrong renaming of 1.7.0; it is engiNIR's tagline again,
    "A universal engineering tool for near-infrared spectra and hyperspectral
    imaging".
  • A project window opens up to a second faster on Windows. The Log
    tab set its fixed-width font when the window was built, which makes Qt
    load the whole Windows font database (0.94 s in a user's log, 0.25 s on a
    warm test machine); the font is now set when the Log tab is first
    selected. It is the system's fixed-width font, since the family
    "Monospace" exists on Linux only.

Install or update on Windows

Paste into PowerShell (the script is attached below):

powershell -ExecutionPolicy ByPass -c "irm https://github.com/TUstudents/engiNIR/releases/latest/download/install-enginir-for-windows.ps1 | iex"

With Python: uv tool upgrade enginir, or pip install -U enginir.

engiNIR 1.7.1

Choose a tag to compare

@TUstudents TUstudents released this 19 Nov 12:51

A fast start that never waits for a network drive. A bugfix release: the
project format and the API are unchanged.

Fixed

  • The welcome screen appears without the scientific libraries.
    import enginir and the launcher load scikit-learn, SciPy, pandas, h5py,
    matplotlib and pyqtgraph only when they are needed; scripts keep
    from enginir import Project unchanged. On Linux the welcome window is
    painted after about 0.2 s instead of 1.4 s.
  • The first project opens without loading the libraries: while the
    welcome screen waits, the viewer loads them in the background.
  • No recent file and no data file is touched on the UI thread. The
    recent-files list (welcome screen and Open Recent) is drawn from the
    settings file alone and grays out missing files when a background check
    ends; the list now stores whether an entry is a project or a dataset.
    Opening a project looks for its data files in the background and lists
    them as "(checking…)" until then, so an unreachable network drive no
    longer freezes the start or the window.
  • The project window is built faster (0.30 s instead of 0.40 s for an
    empty project on Linux): the Fit settings and the Predict page are built
    when first shown.
  • The plot help setting applies to the Model and Predict plots also
    when they are first shown after the start (they showed their help
    buttons whatever the setting).
  • The Windows installer compiles the bytecode at install
    (uv tool install --compile-bytecode), so the first start after an
    install or update does not compile about 2,200 modules.

Added

  • Startup times in the log, counted from the moment the operating
    system started the process: when the launcher ran, the welcome window was
    shown, the background loading ended and the first main window was shown
    (Startup timing lines).

Install or update on Windows

Paste into PowerShell (the script is attached below):

powershell -ExecutionPolicy ByPass -c "irm https://github.com/TUstudents/engiNIR/releases/latest/download/install-enginir-for-windows.ps1 | iex"

With Python: uv tool upgrade enginir, or pip install -U enginir.