{ "cells": [ { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/usr/lib/python3/dist-packages/urllib3/connection.py:391: SubjectAltNameWarning: Certificate for merlin.fmf.uni-lj.si has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/urllib3/urllib3/issues/497 for details.)\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "User: andrej studen CSRF: 1f11a0b613d172716bb47acf122d5106\n" ] } ], "source": [ "import sys\n", "import os\n", "import SimpleITK\n", "import numpy\n", "import matplotlib.pyplot\n", "import subprocess\n", "sys.path.append(os.path.join(os.path.expanduser('~'),'software','src','nixSuite','wrapper'))\n", "import nixWrapper\n", "nixWrapper.loadLibrary('labkeyInterface')\n", "import labkeyInterface\n", "net=labkeyInterface.labkeyInterface()\n", "fconfig=os.path.join(os.path.expanduser('~'),'.labkey','network.json')\n", "net.init(fconfig)\n", "net.getCSRF()\n", "import labkeyFileBrowser\n", "sys.path.append(os.getcwd())\n", "import downloadPatient\n", "fb=labkeyFileBrowser.labkeyFileBrowser(net)\n", "project='dinamic_spect/Patients'\n", "locDir=os.path.join(os.path.expanduser('~'),'temp','dynamicSPECT')\n", "import labkeyDatabaseBrowser\n", "db=labkeyDatabaseBrowser.labkeyDB(net)\n", "ds=db.selectRows(project,'study','Imaging',[])\n", "patients=[row['aliasID'] for row in ds['rows']]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#doAnalysis\n", "import subprocess\n", "\n", "patients=list(set(patients))\n", "#this is if IVF is inferred from locations\n", "runScript='doPixelAnalysis.sh'\n", "#this is if IVF is taken from clusters\n", "runScript='doPixelIVFAnalysis.sh'\n", "scriptPath=os.path.join(os.path.expanduser('~'),\\\n", " 'scripts','dynamicSPECT',runScript)\n", "#patients1=['10KFMIR']\n", "patients1=patients\n", "for pId in patients1:\n", " if pId.find('8')==0:\n", " continue\n", " for sigma2 in [0.1,1.0,4.0]:\n", " print('{}/{}'.format(pId,sigma2))\n", " subprocess.run([scriptPath,pId,str(sigma2)], \\\n", " check=True, stdout=subprocess.PIPE)\n", " \n", " " ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [], "source": [ "def getPatientNIM(id):\n", " f=os.path.join(locDir,id,id+'Volume19.nrrd')\n", " im=SimpleITK.ReadImage(f)\n", " nim=SimpleITK.GetArrayFromImage(im)\n", " return nim\n", "\n", "def getIWeights(locDir,p,nclass,realizationId,ic):\n", " fname='{}_{}_{}_center{}_centerWeigth.nrrd'.\\\n", " format(p,nclass,realizationId+1,ic+1)\n", " uFile=os.path.join(locDir,p,fname)\n", " \n", " imU=SimpleITK.ReadImage(uFile)\n", " return SimpleITK.GetArrayFromImage(imU)\n", "\n", "\n", "\n", "#gets weights by class for a particular realization and sigma2 averaging\n", "def getWeights(project,locDir,p,nclass,realizationId,sigma2,na):\n", " #for w1, classes are in 0 to nclass-1 space\n", " idFilter={'variable':'aliasID','value':p,'oper':'eq'}\n", " ds=db.selectRows(project,'study','Segmentation',[idFilter])\n", " pts={r['regionId']:[float(x) for x in [r['x'],r['y'],r['z']]] for r in ds['rows']}\n", " \n", " w={region:numpy.zeros(nclass) for region in pts}\n", " na2=0.5*(na-1)\n", " \n", " for c in numpy.arange(nclass):\n", " fname='{}_{}_{}_center{}_centerWeigth.nrrd'.\\\n", " format(p,nclass,realizationId+1,c+1)\n", " uFile=os.path.join(locDir,p,fname)\n", " \n", " imU=SimpleITK.ReadImage(uFile)\n", " nU=SimpleITK.GetArrayFromImage(imU)\n", " \n", " \n", " for region in w:\n", " #print(pts[region])\n", " idx=[int(x) for x in pts[region]]\n", " #print(nU[tuple(idx)])\n", " \n", " #gaussian weighted summation of surrounding pixels\n", " fidx=numpy.zeros(3)\n", " fs=0\n", " for i in numpy.arange(na):\n", " fidx[0]=idx[0]+(i-na2)\n", " for j in numpy.arange(na):\n", " fidx[1]=idx[1]+(j-na2)\n", " for k in numpy.arange(na):\n", " fidx[2]=idx[2]+(k-na2)\n", " fidx=[int(x) for x in fidx]\n", " fw=numpy.array(fidx)-numpy.array(pts[region])\n", " fw=numpy.exp(-0.5*sum(fw*fw)/sigma2);\n", " fs+=fw\n", " w[region][c]+=fw*nU[tuple(fidx)]\n", " #print('{}/{}: {:.2f} {:.2g}'.format(idx,fidx,fw,nU[tuple(fidx)]))\n", " w[region][c]/=fs\n", " \n", " \n", " return w\n", "\n", "#gets fitPar for a particular realization\n", "def getFitPar(locDir,p,nclass,realizationId):\n", " #fitGoodnes A tau alpha delay [k1 BVF k2 delay]xNcenters\n", " fname='{}_{}_{}_fitParFinal.txt'.format(p,nclass,realizationId+1)\n", " uFile=os.path.join(locDir,p,fname)\n", " return numpy.genfromtxt(uFile,delimiter='\\t')\n", "\n", "def getFitParIVF(locDir,p,nclass,realizationId):\n", " #fitGoodnes A tau alpha delay [k1 BVF k2 delay]xNcenters\n", " fname='{}_{}_{}_IVF_fitParFinal.txt'.format(p,nclass,realizationId+1)\n", " uFile=os.path.join(locDir,p,fname)\n", " return numpy.genfromtxt(uFile,delimiter='\\t')\n", "\n", "def getFitParPixel(locDir,p,nclass,sigma2):\n", " sigmaCode='{:.2f}'.format(sigma2)\n", " sigmaCode=sigmaCode.replace(\".\",\"p\")\n", " fname='{}_{}_{}_Pixel_fitParFinal.txt'.format(p,nclass,sigmaCode)\n", " uFile=os.path.join(locDir,p,fname)\n", " return numpy.genfromtxt(uFile,deliiter='\\t')\n", "\n", "def getFitParPixelIVF(locDir,p,nclass,sigma2):\n", " sigmaCode='{:.2f}'.format(sigma2)\n", " sigmaCode=sigmaCode.replace(\".\",\"p\")\n", " fname='{}_{}_{}_PixelIVF_fitParFinal.txt'.format(p,nclass,sigmaCode)\n", " uFile=os.path.join(locDir,p,fname)\n", " return numpy.genfromtxt(uFile,delimiter='\\t')\n", "\n", "def getK1(fitPar,iclass):\n", " #fitGoodnes A tau alpha delay [k1 BVF k2 delay]xNcenters\n", " #0 to nclass-1 space\n", " return fitPar[4*iclass+5]\n", "\n", "def calculateK1(w,fitPar):\n", " #calculateK1 for region weights\n", " #return the k1 that belongs to the \n", " #maximum class in region (M) and \n", " #a weighted average (W)\n", " k1={region:{'M':0,'W':0} for region in w}\n", " for region in w:\n", " cmax=numpy.argmax(w[region])\n", " k1[region]['M']=getK1(fitPar,cmax)\n", " fs=0\n", " for c in numpy.arange(len(w[region])):\n", " fs+=w[region][c]*getK1(fitPar,c)\n", " k1[region]['W']=fs\n", " return k1\n", "\n", "def getPatientValuesByNclass(project,locDir,p,nclass,nrealizations,sigma2,na):\n", " #summary script\n", " #project/locDir and p identify patient\n", " #nclass and nrealizations select strategy\n", " #sigma2 is for combining output from adjacent pixels\n", " #na is neighborhood size where smoothing/combination is done\n", " k1={}\n", " for i in numpy.arange(nrealizations):\n", " w=getWeights(project,locDir,p,nclass,i,sigma2,na)\n", " fitPar=getFitParIVF(locDir,p,nclass,i)\n", " qk1=calculateK1(w,fitPar)\n", " for region in w:\n", " for type in qk1[region]:\n", " try:\n", " k1[region][type].append(qk1[region][type])\n", " except KeyError:\n", " k1={region:{type:[] for type in qk1[region]} for region in w}\n", " print(type)\n", " k1[region][type].append(qk1[region][type])\n", " print('[{}] {}/{}'.format(nclass,i+1,nrealizations))\n", " return k1 \n", "\n", "def getSummaryPatientValuesByNclass(project,locDir,p,nclass,nrealizations,sigma2,na):\n", " #summary script, same arguments as above\n", " #also return deviation over realization\n", " k1=getPatientValuesByNclass(project,locDir,p,nclass,nrealizations,sigma2,na)\n", " avgType=['M','W']\n", " summaryK1={type:{region:{\n", " 'mean':numpy.mean(k1[region][type]), \n", " 'std':numpy.std(k1[region][type]), \n", " 'median':numpy.median(k1[region][type])} for region in k1}\n", " for type in avgType}\n", " \n", " return summaryK1\n", "\n", "def fullSummary(project,locDir,patientList,classes,nr,sigma2,na):\n", " return \\\n", " {p:{c:getSummaryPatientValuesByNclass(project,locDir,p,c,nr,sigma2,na) for c in classes} for p in patientList}\n", " \n", "def storeSummary(db,project,locDir,k1,sigma2,na):\n", " dsM=db.selectRows(project,'study','Imaging',[])\n", " for p in k1:\n", " idFilter={'variable':'aliasID','value':p,'oper':'eq'}\n", " for c in k1[p]:\n", " cFilter={'variable':'nclass','value':str(c),'oper':'eq'}\n", " for t in k1[p][c]:\n", " tFilter={'variable':'option','value':t,'oper':'eq'}\n", " for r in k1[p][c][t]:\n", " rFilter={'variable':'regionId','value':str(r),'oper':'eq'}\n", " ds=db.selectRows(project,'study','Summary',[idFilter,cFilter,tFilter,rFilter])\n", " if len(ds['rows'])>0:\n", " qrow=ds['rows'][0]\n", " mode='update'\n", " else:\n", " frow=[r for r in dsM['rows'] if r['aliasID']==p]\n", " qrow={'aliasID':p,'nclass':c,'option':t,'regionId':r}\n", " qrow['SequenceNum']=frow[0]['SequenceNum']+c+0.001*r\n", " if t=='M':\n", " qrow['SequenceNum']+=0.0001\n", " qrow['PatientId']=frow[0]['PatientId']\n", " mode='insert'\n", " for v in k1[p][c][t][r]:\n", " qrow[v]=k1[p][c][t][r][v]\n", " qrow['sigma2']=sigma2\n", " qrow['na']=na\n", " db.modifyRows(mode,project,'study','Summary',[qrow])\n", " \n", "def summaryPixelIVF(project,locDir,patientList,sigma2List,na):\n", " return \\\n", " {p:{sigma2:getPixelIVF(project,locDir,p,sigma2,na) for sigma2 in sigma2List} for p in patientList}\n", " \n", "def storeIVF(db,project,locDir,k1):\n", " dsM=db.selectRows(project,'study','Imaging',[])\n", " for p in k1:\n", " idFilter={'variable':'aliasID','value':p,'oper':'eq'}\n", " for s2 in k1[p]:\n", " sigmaFilter={'variable':'sigma2','value':str(s2),'oper':'eq'}\n", " for r in k1[p][s2]:\n", " rFilter={'variable':'regionId','value':str(r),'oper':'eq'}\n", " typeFilter={'variable':'option','value':'D','oper':'eq'}\n", " ds=db.selectRows(project,'study','Summary',[idFilter,sigmaFilter,rFilter,typeFilter])\n", " if len(ds['rows'])>0:\n", " qrow=ds['rows'][0]\n", " mode='update'\n", " else:\n", " frow=[r for r in dsM['rows'] if r['aliasID']==p]\n", " qrow={'aliasID':p,'sigma2':s2,'regionId':r}\n", " qrow['SequenceNum']=40+frow[0]['SequenceNum']+0.01*r+0.001*s2\n", " qrow['PatientId']=frow[0]['PatientId']\n", " mode='insert'\n", " qrow['mean']=k1[p][s2][r]\n", " qrow['na']=7\n", " qrow['nclass']=16\n", " qrow['option']='D'\n", " db.modifyRows(mode,project,'study','Summary',[qrow])\n", "\n", "def getPixelIVF(project,locDir,p,sigma2,na):\n", " fitPar=getFitParPixelIVF(locDir,p,16,sigma2)\n", " idFilter={'variable':'aliasID','value':p,'oper':'eq'}\n", " ds=db.selectRows(project,'study','Segmentation',[idFilter])\n", " k1={r['regionId']:getK1(fitPar,r['regionId']) for r in ds['rows']}\n", " return k1" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "pat=[p for p in patients if p.find('8')!=0]\n", "k1=summaryPixelIVF(project,locDir,pat,[0.1],7)\n", "storeIVF(db,project,locDir,k1)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "pat=[p for p in patients if p.find('8')!=0]\n", "k1=fullSummary(project,locDir,pat,[10],20,0.1,3)\n", "storeSummary(db,project,locDir,k1,0.1,3)\n" ] }, { "cell_type": "code", "execution_count": 107, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "{'M': {0: {'mean': 0.005371908478823275, 'std': 0.0005748154115907079, 'median': 0.00504829351328475}, 1: {'mean': 0.00398706780698255, 'std': 0.0008592694250527332, 'median': 0.003388404180814905}, 2: {'mean': 0.0037767548460013053, 'std': 0.0006276175516250823, 'median': 0.004138535106155311}, 3: {'mean': 0.0045120019537560705, 'std': 0.0007593001890057208, 'median': 0.004904191257967345}, 4: {'mean': 0.0031040814064716474, 'std': 0.0001765662651125499, 'median': 0.00301590732317976}, 5: {'mean': 0.0045120019537560705, 'std': 0.0007593001890057208, 'median': 0.004904191257967345}, 6: {'mean': 0.0031040814064716474, 'std': 0.0001765662651125499, 'median': 0.00301590732317976}, 7: {'mean': 0.0031040814064716474, 'std': 0.0001765662651125499, 'median': 0.00301590732317976}, 8: {'mean': 0.0031040814064716474, 'std': 0.0001765662651125499, 'median': 0.00301590732317976}, 9: {'mean': 0.0031040814064716474, 'std': 0.0001765662651125499, 'median': 0.00301590732317976}, 10: {'mean': 0.0034925792443534615, 'std': 0.000712836434502568, 'median': 0.003230836321052485}, 11: {'mean': 0.002942684869416924, 'std': 8.584987083884881e-05, 'median': 0.002954897966504385}, 12: {'mean': 0.002942684869416924, 'std': 8.584987083884881e-05, 'median': 0.002954897966504385}, 13: {'mean': 0.0038874562766629287, 'std': 0.0008528550492831983, 'median': 0.003379357792522795}, 14: {'mean': 0.0031040814064716474, 'std': 0.0001765662651125499, 'median': 0.00301590732317976}, 15: {'mean': 0.002184062672680895, 'std': 4.336506662161737e-05, 'median': 0.00218645043494317}}, 'W': {0: {'mean': 0.005931986370752202, 'std': 0.00019139810809457942, 'median': 0.005930116066388524}, 1: {'mean': 0.003749548513649944, 'std': 0.0002816147776747823, 'median': 0.003861192537029771}, 2: {'mean': 0.003727806875027615, 'std': 0.0003322774172470865, 'median': 0.003940037177277234}, 3: {'mean': 0.004167914310279712, 'std': 0.0003870638820251826, 'median': 0.004406229257514758}, 4: {'mean': 0.003022912024319836, 'std': 6.624420546066359e-05, 'median': 0.0030077717895602004}, 5: {'mean': 0.0041797131569875105, 'std': 0.00046772875608648833, 'median': 0.004479721774912185}, 6: {'mean': 0.003247813763947978, 'std': 5.8068068873377935e-05, 'median': 0.0032274876165731556}, 7: {'mean': 0.0030447606235200955, 'std': 0.00011810157358104187, 'median': 0.00298593361254862}, 8: {'mean': 0.0032165663666835617, 'std': 5.5061408735894747e-05, 'median': 0.0031890549872549408}, 9: {'mean': 0.0033939676098046906, 'std': 4.4627474787750075e-05, 'median': 0.003381235252182444}, 10: {'mean': 0.0034631266888655184, 'std': 0.00011706013950740912, 'median': 0.003482031844177046}, 11: {'mean': 0.00362500279071822, 'std': 0.0001368698874922536, 'median': 0.0036780213624651305}, 12: {'mean': 0.0032147639914663546, 'std': 0.00012959835042494118, 'median': 0.0032326569794918335}, 13: {'mean': 0.003665605915324069, 'std': 0.00017376818980351577, 'median': 0.003724704287518482}, 14: {'mean': 0.0033597397409155273, 'std': 5.3618215779729534e-05, 'median': 0.0033406114442330387}, 15: {'mean': 0.0021692854905642515, 'std': 8.516403911876423e-06, 'median': 0.0021676539137135773}}}\n" ] } ], "source": [ "print(k1)" ] }, { "cell_type": "code", "execution_count": 56, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "0.02223504\n", "0.02223504\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/usr/lib/python3/dist-packages/urllib3/connection.py:391: SubjectAltNameWarning: Certificate for merlin.fmf.uni-lj.si has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/urllib3/urllib3/issues/497 for details.)\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "0.4418241525813627\n", "0.34392268845874496\n", "0.44668512187675746\n", "0.4277373071517828\n", "0.3922308796145302\n", "0.35643425292374326\n", "0.3692802456593414\n", "0.31520469737807355\n", "0.4654286761032285\n", "0.7829711283052362\n", "0.29574684452011624\n", "0.32465688583552055\n", "0.4998691162413557\n", "0.45862342417011315\n", "0.5354598797118066\n", "0.29275341177289665\n" ] }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAALMAAAD5CAYAAABs1wT5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAOHUlEQVR4nO3dXYxU5RkH8P8zwy67LJ9bcENwFTT0gmi6bQhtU9NgTA2tTZAbqmkMF6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gQFVXAxhIvi9yPUC1X3pf8idbk6YGKeLMvA7AIVU9rKqXAbwAYGMB62gpqvomgM9mPL0RQH/yuB/A3QWvp6UVEeYVAIamfX8UxTeWVwCvicjbIrK14LVM16OqI8njYwCMO+g0Vcv2S+c/AKtuU9VvoPrR50ER+W7RC5pJq2WnoktPNfVLL0oRYR4G0Dvt++uT5wqjqsPJ11EAu2H0AS/A8am2zsnX0SIXU2u/9KIUEeZ9AFaLyCoRaQdwD4A9BawDACAiXSKyYOoxgDvROn3A9wDYkjzeAuDlAtfS8v3Sm97TRFUnRGQbgFcBlAHsVNUPmr2OaXoA7K72u8ccAM+p6ivNXoSIPA9gPYClInIUwCMAdgDYJSL3o7rbcHPB61nfyv3S+RtACoP/AKQwGGYKg2GmMBhmCoNhpjAYZgqDYaYwGGYK4383QgJw+nonUAAAAABJRU5ErkJggg==\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAALMAAAD5CAYAAABs1wT5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAASc0lEQVR4nO2dXayc1XWG3zW/Z86f8Q8cwDbFIN+gVnUrRCuBKihqRKtKEFW1kovKF6jkIkip1BvETXLJRdM0F1Ek0lpxpZKEqqX4AoVQq1IUqUoxUZRACAmhtmLH+Af/neMzc+bnW72YMT04s95v/M05Myeb95GsMzNr9rf398072zPvrL2XuTuESIHStAcgxEYhMYtkkJhFMkjMIhkkZpEMErNIhso4jc3sMQBfBlAG8I/u/hx7fs3qPoO5Ah0VGt6Y8E5ZlJqdm2WFkgGZbc6c5Z6R4KZ0iWVcuuDutw6LFRazmZUBfAXAnwA4BeB1Mzvq7j+J2sxgDn9gj958X5Wx3nPFKJdp2CxWj/fiF9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PHzOwdM3vXzJ6ZxhhuGM8JM/vxoAb48SmN4bCZnTOzN9c9tsPMXjOznw/+TqxwaDCeLV0vfeJiNrMygK8A+FMA96Ffteq+SY9jCI+4+4EpWk9fB/DYDY89A+CYu+8HcGxwf5rjAfr10g8M/t10kabNZBoz8wMA3nX399y9DeCbAB6fwji2FO7+XQAXb3j4cQBHBrePAHhiyuPZ0kxDzLsB/HLd/VOYfmF5B/AdM3vDzJ6a8ljWs+TuZwa33wewNM3BDNiy9dL1BbDPQ+7+++h/9Pmsmf3RtAd0I963naZtPY1UL31aTEPMpwHsXXd/z+CxqeHupwd/zwF4CUEd8Clw9npZ58Hfc9MczKj10qfFNMT8OoD9ZrbPzGoAPgXg6BTGAQAwszkzW7h+G8AnsHXqgB8FcGhw+xCAl6c4li1fL33iGye6e9fMngbwKoAygMPu/takx7GOJQAv9evdowLgBXf/9qQHYWbfAPAwgF1mdgrA5wE8B+BFM3sS/WzDg1Mez8NbuV66fgEUyaAvgCIZJGaRDBKzSAaJWSSDxCySQWIWySAxi2SQmEUy/B9ghxVRkWpJxQAAAABJRU5ErkJggg==\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "import matplotlib\n", "p='7TMOBR'\n", "sy=28\n", "realizationId=5\n", "nclass=30\n", "nu=getIWeights(locDir,p,30,realizationId,4)\n", "nim=getPatientNIM(p)\n", "cut0=20\n", "w0=20\n", "cut1=0\n", "fw=40\n", "idx=[7,28,34]\n", "print(nu[7,28,34])\n", "print(nu[tuple(idx)])\n", "w=getWeights(project,locDir,p,nclass,realizationId,0.1,7)\n", "for r in w:\n", " print(numpy.max(w[r]))\n", "matplotlib.pyplot.imshow(nu[:,sy,cut0:cut0+w0])\n", "matplotlib.pyplot.show()\n", "matplotlib.pyplot.imshow(nim[:,sy,cut0:cut0+w0])\n", "matplotlib.pyplot.show()" ] }, { "cell_type": "code", "execution_count": 93, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/usr/lib/python3/dist-packages/urllib3/connection.py:391: SubjectAltNameWarning: Certificate for merlin.fmf.uni-lj.si has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/urllib3/urllib3/issues/497 for details.)\n", " warnings.warn(\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "M\n", "[10] 20/20\n", "[20] 20/20\n", "[30] 20/20\n" ] } ], "source": [ "k1=combinePatient(project,locDir,'7TMMIR',[10,20,30],20,4.0,7)" ] }, { "cell_type": "code", "execution_count": 94, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "{0: 0.006172951839546806, 1: 0.0011293802007511504, 2: 0.0034521499735888144, 3: 0.0042544572958967365, 4: 0.0035312206174353085, 5: 0.0042544572958967365, 6: 0.0030514161815550344, 7: 0.0013307214487837872, 8: 0.003330571003684981, 9: 0.0031176179941574842, 10: 0.0020333718489625023, 11: 0.00333907520086298, 12: 0.007351435428832242, 13: 0.0038036462072787995, 14: 0.003625240367164753, 15: 0.0028970199562430546}\n", "{0: 0.0006961087295939239, 1: 0.00031228541489592706, 2: 0.0004510546128805069, 3: 0.0005051282237067151, 4: 0.0004762660491350051, 5: 0.0005051282237067151, 6: 0.0005505760968232114, 7: 0.00032581639272840707, 8: 0.0005191027850853616, 9: 0.0007540860325457227, 10: 0.00032310962085205355, 11: 0.00038986355593399486, 12: 0.0027199019036271716, 13: 0.000548794240952012, 14: 0.0005487268424526743, 15: 0.0006667221336658735}\n" ] } ], "source": [ "avgType=['M','W']\n", "meanK1={type:{region:numpy.mean(k1[region][type]) for region in k1} for type in avgType}\n", "stdK1={type:{region:numpy.std(k1[region][type]) for region in k1} for type in avgType}\n", "print(meanK1['M'])\n", "print(stdK1['M'])\n" ] }, { "cell_type": "code", "execution_count": 79, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[0.00252038792282219, 0.00151611481573515, 0.00254164182147798, 0.00186663983190471, 0.00404895113316396, 0.0020328762566657, 0.00190085158556521, 0.00249521000442543, 0.00157109119636192, 0.00386999102896687, 0.00282258552513781, 0.00334338605677939, 0.00304450254908494, 0.00187659097886802, 0.00202826225861249, 0.0016204124091652]\n", "0.00252038792282219 0 0.00544315853082935\n", "0.00151611481573515 8 0.00204586967629601\n", "0.00254164182147798 1 0.00249553160944056\n", "0.00186663983190471 8 0.00204586967629601\n", "0.00404895113316396 7 0.00310949812694919\n", "0.0020328762566657 8 0.00204586967629601\n", "0.00190085158556521 2 0.0025554273008312\n", "0.00249521000442543 7 0.00310949812694919\n", "0.00157109119636192 9 0.00148953599268332\n", "0.00386999102896687 0 0.00544315853082935\n", "0.00282258552513781 7 0.00310949812694919\n", "0.00334338605677939 1 0.00249553160944056\n", "0.00304450254908494 1 0.00249553160944056\n", "0.00187659097886802 2 0.0025554273008312\n", "0.00202826225861249 8 0.00204586967629601\n", "0.0016204124091652 9 0.00148953599268332\n" ] }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAD4CAYAAAAQP7oXAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAYmElEQVR4nO3df4xV533n8fcnw5iMmsiTYBTBgBdSs0Tj0IXollhKVGVtVYPTKEyRtYurVJbWkrstlpJNl4Zpql3Hm4oQ1JA/1m7l1G5Y5wdmHUpG3rSzbrDUXW2CPQRiDM5sJyZZMyYxtT1OIo0wTL77x30GX27uMM9lfpxz535e0oh7n/Oc537PEXc+c85z7j2KCMzMzHK8pegCzMysdTg0zMwsm0PDzMyyOTTMzCybQ8PMzLItKbqAuXDDDTfEmjVrii7DzKylHDt27J8jYnkz6yyK0FizZg3Dw8NFl2Fm1lIk/bjZdXx6yszMsjk0zMwsm0PDzMyyOTTMzCybQ8PMzLItiqunzHIcPj7G3q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bLq6yrDPiIipf18G/ramhkLfm9PV1eR7s6qZCZAy/lC9Ze0LVCd+piaObq7rs4MrJ44Opsc3c+XE0QtcOdm2hl+dCF9R8/g/UD2HuGC1UZ08/W/AFxu83l6unGz7fEnqKnqfLQe6U58u4H8BH0nP/ztXTur+UUnqWpH+FdXTMZ8r4j2Q+nyIKyecC9tnM9RV6D4Dfg14e+rza8D/AbaU4L15tbqy35uX+83UoRV+gA9TvVrnh8CnU9v9wEfT47em/+ijVC9xfHfNup9O640At9e0f53q4dpFqucG707tj1K9dO1ZYLB2py9EbcAHqR7aPkvdZXJUz2t+m+plff8AvLMkdRW9z36D6uWZzwLPAf+ppv+70xijacylJanrSNpnzwFfIV1ltZDvgZrlH+LKX86F7bMZ6ip0n6X98n3evIT60zX9i3xvXq2upt6bEeGvETEzs3yLYU7DzMwWiEPDzMyyOTTMzCybQ8PMzLI5NMzMLJtDw8zMsjk0zMws2/8HYQ73oPAMoQcAAAAASUVORK5CYII=\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "#k1=combinePatient(project,locDir,'7TMMIR',[10],20,4.0,7)\n", "realizationId=3\n", "c=10\n", "p='7TMOBR'\n", "w=getWeights(project,locDir,p,c,realizationId,0.1,3)\n", "wc={region:numpy.argmax(w[region]) for region in w}\n", "fitPar=getFitParIVF(locDir,p,c,realizationId)\n", "qk1=calculateK1(w,fitPar)\n", "k1p=getPixelIVF(project,locDir,p,4.0,7)\n", "pk=list(k1p.values())\n", "print(pk)\n", "ck=[qk1[region]['M'] for region in qk1]\n", "matplotlib.pyplot.scatter(ck,pk)\n", "for region in w:\n", " print('{} {} {}'.format(k1p[region],wc[region],qk1[region]['M']))" ] }, { "cell_type": "code", "execution_count": 136, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/usr/lib/python3/dist-packages/urllib3/connection.py:391: SubjectAltNameWarning: Certificate for merlin.fmf.uni-lj.si has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/urllib3/urllib3/issues/497 for details.)\n", " warnings.warn(\n" ] } ], "source": [ "k1p=getPixelIVF(project,locDir,'7TMMIR',4.0,7)" ] }, { "cell_type": "code", "execution_count": 156, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "0.00252038792282219 0.00821063685487176 0.000769278586995102/0.0003330083431359072\n", "0.00151611481573515 3.10567836690838e-05 7.88785113142985e-06/1.9000844446763202e-06\n", "0.00254164182147798 3.10567836690838e-05 7.88785113142985e-06/1.9000844446763202e-06\n", "0.00186663983190471 0.00821063685487176 0.000769278586995102/0.0001671052167808519\n", "0.00404895113316396 0.0122210526169817 0.000769278586995102/0.0001671052167808519\n", "0.0020328762566657 0.0329991638607282 0.00219782291835452/0.0009453421745505919\n", "0.00190085158556521 3.10567836690838e-05 7.88785113142985e-06/1.9000844446763202e-06\n", "0.00249521000442543 0.0170371097144494 0.000769278586995102/0.0001671052167808519\n", "0.00157109119636192 3.10567836690838e-05 7.88785113142985e-06/1.9000844446763202e-06\n", "0.00386999102896687 0.22232351448649 0.00260465709367942/0.0010770771831046689\n", "0.00282258552513781 0.0261881964613408 0.002167764950618855/0.0006606993805304795\n", "0.00334338605677939 0.00388464867694823 7.88785113142985e-06/0.0003179710076941252\n", "0.00304450254908494 3.10567836690838e-05 7.88785113142985e-06/1.9000844446763202e-06\n", "0.00187659097886802 3.10567836690838e-05 7.88785113142985e-06/1.9000844446763202e-06\n", "0.00202826225861249 3.10567836690838e-05 0.000769278586995102/0.0007166763218796836\n", "0.0016204124091652 0.0261881964613408 0.002167764950618855/0.0007016445972818652\n" ] } ], "source": [ "for r in k1:\n", " print('{} {} {}/{}'.format(k1p[r], qk1[r]['M'] ,numpy.median(k1[r]['M'][10:20]),numpy.std(k1[r]['M'])))" ] }, { "cell_type": "code", "execution_count": 45, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "array([0., 0., 0.])" ] }, "execution_count": 45, "metadata": {}, "output_type": "execute_result" } ], "source": [ "numpy.zeros(3)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.10" } }, "nbformat": 4, "nbformat_minor": 4 }