Replies: 1 comment 1 reply
-
Sounds like you want to create a master-part relationship. Where the master, @schema
class Unit(dj.Imported):
# ElectrodeGroup is computed location + id (shank number)
definition = """
-> ElectrodeGroup
unit: smallint
---
unit_uid: int # unique across sessions/animals
-> UnitQualityType
unit_channel = null: float # channel on the electrode for which the unit has the largest amplitude
"""
class Position(dj.Part):
definition = """
# Estimated unit position in the brain
-> master
---
-> lab.Hemisphere
-> lab.BrainArea
-> lab.SkullReference
unit_ml_location= null: decimal(8,3) # um from ref; right is positive; based on manipulator coordinates (or histology) & probe config
unit_ap_location= null: decimal(8,3) # um from ref; anterior is positive; based on manipulator coordinates (or histology) & probe config
unit_dv_location= null: decimal(8,3) # um from dura; ventral is positive; based on manipulator coordinates (or histology) & probe config
""" |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
As part of my schema definitions, I have nested tables defined as such:
and then I want to insert to this Unit table info, e.g:
schema_module.Unit.insert(df_unit, skip_duplicates=True, allow_direct_insert=True)
where schema_module is the schema virtualModule, df_unit includes the Unit parameters.
How can I insert to the nested table Unit position? assuming I have another df for it, as far as I see I don't have access to this table (list_tables doesn't include it, I cant use Unit.UnitPosition nor schema_module.UnitPosition)
Thanks!
Update: I understand now that nested table can't be dj.Imported, so follow up question is assuming UnitPosition is defined as dj.Part, what is the proper way to insert to Unit the data?
Beta Was this translation helpful? Give feedback.
All reactions