Skip to content

Commit

Permalink
sort Data Log table rows by field name
Browse files Browse the repository at this point in the history
  • Loading branch information
pothiers committed Nov 11, 2024
1 parent fa0290f commit 07d4dcc
Show file tree
Hide file tree
Showing 2 changed files with 138 additions and 97 deletions.
190 changes: 95 additions & 95 deletions notebooks_tsqr/NightLog.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 23,
"id": "1b509665-d538-4bd9-a93c-22c3ec1ded12",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -788,12 +788,12 @@
" <td>94</td>\n",
" </tr>\n",
" <tr>\n",
" <th>dark</th>\n",
" <th>bias</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>46</td>\n",
" <td>46</td>\n",
" <td>10</td>\n",
" <td>10</td>\n",
" </tr>\n",
" <tr>\n",
" <th>cwfs</th>\n",
Expand All @@ -804,12 +804,12 @@
" <td>81</td>\n",
" </tr>\n",
" <tr>\n",
" <th>bias</th>\n",
" <th>dark</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>10</td>\n",
" <td>10</td>\n",
" <td>46</td>\n",
" <td>46</td>\n",
" </tr>\n",
" <tr>\n",
" <th>science</th>\n",
Expand All @@ -826,9 +826,9 @@
"text/plain": [
" good questionable junk unknown total\n",
"acq 0 0 0 94 94\n",
"dark 0 0 0 46 46\n",
"cwfs 0 0 0 81 81\n",
"bias 0 0 0 10 10\n",
"cwfs 0 0 0 81 81\n",
"dark 0 0 0 46 46\n",
"science 0 0 0 8 8"
]
},
Expand Down Expand Up @@ -872,108 +872,100 @@
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>extra</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>infocus_alignment_sweep_m2rx</th>\n",
" <th>checking</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>7</td>\n",
" <td>7</td>\n",
" <td>6</td>\n",
" <td>6</td>\n",
" </tr>\n",
" <tr>\n",
" <th>extra_alignment_sweep_m2rx</th>\n",
" <th>comcam-usdf-checkout</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>7</td>\n",
" <td>7</td>\n",
" <td>10</td>\n",
" <td>10</td>\n",
" </tr>\n",
" <tr>\n",
" <th>checking</th>\n",
" <th>comcam_twilight_flat</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>6</td>\n",
" <td>6</td>\n",
" <td>87</td>\n",
" <td>87</td>\n",
" </tr>\n",
" <tr>\n",
" <th>extra_sitcom-826</th>\n",
" <th>extra</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>12</td>\n",
" <td>12</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>tmacheckout</th>\n",
" <th>extra_alignment_sweep_m2rx</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>8</td>\n",
" <td>8</td>\n",
" <td>7</td>\n",
" <td>7</td>\n",
" </tr>\n",
" <tr>\n",
" <th>infocus_alignment_sweep_m2ry</th>\n",
" <th>extra_alignment_sweep_m2ry</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>17</td>\n",
" <td>17</td>\n",
" </tr>\n",
" <tr>\n",
" <th>intra_alignment_sweep_m2rx</th>\n",
" <th>extra_best_m2_ry</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>7</td>\n",
" <td>7</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>intra_best_m2_ry</th>\n",
" <th>extra_sitcom-826</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>12</td>\n",
" <td>12</td>\n",
" </tr>\n",
" <tr>\n",
" <th>comcam_twilight_flat</th>\n",
" <th>infocus</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>87</td>\n",
" <td>87</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>infocus_sitcom-826</th>\n",
" <th>infocus_alignment_sweep_m2rx</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>12</td>\n",
" <td>12</td>\n",
" <td>7</td>\n",
" <td>7</td>\n",
" </tr>\n",
" <tr>\n",
" <th>comcam-usdf-checkout</th>\n",
" <th>infocus_alignment_sweep_m2ry</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>10</td>\n",
" <td>10</td>\n",
" <td>17</td>\n",
" <td>17</td>\n",
" </tr>\n",
" <tr>\n",
" <th>infocus</th>\n",
" <th>infocus_sitcom-826</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>12</td>\n",
" <td>12</td>\n",
" </tr>\n",
" <tr>\n",
" <th>intra</th>\n",
Expand All @@ -984,23 +976,23 @@
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>intra_alignment_sweep_m2ry</th>\n",
" <th>intra_alignment_sweep_m2rx</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>18</td>\n",
" <td>18</td>\n",
" <td>7</td>\n",
" <td>7</td>\n",
" </tr>\n",
" <tr>\n",
" <th>science</th>\n",
" <th>intra_alignment_sweep_m2ry</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>8</td>\n",
" <td>8</td>\n",
" <td>18</td>\n",
" <td>18</td>\n",
" </tr>\n",
" <tr>\n",
" <th>extra_best_m2_ry</th>\n",
" <th>intra_best_m2_ry</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
Expand All @@ -1016,38 +1008,46 @@
" <td>12</td>\n",
" </tr>\n",
" <tr>\n",
" <th>extra_alignment_sweep_m2ry</th>\n",
" <th>science</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>17</td>\n",
" <td>17</td>\n",
" <td>8</td>\n",
" <td>8</td>\n",
" </tr>\n",
" <tr>\n",
" <th>tmacheckout</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>8</td>\n",
" <td>8</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" good questionable junk unknown total\n",
"checking 0 0 0 6 6\n",
"comcam-usdf-checkout 0 0 0 10 10\n",
"comcam_twilight_flat 0 0 0 87 87\n",
"extra 0 0 0 3 3\n",
"infocus_alignment_sweep_m2rx 0 0 0 7 7\n",
"extra_alignment_sweep_m2rx 0 0 0 7 7\n",
"checking 0 0 0 6 6\n",
"extra_alignment_sweep_m2ry 0 0 0 17 17\n",
"extra_best_m2_ry 0 0 0 1 1\n",
"extra_sitcom-826 0 0 0 12 12\n",
"tmacheckout 0 0 0 8 8\n",
"infocus 0 0 0 3 3\n",
"infocus_alignment_sweep_m2rx 0 0 0 7 7\n",
"infocus_alignment_sweep_m2ry 0 0 0 17 17\n",
"intra_alignment_sweep_m2rx 0 0 0 7 7\n",
"intra_best_m2_ry 0 0 0 1 1\n",
"comcam_twilight_flat 0 0 0 87 87\n",
"infocus_sitcom-826 0 0 0 12 12\n",
"comcam-usdf-checkout 0 0 0 10 10\n",
"infocus 0 0 0 3 3\n",
"intra 0 0 0 3 3\n",
"intra_alignment_sweep_m2rx 0 0 0 7 7\n",
"intra_alignment_sweep_m2ry 0 0 0 18 18\n",
"science 0 0 0 8 8\n",
"extra_best_m2_ry 0 0 0 1 1\n",
"intra_best_m2_ry 0 0 0 1 1\n",
"intra_sitcom-826 0 0 0 12 12\n",
"extra_alignment_sweep_m2ry 0 0 0 17 17"
"science 0 0 0 8 8\n",
"tmacheckout 0 0 0 8 8"
]
},
"metadata": {},
Expand Down Expand Up @@ -1090,12 +1090,12 @@
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>BLOCK-T279</th>\n",
" <th>BLOCK-T215</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>98</td>\n",
" <td>98</td>\n",
" <td>87</td>\n",
" <td>87</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BLOCK-T246</th>\n",
Expand All @@ -1106,44 +1106,44 @@
" <td>10</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BLOCK-T250</th>\n",
" <th>BLOCK-T248</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>6</td>\n",
" <td>6</td>\n",
" <td>17</td>\n",
" <td>17</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BLOCK-T248</th>\n",
" <th>BLOCK-T249</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>17</td>\n",
" <td>17</td>\n",
" <td>11</td>\n",
" <td>11</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BLOCK-T92</th>\n",
" <th>BLOCK-T250</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>6</td>\n",
" <td>6</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BLOCK-T249</th>\n",
" <th>BLOCK-T279</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>11</td>\n",
" <td>11</td>\n",
" <td>98</td>\n",
" <td>98</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BLOCK-T215</th>\n",
" <th>BLOCK-T92</th>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>87</td>\n",
" <td>87</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>PP-SURVEY</th>\n",
Expand All @@ -1159,13 +1159,13 @@
],
"text/plain": [
" good questionable junk unknown total\n",
"BLOCK-T279 0 0 0 98 98\n",
"BLOCK-T215 0 0 0 87 87\n",
"BLOCK-T246 0 0 0 10 10\n",
"BLOCK-T250 0 0 0 6 6\n",
"BLOCK-T248 0 0 0 17 17\n",
"BLOCK-T92 0 0 0 2 2\n",
"BLOCK-T249 0 0 0 11 11\n",
"BLOCK-T215 0 0 0 87 87\n",
"BLOCK-T250 0 0 0 6 6\n",
"BLOCK-T279 0 0 0 98 98\n",
"BLOCK-T92 0 0 0 2 2\n",
"PP-SURVEY 0 0 0 8 8"
]
},
Expand Down Expand Up @@ -1193,7 +1193,7 @@
" if df.empty:\n",
" continue\n",
" print(field_name.title().replace('_',' '))\n",
" display(df.T)"
" display(df.T.sort_index())"
]
},
{
Expand Down
Loading

0 comments on commit 07d4dcc

Please sign in to comment.