Changeset 352

Show
Ignore:
Timestamp:
06/11/08 17:18:49 (5 months ago)
Author:
apdavison
Message:

Fixed a couple of bugs with neuron.SpikeSourcePoisson

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/0.4/src/common.py

    r342 r352  
    315315                                % (pname, cls.__name__, D['forward_transform'], parameters)) 
    316316            except ZeroDivisionError: 
    317                 pval = 1e300 # this is about the highest value hoc can deal with 
     317                pval = 1e30 # this is about the highest value hoc can deal with 
    318318            native_parameters[pname] = pval 
    319319        return native_parameters 
  • branches/0.4/src/hoc/standardCells.hoc

    r286 r352  
    271271        spiketimes.append(input_spiketimes) 
    272272      } 
     273    } else { 
     274      source.start = start 
     275      source.interval = interval 
     276      source.number = number 
    273277    } 
    274278  } 
  • branches/0.4/src/neuron/__init__.py

    r351 r352  
    111111    def set_native_parameters(self, parameters): 
    112112        cell = self._hoc_cell() 
     113        logging.debug("Setting %s in %s" % (parameters, cell)) 
    113114        for name, val in parameters.items(): 
    114115            if hasattr(val, '__len__'): 
     
    790791             p.set({'tau_m':20,'v_rest':-65}) 
    791792        """ 
     793 
    792794        if isinstance(param, str): 
    793795            if isinstance(val, (str, float, int)): 
     
    801803        else: 
    802804            raise common.InvalidParameterValueError 
     805        logging.debug("Setting %s in %s" % (param_dict, self.label)) 
    803806        for cell in self.gidlist: 
    804807            cell.set_parameters(**param_dict) 
  • branches/0.4/src/neuron/cells.py

    r277 r352  
    144144        ('start',    'start'), 
    145145        ('rate',     'interval',  "1000.0/rate",  "1000.0/interval"), 
    146         ('duration', 'number',    "rate/1000.0*duration", "number*interval"), # should there be a +/1 here? 
     146        ('duration', 'number',    "rate!=0 and rate/1000.0*duration or 1", "number*interval"), # should there be a +/1 here? 
    147147    ) 
    148148    # note that 'number' should really be an integer, but it is better to leave it as