Commit d6536dca authored by amichaut's avatar amichaut
Browse files

bugfix after Pandas update: ensure df dtype is changed to numeric

parent 217e78a7
......@@ -141,7 +141,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "e5adceb454db4f8e8fb81299615971e7",
"model_id": "ba1ecdc0d76346f3acfe62a7289d3bac",
"version_major": 2,
"version_minor": 0
},
......@@ -155,7 +155,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "9ce1f4435bce4503b595e2c6b0978323",
"model_id": "e921f47a13c74b9588071d5b3d24e08d",
"version_major": 2,
"version_minor": 0
},
......@@ -169,7 +169,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "3cf7295fff524fbeb2cc0ff63d9475d7",
"model_id": "3cfef97eef9d44d78784e0dcfef5c526",
"version_major": 2,
"version_minor": 0
},
......@@ -219,12 +219,12 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "f79cb151175e4b0c99010c3a80f00d47",
"model_id": "cd394c2cb5144210b1dcc46afce00882",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"FileChooser(path='/Users/amichaut/Desktop/Fluo-N3DH-CE', filename='', title='HTML(value='<b>Image file</b>')',…"
"FileChooser(path='/Users/amichaut/Desktop/data_gaelle', filename='', title='HTML(value='<b>Image file</b>')', …"
]
},
"metadata": {},
......@@ -258,39 +258,6 @@
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"You have loaded a 4D image: (708x512) pixels with 195 time steps and 35 z slices\n"
]
},
{
"data": {
"text/markdown": [
"If there is an error between t and z dimension, you can swap these dimensions"
],
"text/plain": [
"<IPython.core.display.Markdown object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "b11a3322813643009e72d590c979a8b4",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"ToggleButton(value=False, description='Swap z and t')"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/markdown": [
......@@ -318,7 +285,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c9b6c6ca2c7e4982b3f7b794e0382321",
"model_id": "d9d81b6096a946829922d4073b223891",
"version_major": 2,
"version_minor": 0
},
......@@ -344,7 +311,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "6064fdc9f522436cbf826ef4d2228bdf",
"model_id": "e8a7060b59db4e119f6a2f4e5fba168a",
"version_major": 2,
"version_minor": 0
},
......@@ -366,6 +333,9 @@
"image = tpr.get_image(data_dir,filename=im_file,verbose=True)\n",
"if image['image_size'] is not None:\n",
" y_size,x_size = image['image_size']\n",
" get_image_size = False\n",
"else: \n",
" get_image_size = True # to call get_image again after info.txt is generated\n",
"\n",
"# swap z and t dimensions if needed \n",
"check_swap_wid = False # bool to retrieve swap_wid value if necessary\n",
......@@ -391,7 +361,7 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 5,
"metadata": {
"code_folding": [],
"scrolled": true
......@@ -456,7 +426,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 6,
"metadata": {
"code_folding": [],
"scrolled": true
......@@ -486,12 +456,14 @@
" info[couple[0]]=couple[1].value\n",
" f.write('{}:{}\\n'.format(couple[0],couple[1].value))\n",
"else: \n",
" info=tpr.get_info(data_dir)"
" info = tpr.get_info(data_dir)\n",
" \n",
"image = tpr.get_image(data_dir,filename=im_file,verbose=True)"
]
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 7,
"metadata": {
"scrolled": false
},
......@@ -507,148 +479,6 @@
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/markdown": [
"**Here are the first rows of the input data table**"
],
"text/plain": [
"<IPython.core.display.Markdown object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>track</th>\n",
" <th>frame</th>\n",
" <th>z</th>\n",
" <th>y</th>\n",
" <th>x</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1</td>\n",
" <td>0</td>\n",
" <td>17.0</td>\n",
" <td>251.0</td>\n",
" <td>189.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>17.0</td>\n",
" <td>226.0</td>\n",
" <td>190.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>1</td>\n",
" <td>2</td>\n",
" <td>17.0</td>\n",
" <td>234.0</td>\n",
" <td>201.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>1</td>\n",
" <td>3</td>\n",
" <td>15.0</td>\n",
" <td>234.0</td>\n",
" <td>209.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>2</td>\n",
" <td>4</td>\n",
" <td>13.0</td>\n",
" <td>247.0</td>\n",
" <td>198.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>2</td>\n",
" <td>5</td>\n",
" <td>14.0</td>\n",
" <td>261.0</td>\n",
" <td>182.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>2</td>\n",
" <td>6</td>\n",
" <td>16.0</td>\n",
" <td>273.0</td>\n",
" <td>180.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>2</td>\n",
" <td>7</td>\n",
" <td>17.0</td>\n",
" <td>278.0</td>\n",
" <td>164.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>2</td>\n",
" <td>8</td>\n",
" <td>16.0</td>\n",
" <td>304.0</td>\n",
" <td>156.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>2</td>\n",
" <td>9</td>\n",
" <td>14.0</td>\n",
" <td>309.0</td>\n",
" <td>159.0</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" track frame z y x\n",
"0 1 0 17.0 251.0 189.0\n",
"1 1 1 17.0 226.0 190.0\n",
"2 1 2 17.0 234.0 201.0\n",
"3 1 3 15.0 234.0 209.0\n",
"4 2 4 13.0 247.0 198.0\n",
"5 2 5 14.0 261.0 182.0\n",
"6 2 6 16.0 273.0 180.0\n",
"7 2 7 17.0 278.0 164.0\n",
"8 2 8 16.0 304.0 156.0\n",
"9 2 9 14.0 309.0 159.0"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
......@@ -665,7 +495,7 @@
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": 8,
"metadata": {
"scrolled": false
},
......@@ -681,60 +511,6 @@
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/markdown": [
"**Select the columns to be used in the analysis: track,frame,x,y,(z). Leave to 'none' the other ones.**"
],
"text/plain": [
"<IPython.core.display.Markdown object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "629b2bff62a44358a379d7001da465fa",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(VBox(children=(Dropdown(description='column track:', index=5, options=('x', 'y', 'z', 'frame', …"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/markdown": [
"**Some tracking softwares support to miss objects at some frames. This results in tracks with gaps.\n",
" However, this analysis pipeline requires to have continuous tracks. How do you want to handle tracks with gaps:\n",
" fill the gaps by linear interpolation or split the track in different tracks?**"
],
"text/plain": [
"<IPython.core.display.Markdown object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "d14068beaac34d1e89e4de248a3560b1",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Dropdown(description='gap resolution:', options=('interpolate', 'split'), style=DescriptionStyle(description_w…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
......@@ -904,7 +680,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "0f9ad806d15141a08efb6a9faaa260a2",
"model_id": "01746cd3143f4e489684771e53a0b493",
"version_major": 2,
"version_minor": 0
},
......@@ -918,7 +694,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "cdf459cfeeb947b492e417ff59aeb05a",
"model_id": "7b10de6339af43f0bbe48e65f67a6b10",
"version_major": 2,
"version_minor": 0
},
......@@ -932,7 +708,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "9ad2931a8f194c59bfd645aceeab4f01",
"model_id": "bb1c53c673bf4254ba722e9d882c2099",
"version_major": 2,
"version_minor": 0
},
......@@ -958,7 +734,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "09575a6f93b94c6c862cd719c5fd2098",
"model_id": "79f701a933bc418ea74083cafbc4a537",
"version_major": 2,
"version_minor": 0
},
......@@ -984,7 +760,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "d3e1b3af4fa14c659d3ae946111fad7b",
"model_id": "ed34c148b7814f1b801c6f2b9617f5a8",
"version_major": 2,
"version_minor": 0
},
......@@ -1010,7 +786,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "dc7ac54d76e04f2cb881e8e6be1fe652",
"model_id": "9d8267c8ad5e4800a4ba600e50e02771",
"version_major": 2,
"version_minor": 0
},
......@@ -1036,7 +812,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "473026224d1d41b3a2257252519524eb",
"model_id": "ac1a1ec156ee4c98b463ff0c5be55a4f",
"version_major": 2,
"version_minor": 0
},
......@@ -1062,7 +838,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "369841c3c0e94c588c09ea7049a2f6c8",
"model_id": "84206aeae9ca47e3a59941bf31b63d7f",
"version_major": 2,
"version_minor": 0
},
......@@ -1232,10 +1008,22 @@
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/markdown": [
"Warning: you have a 2D+t image, no 3D redering is available then."
],
"text/plain": [
"<IPython.core.display.Markdown object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "e6422b6978734e2fb943bfb15c34d9c0",
"model_id": "8021e412527c436ba73ba933e32f99ab",
"version_major": 2,
"version_minor": 0
},
......@@ -1245,13 +1033,6 @@
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"2022-01-30 22:51:37,461 [INFO] WRITING LOG OUTPUT TO /Users/amichaut/.cellpose/run.log\n"
]
}
],
"source": [
......@@ -1275,7 +1056,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 15,
"metadata": {
"scrolled": true
},
......@@ -1295,7 +1076,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "0049bfcf1ed24382b8879c39ad6d74a1",
"model_id": "497157d77b1d451d9d738833783c9424",
"version_major": 2,
"version_minor": 0
},
......@@ -1333,7 +1114,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "9a0c23dc968643b6ad4a57ccd8e4a656",
"model_id": "036b619023804616b442c62dc138d375",
"version_major": 2,
"version_minor": 0
},
......@@ -1358,7 +1139,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 16,
"metadata": {
"scrolled": false
},
......@@ -1390,7 +1171,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "3694f6a11d6347b29116ccce24f5a9ec",
"model_id": "7c80632b9b764c668c49fc09157a2f46",
"version_major": 2,
"version_minor": 0
},
......@@ -1440,7 +1221,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "d88ab3fc4f7640d089c261aee05df7ef",
"model_id": "82059cf55f354aa7aa2577f94aa5ed84",
"version_major": 2,
"version_minor": 0
},
......@@ -1466,12 +1247,12 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "9aeda2ff864f41e8978bc4406fbe4b91",
"model_id": "0a3991ad34e644598b7e03c80e377d03",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(IntRangeSlider(value=(0, 194), description='Frame subset:', max=194, style=SliderStyle(descript…"
"HBox(children=(IntRangeSlider(value=(0, 24), description='Frame subset:', max=24, style=SliderStyle(descriptio…"
]
},
"metadata": {},
......@@ -1571,7 +1352,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 17,
"metadata": {
"scrolled": false
},
......@@ -1615,7 +1396,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "82835734b7b54d1086457e04a43093f7",
"model_id": "cc4974f914d14a929330144d1a7de482",
"version_major": 2,
"version_minor": 0
},
......@@ -1700,7 +1481,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 18,
"metadata": {
"scrolled": false
},
......@@ -1775,7 +1556,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 19,
"metadata": {},
"outputs": [
{
......@@ -1806,13 +1587,13 @@
"name": "stdout",
"output_type": "stream",
"text": [
"{'xlim': (105.0, 614.0), 'ylim': (91.0, 436.0), 'zlim': (7.0, 28.0), 'min_traj_len': 0, 'max_traj_len': 195, 'frame_subset': (0, 194), 'track_list': None, 'track_ROI': None, 'name': ''}\n"
"{'xlim': (36.61438636861541, 151.61439), 'ylim': (38.13919994626437, 473.7006114895953), 'zlim': (21.689340569848213, 473.7984788052534), 'min_traj_len': 0, 'max_traj_len': 25, 'frame_subset': (0, 6), 'track_list': None, 'track_ROI': None, 'name': ''}\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "57998b469cd049cc86c03c06ef299949",
"model_id": "6791259f374d43049cd35e0d035e2dac",
"version_major": 2,
"version_minor": 0
},
......@@ -1892,7 +1673,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 20,
"metadata": {
"scrolled": true
},
......@@ -1936,7 +1717,7 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 21,
"metadata": {
"scrolled": false
},
......@@ -1968,7 +1749,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "dca6b24e228e4bf689fed2bb85c8e131",
"model_id": "d2fcd85061a54161847ef40435ab751f",
"version_major": 2,
"version_minor": 0
},
......@@ -1994,7 +1775,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "e8fc323ff8ff4ae9a5c9bd9a2e566c45",
"model_id": "bc190da5b9df4802b8bb807d498bcc24",
"version_major": 2,
"version_minor": 0
},
......@@ -2044,7 +1825,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "9629fd3e0ca649c5a40745e1f99a19e6",
"model_id": "afa61d7a8f33428d8b8b1177eaadb5f2",
"version_major": 2,
"version_minor": 0
},
......@@ -2070,7 +1851,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "ed4673fd14e84d0e84332f3d16576f6e",
"model_id": "fc324fe882434df299e45383afb81adb",
"version_major": 2,
"version_minor": 0
},
......@@ -2096,7 +1877,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c0fde10331f44458a98437ef1e90e8e8",
"model_id": "c96c0cde4c2446998f940291621f6793",
"version_major": 2,
"version_minor": 0
},
......@@ -2122,7 +1903,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c1722e8618ce45f88a43200c4c77338d",
"model_id": "b46faeac867a40dd84593ecf9983e3dc",
"version_major": 2,
"version_minor": 0
},
......@@ -2172,7 +1953,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "e43ed779a4054ce8becc69de05458287",
"model_id": "419ece0a1a5d4852a4891d95d089f601",
"version_major": 2,
"version_minor": 0
},
......@@ -2186,7 +1967,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "7bd6ca0f8b0c493da9c34b6feb1ec02a",
"model_id": "99aae4740f6a4229b5f9daef2419a724",
"version_major": 2,
"version_minor": 0
},
......@@ -2200,7 +1981,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "6bc47f86382740f49f9e6fd6077a95d0",
"model_id": "8ad7c3f659534acb852ae9caf436c080",
"version_major": 2,
"version_minor": 0
},
......@@ -2250,7 +2031,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "eec01f7f924e4bd49afd366c61f347c9",
"model_id": "3a47af60147d4af0ac2b858034ebd545",
"version_major": 2,
"version_minor": 0
},
...