CIRDLES / Squid

Squid3 is being developed by the Cyber Infrastructure Research and Development Lab for the Earth Sciences (CIRDLES.org) at the College of Charleston, Charleston, SC and Geoscience Australia as a re-implementation in Java of Ken Ludwig's Squid 2.5. - please contribute your expertise!
http://cirdles.org/projects/squid/
Apache License 2.0
12 stars 24 forks source link

organizing squid functions - a discussion #316

Closed NicoleRayner closed 5 years ago

NicoleRayner commented 5 years ago

Although I haven't made much outward progress on providing definitions for the functions I have been spending a bit of time trying to understand what the squid functions do and how a user is likely to interact with them. My intuition regarding the squid functions was that they were basically a re-creation of the "user defined functions" in the Excel version. It turns out my intuition was not quite right. While this is true in some cases (Age76 for example), it isn't true for many other of these functions which are more behind the hood functions needed to derive a standard squid table (e.g. Pb46cor7) within a task. The good thing though is that many of these "procedural" functions won't really be harvested for use in other expressions by anyone except the most advanced users (and that doesn't include me).

Because I think that my intuition (that "squid functions" are akin to user defined functions) might be commonly shared my suggestion is to subdivide the squid functions into 2 sub categories "Squid functions - general" and "Squid functions - procedural" (I'm open to other names) with the goal of making it easy/obvious for users to find the function they need without have to wade through a bunch that are needed under the hood.

Ones that I consider "general" are: AgePb76.java AgePb76WithErr.java Concordia.java ConcordiaTW.java Pb76 Pb206U238rad.java RobReg.java sqBiweight.java (discussion with @bowring means that sq prefix might be dropped ) sqWtdAv.java (discussion with @bowring means that sq prefix might be dropped) ValueModel.java

All the other existing squid functions would be under Procedural (or whatever we decide to call it) @sbodorkos and @cwmagee what do you think?

If due to space constraints there was a desire to consolidate a few other of the function categories logic/presentation could be merged as they each only have a couple of associated functions.

sbodorkos commented 5 years ago

@NicoleRayner I think this is a good idea. We have already started going this way, by not treating all of the various "user-defined" functions in a consistent way... one of the reasons the function-list is quite short is because we have already converted quite a few of the complex, single-use "functions" (e.g. those that perform various aspects of the 208-correction, and have up to 10 or 11 arguments) into de facto subroutines, in recognition of the fact that no sane user would ever want to use them in the shape they have been formulated.

One potential issue relates to categorisation; all of your "general" functions are applied to U-Pb data obtained via IDTIMS or LA-ICPMS as easily as they are to U-Pb SIMS data, which perhaps suggests they should be part of Topsoil (or ET_Redux?) and simply accessed by Squid3 from there? Maybe this is not a concern. But I sometimes get confused about which software package is supposed to do what.

I think it would also be worthwhile looking through the Isoplot (and possibly also SQUID 2.50) manual for other obviously useful user-defined functions that presumably haven't been covered yet, because Ludwig had a pretty good understanding of the difference between "general" and "procedural" functions, and the manual contents (plus the "toolbar-only" functions, etc.) reflect that.

"AgePb6U8" is one that jumps out at me, and by analogy "AgePb8Th2". Ideally we'd also take the opportunity to unify principles of operation in a way Ludwig never did: I would love to have access to "AgePb6U8WithErr" (analogous to AgePb76WithErr), even though no version of Squid or Isoplot has ever had this. There are also some others that remain downstream of our current documentation, like "SingleStagePbR", which yield Stacey-Kramers common-Pb isotopic compositions for a specified age. This is useful in a variety of contexts, inside and outside Squid. Other more generalised functions that we probably need to look at include the classical "YorkFit" analogue of "RobReg", and the non-parametric routines that derive asymmetric 95% confidence intervals for a median.