Skip to content

Commit

Permalink
Fixed a bug in the default settings that prevented the analysis from …
Browse files Browse the repository at this point in the history
…starting in some instances.
  • Loading branch information
abalijepalli committed May 30, 2017
1 parent 03561ea commit 4932336
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 12 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Change Log
++++++++++++++++++++++++++++++++++++++++++

**v1.3.4**

- Fixed a bug in the default settings that prevented the analysis from starting in some instances.

**v1.3.3**

- Added support for Chimera data files.
- Resolves issues #92 and #95.

**v1.3.2**

Expand Down
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ Report problems using our `issue tracker <https://github.com/usnistgov/mosaic/is
Change Log
=================================

**v1.3.4**

- Fixed a bug in the default settings that prevented the analysis from starting in some instances.

**v1.3.3**

- Added support for Chimera data files.
Expand Down
20 changes: 10 additions & 10 deletions mosaic/partition/eventSegment.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,14 @@ def _eventsegment(self):
the event by 'eventPad' points and hand off to the event processing algorithm.
"""
try:
skipflag = False
skipflag = False
while(1):
while (skipflag == True): #if we are in a clogged state or a very long event, skip data until we reach good baseline again
t=self.currData.popleft()
self.globalDataIndex+=1
if abs(t) >= self.meanOpenCurr:
skipflag = False
while (skipflag == True): #if we are in a clogged state or a very long event, skip data until we reach good baseline again
t=self.currData.popleft()
self.globalDataIndex+=1
if abs(t) >= self.meanOpenCurr:
skipflag = False

t=self.currData.popleft()
self.globalDataIndex+=1

Expand All @@ -180,8 +181,8 @@ def _eventsegment(self):
self.eventdat.append(t)
self.globalDataIndex+=1
if len(self.eventdat) > self.maxEventLength:
skipflag = True
break
skipflag = True
break

# end of event. Reset the flag
self.eventstart=False
Expand All @@ -200,8 +201,7 @@ def _eventsegment(self):
self.meanOpenCurr,
self.sdOpenCurr
)

#print self.trajDataObj.FsHz, self.windowOpenCurrentMean, self.sdOpenCurr, self.slopeOpenCurr
# print self.trajDataObj.FsHz, self.windowOpenCurrentMean, self.sdOpenCurr, self.slopeOpenCurr, len(self.eventdat)
if len(self.eventdat)>=self.minEventLength and len(self.eventdat)<self.maxEventLength:
self.eventcount+=1
# print "i=", self.eventcount
Expand Down
2 changes: 1 addition & 1 deletion mosaic/partition/metaEventPartition.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def PartitionEvents(self):
#print self.meanOpenCurr, self.minDrift, self.maxDrift, self.minDriftR, self.maxDriftR

# Process the data segment for events

if (self.meanOpenCurr > self.minBaseline and self.meanOpenCurr < self.maxBaseline) or self.minBaseline == -1.0 or self.maxBaseline == -1.0:
self._eventsegment()
else: #skip over bad data, no need to abort
Expand Down
5 changes: 4 additions & 1 deletion mosaic/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def getSettings(self, section):
"blockSizeSec" : "0.5",
"eventPad" : "50",
"minEventLength" : "5",
"maxEventLength" : "10000",
"eventThreshold" : "6.0",
"driftThreshold" : "999.0",
"maxDriftRate" : "999.0",
Expand All @@ -117,7 +118,9 @@ def getSettings(self, section):
"slopeOpenCurr" : "-1",
"writeEventTS" : "1",
"parallelProc" : "0",
"reserveNCPU" : "2"
"reserveNCPU" : "2",
"minBaseline" : "-1",
"maxBaseline" : "-1"
},
"adept2State" : {
"FitTol" : "1.e-7",
Expand Down

0 comments on commit 4932336

Please sign in to comment.