Menu

Keeping Track of Data During Simulation

Help
Kesh Rao
2012-06-16
2012-12-12
  • Kesh Rao

    Kesh Rao - 2012-06-16

    Hi all,
        Hope things find you well. We've had some radio silence for a while because we've been occupied with peripheral aspects of the project. But now we're back on track and will be with topographica for a while now. I have a two part question, both regarding keeping track of information during a long simulation.

    1) We're using ShiftingGeneratorSheets to model a saccading eye. To keep track of eye position, we initially planned on just creating a list of values and just doing something like EPold = EPnew + saccade_vector. But I see that one of the ports on the ShifitngGeneratorSheet is "Position". I was looking into accessing the position by topo.sim.bounds.aarect().centroid() or by creating a InMemoryRecorder and linking the "Position" port to the recorder. Do you have a recommendation on which way to do? I was having some trouble using the recorder to get the position at all points in time in that I only saw data for a few points in time.

    2) There are several variables we want to keep track of during the simulation and some of them cannot be connected to the recorder. For instance, we want to perform some computation at every time step and use knowledge of activity and location to generate values. What is the best way to organize this type of computations we want to do? I thought about doing some scheduling using schedule_command but then I'd have to schedule a command for all time. Is there a more efficient way of performing custom calculations and storing variables and lists?

    Thank you very much for your help!

     
  • James A. Bednar

    James A. Bednar - 2012-06-17

    Question 1 is all about things added by Jeff (ShiftingGeneratorSheet and InMemoryRecorder), so there's not much we can say about that - I've never looked at those classes.

    Question 2 I'm not sure of.  It sounds like something I'd use a custom TransferFn for, attached to the output_fn of a Sheet or Projection as appropriate.  But not all the data you need might be available there, so I'm not sure.  Doing a schedule_command for this doesn't *sound* appropriate…

     
  • Kesh Rao

    Kesh Rao - 2012-06-26

    Thanks for your help Jim. I tried using a TransferFn attached to the output_fn of a sheet as well as a projection but that output_fn is only called when that sheet/projection is activated. I would like that custom function to be called after each run step during the simulation regardless of what that specific sheet/projection is doing. I put it in as a scheduled command for now and it works great. It may not be the absolute best way of doing it but as I experiment with things, the scheduled command seems to be a good temporary solution.

     

Log in to post a comment.