-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #101 from tyarkoni/various-improvements
Major improvements
- Loading branch information
Showing
29 changed files
with
516 additions
and
290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
*.pyc | ||
*.DS_Store | ||
*~ | ||
benchmarks/ | ||
build/ | ||
dist | ||
dist/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
cache_converters = False | ||
cache_filters = False | ||
cache_extractors = False | ||
log_transformations = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from pliers.stimuli.video import VideoStim, DerivedVideoStim | ||
from pliers.stimuli.image import ImageStim | ||
from pliers.stimuli.text import ComplexTextStim, TextStim | ||
from pliers.converters import Converter | ||
|
||
|
||
class StimCollectionIterator(Converter): | ||
|
||
def _convert(self, stim): | ||
for element in stim: | ||
yield element | ||
|
||
|
||
class VideoFrameIterator(StimCollectionIterator): | ||
|
||
_input_type = VideoStim | ||
_output_type = ImageStim | ||
|
||
|
||
class DerivedVideoFrameIterator(StimCollectionIterator): | ||
|
||
# TODO: use VideoFrameIterator for both VideoStim and DerivedVideoStim, | ||
# but this may require reworking _input_type to handle disjunction rather | ||
# than the current conjunction, or making the get_converter() code walk | ||
# up the hierarchy and use superclass iterators. | ||
|
||
_input_type = DerivedVideoStim | ||
_output_type = ImageStim | ||
|
||
|
||
class ComplexTextIterator(StimCollectionIterator): | ||
|
||
_input_type = ComplexTextStim | ||
_output_type = TextStim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.