Open lucaswittwer opened 3 years ago
This would be a nice feature indeed. Question is how to implement it. The current analysis pipeline demands that hierarchy children inherit all feature data from their parents.
Haven't looked into the implementation yet, adding a warning (with a hint how to get the emodulus into a child dataset) would be a good start I think.
Does the child "know" its parents? If so, triggering the computation in the parent would be a workaround.
The child knows its parent: https://github.com/ZELLMECHANIK-DRESDEN/dclab/blob/master/dclab/rtdc_dataset/fmt_hierarchy.py#L234-L235
We have to keep these things in mind:
I think the best solution for now would be to raise an exception if anyone tries to set CFG_ANALYSIS["calculation"]
keywords for a hierarchy child.
I just came across this problem again and it took me a while to figure out what I was doing wrong. So, it would be nice to get an exception when trying to perform the emodulus calculation for a hierachy child with the explanation that the emodulus can only be computed for the original dataset. Right now you get the exception KeyError: "Feature 'emodulus' does not exist in <RTDC_HDF5 ...
which is just frustrating.
I made the error message more verbose, but this issue should stay open.
Description: Calculating the auxilliary feature
emodulus
in a hierarchy child of a RTDCBase data set does not work:prints
False
Calculating the
emodulus
based on the data setds
works and is propagated to thedsf
data set too. I think it would be nice to trigger the calculation of such features in a hierarchy child too.