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

Release 0.7.0 #94

Merged
merged 27 commits into from
Jan 27, 2022
Merged

Release 0.7.0 #94

merged 27 commits into from
Jan 27, 2022

Conversation

ianbrown9475
Copy link
Collaborator

No description provided.

jusjusjus
jusjusjus previously approved these changes Jan 24, 2022
Copy link
Member

@ephathaway ephathaway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple minor things, then should be good to go.

bin/mffdiff.py Outdated Show resolved Hide resolved
@@ -289,6 +289,19 @@ def _parse_calibration(self, cali):
}
return ans

@cached_property
def channels(self) -> List[Dict[str, Any]]:
"""returns list of good and bad channels"""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it is written now, it seems like this function only finds bad channels listed in the data info XML. Maybe rename this method to bad_channels? From the changelog, it looks like this is the intended funcitonality.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, just looking at the code, it seems like it would fetch all channels, not just bad ones. Can you explain?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

>>> import mffpy
>>> dinfo = mffpy.XML.from_file('examples/example_1.mff/info1.xml')
>>> dinfo.channels
[{'channels': [31, 47, 65, 79], 'exclusion': 'badChannels'}]

The way it is written, DataInfo.channels will parse the text in this channels tag, which looks something like this

<channels exclusion="badChannels">31 47 65 79</channels>

This is what the MFF API docs from EGI say about this tag:

This is a comma separated list of channels that have some "attribute" to take into account

  • exclusion
    • goodChannels
    • badChannels

That's not super descriptive, but in my experience, I have only ever seen bad channels listed in this tag. I am guessing Damian added this method to get the bad channels for showing in sourcerer? Can you comment @damian5710?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't seen the list being comma separated in my MFF examples. The property is called .channels b/c the XML tag is called <channels>....

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose the docstring is technically true, but to me it sounds like it's going to return a list of all channels. Maybe the docstring could just be

"""return contents of <channels> element"""

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't seen the list being comma separated in my MFF examples. The property is called .channels b/c the XML tag is called <channels>....

Yeah, I don't super trust those EGI docs. They're old.

@ianbrown9475 ianbrown9475 merged commit 28ccc3a into master Jan 27, 2022
@ianbrown9475 ianbrown9475 deleted the release-0.7.0 branch January 27, 2022 18:22
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 this pull request may close these issues.

5 participants