Skip to content

Commit

Permalink
Fix for dumping hilltau files.
Browse files Browse the repository at this point in the history
  • Loading branch information
upibhalla committed May 23, 2024
1 parent 0d12508 commit 2d52767
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions findSim.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ def __str__( self ):
'''

def notTooSmall( x ):
return (abs( x ) > 1e-13 ) # We have to handle sub-picoamp currents.
return (abs( x ) > 1e-14 ) # We have to handle sub-picoamp currents.

def tooSmall( x ):
return (abs( x ) <= 1e-13 ) # We have to handle sub-picoamp currents.
return (abs( x ) <= 1e-14 ) # We have to handle sub-picoamp currents.

##########################################################################

Expand Down Expand Up @@ -356,7 +356,7 @@ def __init__( self, findsim, isPlotOnly = False ):

def plotCopy( self, entity, field):
ret = copy.copy( self )
ret.entities = [ entity ]
ret.entities = {"name": entity }
ret.field = field
if field == 'conc' or field == 'concInit':
if self.field in ['conc', 'concInit'] and not self.quantityUnits == 'ratio':
Expand Down Expand Up @@ -1036,9 +1036,9 @@ def putReadoutsInQ( q, readouts, pauseHsolve ):
startt = t + readouts.window["startt"] * readouts.timeScale
endt = t + readouts.window["endt"] * readouts.timeScale
dt = readouts.window["dt"] * readouts.timeScale
for t in np.arange( startt, endt + 1e-8, dt ):
# t *= readouts.timeScale ##already scaled by timeScale
heapq.heappush( q, Qentry(t, readouts, j) )
for tt in np.arange( startt, endt + 1e-8, dt ):
#tt *= readouts.timeScale ##already scaled by timeScale
heapq.heappush( q, Qentry(tt, readouts, j) )
else:
heapq.heappush( q, Qentry(t, readouts, j) )

Expand Down Expand Up @@ -1447,7 +1447,7 @@ def saveTweakedModel( origFname, dumpFname, mapFile, scaleParam ):
for i in scaleParam:
sp.extend( i )
localSW.deleteSimulation()
localSW.loadModelFile( origFname, silentDummyModify, sp, dumpFname, "")
localSW.loadModelFile( origFname, None, sp, dumpFname, "")
localSW.deleteSimulation()

def dummyModify( erSPlist, modelWarning ):
Expand Down

0 comments on commit 2d52767

Please sign in to comment.