Skip to content

Commit

Permalink
Warn that rerun association databases were not joined properly
Browse files Browse the repository at this point in the history
  • Loading branch information
mrawls committed Jul 2, 2018
1 parent e844e22 commit 786490e
Showing 1 changed file with 23 additions and 12 deletions.
35 changes: 23 additions & 12 deletions notebooks/DM-14761-Reprocessing-Take2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"execution_count": 2,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import os\n",
Expand All @@ -37,13 +39,18 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"We'll bring in the \"take2\" rerun and refer to the DM-14260 \"take1\" rerun as \"old,\" eventually concatenating the pandas dataframes we make from each of them together as if it had been one big successful run."
"We'll bring in the \"take2\" rerun and refer to the DM-14260 \"take1\" rerun as \"old,\" eventually concatenating the pandas dataframes we make from each of them together as if it had been one big successful run.\n",
"\n",
"#### WARNING\n",
"This naive concatenation doesn't work as intended because the DIAObject IDs don't match! To do this properly, we would need to associate the objects in the take2 database with the objects in the take1 database."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"execution_count": 3,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"butler = dafPersist.Butler(workingDir)\n",
Expand All @@ -59,7 +66,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 4,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -854,10 +861,10 @@
{
"data": {
"text/plain": [
"<matplotlib.image.AxesImage at 0x7fe239eb5908>"
"<matplotlib.image.AxesImage at 0x7f43ae893780>"
]
},
"execution_count": 14,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -874,7 +881,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"metadata": {
"collapsed": true
},
Expand All @@ -894,7 +901,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"metadata": {
"collapsed": true
},
Expand All @@ -914,10 +921,14 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"# WARNING\n",
"# this concatenation is not working as intended because the new DIAObjects are not associated with the old ones\n",
"# (in other words, the DIAObject IDs are different in each dataframe)\n",
"\n",
"objTable = pd.concat([objTableOld, objTableNew])\n",
"srcTable = pd.concat([srcTableOld, srcTableNew])\n",
"ccdTable = pd.concat([ccdTableOld, ccdTableNew])\n",
Expand Down Expand Up @@ -1740,7 +1751,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 8,
"metadata": {},
"outputs": [
{
Expand Down

0 comments on commit 786490e

Please sign in to comment.