Author Topic: Always/never use flags when importing multi-point background file setups  (Read 4867 times)

Karsten Goemann

  • Global Moderator
  • Professor
  • *****
  • Posts: 228
I don't know if that's actually possible or not, but how can I preserve the always use / never use flags when I import a file setup which contains multi-point backgrounds?

Thanks, Karsten

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 3304
  • Other duties as assigned...
    • Probe Software
Re: Always/never use flags when importing multi-point background file setups
« Reply #1 on: February 23, 2016, 06:03:03 AM »
I don't know if that's actually possible or not, but how can I preserve the always use / never use flags when I import a file setup which contains multi-point backgrounds?

Thanks, Karsten

The reason it's not imported now is because I have always considered these manual flags "data", and secondly because they're in a separate table from the MPB positions, so yes, it's possible, but we would need a specific call to bring it in.

On second thought that won't work... because although I could read the manual flags from the file setup if the selected sample actually has data, there is no where for me to store the manual flags flags since the new sample has no data yet!

Sorry.

PS Basically PFE saves 24 manual over ride flags for each data point for each MPB element.  So that is why it's considered "data".
« Last Edit: February 23, 2016, 08:44:38 AM by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Karsten Goemann

  • Global Moderator
  • Professor
  • *****
  • Posts: 228
Re: Always/never use flags when importing multi-point background file setups
« Reply #2 on: February 23, 2016, 04:11:04 PM »
Ok, no worries.

The reason I ask is that for the shared background methods I'm developing now (scheelite, monazite, complex sulphides...) I actually have to use the flags quite a bit, as the multi-point background arrays contain all of the backgrounds for each spectro for each element. So the overall ranges are very wide and the selections need refinement as the automatic selection (by selection how many to iterate on each side) in many cases doesn't pick the best backgrounds.

But each shared background measurement starts out as a normal off-peak measurement, so what I'm doing is after the acquisition I import a File Setup from a previous run where all the shared backgrounds (and flags) are set as a New Sample. Then in Analyze I control-click to select that new empty setup first and then all of the new measurements to apply the shared background settings to the new measurements. Works great (except for the flags) - if I had to do the whole thing manually from scratch it would probably take me hours for every new run.

Is there a better way of doing this?

Cheers,
Karsten






John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 3304
  • Other duties as assigned...
    • Probe Software
Re: Always/never use flags when importing multi-point background file setups
« Reply #3 on: February 23, 2016, 04:21:50 PM »
The reason I ask is that for the shared background methods I'm developing now (scheelite, monazite, complex sulphides...) I actually have to use the flags quite a bit, as the multi-point background arrays contain all of the backgrounds for each spectro for each element. So the overall ranges are very wide and the selections need refinement as the automatic selection (by selection how many to iterate on each side) in many cases doesn't pick the best backgrounds.

But each shared background measurement starts out as a normal off-peak measurement, so what I'm doing is after the acquisition I import a File Setup from a previous run where all the shared backgrounds (and flags) are set as a New Sample. Then in Analyze I control-click to select that new empty setup first and then all of the new measurements to apply the shared background settings to the new measurements. Works great (except for the flags) - if I had to do the whole thing manually from scratch it would probably take me hours for every new run.

Is there a better way of doing this?

Hi Karsten,
I see. So you're using the shared bgd version of the multi-point backgrounds method. And you're setting the iterate points and background fit types by importing a file setup from a previous run and assigning it to the selected samples in the new run. And you want to add the importing of the manual flags to this procedure?

Let me think more about it.  One possibility is to add new fields that would behave as the count time does in the sample acquisition now. That is, a "last count time" field. Because that is how one can set a different count time for each element for each data point... but the last utilized count time is what gets used for new data points.

So if I created a new "last manual flags" field, that might work for you. Though it is more complicated than last count time because it is 24 flags as opposed to just a single count time per element.  Let me look at the code and see how hard it might be.
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Karsten Goemann

  • Global Moderator
  • Professor
  • *****
  • Posts: 228
Re: Always/never use flags when importing multi-point background file setups
« Reply #4 on: February 23, 2016, 04:46:40 PM »
So you're using the shared bgd version of the multi-point backgrounds method. And you're setting the iterate points and background fit types by importing a file setup from a previous run and assigning it to the selected samples in the new run.

Exactly!

And you want to add the importing of the manual flags to this procedure?

That'd be great if that was possible.

Let me think more about it.  One possibility is to add new fields that would behave as the count time does in the sample acquisition now. That is, a "last count time" field. Because that is how one can set a different count time for each element for each data point... but the last utilized count time is what gets used for new data points.

So if I created a new "last manual flags" field, that might work for you. Though it is more complicated than last count time because it is 24 flags as opposed to just a single count time per element.  Let me look at the code and see how hard it might be.

Many thanks for looking into it. I know you've got plenty on your plate.

I don't know how many other people would be using this but after experimenting with shared backgrounds for a while I can see me using it a lot. For example have several different "processing setups" in a run for different types of sulphide minerals with optimised shared background selections (which very acquired with the same off-peak acquisition method), or monazite/xenotime... and assign them during post processing while working through the data. With the optimised graphical multi-background display this can be very interactive and powerful I think. Which reminds me I still wanted to post a couple of examples.

Cheers,
Karsten

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 3304
  • Other duties as assigned...
    • Probe Software
Re: Always/never use flags when importing multi-point background file setups
« Reply #5 on: February 23, 2016, 06:33:23 PM »
Which reminds me I still wanted to post a couple of examples.

I think everyone would be interested to see some examples of these!   8)

Frankly I'd like to see them myself, just to better understand why you are needing to utilize the manual over ride flags so much.  I mean, it's great to see the feature getting used, but I always assumed that this would be a rarely used feature as the statistical evaluation by the software generally does an excellent job of removing the outliers... can you enlighten me?
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Philipp Poeml

  • Professor
  • ****
  • Posts: 222
Re: Always/never use flags when importing multi-point background file setups
« Reply #6 on: February 24, 2016, 12:34:57 AM »
This would be great if this could be impelemnted. I asked for the same thing a while ago. I had to manually re-do the 24 flags for about 24 elements, that was quite time consuming.

Cheers
Philipp

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 3304
  • Other duties as assigned...
    • Probe Software
Re: Always/never use flags when importing multi-point background file setups
« Reply #7 on: February 24, 2016, 09:53:50 AM »
This would be great if this could be impelemnted. I asked for the same thing a while ago. I had to manually re-do the 24 flags for about 24 elements, that was quite time consuming.

Hi Philipp,
I appreciate that.

So I started working on a solution to save/load the MPB manual over ride flags even if there's no data, and made considerable progress, but then discovered a "fly in the ointment"! Which I now remember is the reason why I didn't implement this back when you requested it.

I'll explain it here, in the hopes that it will jog a few of my brain cells and help me think of a solution. It's actually been a problem for a while, but this brings it to "a head". Basically, every data row can have different manual flags because, you know, every data point could be a completely different composition.  In the multi point display dialog one can apply the manual flags to a single data point or all the data points.   

But then you and Karsten wanted to be able update all the manual flags for multiple samples from the Elements/Cations dialog, and so I implemented that, but I realized that will make all of the the data points using the same manual flags.  That might be want you want, but what if someone wants to *not* over write manual flags that are assigned differently to each data point in a sample...?

I'm using a code method similar to what I use for the count times. That is the "last count times" array. That works for count times because once they are acquired, the count time for that data point cannot be modified- it is data after all!  But for the MPB manual flags, they can be changed after acquisition because they are simply re-fitting the intensity data, so they can be over written, but maybe someone might not want that! 

I'm in a bit of a dilemma...
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Karsten Goemann

  • Global Moderator
  • Professor
  • *****
  • Posts: 228
Re: Always/never use flags when importing multi-point background file setups
« Reply #8 on: February 24, 2016, 05:25:06 PM »
Hi John,

If I understand you correctly, the problem is that all data lines in a sample get the same flags if I do it the way I described: in Analyze, click to select samples in specific order, open Elements/Cations, click OK to assign Elements/Cations settings of first selected sample to all selected samples.

For us that would be fine. Yes, I can edit these settings individually for each line in Run | Display Multi Background Intensities. But for everything else, i.e. all the processing settings in Analyze!, Calculation Options, TDI settings..., lines in a sample are treated the same anyway, right? So if I want to use different settings for any of these, I either have to create separate samples for acquisition, which is what we tell our users to do. Or, if they haven't done that, save different versions of the file with different settings for the sample and use the lines from different files.
 
I would assume if anyone uses different multi-point background settings for different lines in a sample they would have set that up manually anyway, so they wouldn't need to apply a different setup to this sample?

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 3304
  • Other duties as assigned...
    • Probe Software
Re: Always/never use flags when importing multi-point background file setups
« Reply #9 on: February 24, 2016, 08:30:46 PM »
If I understand you correctly, the problem is that all data lines in a sample get the same flags if I do it the way I described: in Analyze, click to select samples in specific order, open Elements/Cations, click OK to assign Elements/Cations settings of first selected sample to all selected samples.

For us that would be fine. Yes, I can edit these settings individually for each line in Run | Display Multi Background Intensities. But for everything else, i.e. all the processing settings in Analyze!, Calculation Options, TDI settings..., lines in a sample are treated the same anyway, right? So if I want to use different settings for any of these, I either have to create separate samples for acquisition, which is what we tell our users to do. Or, if they haven't done that, save different versions of the file with different settings for the sample and use the lines from different files.
 
I would assume if anyone uses different multi-point background settings for different lines in a sample they would have set that up manually anyway, so they wouldn't need to apply a different setup to this sample?

Yes, I agree with all that you say.

But sometimes when acquiring data across an expected (or unexpected)  boundary, one cannot help having different compositions in each data point within a single sample and in some of those cases it might be nice to have the ability to force different MPB manual over ride flags for each data point.

I think I've got a method to allow this without making it a burden for the user when assigning them to all data points in a sample.  I'll probably have something for you tomorrow or Friday to try out.

By the way, I'm also adding the MPB manual flags to the element setup databases for subsequent retrieval with new sample setups.    8)
« Last Edit: February 24, 2016, 08:48:52 PM by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Philipp Poeml

  • Professor
  • ****
  • Posts: 222
Re: Always/never use flags when importing multi-point background file setups
« Reply #10 on: February 24, 2016, 11:55:17 PM »
Hi both,

but if I understand both of you correctly: Let's assume I have a sample and I make a nice line over a phase boundary. Then, using the elements/cations dialogue to set the mpb flags is not what I want. Instead I would go to the Display Multi Background Intensities dialogue and do things for each data point individually. I don't particularly see a monster dilemma here. If I know that my sample is heterogeneous, then I would just use the correct method to apply the mpb flags. Either I want them all to be the same for a specific sample, or I want to play with data points individually. For me that makes sense and I think for the user it could also make sense.

Ok, but how is it, if I open the elements/cations dialogue and change let's say something else? Would those flags still get overwritten? Then I might lose what I coded in detail in the Display Multi Background Intensities dialogue.

So I guess the point is that we have to make sure that no flags or data is unintentionally overwritten, right?

I look forward to your solution!

Cheers
Philipp

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 3304
  • Other duties as assigned...
    • Probe Software
Re: Always/never use flags when importing multi-point background file setups
« Reply #11 on: February 25, 2016, 01:52:01 PM »
but if I understand both of you correctly: Let's assume I have a sample and I make a nice line over a phase boundary. Then, using the elements/cations dialogue to set the mpb flags is not what I want. Instead I would go to the Display Multi Background Intensities dialogue and do things for each data point individually. I don't particularly see a monster dilemma here. If I know that my sample is heterogeneous, then I would just use the correct method to apply the mpb flags. Either I want them all to be the same for a specific sample, or I want to play with data points individually. For me that makes sense and I think for the user it could also make sense.

Ok, but how is it, if I open the elements/cations dialogue and change let's say something else? Would those flags still get overwritten? Then I might lose what I coded in detail in the Display Multi Background Intensities dialogue.

So I guess the point is that we have to make sure that no flags or data is unintentionally overwritten, right?

I look forward to your solution!

Hi Philipp (and Karsten),
You are exactly right.

Ok, I've got a solution for this working I think.  Took a bit of coding but it seems clean and doesn't bother the user too much while still preserving the capability of assigning different MPB manual flags to each data point if that becomes necessary ever (I'd be interested in seeing such an example posted to this topic someday!).

1. The MPB manual flags are now saved (along with the other MPB parameters) to the element setup database.  So they can be saved and loaded on an element by element basis for subsequent acquisitions.

2. The Elements/Cations dialog over writes the MPB manual flags for all data points in a sample (as it was before), but... if it detects that some lines have different MPB manual flags, it will ask for confirmation before doing so.  One can say Yes, No or Cancel. If you say No it will not overwrite the manual flags (but will still save all the other parameters), for that probe session (until the MDB file is closed) without asking again if you happen to re-enter the Elements/Cations dialog again.

Please try it out and let me know what you think.  I played with it in one of Karsten's MPB runs and it all seems to be working.
« Last Edit: February 25, 2016, 02:37:14 PM by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 3304
  • Other duties as assigned...
    • Probe Software
The reason I ask is that for the shared background methods I'm developing now (scheelite, monazite, complex sulphides...) I actually have to use the flags quite a bit, as the multi-point background arrays contain all of the backgrounds for each spectro for each element. So the overall ranges are very wide and the selections need refinement as the automatic selection (by selection how many to iterate on each side) in many cases doesn't pick the best backgrounds.

But each shared background measurement starts out as a normal off-peak measurement, so what I'm doing is after the acquisition I import a File Setup from a previous run where all the shared backgrounds (and flags) are set as a New Sample. Then in Analyze I control-click to select that new empty setup first and then all of the new measurements to apply the shared background settings to the new measurements. Works great (except for the flags) - if I had to do the whole thing manually from scratch it would probably take me hours for every new run.

All,
We now include saving of the "shared" or Multi-Point-Bgd manual over-ride flags when loading file setups.  Last year I was able to add new arrays that store the "last" specified manual over-ride flags even if the sample does not contain any data.  These new arrays now allow these flags to be imported into a new sample, from a previous file setup run...

Thanks to Karsten for the suggestion!
john
« Last Edit: March 18, 2017, 05:37:56 PM by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"