Averaging - File compatability

Moderators: Andreas Mohr, rah

Post Reply
JConley
Posts: 9
Joined: Thu Feb 11, 2016 4:59 pm

Averaging - File compatability

Post by JConley » Thu Feb 11, 2016 5:56 pm

Hello,

I am working with OPUS 7.5 and trying to build a macro to allow our users to add standards to our raw materials spectrum library.

Our operators will measure a number of samples from a batch or batches of what will be assumed to be the same material. Spectrum for each sample will then be averaged (to reduce the appearance of inherent variation) to form the standard spectrum. The standard spectrum will be added to the library for comparison and searching later on as we monitor various materials.

I am having a hard time getting the Averaging function to work properly.

In or out of the macro, I am told spectra are incompatible when I try to average them. In the macro, I was averaging spectrum measured with the exact same parameters, literally taken during part of a loop sequence. Same wavenumber range, same instrument, scan time, apodization, literally everything (except the filename or extension) is the same. The macro returns the last file selected for averaging as the average. When I manually average the spectra (out of the macro) to compare, I am told the spectra are incompatible.

I have gone through some older saved spectra taken during the same project/experiment to try and determine what makes spectrum files compatible with no luck. Every set of files I have tried to average are incompatible.

If two files taken with the same experiment parameters seconds apart from each other aren't compatible, how can I generate compatible files? Is another step required in processing these files?

What are the compatibility criteria?

I have the OPUS - Programming manual, version 4 (provided under the "help" menu, but I haven't been able to locate any information on file compatibility.

Any insight is greatly appreciated.

Jared Conley
LUMOS User
Attachments
Library Macro.JPG
No .mtx or .txt allowed, jpg of macro text
Library Macro.JPG (214.92 KiB) Viewed 54450 times

Andreas Mohr
Posts: 29
Joined: Mon Jun 30, 2008 4:50 pm

Re: Averaging - File compatability

Post by Andreas Mohr » Fri Feb 12, 2016 3:57 pm

Dear JConley,

I just consulted a knowledgeable colleague of mine.

He strongly suspects that this is the (unfortunately sufficiently common) issue of the Averaging function trying to store its output/result data into a path which the currently active user does not have access permissions to (especially given your environment context description of "Our operators"). Failure of the OPUS function to store file data in the work path will then unfortunately result in reporting of this special low-level error condition via "generic", "weakly-descriptive" high-level messages such as "spectra are incompatible".

Path settings as currently used by OPUS environment configuration can be reviewed within the Setup --> User Settings ... menu area.

The underlying issue is that currently these paths are not managed as a properly user-private setting by OPUS, but rather serialized into OPUS workspace (.ows) files which are more widely/globally shared, even among differing user environments.
This handling in fact still needs to be enhanced/corrected in order to correctly/precisely allow for per-user paths.

Please note that in sufficiently newish OPUS versions (>= 7.5 or so) the Averaging function (and its accompanying GUI dialog) at least has been extended to allow for specifying a specific output/result path.

I sincerely hope that this manages to resolve your trouble, and I am ready to process any further questions (especially those which might be of general interest to all forum visitors, such as this nice one).

Yours sincerely

Andreas Mohr, Non-Windows (Linux) development

JConley
Posts: 9
Joined: Thu Feb 11, 2016 4:59 pm

Re: Averaging - File compatability

Post by JConley » Tue Feb 16, 2016 7:23 pm

Andreas,

Thank you for the quick response.

I have been writing and testing the macro as an administrator in a workspace that is a slightly-modified clone of one of the workspaces the installing technician built.

I have not modified the User Settings data paths in any workspace I use. Individual spectrum files have no problem saving to any path (even one that previously did not exist) when using advanced measurement or within the macro. I currently can save files to a path based on user input, often creating a new path for a new sample. These paths will always be to a parent network folder that has several branches with their own sub-folders. For clarity, all spectra go into an FTIR dump which has folders for different projects. In one project, files are stored by substance and plant location, in another (the project relating to the attached macro) some spectra are stored in one location and others in the designated library folder. I have been setting data paths either in the .XPM file or as part of a macro command. All of the possible data paths I will be using are on a local network, the default paths in the User Settings menu are all local to the computer connected to the LUMOS.

Would I need to set the BASE, WORK, or DATA path to the parent/umbrella folder to resolve these issues? Will it prevent other functions from working properly to change these paths?

You mentioned the path settings are saved with the workspace. If I log into a workspace, let's call it: operator-workspace.ows, as an admin and modify those path settings, they will not need to be (cannot be?) modified in the same workspace as an operator-type user?

If the issue is improper User Settings, is it possible this error would cause spectrum measured through the video wizard not to save properly also?

I am currently experiencing a file-save issue with the Video Wizard where a spectrum is measured and temporarily stored in the specified data path (arbitrary path) but is removed when the video wizard is closed. I progress through the VidWizard dialogue windows, take the measurement, and am directed to a window with options to "End" or "Repeat". Either choice results in the measured file, which is intact ( I can find the file in the folder and load it into the spectrum window) up until clicking either end or repeat when the file vanishes.

Also, is version 4 of the programming manual the latest version?

Thank you for the help!

Sincerely,

Jared Conley

Andreas Mohr
Posts: 29
Joined: Mon Jun 30, 2008 4:50 pm

Re: Averaging - File compatability

Post by Andreas Mohr » Wed Feb 17, 2016 11:44 am

JConley wrote: Would I need to set the BASE, WORK, or DATA path to the parent/umbrella folder to resolve these issues? Will it prevent other functions from working properly to change these paths?
I would say it differently:
For a parent/umbrella folder, one may in fact easily encounter permissions which are more restrictive than the ones of a particular child folder (e.g., HDD partition system root folder vs. a sub folder designed to be freely belonging to a particular user), thus what's in fact relevant here is not that one changes the path value to be using a parent/umbrella folder, but that the storage location chosen has permissions which are generally more relaxed (i.e., freely accessible by all types of user who might want to have write access - or potentially at least read access - to it).

IOW, for these path access issues, that's a problem with file-system-side permissions, not of OPUS session user permissions.

For the Average function specifically, it is important that the WORK path choice is accessible by all relevant OPUS users.

JConley wrote: You mentioned the path settings are saved with the workspace. If I log into a workspace, let's call it: operator-workspace.ows, as an admin and modify those path settings, they will not need to be (cannot be?) modified in the same workspace as an operator-type user?
While I'm rather insufficiently familiar with daily OPUS use, a colleague of mine told me that modification permissions of certain settings within workspace configuration by less privileged users such as operators can be restricted, but is not necessarily usually configured that way or even useful (but of course that choice is strongly influenced by local workflow intentions/practice).

JConley wrote: If the issue is improper User Settings, is it possible this error would cause spectrum measured through the video wizard not to save properly also?

I am currently experiencing a file-save issue with the Video Wizard where a spectrum is measured and temporarily stored in the specified data path (arbitrary path) but is removed when the video wizard is closed. I progress through the VidWizard dialogue windows, take the measurement, and am directed to a window with options to "End" or "Repeat". Either choice results in the measured file, which is intact ( I can find the file in the folder and load it into the spectrum window) up until clicking either end or repeat when the file vanishes.
I consulted another colleague of mine who is familiar with that area, and he said that it's a bit unclear which folder locations / location types are involved here (this file vs. folder settings in User Settings etc.).
Given settings of paths with proper access permissions this issue might resolve into sweet nirvana, too.

JConley wrote: Also, is version 4 of the programming manual the latest version?
Indeed, current version of Programming.pdf is 4[.1] (file size 2689619 Bytes).

If you happen to have questions about certain areas in this document, then feel free to mention them - I am recording a list of items within this document in need of updating.

Yours sincerely

Andreas Mohr

Post Reply