openNEVOpensan.nevfileforreading,returnsallfileinformationinaNEVstructure.WorkswithFileSpec2.1&2.2&2.3&3.0.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%UseOUTPUT=openNEV(fname,'noread','report','noparse','nowarning','nosave','nomat','uV','overwrite','direct').NOTE:Allinputargumentsareoptional.Inputargumentsmaybeinanyorder.fname:Nameofthefiletobeopened.Ifthefnameisomittedtheuserwillbepromptedtoselectafileusinganopenfileuserinterface.DEFAULT:WillopenOpenFileUI.'noread':Willnotreadthespikewaveformsifuserpassesthisargument.DEFAULT:willreadspikewaveform.'report':Willshowasummaryreportifuserpassesthisargument.DEFAULT:willnotshowreport.'parse':ThecodewillnotparsetheexperimentalparametersindigitalI/O.Seebelowforguidelinesonhowtoformatyourparameters.DEFAULT:willnotparsetheparameters.'nowarning':Thecodewillnotgiveawarningifthereisanerrorinparsing.DEFAULT:willgivewarningmessage.'nosave':ThecodewillnotsaveacopyoftheNEVstructureasaMATfile.BydefaultthecodewillsaveacopyinthesamefolderastheNEVfileforeasyfutureaccess.DEFAULT:willsavetheMATfile.'nomat':WillnotlookforaMATfile.ThisoptionwillforceopenNEVtoopenaNEVfileinsteadofanyavailableMATfiles.DEFAULT:willloadtheMATfileifavailable.'uV':WillreadthespikewaveformsinunitofuVinsteadofrawvalues.Notethatthisconversionmayleadtolossofinformation(e.g.15/4=4)sincethewaveformstypewillstayinint16.It's recommended to read raw spikewaveformsandthenperformtheconversionatalatertime.DEFAULT:willreadwaveforminformationinraw.'8bits':Indicatesthat8bitsonthedigitalIOportwasusedinsteadof16bits.DEFAULT:willassumesthat16bitsofdigitalIOwereused.'t:':IndicatsthetimewindowoftheNEVfiletoberead.Forexample,ift:issetto2(i.e.'t:0.6')thenonlythefirst2secondsofthefileistoberead.Ifsetto2-50(i.e.'t:2:50) then the time between 2 secondsand50secondswillberead.DEFAULT:theentirefilewillbereadif't:xx:xx'isnotpassedtothefunction.'overwrite':IfMATLABloadsaNEVfileusing'nomat'andaMATfilealreadyexists,bydefaultitwillprompttheusertoallowforoverwritingtheoldMAT.Passingthe'overwrite'flagwillautomaticallyoverwritethenewlyopenedNEVfileonttheoldMATfile.DEFAULT:willasktheuserwhethertooverwritetheoldMAT.'direct':UsethisifyouareusingaCerePlexDirectsystemwithoutthetypicalstrobemode.Thiswilltreatthe16thbitofthedigitalinputasastrobesignalandreporttheremaining15bitsasthedigitalinputvalue.OUTPUT:ContainstheNEVstructure.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%USAGEEXAMPLE:openNEV('report','read');Intheexampleabove,thefiledialoguewillpromptforafile.Areportofthefilecontentswillbeshown.Thedigitaldatawillnotbeparsed.Thedataneedstobeintheproperformat(referbelow).ThespikewaveformsareinrawunitsandnotinuV.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%DIGITALPARAMETERS/MARKERSFORMAT:Inorderforthisfunctiontoparseyourexperimentalparameterstheyneedtobeinthefollowingformat:*ParamLabel:Parameter1=value1;Parameter2=value2;Parameter3=value3;#TWOEXAMPLES:*ExpParameter:Intensity=1.02;Duration=400;Trials=1;PageSegment=14;#*Stimulation:StimCount=5;Duration=10;#Inthefirstexample,theparameterisoftype"ExpParameter".Theparametersare,"Intensity, Duration, Trials, and PageSement."Thevaluesofthoseparametersare,"1.02, 400, 1, and 14,"respectively.Thesecondexampleisoftype"Stimulation".Thenameoftheparametersare"StimCount"and"Duration"andthevaluesare"5"and"10"respectively.-----------------------------------------------------------------------Itcanalsoreadsinglevaluemarkersthatfollowthefollowingformat.*MarkerName=Value;#EXAMPLES:*WaitSeconds=10;# OR *JuiceStatus=ON;#Theabovelineisa"Marker".Themarkervalueis10inthefirstandit's ON in the second example.-----------------------------------------------------------------------Moreover,themarkercouldbeasinglevalue:*MarkerValue#EXAMPLES:*JuiceOff# OR *HandsOnSwitches#-----------------------------------------------------------------------Thelabel,parametername,andvaluesareflexibleandcanbeanything.Theonlyrequiredformattingisthattheuserneedstohavealabelfollowedbyacolon':',followedbyafieldname'MarkerVal',followedbyanequalsign'=',followedbytheparametervalue'10',andendwithasemi-colon';'.NOTE:Everylinerequiresapound-sign'#'attheveryend.Everylinerequiresastarsign'*'attheverybeginning.IfyouuseLabVIEWSendtoCerebus.vibyKianTorabthenthereisnoneedfora'*'inthebeginning.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%KianTorabsupport@blackrockmicro.comBlackrockMicrosystems%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%VersionHistory4.4.0.0:-MajorperformanceboostinreadingNEVfileswhentrackingdataisstoredinthefile.4.4.0.2:-Updateddocumentation.4.4.0.3:5January2014-FixedthewayDayOfWeekisreadinMetaTags.-Fixed'noread'argument,sowhenpassed,openNEVwillnotreadthespikewaveforms.4.4.1.0:25January2014-Fixedabugthatresultedfrompassing'read'toopenNEV.4.4.2.0:28February2014-Fixedbugrelatedtoloadingdatawitht:XX:XXargument.4.4.3.0:12June2014-Fixedatypointhehelp.4.4.3.1:13June2014-Updatedtheversionnumbersinthehelpandinthefunctionitself.5.0.0.0:02December2014-FixedabugwhereApplicationnamewasn't being read properly.-Warningsnowdon't show up in more places when "nowarning" is used.-AddedfieldFileExttoMetaTags.-Added512synchronizedreadingcapability.-FixedthedateinNSx.MetaTags.DateTime.5.1.0.0:28March2015-AddedtheabilitytoreadfromnetworkeddrivesinWindows.-FixedtheDateTimevariableinMetaTags.-FixedthedateinNSx.MetaTags.DateTime(again).-Fixedabugrelatedto>512-chdataloading.5.1.1.0:1April2015-FixedabugwithNeuroMotivewhenspikewindowischangedfromtheoriginallength.5.1.2.0:June302015-Fixedabugregardingthenumberofpackageswhen'no read'isused.5.1.3.0:July102015-FixedabugwithNeuroMotivedatareadingwhenbothobjectsandmarkerswerebeingrecorded.5.2.0.0:June112016-AddedsupportforCerePlexDirectstrobemodeondigitalinput.-FixedabugwithreadingNeuroMotivedatathatresultedinacrash.5.3.0.0:June132016-FixedabugwithreadingNeuroMotivedatathatresultedinacrash.-ImprovedandmoredetailedparsingofNeuroMotiveevents.-Addedparsingofcommentstarttimeandcommentcommitttime(timethatacommentisentered.5.3.1.0:September1,2017-Fixedabugwithfilepathandwhentthiswaspassedtothefunction.5.4.0.0:September13,2017-Checkstoseeifthere's a newer version of NPMK is available.-Properlyreadsthecommentcolors.5.4.0.1:January10,2018-FixedaNeuroMotivebugwhenAllMarkerswasbeingrecorded.5.4.1.0:April25,2018-Nowallcommentsopeninorder.-FixedabugwithpathoffileifbothNEVandMATweremovedtoanewlocation.6.0.0.0:January27,2020-Addedsupportfor64-bittimestampsinNEVandNSx.-RemoveddependencyonMATLABR2016bbyremovingfunction'contains'.6.1.0.0:April16,2020-Somebugfixes.(DavidKluger)6.2.0.0:April29,2020-Addedabilitytoreadalltypesofrecordingeventtypes.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%