Hello everyone,I am trying to set up a shell script to run a network (fem.srn) in scirunI basically have the following files:Input:1) READFIELD: Mesh with conductivity values in it (.fld).2) READFIELD : Electrode position (.pts)I have a series of files(.mat ) with conductivity values which needs to go in loop to get leadfield for each data set.The idea is to generate leadfield values for meshes with different conductivity values of each layer at a time. So, for one set of data, I am varying conductivity value for one layer , keeping the values for other 4 layers constant.Output: Leadfield (Matlab .mat) : it should save leadfield for one mesh at a time and then rerun scirun.This is the shell script I am using. Unfortunately, the SCIRUN app is not opening and I am not able to get the files in loop. I have added the folder containing scirun app in the PATH. Any help will be really appreciated.# check for inputsif [ -z "2"]thenecho need at least two inputsexitfi# list all files in input directoryfldfile=($(ls -1 $1/*.fld))#run all fld files through scirun networkfor l in ${fldfile[@]}do# print out file to runecho -e "\n running file $l \n"# run scirun network output files save automaticallyscirun -E fem2.srn + FLDFILE=$l + PTSFILE=$2done# check for result directory, move output files to that directory.if [ $3 ]thenecho moving results to $3mv $1/*simulation.mat $3fiThank you so muchRegardsRegardsPurbashaOn 26 October 2015 at 12:23, Purbasha Garai <pg0222@gmail.com> wrote:Hello everyone,I am trying to set up a shell script to run a network (fem.srn) in scirunI basically have the following files:Input:1) READFIELD 1: Mesh with conductivity values in it (.fld).2) READFIELD 2: Electrode position (.pts)TThe idea is to generate leadfield values for meshes with different conductivity values of each layer at a time. So, for one set of data, I am varying conductivity value for one layer , keeping the values for other 4 layers constant.Output: Leadfield (Matlab .mat) : it should save leadfield for one mesh at a time and then rerun scirun.For now, I am using the fem.srn file to generate the leadfield using one ring at a time.I am using windows operating system which uses .bat files. In the "defib evaluation folder", the bash scripting is for linux or for mac (.sh file). I re-wrote the script looking at the sxample you have provided, but I am not sure if its correct.Thank you so muchRegardsPurbasha
Archive powered by MHonArc 2.6.18.