Skip to content

Commit

Permalink
change interval_type to pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelbray32 committed Dec 28, 2023
1 parent 9d49b1d commit e805b0f
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
- Position:
- Refactor input validation in DLC pipeline. #688
- DLC path handling from config, and normalize naming convention. #722
- IntervalList: Add secondary key `interval_type` #742
- IntervalList: Add secondary key `pipeline` #742

## [0.4.3] (November 7, 2023)

Expand Down
4 changes: 2 additions & 2 deletions notebooks/01_Insert_Data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2052,11 +2052,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"`IntervalList` has an additional secondary key `interval_type` which can describe the origin of the data.\n",
"`IntervalList` has an additional secondary key `pipeline` which can describe the origin of the data.\n",
"Because it is a _secondary_ key, it is not required to uniquely identify an entry. \n",
"Current values for this key from spyglass pipelines are:\n",
"\n",
"| interval_type | Source|\n",
"| pipeline | Source|\n",
"| --- | --- |\n",
"| position | sg.common.PositionSource |\n",
"| lfp_v0 | sg.common.LFP |\n",
Expand Down
4 changes: 2 additions & 2 deletions notebooks/py_scripts/01_Insert_Data.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,11 @@
- {"interval_list_name": "pos 2 valid times"}
).fetch("interval_list_name")

# `IntervalList` has an additional secondary key `interval_type` which can describe the origin of the data.
# `IntervalList` has an additional secondary key `pipeline` which can describe the origin of the data.
# Because it is a _secondary_ key, it is not required to uniquely identify an entry.
# Current values for this key from spyglass pipelines are:
#
# | interval_type | Source|
# | pipeline | Source|
# | --- | --- |
# | position | sg.common.PositionSource |
# | lfp_v0 | sg.common.LFP |
Expand Down
2 changes: 1 addition & 1 deletion src/spyglass/common/common_behav.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def insert_from_nwbfile(cls, nwb_file_name):
**sess_key,
**ind_key,
valid_times=epoch_list[0]["valid_times"],
interval_type="position",
pipeline="position",
)
)

Expand Down
4 changes: 2 additions & 2 deletions src/spyglass/common/common_ephys.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ def make(self, key):
"nwb_file_name": key["nwb_file_name"],
"interval_list_name": key["interval_list_name"],
"valid_times": lfp_valid_times,
"interval_type": "lfp_v0",
"pipeline": "lfp_v0",
},
replace=True,
)
Expand Down Expand Up @@ -839,7 +839,7 @@ def make(self, key):
"nwb_file_name": key["nwb_file_name"],
"interval_list_name": key["interval_list_name"],
"valid_times": lfp_band_valid_times,
"interval_type": "lfp_band",
"pipeline": "lfp_band",
}
)
else:
Expand Down
2 changes: 1 addition & 1 deletion src/spyglass/common/common_interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class IntervalList(SpyglassMixin, dj.Manual):
interval_list_name: varchar(170) # descriptive name of this interval list
---
valid_times: longblob # numpy array with start/end times for each interval
interval_type = "": varchar(100) # type of interval list (e.g. 'position', 'spikesorting_recording_v1')
pipeline = "": varchar(100) # type of interval list (e.g. 'position', 'spikesorting_recording_v1')
"""

# See #630, #664. Excessive key length.
Expand Down
2 changes: 1 addition & 1 deletion src/spyglass/lfp/analysis/v1/lfp_band.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def make(self, key):
"nwb_file_name": key["nwb_file_name"],
"interval_list_name": key["interval_list_name"],
"valid_times": lfp_band_valid_times,
"interval_type": "lfp band",
"pipeline": "lfp band",
}
)
else:
Expand Down
2 changes: 1 addition & 1 deletion src/spyglass/lfp/v1/lfp.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def make(self, key):
"nwb_file_name": key["nwb_file_name"],
"interval_list_name": key["interval_list_name"],
"valid_times": lfp_valid_times,
"interval_type": "lfp_v1",
"pipeline": "lfp_v1",
},
replace=True,
)
Expand Down
2 changes: 1 addition & 1 deletion src/spyglass/lfp/v1/lfp_artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def make(self, key):
"nwb_file_name": key["nwb_file_name"],
"interval_list_name": key["artifact_removed_interval_list_name"],
"valid_times": key["artifact_removed_valid_times"],
"interval_type": "lfp_artifact",
"pipeline": "lfp_artifact",
}

LFPArtifactRemovedIntervalList.insert1(key, replace=True)
Expand Down
2 changes: 1 addition & 1 deletion src/spyglass/spikesorting/spikesorting_artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def make(self, key):
"artifact_removed_interval_list_name"
]
tmp_key["valid_times"] = key["artifact_removed_valid_times"]
tmp_key["interval_type"] = "spikesorting_artifact_v0"
tmp_key["pipeline"] = "spikesorting_artifact_v0"
IntervalList.insert1(tmp_key, replace=True)

# insert into computed table
Expand Down
2 changes: 1 addition & 1 deletion src/spyglass/spikesorting/spikesorting_recording.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ def make(self, key):
"nwb_file_name": key["nwb_file_name"],
"interval_list_name": recording_name,
"valid_times": sort_interval_valid_times,
"interval_type": "spikesorting_recording_v0",
"pipeline": "spikesorting_recording_v0",
},
replace=True,
)
Expand Down
2 changes: 1 addition & 1 deletion src/spyglass/spikesorting/v1/artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def make(self, key):
).fetch1("nwb_file_name"),
interval_list_name=str(key["artifact_id"]),
valid_times=artifact_removed_valid_times,
interval_type="spikesorting_artifact_v1",
pipeline="spikesorting_artifact_v1",
),
skip_duplicates=True,
)
Expand Down
2 changes: 1 addition & 1 deletion src/spyglass/spikesorting/v1/recording.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def make(self, key):
),
"interval_list_name": key["recording_id"],
"valid_times": sort_interval_valid_times,
"interval_type": "spikesorting_recording_v1",
"pipeline": "spikesorting_recording_v1",
}
)
AnalysisNwbfile().add(
Expand Down

0 comments on commit e805b0f

Please sign in to comment.