-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
587 additions
and
9 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 |
---|---|---|
|
@@ -35,7 +35,7 @@ | |
# | ||
import logging | ||
|
||
__version__ = '2.13.2' | ||
__version__ = '2.13.3' | ||
|
||
|
||
try: | ||
|
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
29 changes: 29 additions & 0 deletions
29
allensdk/brain_observatory/multi_stimulus_running_speed/README.md
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,29 @@ | ||
Extract running speed | ||
===================== | ||
Calculates an average running speed for the subject on each stimulus frame. | ||
|
||
|
||
Running | ||
------- | ||
``` | ||
python -m allensdk.brain_observatory.multi_stimulus_running_speed --input_json <path to input json> --output_json <path to output json> | ||
``` | ||
See the schema file for detailed information about input json contents. | ||
|
||
|
||
Input data | ||
---------- | ||
- Mapping stimulus pickle : Contains information about the mapping stimuli that were | ||
presented in this experiment. | ||
- Behavior stimulus pickle : Contains information about the behavior stimuli that were | ||
presented in this experiment. | ||
- Replay stimulus pickle : Contains information about the replay stimuli that were | ||
presented in this experiment. | ||
- Sync h5 : Contains information about the times at which each frame was presented. | ||
|
||
|
||
Output data | ||
----------- | ||
- Running speeds h5 : Contains two tables. These are: | ||
- running_speed : rows are intervals. Columns list frame times, frame indexes, mean velocities, and the net rotations from which those velocities are calculated. Known artifacts are removed, but the data are otherwise unfiltered. | ||
- raw_data : rows are samples. Columns list acquisition times, signal and supply voltages, and net rotations since the last timestamp. |
Empty file.
8 changes: 8 additions & 0 deletions
8
allensdk/brain_observatory/multi_stimulus_running_speed/__main__.py
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,8 @@ | ||
from allensdk.brain_observatory.\ | ||
multi_stimulus_running_speed.multi_stimulus_running_speed import ( | ||
MultiStimulusRunningSpeed | ||
) | ||
|
||
if __name__ == "__main__": | ||
multi_stimulus_running_speed = MultiStimulusRunningSpeed() | ||
multi_stimulus_running_speed.process() |
60 changes: 60 additions & 0 deletions
60
allensdk/brain_observatory/multi_stimulus_running_speed/_schemas.py
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,60 @@ | ||
import argschema | ||
from argschema.fields import Nested | ||
|
||
|
||
class MultiStimulusRunningSpeedInputParameters(argschema.ArgSchema): | ||
output_path = argschema.fields.OutputFile( | ||
required=True, | ||
description="The location to write the output file" | ||
) | ||
|
||
mapping_pkl_path = argschema.fields.InputFile( | ||
required=True, | ||
help="path to pkl file containing raw stimulus information", | ||
) | ||
behavior_pkl_path = argschema.fields.InputFile( | ||
required=True, | ||
help="path to pkl file containing raw stimulus information", | ||
) | ||
replay_pkl_path = argschema.fields.InputFile( | ||
required=True, | ||
help="path to pkl file containing raw stimulus information", | ||
) | ||
sync_h5_path = argschema.fields.InputFile( | ||
required=True, | ||
help="path to h5 file containing synchronization information", | ||
) | ||
|
||
use_lowpass_filter = argschema.fields.Bool( | ||
required=True, | ||
default=True, | ||
description=( | ||
"apply a low pass filter to the running speed results" | ||
) | ||
) | ||
|
||
zscore_threshold = argschema.fields.Float( | ||
required=True, | ||
default=10.0, | ||
description=( | ||
"The threshold to use for removing outlier " | ||
"running speeds which might be noise and not true signal" | ||
) | ||
) | ||
|
||
|
||
class MultiStimulusRunningSpeedOutputSchema(argschema.schemas.DefaultSchema): | ||
input_parameters = Nested( | ||
MultiStimulusRunningSpeedInputParameters, | ||
description=("Input parameters the module was run with"), | ||
required=True, | ||
) | ||
|
||
|
||
class MultiStimulusRunningSpeedOutputParameters( | ||
MultiStimulusRunningSpeedOutputSchema | ||
): | ||
output_path = argschema.fields.OutputFile( | ||
required=True, | ||
help="Filtered running speed hdf5 output file." | ||
) |
Oops, something went wrong.