-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
verify_SingleGrainData(): Bugs and wishes #113
Comments
This might be indeed a documentation error. I do remember that I had first a different criterion and then went back to the ratio, but obviously forgot about the documentation. |
Here I am not sure what kind of data you have. The selection should work. At least from the code, I cannot see an obvious reason. Update (2023-01-03): OK, I did not get this yesterday: This behaviour makes sense because you don't want to remove curves if you are interested in analysing the entire sequence. Otherwise, the sequence is not anymore complete. This means, if `cleanup_level = 'aliquot'" all curves from one aliquot would need to fail, otherwise the algorithm retains the aliquot. |
This is not the case, if for one grain/positon pair, a valid signal was found, nothing is discarded (depending on the cleanup level). Update (2023-01-03): Please see my previous comment. It is related to the cleanup level aliquot vs curve. |
The function returns a single plot with a threshold line and points. I admit that a histogram, however, would be more sensible. However, if the function is called on a list of objects, indeed, then you will get one for each analysis object one plot, which might be too much. So we would need a different plot for the self-call option. Would like to implement that? |
Yes, I would like that. However, first, I would like to see code to reproduce the behaviour (except for the documentation error) so that we can write tests for those scenarios. For a pull request, please check out branch Update (2023-01-03): If I am not mistaken, only point 1 needs to be fixed, point 4 is nice to have, and I would appreciate you taking over to implement it. |
Thanks @DirkMittelstrass. I appreciate the detailed discussion!
It is written in the documentation, but I do agree that a better terminal output may help to better understand the behaviour of the function without reading the manual.
This was an intensively discussed question before the current implementation happened. It sounds odd, but you may have very weird grains or technical issues in single-grain measurements, causing a ratio to fall below the threshold, but you still want to retain the grain. Therefore the current implementation.
This is, however, a sensible suggestion and makes sense. The default should be
It is just easier to process after, but I do agree it is more logical to have an |
@DirkMittelstrass Just double-checking. Have I spooked you off, or do you need help with the code changes? |
@RLumSK No, you had not spooked me off. Just other things being more urgent. It is still on my list! |
Hi Sebastian! First of all, I like to thank you for all the effort you put as maintainer into the Luminescence package for more than a decade now. Your package makes it so much easier to analyse usual and unusual luminescence dating data sets.
However, I encountered some issues with the verify_SingleGrainData() function I like to adresss:
1. In the Details section is an error. There is stated that the validation criterion is:
abs(mean(x) - var(x)) > threshold
while the true criterion is actually:
var(x) / mean(x) > threshold
Either the documentation or the code is outdated and needs revision.
2. The clean up procedure does not work as expected, at least for my data set. If set the arguments
cleanup = TRUE, cleanup_level = "aliquot"
I get always back:[verify_SingleGrainData()] RLum.Analysis object reduced to records: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
But nothing was deleted, even if I select a very high threshold which leads to plenty of fails. If I set
cleanup_level = "curve"
, only the records are deleted as expected. Please mail me, if you need the said data set.3. A good grain may fail the validation check if either the grain has no natural dose or if the grain emits no residual signal during zero-dose measurements (i.e. recuperation test). Thus, it should be possible to allow some records to fail the check without removing the whole grain/aliquot from the data set. The simpliest solution would be to add an argument
allowed_fails = 2
or an argumentignore_zero_dose = TRUE.
Theignore_zero_dose
argument could check forinfo$IRR_TIME == 0
.4. It would be cool to not get hundreds of plots back if
plot = TRUE
. A histogram or a result matrix (X = log(ratio), Y = grain no.) might be more convenient.Btw: I'm ok with it if you assign this change request to me :-).
Session info
The text was updated successfully, but these errors were encountered: