-
Notifications
You must be signed in to change notification settings - Fork 85
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
Change manifold to pixel_origin and pixel_deltas #576
Conversation
I'm not sure how to fix the last failing test: ======================================================================
FAIL: test_write_cache_spec (test_io.TestHDF5Writer) (neurodata_type='ImagingPlane', test='cached spec preserved original spec')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/bendichter/dev/pynwb/tests/integration/test_io.py", line 119, in test_write_cache_spec
self.assertDictEqual(original_spec, cached_spec)
AssertionError: {'att[16 chars]pe': 'text', 'doc': "Value is 'Metadata about [2313 chars]ces'} != {'att[16 chars]pe': u'text', 'doc': u"Value is 'Metadata abou[2366 chars]ces'}
Diff is 8705 characters long. Set self.maxDiff to None to see it. |
Codecov Report
@@ Coverage Diff @@
## dev #576 +/- ##
==========================================
- Coverage 76.83% 76.77% -0.06%
==========================================
Files 59 59
Lines 6354 6334 -20
Branches 1257 1253 -4
==========================================
- Hits 4882 4863 -19
+ Misses 1138 1137 -1
Partials 334 334
Continue to review full report at Codecov.
|
@bendichter just to confirm, this is just a different way of representing the same data, correct? |
well, not exactly. The previous way would allow you to have irregular sampling. This enforces that you must have uniform grids. The irregular sampling will be useful for random sampling techniques, but from what I understand they'll need an extension anyway. The majority of labs use a uniform grid, so this is a much more straightforward and compact way of representing space. |
To me this seems analogous to |
I agree with Ben's last comment here -- allow both methods to work, especially now that we do not want to break backwards compatibility with 2.0. |
Using This is different from timestamps (below) where, to be consistent, I would have created a group called For reference, the schema for - name: starting_time
dtype: float64
doc: 'The timestamp of the first sample. COMMENT: When timestamps are uniformly
spaced, the timestamp of the first sample can be specified and all subsequent
ones calculated from the sampling rate.'
attributes:
- name: rate
dtype: float32
doc: 'Sampling rate, in Hz COMMENT: Rate information is stored in Hz'
- name: unit
dtype: text
doc: Value is 'Seconds'
value: Seconds
quantity: '?'
- name: timestamps
dtype: float64
doc: 'Timestamps for samples stored in data.COMMENT: Timestamps here have all
been corrected to the common experiment master-clock. Time is stored as seconds
and all timestamps are relative to experiment start time.'
attributes:
- name: interval
dtype: int32
doc: Value is '1'
value: 1
- name: unit
dtype: text
doc: Value is 'Seconds'
value: Seconds
dims:
- num_times
quantity: '?'
shape:
- null |
I agree about the need for a unit. Let's discuss the options for how to include this information. Making a group seems like it may be more complicated than necessary |
@bendichter @rly What's the status of this? Tomorrow marks this PR's first birthday, and there hasn't been activity for six weeks. From my end, this seems reasonable and something that should be included. @bendichter do you want this to automatically close #554? If so, "addresses" needs to be changed to something from this list |
The status is this racked up merge conflicts but it is still definitely something I want to push through |
I use "addresses" when it's a partial fix and shouldn't close the issue |
I will resolve the conflicts, set units to be fixed to meters, and make |
Sounds good |
Yeah, sounds good |
Motivation
The
manifold
datatype ofImagingPlane
is confusing and inefficient. It is being replaced withpixel_origin
andpixel_deltas
which specify where the pixels of the image are in space. This assumes a grid layout of the pixels. Non-grids will require an extension.addresses #554
How to test the behavior?
Checklist
flake8
from the source directory.#XXX
notation whereXXX
is the issue number ?