Closed NicoleRayner closed 2 months ago
@NicoleRayner - no limits - this is just a plain old bug.
Thanks for looking into this Jim. If you have a moment to explain the bug it might be helpful to record here for posterity/undertanding of future issues. Is it because it has a name recognized as "Built in" that it won't write? No rush.
The bug is that the SWAP expression reverts back to the default Built-in one when you toggle between a Pb-U and a Pb-Th calibration on the calibration constant WM. That is why it wasn't writing to the xml, because by the time I told it to write, it was gone.....
The bug was caused by an overly-complicated work flow. The solution in v2.0.9 is to always keep SWAPCustomCorrection204 in Custom Expressions as it is not a true BuiltIn Expression. This expression is only used in the Common Pb Count Corrections tab. Now you can simply edit it or even remove it. No renaming necessary. Saving and loading tasks now works as well. There is an explanation available in the "Show Notes" for SWAPCustomCorrection204, shown below.
Edit this expression to calculate a custom corrected value for 204/206 as per Squid2.5 'column swapping' and invoke it from the Common Pb menu window for overcounts of 204.
REQUIRED: Use the expression name 'SWAPCustomCorrection204' and define a ValueModel.
The default definition is: 'ValueModel(Orig(["204/206"]),Orig([±"204/206"]),true)'.
NOTE: Use the 'Orig' function to retrieve the unmutable value of a ratio. Otherwise, a circular logic obtains.
Another related bug discovered and fixed in this release is that the SWAPCustomCorrection204 is re-applied to reflect any edits when opening Count Corrections tab.
Here's the situation: I made a copy of the built-in SWAPCustomCorrection204 expression, redefined the value model as needed and saved in my Custom Expression folder. Everything is working as it should. I then saved/exported the task as an xml for future use. The next time I attempted to use that task (with my custom 204 Correction) it wasn't there, it was back as the default one in built in. It turns out that this new custom expression doesn't actually get written to the xml of my task for some reason, even though it is working in the squid file.
Is there a limit to the number of custom expressions that can be written to an xml task? I haven't done thorough troubleshooting on this but have a vague recollection of the USGS folks saying that old squid had a limit to custom expressions and that squid3 might as well? @sbodorkos does this ring any bells?