Problem in logging to savepath.fit

Using the Multiple Run Fitter, praxis, etc..
Post Reply
shailesh
Posts: 104
Joined: Thu Mar 10, 2011 12:11 am

Problem in logging to savepath.fit

Post by shailesh » Mon Jun 09, 2014 11:02 am

I was using the MRF and wanted to save the various parameter set combinations it was using in arriving at its final set. I clicked the "Append the path to savepath.fit" checkbox and ran the Optimizer but did not see any file being created. On going through "nrn/lib/hoc/mulfit/fitparm.hoc" I found that a variable named 'saveflag' was being used to determine whether the file was to be created or not:

Code: Select all

if (saveflag) {
		savepath.wopen("savepath.tmp") // need to put in rank later
		lines = 0
	}
In its init() function, it was being explicitly set to 0. But apparently, it is not getting updated when its checkbox is ticked in the GUI panel. By explicitly setting saveflag = 1 in its init(), I was able to get it working. What could be the issue with the GUI checkbox?

hines
Site Admin
Posts: 1526
Joined: Wed May 18, 2005 3:32 pm

Re: Problem in logging to savepath.fit

Post by hines » Mon Jun 09, 2014 7:48 pm

Thanks. See http://www.neuron.yale.edu/hg/neuron/nr ... 40cd961554
Long ago when the gui was factored out of the fitter module, the saveflag got left behnd.

shailesh
Posts: 104
Joined: Thu Mar 10, 2011 12:11 am

Re: Problem in logging to savepath.fit

Post by shailesh » Tue Jun 10, 2014 2:33 am

Yupp, its working now. Thanks!

I thought I would post this for future reference (hoping I am right):
savepath.fit saves several columns of date for each entry. Their meanings:

Line 1: start (just a label)
Line 2: Number of Lines and Columns
Line 3 onwards:

Column 1: Quadratic Expression Number
Column 2: Simulation Run Number *
Column 3: Time (s)
Column 4: Error Value
Columns 5+: Parameter Values

* I read that savepath.fit does not save after every run but only the best result after each quadratic form.

RBJ
Posts: 33
Joined: Sun Aug 02, 2015 4:28 am

Re: Problem in logging to savepath.fit

Post by RBJ » Sat Aug 15, 2015 4:57 am

Thank you very much Shaliest.... my current OsX version 7.3 also leaves flag set on 0; so your tip has solved my problem for me to. Now it writes it out as you so clearly described.
Richard

shailesh
Posts: 104
Joined: Thu Mar 10, 2011 12:11 am

Re: Problem in logging to savepath.fit

Post by shailesh » Mon Aug 17, 2015 12:52 am

Glad to know it came in handy! :)

Post Reply