-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
4 changed files
with
55 additions
and
224 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
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 |
---|---|---|
@@ -1,220 +1,8 @@ | ||
groups: | ||
- neurodata_type_def: Indicator | ||
neurodata_type_inc: Device | ||
doc: Extends Device to hold metadata on the Indicator. | ||
- neurodata_type_def: TetrodeSeries | ||
neurodata_type_inc: ElectricalSeries | ||
doc: An extension of ElectricalSeries to include the tetrode ID for each time series. | ||
attributes: | ||
- name: label | ||
dtype: text | ||
doc: Indicator standard notation. | ||
- name: injection_location | ||
dtype: text | ||
doc: Injection brain region name. | ||
required: false | ||
- name: injection_coordinates_in_mm | ||
dtype: float | ||
shape: | ||
- 3 | ||
doc: Indicator injection location in stereotactic coordinates (AP, ML, DV) mm | ||
relative to Bregma. | ||
required: false | ||
- neurodata_type_def: OpticalFiber | ||
neurodata_type_inc: Device | ||
doc: Extends Device to hold metadata on the Optical Fiber. | ||
attributes: | ||
- name: model | ||
dtype: text | ||
doc: Model of optical fiber. | ||
required: false | ||
- name: numerical_aperture | ||
dtype: float | ||
doc: Numerical aperture, e.g., 0.39 NA. | ||
required: false | ||
- name: core_diameter_in_um | ||
dtype: float | ||
doc: Core diameter in micrometers. | ||
required: false | ||
- neurodata_type_def: ExcitationSource | ||
neurodata_type_inc: Device | ||
doc: Extends Device to hold metadata on the Excitation Source. | ||
attributes: | ||
- name: model | ||
dtype: text | ||
doc: Model of excitation source device. | ||
required: false | ||
- name: illumination_type | ||
dtype: text | ||
doc: 'Type of illumination. Suggested values: LED, LAser or more specifically | ||
Gas, Metal vapor, Solid state, Dye, Semiconductor, Free electron, etc.' | ||
- name: excitation_wavelength_in_nm | ||
dtype: float | ||
doc: Excitation wavelength of the stimulation light (nanometers). | ||
- name: peak_power_in_W | ||
dtype: float | ||
doc: Incident power of stimulation device (in Watts). | ||
required: false | ||
- name: peak_pulse_energy_in_J | ||
dtype: float | ||
doc: If device is pulsed light source, pulse energy (in Joules). | ||
required: false | ||
- name: intensity_in_W_per_m2 | ||
dtype: float | ||
doc: Intensity of the excitation in W/m^2, if known. | ||
required: false | ||
- name: pulse_rate_in_Hz | ||
dtype: float | ||
doc: If device is pulsed light source, pulse rate (in Hz) used for stimulation. | ||
required: false | ||
- name: exposure_time_in_s | ||
dtype: float | ||
doc: Exposure time of the sample (in sec). | ||
required: false | ||
- neurodata_type_def: Photodetector | ||
neurodata_type_inc: Device | ||
doc: Extends Device to hold metadata on the Photodetector. | ||
attributes: | ||
- name: model | ||
dtype: text | ||
doc: Model of photodetector device. | ||
required: false | ||
- name: detector_type | ||
dtype: text | ||
doc: 'Technology used to detect the light. Suggested values: CCD, Intensified | ||
CCD, Analog video, PMT, Photodiode, CMOS, EBCCD, FTIR.' | ||
- name: detected_wavelength_in_nm | ||
dtype: float | ||
doc: Wavelength detected by photodetector. | ||
- name: gain | ||
dtype: float | ||
doc: Gain on the photodetector. | ||
- neurodata_type_def: DichroicMirror | ||
neurodata_type_inc: Device | ||
doc: Extends Device to hold a Dichroic Mirror. | ||
attributes: | ||
- name: cut_on_wavelength_in_nm | ||
dtype: float | ||
doc: Wavelength at which the mirror starts to transmit light more than reflect. | ||
required: false | ||
- name: cut_off_wavelength_in_nm | ||
dtype: float | ||
doc: Wavelength at which transmission shifts back to reflection,for mirrors with | ||
complex transmission spectra. | ||
required: false | ||
- name: reflection_bandwidth_in_nm | ||
dtype: float | ||
shape: | ||
- 2 | ||
doc: The range of wavelengths that are primarily reflected.The start and end wavelengths | ||
needs to be specified. | ||
required: false | ||
- name: transmission_bandwidth_in_nm | ||
dtype: float | ||
shape: | ||
- 2 | ||
doc: The range of wavelengths that are primarily transmitted.The start and end | ||
wavelengths needs to be specified. | ||
required: false | ||
- name: angle_of_incidence_in_degrees | ||
dtype: float | ||
doc: Intended angle at which light strikes the mirror. | ||
required: false | ||
- name: model | ||
dtype: text | ||
doc: Model of the dichroic mirror. | ||
required: false | ||
- neurodata_type_def: BandOpticalFilter | ||
neurodata_type_inc: Device | ||
doc: Extends Device to hold a Band Optical Filter (Bandpass or Bandstop). | ||
attributes: | ||
- name: center_wavelength_in_nm | ||
dtype: float | ||
doc: The midpoint of the band of wavelengths that the filter transmits or blocks. | ||
- name: bandwidth_in_nm | ||
dtype: float | ||
doc: The width of the wavelength range that the filter transmits or blocks (full | ||
width at half maximum). | ||
- name: filter_type | ||
dtype: text | ||
doc: Type of filter (e.g., 'Bandpass', 'Bandstop'). | ||
- name: model | ||
dtype: text | ||
doc: Model of the optical filter. | ||
required: false | ||
- neurodata_type_def: EdgeOpticalFilter | ||
neurodata_type_inc: Device | ||
doc: Extends Device to hold an Edge Optical Filter (Longpass or Shortpass). | ||
attributes: | ||
- name: cut_wavelength_in_nm | ||
dtype: float | ||
doc: ' The wavelength at which the filter transmits half as much as its peak transmission.' | ||
- name: filter_type | ||
dtype: text | ||
doc: Type of filter (e.g., 'Longpass', 'Shortpass'). | ||
- name: slope_in_percent_cut_wavelength | ||
dtype: float | ||
doc: The steepness of the transition from high blocking to high transmission (or | ||
vice versa). Specified as a percentage of the cut wavelength. | ||
required: false | ||
- name: slope_starting_transmission_in_percent | ||
dtype: float | ||
doc: The percent transmission that defines the starting point for the slope (e.g. | ||
10%). | ||
required: false | ||
- name: slope_ending_transmission_in_percent | ||
dtype: float | ||
doc: The percent transmission that defines the ending point for the slope (e.g. | ||
80%). | ||
required: false | ||
- name: model | ||
dtype: text | ||
doc: Model of the optical filter. | ||
required: false | ||
- neurodata_type_def: ObjectiveLens | ||
neurodata_type_inc: Device | ||
doc: Extends Device to hold a Objective lens. | ||
attributes: | ||
- name: model | ||
dtype: text | ||
doc: Model of the objective lens. | ||
required: false | ||
- name: numerical_aperture | ||
dtype: float | ||
doc: Numerical aperture, e.g., 0.39 NA. | ||
required: false | ||
- name: magnification | ||
dtype: float | ||
doc: Lens magnification. | ||
required: false | ||
- neurodata_type_def: Effector | ||
neurodata_type_inc: Device | ||
doc: Extends Device to hold metadata on the Effector or Opsin. | ||
attributes: | ||
- name: label | ||
dtype: text | ||
doc: Effector standard notation. | ||
- name: injection_location | ||
dtype: text | ||
doc: Injection brain region name. | ||
required: false | ||
- name: injection_coordinates_in_mm | ||
dtype: float | ||
shape: | ||
- 3 | ||
doc: Indicator injection location in stereotactic coordinates (AP, ML, DV) mm | ||
relative to Bregma. | ||
required: false | ||
- neurodata_type_def: Miscroscope | ||
neurodata_type_inc: Device | ||
doc: Extends Device to hold a Miscroscope. | ||
attributes: | ||
- name: microscopy_type | ||
dtype: text | ||
doc: Type of microscope used to capture the image (e.g., inverted, upright, light | ||
sheet, confocal, two photon). | ||
- name: doi | ||
dtype: text | ||
doc: The publication link for custom-built microscope. | ||
required: false | ||
- name: model | ||
dtype: text | ||
doc: Model of the miscroscope. | ||
required: false | ||
- name: trode_id | ||
dtype: int32 | ||
doc: The tetrode ID. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# -*- coding: utf-8 -*- | ||
import os.path | ||
|
||
from pynwb.spec import NWBNamespaceBuilder, export_spec, NWBGroupSpec, NWBAttributeSpec | ||
|
||
# TODO: import other spec classes as needed | ||
# from pynwb.spec import NWBDatasetSpec, NWBLinkSpec, NWBDtypeSpec, NWBRefSpec | ||
|
||
|
||
def main(): | ||
# these arguments were auto-generated from your cookiecutter inputs | ||
ns_builder = NWBNamespaceBuilder( | ||
name="""ndx-ophys-devices""", | ||
version="""0.1.0""", | ||
doc="""This is an NWB extension for storing metadata of devices used in optical experimental setup (microscopy, fiber photometry, optogenetic stimulation etc.)""", | ||
author=[ | ||
"Alessandra Trapani", | ||
], | ||
contact=[ | ||
"[email protected]", | ||
], | ||
) | ||
ns_builder.include_namespace("core") | ||
|
||
# TODO: if your extension builds on another extension, include the namespace | ||
# of the other extension below | ||
# ns_builder.include_namespace("ndx-other-extension") | ||
|
||
# TODO: define your new data types | ||
# see https://pynwb.readthedocs.io/en/stable/tutorials/general/extensions.html | ||
# for more information | ||
tetrode_series = NWBGroupSpec( | ||
neurodata_type_def="TetrodeSeries", | ||
neurodata_type_inc="ElectricalSeries", | ||
doc="An extension of ElectricalSeries to include the tetrode ID for each time series.", | ||
attributes=[NWBAttributeSpec(name="trode_id", doc="The tetrode ID.", dtype="int32")], | ||
) | ||
|
||
# TODO: add all of your new data types to this list | ||
new_data_types = [tetrode_series] | ||
|
||
# export the spec to yaml files in the spec folder | ||
output_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "spec")) | ||
export_spec(ns_builder, new_data_types, output_dir) | ||
|
||
|
||
if __name__ == "__main__": | ||
# usage: python create_extension_spec.py | ||
main() |