Skip to content

Commit

Permalink
Merge branch 'rc/2.9.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsf committed Mar 8, 2021
2 parents aa413e8 + 755131d commit 9474baf
Show file tree
Hide file tree
Showing 47 changed files with 1,528 additions and 891 deletions.
112 changes: 0 additions & 112 deletions .circleci/config.yml

This file was deleted.

20 changes: 18 additions & 2 deletions .github/workflows/github-actions-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,28 @@ env:
MTRAIN_PASSWORD: password

jobs:
osx:
lint:
name: Lint
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
- name: flake8 linting
run: |
pip install flake8
export PATH="/home/runner/.local/bin:${PATH}"
git fetch origin master
# `|| true` to force exit code 0 even if no files found
CHANGED_PYFILES=$(git diff --name-only --diff-filter AM origin/master | grep .py || true)
echo "List of changed files:"
echo ${CHANGED_PYFILES}
flake8 ${CHANGED_PYFILES} --count
allensdk:
name: ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["macos-latest", "windows-latest"]
os: ["macos-latest", "windows-latest", "ubuntu-latest"]
python-version: ["3.6", "3.7"]
defaults:
run:
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Change Log
All notable changes to this project will be documented in this file.

## [2.8.0] = TBD
## [2.9.0] = 2021-03-08
- Updates to Session metadata; refactors implementation to use class rather than dict internally
- Fixes a bug that was preventing Allen Institute Windows users from accessing gratings images

## [2.8.0] = 2021-02-25
- Created lookup table to get monitor_delay for cases where calculation from data fails
- If sync timestamp file has more timestamps than eye tracking moving has frame, trim excess timestamps (up to 15)
- Session API returns both warped and unwarped stimulus images, and both are written to NWB
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

[![Join the chat at https://gitter.im/AllenInstitute/AllenSDK](https://badges.gitter.im/AllenInstitute/AllenSDK.svg)](https://gitter.im/AllenInstitute/AllenSDK?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Documentation Status](https://readthedocs.org/projects/allensdk/badge/?version=latest)](https://allensdk.readthedocs.io/en/latest/?badge=latest)
[![AllenInstitute](https://circleci.com/gh/AllenInstitute/AllenSDK.svg?style=svg)](https://app.circleci.com/pipelines/github/AllenInstitute/AllenSDK)
[![Actions Status](https://github.com/AllenInstitute/AllenSDK/workflows/ci/github-actions/badge.svg)](https://github.com/AllenInstitute/AllenSDK/actions)


Expand Down
2 changes: 1 addition & 1 deletion allensdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#
import logging

__version__ = '2.8.0'
__version__ = '2.9.0'


try:
Expand Down
18 changes: 14 additions & 4 deletions allensdk/brain_observatory/behavior/behavior_ophys_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,13 @@ def ophys_experiment_id(self) -> int:
"""
return self._ophys_experiment_id

@property
def ophys_session_id(self) -> int:
"""Unique identifier for this ophys session.
:rtype: int
"""
return self._ophys_session_id

@property
def max_projection(self) -> Image:
"""2D max projection image.
Expand Down Expand Up @@ -309,11 +316,14 @@ def eye_tracking(self) -> pd.DataFrame:
gaze location), with (0, 0) being the upper-left corner of the
eye-tracking image.
- The 'likely_blink' column is True for any row (frame) where the pupil
fit failed OR eye fit failed OR an outlier fit was identified on the pupil or eye fit.
- The pupil_area, cr_area, eye_area columns are set to NaN wherever 'likely_blink' == True.
- The pupil_area_raw, cr_area_raw, eye_area_raw columns contains all pupil fit values (including where 'likely_blink' == True).
fit failed OR eye fit failed OR an outlier fit was identified on the
pupil or eye fit.
- The pupil_area, cr_area, eye_area columns are set to NaN wherever
'likely_blink' == True.
- The pupil_area_raw, cr_area_raw, eye_area_raw columns contains all
pupil fit values (including where 'likely_blink' == True).
- All ellipse fits are derived from tracking points that were output by
a DeepLabCut model that was trained on hand-annotated data frome a
a DeepLabCut model that was trained on hand-annotated data from a
subset of imaging sessions on optical physiology rigs.
- Raw DeepLabCut tracking points are not publicly available.
Expand Down
15 changes: 11 additions & 4 deletions allensdk/brain_observatory/behavior/behavior_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
import numpy as np
import inspect

from allensdk.brain_observatory.behavior.stimulus_processing import \
StimulusTemplate
from allensdk.brain_observatory.behavior.metadata.behavior_metadata import \
BehaviorMetadata
from allensdk.core.lazy_property import LazyPropertyMixin
from allensdk.brain_observatory.behavior.session_apis.data_io import (
BehaviorLimsApi, BehaviorNwbApi)
from allensdk.brain_observatory.behavior.session_apis.abcs import BehaviorBase
from allensdk.brain_observatory.behavior.session_apis.abcs.\
session_base.behavior_base import BehaviorBase
from allensdk.brain_observatory.behavior.trials_processing import (
calculate_reward_rate)
from allensdk.brain_observatory.behavior.dprime import (
Expand Down Expand Up @@ -385,7 +386,13 @@ def metadata(self) -> Dict[str, Any]:
"""Return metadata about the session.
:rtype: dict
"""
return self._metadata
if isinstance(self._metadata, BehaviorMetadata):
metadata = self._metadata.to_dict()
else:
# NWB API returns as dict
metadata = self._metadata

return metadata

@metadata.setter
def metadata(self, value):
Expand Down
Empty file.
Loading

0 comments on commit 9474baf

Please sign in to comment.