File tree Expand file tree Collapse file tree 4 files changed +6
-8
lines changed Expand file tree Collapse file tree 4 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 66import datajoint as dj
77import numpy as np
88import pandas as pd
9-
109from swc .aeon .analysis import utils as analysis_utils
10+
1111from aeon .dj_pipeline import acquisition , fetch_stream , get_schema_name
1212
1313schema = dj .schema (get_schema_name ("analysis" ))
Original file line number Diff line number Diff line change @@ -521,9 +521,8 @@ def associate_subject_and_experiment(subject_name):
521521 & "content LIKE 'experiment:%'" ).fetch (as_dict = True ):
522522 entry .pop ("comment_id" )
523523 entry ["experiment_name" ] = entry .pop ("content" ).replace ("experiment:" , "" ).strip ()
524- if acquisition .Experiment .proj () & entry :
525- if not acquisition .Experiment .Subject & entry :
526- new_entries .append (entry )
527- logger .info (f"\t New experiment subject: { entry } " )
524+ if (acquisition .Experiment .proj () & entry ) and (not acquisition .Experiment .Subject & entry ):
525+ new_entries .append (entry )
526+ logger .info (f"\t New experiment subject: { entry } " )
528527
529528 acquisition .Experiment .Subject .insert (new_entries )
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ class SLEAPTracking(dj.Imported):
122122 """
123123
124124 class PoseIdentity (dj .Part ):
125- definition = """
125+ definition = """
126126 -> master
127127 identity_idx: smallint
128128 ---
@@ -210,7 +210,7 @@ def make(self, key):
210210
211211 # get anchor part
212212 # ie the body_part with the prefix "anchor_" (there should only be one)
213- anchor_part = set ( part for part in pose_data .part .unique () if part .startswith ("anchor_" ))
213+ anchor_part = { part for part in pose_data .part .unique () if part .startswith ("anchor_" )}
214214 if len (anchor_part ) != 1 :
215215 raise ValueError (f"Anchor part not found or multiple anchor parts found: { anchor_part } " )
216216 anchor_part = anchor_part .pop ()
Original file line number Diff line number Diff line change @@ -149,7 +149,6 @@ def key_source(self):
149149 + Chunk(s) started after {device_type} install time & ended before {device_type} remove time
150150 + Chunk(s) started after {device_type} install time for {device_type} and not yet removed
151151 """
152-
153152 return (
154153 acquisition .Chunk * ExperimentDevice .join (ExperimentDevice .RemovalTime , left = True )
155154 & "chunk_start >= {device_type_name}_install_time"
You can’t perform that action at this time.
0 commit comments