Is it possible to dynamically generate analyses at initialization

I am working on a simulation that can be set to have different numbers of agents. I wish to generate more or less metrics and plots based on information within globals and init.py/init.js. Is there anyway I can do so? If there is a way to read/write to analysis.json, Would the plots and metrics load up at simulation reload?

Are you able to provide some more information on what it is you’re trying to do?
I don’t quite understand what you mean by generate more or less metrics.

The analysis.json is not dynamically configurable to my knowledge though, I believe it’s only static.

Yes of course. As a basic example, say I have a simulation where I am able to configure the number of typed agents through global.json. Based on this number, I wish to be able to have more metrics obtained (e.g. one metric per agent position). These metrics would then need to be plotted (either together or separately). The way I would envision such a capability would be either through a message that can be sent to the “hash” agent where the type is say “new_metric” or “new_plot” (with accompanying “del_metric” and “del_plot”). If you want to restrict this to only init.py/init.js, you could supply a second dictionary in the return of the init function that would contain a list of metrics and a list of plots. I would prefer the first method since it seems hCore already has the ability to render new analysis.json based on a already run simulation. Unfortunately, at the moment, if I want to run multiple simulations with different agent populations, I simply have to save a bunch of analysis.json templates and copy paste one in each time.