Ticket #18 (assigned enhancement)

Opened 3 months ago

Last modified 2 months ago

Interrogation about load functions in signals.py

Reported by: pierre Assigned to: pierre (accepted)
Priority: major Milestone: 0.2
Component: signals Version: trunk
Keywords: Cc: davison@unic.cnrs-gif.fr

Description

While reformatting the signals.py file, I just would like to ask something about the load_spikelist, load_(vm/current/conductance)list. Is it really useful to keep the full syntax load(file, id_list, dt, t_start, t_stop, dimensions) ?

I mean, those file should have been generated in the compatible_output format of pyNN in order to be read. So the header should be there. Therefore id_list, dt, dimensions seems to be useless.... What do you think about it ? Does somebody use the full syntax of those functions ?

Change History

10/17/08 09:54:35 changed by apdavison

  • owner changed.
  • component changed from ALL to signals.

t_start and t_stop we should keep, with default values of None. This allows you to load only a part of a file.

id_list I would suggest keeping as well, but again giving it a default value of None:

  • it is not specified we get the data from the header.
  • if there is no header, we use id_list
  • if id_list is a subset of the ids in the header, we use id_list
  • if id_list and the header disagree, we raise an Exception

Reasons for keeping it: (i) we may not always be using files that have headers, (ii) this could be used to load only a subset of the data, (iii) it can be used to trap errors due to inconsistent ids.

We should lose dt for SpikeTrain and SpikeList, but keep it for AnalogSignal and its subclasses, since it is common to sample analog signals at a fixed interval.

dimensions we should lose (and remove all the code involving self.dimensions. It is only useful when generating activity maps, etc, in which case the activity_map() method should accept a mapping that defines how ids map to spatial coordinates.

10/17/08 09:56:15 changed by apdavison

  • cc set to davison@unic.cnrs-gif.fr.

10/17/08 10:03:56 changed by pierre

  • status changed from new to assigned.
  • owner set to pierre.

I'll see what I can do, but i'm not sure we should erase the dimensions attribute :-)

11/09/08 11:03:56 changed by pierre

  • milestone changed from 0.1 to 0.2.

Ok, I guess the current implementation of signals.py is good enough for 0.1. I kept the dimensions attribute, but discussions can be opened on the subject. dt has been removed for SpikeTrain