Permalink
Commits on Aug 3, 2017
  1. python: s/openFile/open_file/

    keszybz committed Aug 3, 2017
    Apparently the camelCased name is gone from new pytables.
Commits on Jul 28, 2017
Commits on Jul 5, 2017
  1. Bump version to 3.2.3

    keszybz committed Jul 5, 2017
    This release adds a special constraint to treat any injection event as leap barrier for the whole
    voxel. This is a work-around for the case where injections into a given voxel influence events in
    the same voxel which are not directly dependent, but only dependent through an intermediary event.
Commits on Apr 25, 2017
  1. NextEventQueue: treat any injection event as leap barrier

    keszybz committed Apr 25, 2017
    Previous "fix" wasn't enough. In the test simulation, injection of Ca
    and leaping of CaBuf combined to create unwanted jumps. With this wider
    condition, the issue is avoided.
    
    Unfortunately in the test case, simulation time increases, 4 s → 7 s.
    But this is a special example, that only has three molecules and lots
    of stimulation events. If the slow down for "real" models proves to be
    significant, we can try to make the condition a bit narrower again, e.g.
    by limiting it to events which are dependent on another event dependent
    on the stimulation (dependency children and grandchildren).
Commits on Apr 5, 2017
  1. python: fix description in dependency graph

    keszybz committed Apr 5, 2017
    "Next" was dropped from the descriptions at some point, but the pattern was not adjusted
    here.
Commits on Apr 4, 2017
Commits on Mar 10, 2017
  1. python: fix output with --sum-regions

    keszybz committed Mar 10, 2017
    --sum-all was OK.
Commits on Jan 11, 2017
Commits on Dec 16, 2016
  1. StochDiff: do not print a traceback on xml parsing errors

    keszybz committed Dec 16, 2016
    We log a nicer error message, and there's no need to obscure
    it by printing a long traceback.
  2. xml: report xml loading errors the same as other errors

    keszybz committed Dec 16, 2016
    Our error handler was only called for validation errors, but not when
    loading the file failed. We got an ugly traceback, and no nice red error
    message:
    
    Exception in thread "main" java.lang.RuntimeException: org.xml.sax.SAXParseException; systemId: file:///mnt/meshugaas/home/zbyszek/neuro/stochastic-test-set/injection/newinjection-borked.xml; lineNumber: 12; columnNumber: 37; Error attempting to parse XML file (href='foobar.xml'). Reason: Content is not allowed in prolog.
            at neurord.model.SDRun.deserialize(SDRun.java:416)
            at neurord.model.SDRun.loadFromFile(SDRun.java:472)
            at neurord.StochDiff.main(StochDiff.java:165)
    Caused by: org.xml.sax.SAXParseException; systemId: file:///mnt/meshugaas/home/zbyszek/neuro/stochastic-test-set/injection/newinjection-borked.xml; lineNumber: 12; columnNumber: 37; Error attempting to parse XML file (href='foobar.xml'). Reason: Content is not allowed in prolog.
            at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1239)
            at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
            at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:357)
            at neurord.xml.ModelReader.unmarshall(ModelReader.java:264)
            at neurord.xml.ModelReader.unmarshall(ModelReader.java:287)
            at neurord.model.SDRun.deserialize(SDRun.java:414)
            ... 2 more
    
    A hacky fix is to catch this error type and call our handler:
    
    14:01:25.113 E n.x.ModelReader - /mnt/meshugaas/home/zbyszek/neuro/stochastic-test-set/injection/newinjection-borked.xml:12:37: /SDRun: Error attempting to parse XML file (href='foobar.xml'). Reason: Content is not allowed in prolog.
    Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unmarshalling failed
            at neurord.model.SDRun.deserialize(SDRun.java:416)
            at neurord.model.SDRun.loadFromFile(SDRun.java:472)
            at neurord.StochDiff.main(StochDiff.java:165)
    Caused by: java.lang.RuntimeException: Unmarshalling failed
            at neurord.xml.ModelReader.unmarshall(ModelReader.java:266)
            at neurord.xml.ModelReader.unmarshall(ModelReader.java:290)
            at neurord.model.SDRun.deserialize(SDRun.java:414)
            ... 2 more
  3. xml: properly detect unexpected character content

    keszybz committed Dec 16, 2016
    The code was written to detect and silence certain kind of errors
    (namespace-less elements), so it would store a parsing exception and
    only throw it later on, when called again with another parsing exception.
    This worked in some cases, but not for the case where one element
    had unexpected children. This is now detected properly:
    
    13:54:29.502 E n.x.ModelReader - /mnt/meshugaas/home/zbyszek/neuro/stochastic-test-set/injection/newinjection-borked.xml:10:42: : cvc-complex-type.2.3: Element 'StimulationSet' cannot have character [children], because the type's content type is element-only.
  4. NextEventQueue: do not crash if no events are defined

    keszybz committed Dec 16, 2016
    This is most likely an operator error, but we should handle it gracefully.
    
    12:18:56.255 E n.n.BaseCalc - neurord.numeric.grid.AdaptiveGridCalc@6c9f5c0: failed (seed=123)
    12:18:56.255 E n.SDCalc - Trial 0 failed!
     java.lang.ArrayIndexOutOfBoundsException: 0
            at neurord.numeric.grid.NextEventQueue$PriorityTree.first(NextEventQueue.java:142) ~[classes/:?]
            at neurord.numeric.grid.NextEventQueue.advance(NextEventQueue.java:1999) ~[classes/:?]
            at neurord.numeric.grid.AdaptiveGridCalc.advance(AdaptiveGridCalc.java:108) ~[classes/:?]
            at neurord.numeric.grid.GridCalc._run(GridCalc.java:151) ~[classes/:?]
            at neurord.numeric.BaseCalc.run(BaseCalc.java:121) ~[classes/:?]
            at neurord.SDCalc.run(SDCalc.java:87) [classes/:?]
            at neurord.StochDiff.main(StochDiff.java:184) [classes/:?]
    
    ↓
    
    12:26:26.944 W n.n.g.NextEventQueue - Event queue is empty — no diffusion, reaction, or stimulation events
  5. InitialConditions: do not crash if we have an empty <InitialCondition…

    keszybz committed Dec 16, 2016
    …s /> set
    
    12:14:19.658 E n.n.BaseCalc - neurord.numeric.grid.AdaptiveGridCalc@5123a21: failed (seed=123)
    12:14:19.659 E n.SDCalc - Trial 0 failed!
     java.lang.NullPointerException
            at neurord.model.InitialConditions.verify(InitialConditions.java:56) ~[classes/:?]
            at neurord.model.SDRun.getInitialConditions(SDRun.java:277) ~[classes/:?]
            at neurord.model.SDRun.getRegionConcentration(SDRun.java:360) ~[classes/:?]
            at neurord.numeric.grid.StochasticGridCalc.initPopulation(StochasticGridCalc.java:68) ~[classes/:?]
            at neurord.numeric.grid.StochasticGridCalc.init(StochasticGridCalc.java:56) ~[classes/:?]
            at neurord.numeric.grid.AdaptiveGridCalc.init(AdaptiveGridCalc.java:39) ~[classes/:?]
            at neurord.numeric.grid.GridCalc._run(GridCalc.java:85) ~[classes/:?]
            at neurord.numeric.BaseCalc.run(BaseCalc.java:121) ~[classes/:?]
            at neurord.SDCalc.run(SDCalc.java:87) [classes/:?]
            at neurord.StochDiff.main(StochDiff.java:184) [classes/:?]
Commits on Dec 13, 2016
  1. After loading the model, verify that regions and species are named co…

    keszybz committed Dec 13, 2016
    …rrectly
    
    10:36:36.295 E n.m.SurfaceDensitySet - SurfaceDensitySet has region "foobar", not in [default, dend]
    10:36:36.296 E n.n.BaseCalc - neurord.numeric.grid.SteppedStochasticGridCalc@5252584: failed (seed=123)
    10:36:36.296 E n.SDCalc - Trial 0 failed!
    etc.
Commits on Dec 9, 2016
  1. Bump version to 3.2.2

    keszybz committed Dec 9, 2016
Commits on Dec 6, 2016
  1. InitialConditions: restore per-species overriding of concentrations

    keszybz committed Dec 6, 2016
    When a ConcentrationSet is specified for a given region, it only overrides
    the species it specifes. Others should use the default ConcentrationSet.
    This was inadvertently changed in a77fd29.
    
    README is extended to clarify this, but also a bunch of obsolete statements
    is removed.
Commits on Nov 29, 2016
Commits on Nov 22, 2016
  1. Make tests compile

    keszybz committed Nov 22, 2016
  2. NextEventQueue: get rid of -Dneq.stepper

    keszybz committed Nov 22, 2016
    This should not be configurable.
  3. Use new code everywhere

    keszybz committed Nov 22, 2016
  4. Import Binomial and Poisson number generators from colt project

    keszybz committed Nov 22, 2016
    They are not used for anything yet, except that StepGenerator
    is extended to allow testing.
    
    Tests show that this code is about as fast as previous code
    (InterpolatingStepGenerator), while giving real binomial numbers
    and poisson numbers. Distributions match expected values nicely.
    
    numpy.random.binomial is still quite a bit faster. I'm not sure
    if this is because of a different algorithm, or because the native
    code runs faster. Comparing raw random number generation between
    our MersenneTwister and the MersenneTwister used by numpy shows that
    numpy is a bit more than twice as fast. This suggests that this
    really is a difference between native and non-native code, possibly
    in operations like log / exp.
Commits on Nov 21, 2016
  1. NextEventQueue: fix spelling of default neq.stepper argument

    keszybz committed Nov 21, 2016
    Long-term fix would probably be to make the parser case-insensitive.
  2. StepGenerator: style fix to make two functions similar

    keszybz committed Nov 21, 2016
    gaussianStep and possionStep do almost the same thing, they should
    look almost the same.