-
Notifications
You must be signed in to change notification settings - Fork 23
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
Preserve order of recording extractor custom properties in add_electrodes()
#792
Comments
add_electrodes()
add_electrodes()
Why should we keep the order? |
@h-mayorquin Because it doesn't look as good as it could in Neurosift In Szonja's example of : (BTW @weiglszonja I'd expand the |
If that's the case maybe an easier solution is to have a predetermined order for the special ones (like location) and then write the rest of them with natsort. I Just thinking that bounding ourselves to followg spikeinterface order will bring us problems. Plus, it is even more problematic when you consider more than one recording object. |
@h-mayorquin See discussion on related PR for proposed approach: #793 |
I'm following the lab's notation here,
Yes, I'm not sure how to solve that one in #793 yet... |
In principle the approach outlined in #793 (comment) should handle it because the metadata columns are already global across interfaces |
My first intuition is that the complexity is not worth the effort. For producing better looking output I think a hard-coded rule for some properties and then sorting the rest should ease most of the ugliness. I am strongly against:
|
Did you read the PR conversation? Using the already existing This is also a feature that could play a role in the GUIDE, which allows even easier customization of electrode table content than we've ever had |
Yes, I did, I had this proposal in mind:
The complexity added would be the modifcation to make the rest of the function to actually work with that. Then documenting and testing the different scenarios (multiple recordings, recordings that match only in some channels, etc) and the error handling. You already mentioned that all the properties should be there. Probably our difference here is that I Just don't see much value on ordering columns. The example you gave seems like a minor aesthethical thing that can be fixed with two lines (one for defining the order of the special properties) and one for sorting the rest. What would further customization be used for? |
This can be documented with a single line statement: "The order of entries in the More tests is a good thing, might even catch other issues with tangentially related things Which is why this feature wasn't in the code base before now, but is requested now, so we're adding it now |
I think it would be more fruitful if we had some concrete use cases on mind. The example that you mentioned above would be work with natsort. I am coming from the prior that determining the order of columns is something that does not add too much. But if the code, tests and documentations are that simple I guess the implementation PR should showcase it. How would you grant configurability to other tables? Units for example? Just to be clear, is @weiglszonja use case the same as yours? To make the electrode_table look better? |
I noticed the order of properties that are being added to the
Electrodes
table is not in the same order as in the recording_extractor._properties, for instance:The order of properties to add to the Electrodes table is changed at this line:
neuroconv/src/neuroconv/tools/spikeinterface/spikeinterface.py
Line 322 in fa6edd5
which does not preserve the order of the elements:
I think we should preserve the order of properties to be the same the
recording_extractor._properties
.Opened #793 as draft to discuss
The text was updated successfully, but these errors were encountered: