Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Gitlab will go into maintenance Friday 3rd February from 9:00 to 10:00
Open sidebar
Computational modelling and simulation
pb4covid19
Commits
df4e6cb9
Commit
df4e6cb9
authored
Oct 26, 2020
by
Vincent Noël
Browse files
Bugfixes in interface
parent
f7dbd852
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
bin/substrates.py
View file @
df4e6cb9
...
...
@@ -983,7 +983,6 @@ class SubstrateTab(object):
else
:
if
self
.
color_physiboss
and
self
.
color_physiboss_node
is
not
None
and
self
.
color_physiboss_node
[
0
]
!=
'<'
:
if
int
(
child
.
attrib
[
'id'
][
4
:])
in
states_dict
.
keys
():
if
self
.
color_physiboss_node
in
states_dict
[
int
(
child
.
attrib
[
'id'
][
4
:])]:
rgb
=
[
0
,
0.5
,
0
]
...
...
data/PhysiCell_settings.xml
View file @
df4e6cb9
...
...
@@ -113,7 +113,7 @@
</full_data>
<SVG>
<interval
units=
"min"
>
1
5
</interval>
<interval
units=
"min"
>
5
</interval>
<enable>
true
</enable>
</SVG>
...
...
data/create_cell_types_flat.py
0 → 100644
View file @
df4e6cb9
This diff is collapsed.
Click to expand it.
data/initial.xml
View file @
df4e6cb9
...
...
@@ -11,9 +11,9 @@
</software>
<citation
/>
<current_time
units=
"min"
>
0.000000
</current_time>
<current_runtime
units=
"sec"
>
0.13
3552
</current_runtime>
<created>
2020-10-2
3
T1
6
:2
0
:5
5
Z
</created>
<last_modified>
2020-10-2
3
T1
6
:2
0
:5
5
Z
</last_modified>
<current_runtime
units=
"sec"
>
0.13
7806
</current_runtime>
<created>
2020-10-2
6
T1
0
:2
1
:5
2
Z
</created>
<last_modified>
2020-10-2
6
T1
0
:2
1
:5
2
Z
</last_modified>
</metadata>
<microenvironment>
<domain
name=
"microenvironment"
>
...
...
pc4covid19.ipynb
View file @
df4e6cb9
...
...
@@ -18,20 +18,7 @@
}
}
},
"outputs": [
{
"data": {
"text/html": [
"<style>.container { width:100% !important; }</style>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"from IPython.core.display import display, HTML\n",
"display(HTML(\"<style>.container { width:100% !important; }</style>\"))\n",
...
...
@@ -56,164 +43,7 @@
}
}
},
"outputs": [
{
"data": {
"application/javascript": [
"\n",
"requirejs.undef('filepicker');\n",
"\n",
"define('filepicker', [\"@jupyter-widgets/base\"], function(widgets) {\n",
"\n",
" var FilePickerView = widgets.DOMWidgetView.extend({\n",
" render: function(){\n",
" this.file = document.createElement('input');\n",
" this.file.setAttribute('class', 'fileinput');\n",
" this.file.setAttribute('id', this.cid);\n",
" this.file.multiple = this.model.get('multiple');\n",
" this.file.required = true;\n",
" this.file.setAttribute('type', 'file');\n",
" this.file.setAttribute('style', 'display:none');\n",
"\n",
" this.label = document.createElement('label');\n",
" this.label.setAttribute('for', this.cid);\n",
" this.label.setAttribute('style', 'border: 1px solid; border-radius: 5px; display: inline-block; padding: 6px 12px');\n",
"\n",
" this.icon = document.createElement('i');\n",
" this.icon.setAttribute(\"class\", \"fa fa-upload\");\n",
"\n",
" if (this.file.multiple) {\n",
" this.labelstr = \" Upload Files\";\n",
" } else {\n",
" this.labelstr = \" Upload File\";\n",
" }\n",
" this.label.innerHTML = this.labelstr;\n",
" this.label.prepend(this.icon);\n",
" this.el.appendChild(this.label);\n",
" this.el.appendChild(this.file);\n",
" this.listenTo(this.model, 'change:send', this._send_changed, this);\n",
" this.listenTo(this.model, 'change:reset', this._reset, this);\n",
" this.update();\n",
" },\n",
"\n",
" events: {\n",
" // List of events and their handlers.\n",
" 'change': 'handle_file_change'\n",
" },\n",
"\n",
" _reset: function() {\n",
" this.label.innerHTML = this.labelstr;\n",
" this.label.prepend(this.icon);\n",
" this.file.removeAttribute(\"disabled\");\n",
" },\n",
"\n",
" _send_changed: function() {\n",
" var that = this;\n",
" var send = this.model.get('send');\n",
" var fnum = send[0];\n",
" var offset = send[1];\n",
" var chunk_size=64*1024;\n",
" var reader;\n",
"\n",
" if (fnum == -1) {\n",
" // ignore\n",
" return\n",
" }\n",
"\n",
" if (offset == 0) {\n",
" this.model.set('sent', -1);\n",
" this.touch();\n",
" }\n",
"\n",
" // console.log('send: ' + fnum + ' ' + offset);\n",
" function tob64( buffer ) {\n",
" var binary = '';\n",
" var bytes = new Uint8Array( buffer );\n",
" var len = bytes.byteLength;\n",
" for (var i = 0; i < len; i++) {\n",
" binary += String.fromCharCode( bytes[ i ] );\n",
" }\n",
" return window.btoa( binary );\n",
" }\n",
"\n",
" var reader_done = function (event) {\n",
" // chunk is finished. Send to python\n",
" if (event.target.error == null) {\n",
" var b64 = tob64(event.target.result);\n",
" that.model.set('data', b64);\n",
" that.model.set('sent', offset);\n",
" that.touch();\n",
" } else {\n",
" console.log(\"Read error: \" + event.target.error);\n",
" that.model.set('data', '');\n",
" that.model.set('sent', -2);\n",
" that.touch();\n",
" }\n",
" that.touch();\n",
" }\n",
" \n",
" var chunk_reader = function (_offset, _f) {\n",
" // console.log('CR' + ' ' + _f + ' ' + _offset);\n",
" reader = new FileReader();\n",
" var chunk = _f.slice(_offset, chunk_size + _offset); \n",
" reader.readAsArrayBuffer(chunk);\n",
" reader.onload = reader_done;\n",
" }\n",
" \n",
" // OK. request next chunk\n",
" chunk_reader(offset, this.files[fnum]);\n",
" },\n",
" \n",
" \n",
" handle_file_change: function(evt) {\n",
"\n",
" var _files = evt.target.files;\n",
" var filenames = [];\n",
" var file_readers = [];\n",
" this.files = [];\n",
"\n",
" for (var i = 0; i < _files.length; i++) {\n",
" var file = _files[i];\n",
" console.log(\"Filename: \" + file.name);\n",
" console.log(\"Type: \" + file.type);\n",
" console.log(\"Size: \" + file.size + \" bytes\");\n",
" this.files.push(file);\n",
" filenames.push([file.name, file.size]);\n",
" };\n",
" \n",
" // Set the filenames of the files.\n",
" this.model.set('filenames', filenames);\n",
" this.touch();\n",
"\n",
" // update the label\n",
" if (filenames.length == 0) {\n",
" this.label.innerHTML = this.labelstr;\n",
" this.file.removeAttribute(\"disabled\");\n",
" } else if (filenames.length == 1) {\n",
" this.label.innerHTML = \" \" + filenames[0][0];\n",
" this.file.setAttribute('disabled', 'true');\n",
" } else {\n",
" this.label.innerHTML = \" \" + filenames.length + \" files selected\";\n",
" this.file.setAttribute('disabled', 'true'); \n",
" };\n",
" this.label.prepend(this.icon);\n",
" },\n",
" });\n",
"\n",
" // Register the FilePickerView with the widget manager.\n",
" return {\n",
" FilePickerView: FilePickerView\n",
" };\n",
"});\n"
],
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"import sys, os\n",
"sys.path.insert(0, os.path.abspath('bin'))\n",
...
...
@@ -222,7 +52,7 @@
},
{
"cell_type": "code",
"execution_count":
3
,
"execution_count":
null
,
"metadata": {
"extensions": {
"jupyter_dashboards": {
...
...
@@ -243,29 +73,14 @@
},
"scrolled": false
},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "935b02b1ef1a4d1397a0da518893897d",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox(children=(HBox(children=(Dropdown(description='Load Config', options={'DEFAULT': '/home/vincent/Work/code…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"pc4covid19.gui"
]
},
{
"cell_type": "code",
"execution_count":
4
,
"execution_count":
null
,
"metadata": {
"extensions": {
"jupyter_dashboards": {
...
...
@@ -321,10 +136,10 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.
8.3
"
"version": "3.
6.5
"
},
"tool": true
},
"nbformat": 4,
"nbformat_minor": 2
}
}
\ No newline at end of file
%% Cell type:code id: tags:
```
python
from
IPython.core.display
import
display
,
HTML
display
(
HTML
(
"<style>.container { width:100% !important; }</style>"
))
%
matplotlib
inline
```
%% Output
%% Cell type:code id: tags:
```
python
import
sys
,
os
sys
.
path
.
insert
(
0
,
os
.
path
.
abspath
(
'bin'
))
import
pc4covid19
```
%% Output
%% Cell type:code id: tags:
```
python
pc4covid19
.
gui
```
%% Output
%% Cell type:code id: tags:
```
python
#from debug import debug_view
#debug_view
```
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment