write DA, stimulus presentation and stimulus template accordingly //. setting chunkedLayout to zero makes writing faster but increases the final filesize IPNWB#WriteSingleChannel(fileID, "/acquisition/timeseries", version, params, tsp) IPNWB#AddProperty(tsp, "capacitance_slow", 1.0) ![]() all values not added are written into the missing_fields dataset IPNWB#AddProperty(tsp, "capacitance_fast", 1.0) IPNWB#InitTimeSeriesProperties(tsp, params.channelType, params.clampMode) IPNWB#AddDevice(fileID, "Device name", version, "My hardware specs") Params.startingTime -= ti.session_start_time // relative to the start of the session // we want the timestamp of the beginning of the measurement params.startingTime -= IndexToScale(AD, DimSize(AD, 0) - 1, 0) calculate the timepoint of the first wave point relative to the session_start_time // last time the wave was modified (UTC) params.startingTime = NumberByKeY( "MODTIME", WaveInfo(AD, 0)) - date2secs(-1, -1, -1) IPNWB#AddElectrode(fileID, params.electrodeName, version, contents, device) ![]() Sprintf contents, "Electrode %d", params.ElectrodeNumber Params.electrodeName = "Nose of the mouse" params.stimset = "My fancy sine curve" params.channelType = 0 // IPNWBChannelTypes WAVE params.data = ADĭevice = "My selfbuilt DAC" IPNWB#CreateIntraCellularEphys(fileID) vice = "My Hardware" params.clampMode = 0 // 0 for V_CLAMP_MODE, 1 for I_CLAMP_MODE params.channelSuffix = "" params.sweep = 123 SetScale/P x, 0, 5e-6, "s" // write AD data to the file STRUCT IPNWB#WriteChannelParams params If you open an existing NWB file to append to, use the following command // to add an modification time entry, is implicitly called in IPNWB#CreateCommonGroups // IPNWB#AddModificationTimeEntry(locationID) // 1D waves from your measurement program // we use fake data here Make/FREE/N=1000 AD = ( sin(p) + cos(p/10)) * enoise(0.1) IPNWB#CreateCommonGroups(fileID, toplevelInfo=ti, generalInfo=gi, subjectInfo=si) takes care of initializing IPNWB#InitToplevelInfo(ti, version) Open a dialog for selecting an HDF5 file name HDF5CreateFile fileID as "" // fill gi/ti/si with appropriate data for your lab and experiment // if you don't care about that info just pass the initialized structures STRUCT IPNWB#GeneralInfo gi ![]() #include "IPNWB_include" Function NWBWriterExample() multi-line definition appeared in IgorMan.#pragma TextEncoding = "UTF-8" #define IPNWB_DEFINE_IM It is recommended to declare functions in a single line. While Igor Pro allows function declarations which span several lines, this extension can not colorize them properly, owing to the limitation of the syntax highlithing grammer of VS Code. See Language Configuration Guide / Indentation Rules. They are due to the limitation of the indentation adjustment feature of VS Code. While Igor Pro procedure is case-insensitive, the indentation adjustment feature of VS Code works based on a case-insensitive pattern matching.Īlso, it does not work perfectly on switch and strswitch flow controls. Restricted Behaviors of Indentation Adjustment Known Issues Code Helps not completeĬode hinting database currently lacks descriptive messages of most symbols (See Issue #1).Ĭontribution to the point is very welcome.
0 Comments
Leave a Reply. |