\n'
- html+=' \n'%(c,p)
- html+=' \n'%(img_loc,c,p)
-
- html+=' NML\n'%(c,p)
- html+=' OSB\n'%(c,p)
-
- pres = ['neurons_','neuron_activity_','muscles_','muscle_activity_']
+ print("Params: %s" % p)
+ html2 = "c302 simulation\n"
+ html2 += (
+ "Parameter set: %s; configuration: %s \n"
+ % (c, p)
+ )
+ html2 += "Generated on: %s with c302 v%s \n" % (
+ time.strftime("%a, %d %b %Y", time.gmtime()),
+ c302.__version__,
+ )
+ html2 += "\n"
+ html += ' \n' % (c, p)
+ html += (
+ ' \n'
+ % (img_loc, c, p)
+ )
+
+ html += (
+ ' NML\n'
+ % (c, p)
+ )
+ html += (
+ ' OSB\n'
+ % (c, p)
+ )
+
+ pres = ["neurons_", "neuron_activity_", "muscles_", "muscle_activity_"]
for pre in pres:
-
- html2+='\n | \n | \n'%(img_loc,pre,c,p,img_loc,pre,c,p)
- if pre == 'neurons_':
- pre = 'neuron_'
- if pre == 'muscle_activity_':
- pre = 'muscles_activity_'
- html2+=' | \n \n'%(img_loc,pre,p,c,img_loc,pre,p,c)
-
- html2+=' \n'
- html2+='\n'
-
- html2 += '\n | \n' % (img_loc,c,p,img_loc,c,p)
- html2 += '\n | \n' % (img_loc,c,p,img_loc,c,p)
- html2 += '\n | \n' % (img_loc,c,p,img_loc,c,p)
-
- html2 += '\n | \n' % (img_loc,c,p,img_loc,c,p)
- html2 += '\n | ' % (img_loc,c,p,img_loc,c,p)
- if os.path.isfile('%s/%s/%s/c302_%s_%s_elec_neurons_muscles.png' % ('examples', save_fig_dir, img_loc, c, p)):
- html2 += '\n\n | ' % (img_loc,c,p,img_loc,c,p)
- html2 += ' \n'
-
- if os.path.isfile('%s/%s/%s/c302_%s_%s_elec_muscles_muscles.png' % ('examples', save_fig_dir, img_loc, c, p)):
- html2 += '\n | \n' % (img_loc,c,p,img_loc,c,p)
-
-
- html2+=' \n'
-
- with open('examples/%s/summary_%s_%s.html'%(save_fig_dir, c,p),'w') as f2:
- f2.write('%s'%html2)
- with open('examples/%s/summary_%s_%s.md'%(save_fig_dir,c,p),'w') as f3:
- f3.write('### Parameter config summary \n%s'%html2)
-
- dt = 0.05 if p!='Pharyngeal' else 0.01
-
- run_c302(p,
- c,
- '',
- durations[p],
- dt,
- 'jNeuroML_NEURON',
- save=True,
- show_plot_already=False,
- plot_connectivity=True,
- data_reader='SpreadsheetDataReader')
-
- html+=' | \n'
-
- html+='\n'
-
- html+='
\n'
-
- with open('examples/'+save_fig_dir+'info.html','w') as f:
- f.write('\n%s\n'%html)
- with open('examples/'+save_fig_dir+'README.md','w') as f2:
- f2.write('### c302 activity summary \n%s'%(html.replace('.html','.md')))
+ html2 += (
+ '\n