Skip to content
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

Add new metadata key and functions for "baseline offset" #107

Closed
maxschloegel opened this issue Mar 17, 2021 · 3 comments · Fixed by #108
Closed

Add new metadata key and functions for "baseline offset" #107

maxschloegel opened this issue Mar 17, 2021 · 3 comments · Fixed by #108
Assignees

Comments

@maxschloegel
Copy link
Contributor

This issue is a prerequisite for ZELLMECHANIK-DRESDEN/DCKit#11.
As described there, we want to be able to compute possible baseline offsets for all fluorescence traces. This in turn can be used to correct fl?_max values.
This prerequisite includes:

  • Add metadata-keys for "baseline ? offset"
  • Add ancillary functions to compute baseline offset for given traces
@maxschloegel maxschloegel changed the title Add new metadata key and functions for "baseline ? offset" Add new metadata key and functions for "baseline offset" Mar 17, 2021
@maxschloegel maxschloegel self-assigned this Mar 17, 2021
@paulmueller
Copy link
Member

In which submodule should we put the function to determine the baseline offset? Initially I thought this should be in DCKit, but it might be useful to have this well-documented in dclab.

@maxschloegel
Copy link
Contributor Author

maxschloegel commented Mar 17, 2021

I am not sure either. I first thought I would put compute_offset() into rtdc_dataset/ancillaries/af_basic.py, and adjust the fl?_max-values directly in DCKit.
On the other hand: I was playing around on how to get the minimum trace-value. Since the trace-values are roughly an array of size [100000, 1000], we thought about using only the traces of the 100 lowest peaks to cut down the computation time. But when I was applying this to a dataset, the lowest trace value was not in those 100 traces, not even the traces with 1000 lowest peaks. Above 1000 lowest peak samples the computation time and rearranging of the indices etc. gets quite long by itself. So I timed the computation of np.minon an array of above mentioned size with a similar value range as the actual traces and the mean computation time is about 0.1 seconds. Is that feasible? To get back to the question, where to put the function: If this is feasible and we simply usenp.min` on the traces, then maybe implementing an actual function is unnecessary.

@paulmueller
Copy link
Member

paulmueller commented Mar 17, 2021

I think such a function does not really belong with ancillaries. This qualifies more for a repair or fix submodule. 0.1 seconds is really fine though from the user's perspective. So I would just go with np.min then.

Implement the "heavy-lifting" logic in DC-analysis/DCKit#11 and just add the new configuration values in dclab.definitions to close this issue here.

paulmueller pushed a commit that referenced this issue Mar 18, 2021
These new metadata keys will enable the computation of baseline
offsets of the fluorescence channel traces. Fixes #107.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants