Open JohannesWiesner opened 4 years ago
Thanks for flagging this. I think that documentation is outdated; get_events()
is no longer a supported method.
If you're just trying to follow a tutorial to learn the package, use this one. If you're trying to get the contents of an event file, the recommended pattern is to retrieve that file via layout.get()
(or, if you know the exact path, you can use layout.get_file()
, and then you can use get_df()
on the returned BIDSFile
to get the contents as a pandas DataFrame. See the examples in the above linked tutorial.
Will leave this open until we fix the docs.
yes, get_events() is from the official user guide: https://bids-standard.github.io/pybids/layout/index.html
See also issue #659, #676, #678, and #690.
The inheritance of JSON files also doesn't appear to work anymore. I think the issue is that pybids underwent a major redesign, which was good. However, the current documentation is somewhat unrelated to the actual package now and many things only work for fMRI studies. The implementation is sophisticated enough that it is pretty daunting to try propose a fix for any one thing.
It would really be nice if the layout
and the model
were updated for basic support.
This would make it possible for tool builders to use these. It would also be nice to have a
stable interface. There are real advantages to having everyone use the same underlying
representation of a BIDS dataset rather than having everyone build their own, thereby
losing potential for interoperability.
I'd be willing to work on the documentation at the layout/model levels and submit issues of things that might not be working, but I don't have enough global understanding of the implementation to contribute usefully to the code until things are further along.
Hi @VisLab,
Fixes to the docs would be great, thanks. At a glance, I think all of the issues you mention are strictly documentation issues, and don't require any changes to the code.
Regarding "many things only work for fMRI studies", this is unfortunately just the nature of community-driven open-source software. It goes without saying that we would all like there to be tools that work for all neuroimaging modalities in a unified way. Unfortunately, PyBIDS doesn't have any dedicated funding or development effort, and everyone who contributes to it also has many other things on their plate. Adding report generation and design matrix construction for other modalities isn't a trivial job, so it's unlikely to happen until and unless someone with a vested interest in seeing that kind of functionality added volunteers their time.
The inheritance of JSON files also doesn't appear to work anymore.
Can you say more about this? There are definitely some minor quirks in the handling of inheritance—it turns out to be fairly complicated to implement per the spec, plus the spec is ambiguous on some edge cases. But it shouldn't be the case that there were things that used to work and now don't. If you're referring to #692, this may well be a bug in the sense that the correct list of associations isn't returned, but the actual metadata inheritance seems to be working correctly, and I don't think anything has changed for the worse (note that get_associations()
didn't even exist until recently).
I completely understand about the time factor and the funding.... The main two things I'm concerned about are the layout.py and the models.py. I am not worried about the report generation and the design matrix.
In particular, I'm having trouble getting BIDSDataFile and BIDSImageFile to work for EEG studies. These are really the basic building blocks (along with BIDSJSONFile) for people who want to build BIDS apps or integrate their own libraries. I'll create a branch to start working on the documentation of the new layout (it will be next week) and make a first stab at starting to revise some of the basic documentation. My thought is that the first step in an introduction to pybids is to describe what entities are and what distinguishes them from suffixes.
I'll try to produce some test examples of things that don't work and maybe they will be easy for someone who knows the code to fix.
In particular, I'm having trouble getting BIDSDataFile and BIDSImageFile to work for EEG studies.
Can you open a separate issue describing the problem(s)? Thanks!
I followed the tutorial for pybids and just copy-pasted the code from the tutorial into a script:
However, I am getting the following error:
I am restricted to use Windows 10 on my machine, don't know if this might have something to do with the error?