Skip to content

Instantly share code, notes, and snippets.

@zonca
Created October 28, 2020 06:06
Show Gist options
  • Save zonca/e0361f4d0b1954dd6c2ac47f9820a35e to your computer and use it in GitHub Desktop.
Save zonca/e0361f4d0b1954dd6c2ac47f9820a35e to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Using the `jwst` conda environment on `azonca` home on Galactica"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"/home/azonca/p/software/IRIS-telemetry/IRIS-Model-Files/drs/drs-assembly\n"
]
}
],
"source": [
"cd IRIS-Model-Files/drs/drs-assembly/"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"command-model.conf publish-model.conf\n",
"component-model.conf subscribe-model.conf\n",
"\u001b[0m\u001b[01;32mdefinition_of_metadata_from_detector_assemblies.png\u001b[0m*\n"
]
}
],
"source": [
"ls"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"from pyhocon import ConfigFactory\n",
"\n",
"conf = ConfigFactory.parse_file('subscribe-model.conf')"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"import pyhocon"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"odict_keys(['subsystem', 'component', 'subscribe'])"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"conf.keys()"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"odict_keys(['description', 'events'])"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"conf[\"subscribe\"].keys()"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"telemetry = conf['subscribe']['events']"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"ConfigTree([('subsystem', 'TCS'),\n",
" ('component', 'cmIRIS'),\n",
" ('name', 'oiwfsTargetInfo'),\n",
" ('requiredRate', 4),\n",
" ('usage',\n",
" 'Proposed item in which TCS publishes ICRS RA, Dec and proper motions, names, and colors (what system?) for OIWFS targets. FITS=GUIDDEC*, GUIDRA*, GUIDNAM*, GUIDPM*, GUIDCOL*')])"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"telemetry[0]"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"113"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"len(telemetry)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"odict_keys(['subsystem', 'component', 'subscribe'])"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"conf.keys()"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
"sub = set()"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"odict_keys(['subsystem', 'component', 'name', 'requiredRate', 'usage'])"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"telemetry[0].keys()"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"for each in telemetry:\n",
" sub = sub.union(set(each.keys()))"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'component', 'name', 'requiredRate', 'subsystem', 'usage'}"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sub"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
"field_name = sub"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"missing requiredRate from currentPosition\n",
"missing usage from currentPosition\n",
"missing requiredRate from pointingStatus\n",
"missing usage from pointingStatus\n",
"missing requiredRate from atmDispersion\n",
"missing usage from atmDispersion\n",
"missing requiredRate from ngsPos\n",
"missing usage from ngsPos\n",
"missing requiredRate from M3 Position\n",
"missing usage from M3 Position\n",
"missing requiredRate from M2 Position\n",
"missing usage from M2 Position\n",
"missing requiredRate from imgAtmDispersion\n",
"missing usage from imgAtmDispersion\n",
"missing requiredRate from oiwfs1AtmDispersion\n",
"missing usage from oiwfs1AtmDispersion\n",
"missing requiredRate from oiwfs2AtmDispersion\n",
"missing usage from oiwfs2AtmDispersion\n",
"missing requiredRate from oiwfs3AtmDispersion\n",
"missing usage from oiwfs3AtmDispersion\n",
"missing requiredRate from instrumentRotatorAngle\n",
"missing usage from instrumentRotatorAngle\n",
"missing requiredRate from pupilRotation\n",
"missing usage from pupilRotation\n",
"missing requiredRate from positionAngle\n",
"missing usage from positionAngle\n",
"missing requiredRate from oiwfsProbeDemands\n",
"missing usage from oiwfsProbeDemands\n",
"missing requiredRate from odgwPosDemands\n",
"missing usage from odgwPosDemands\n",
"missing requiredRate from TCS Telescope Position\n",
"missing usage from TCS Telescope Position\n",
"missing requiredRate from CurrentPosition\n",
"missing usage from CurrentPosition\n",
"missing requiredRate from CurrentPosition\n",
"missing usage from CurrentPosition\n",
"missing requiredRate from current\n",
"missing usage from current\n",
"missing requiredRate from turbLgs\n",
"missing usage from turbLgs\n",
"missing requiredRate from turbNgs\n",
"missing usage from turbNgs\n",
"missing requiredRate from mode\n",
"missing usage from mode\n",
"missing requiredRate from inst\n",
"missing usage from inst\n",
"missing requiredRate from lgsState\n",
"missing usage from lgsState\n",
"missing requiredRate from odgwImage\n",
"missing usage from odgwImage\n",
"missing requiredRate from oiwfsImage\n",
"missing usage from oiwfsImage\n",
"missing requiredRate from pwfsState\n",
"missing usage from pwfsState\n",
"missing requiredRate from state\n",
"missing usage from state\n",
"missing requiredRate from current\n",
"missing usage from current\n",
"missing requiredRate from state\n",
"missing usage from state\n",
"missing requiredRate from temperature\n",
"missing usage from temperature\n",
"missing requiredRate from sodiumLayer\n",
"missing usage from sodiumLayer\n",
"missing requiredRate from current\n",
"missing usage from current\n",
"missing requiredRate from temperature\n",
"missing usage from temperature\n",
"missing requiredRate from pressure\n",
"missing usage from pressure\n",
"missing requiredRate from current\n",
"missing usage from current\n",
"missing requiredRate from current\n",
"missing usage from current\n",
"missing requiredRate from MIRROR_state\n",
"missing usage from MIRROR_state\n",
"missing requiredRate from dark\n",
"missing usage from dark\n",
"missing requiredRate from current\n",
"missing usage from current\n",
"missing requiredRate from state\n",
"missing usage from state\n",
"missing requiredRate from wheel1\n",
"missing usage from wheel1\n",
"missing requiredRate from wheel2\n",
"missing usage from wheel2\n",
"missing requiredRate from wheel3\n",
"missing usage from wheel3\n",
"missing requiredRate from wheel4\n",
"missing usage from wheel4\n",
"missing requiredRate from wheel5\n",
"missing usage from wheel5\n",
"missing requiredRate from odgwShift\n",
"missing usage from odgwShift\n",
"missing requiredRate from PRISM_state\n",
"missing usage from PRISM_state\n",
"missing requiredRate from currentConfig\n",
"missing usage from currentConfig\n",
"missing requiredRate from systemConf\n",
"missing usage from systemConf\n",
"missing requiredRate from exposureState\n",
"missing usage from exposureState\n",
"missing requiredRate from startExposure\n",
"missing usage from startExposure\n",
"missing requiredRate from readoutCompleted\n",
"missing usage from readoutCompleted\n",
"missing requiredRate from endExposure\n",
"missing usage from endExposure\n",
"missing requiredRate from aborting\n",
"missing usage from aborting\n",
"missing requiredRate from aborted\n",
"missing usage from aborted\n",
"missing requiredRate from readoutFailed\n",
"missing usage from readoutFailed\n",
"missing requiredRate from POS_current\n",
"missing usage from POS_current\n",
"missing requiredRate from MODE_state\n",
"missing usage from MODE_state\n",
"missing requiredRate from exposureRepeats\n",
"missing usage from exposureRepeats\n",
"missing requiredRate from observing\n",
"missing usage from observing\n",
"missing requiredRate from aborting\n",
"missing usage from aborting\n",
"missing requiredRate from ifsMode\n",
"missing usage from ifsMode\n",
"missing requiredRate from sciAdcFollow\n",
"missing usage from sciAdcFollow\n",
"missing requiredRate from ifsObserveSettings\n",
"missing usage from ifsObserveSettings\n",
"missing requiredRate from imagerObserveSettings\n",
"missing usage from imagerObserveSettings\n",
"missing requiredRate from startPrepare\n",
"missing usage from startPrepare\n",
"missing requiredRate from startDataAcquisition\n",
"missing usage from startDataAcquisition\n",
"missing requiredRate from endDataAcquisition\n",
"missing usage from endDataAcquisition\n",
"missing requiredRate from startReadout\n",
"missing usage from startReadout\n",
"missing requiredRate from endReadout\n",
"missing usage from endReadout\n",
"missing requiredRate from startDatasetWrite\n",
"missing usage from startDatasetWrite\n",
"missing requiredRate from endDatasetWrite\n",
"missing usage from endDatasetWrite\n",
"missing requiredRate from observeComplete\n",
"missing usage from observeComplete\n",
"missing requiredRate from observationId\n",
"missing usage from observationId\n",
"missing requiredRate from observerKeywords\n",
"missing usage from observerKeywords\n",
"missing requiredRate from observationBlockKeywords\n",
"missing usage from observationBlockKeywords\n",
"missing requiredRate from scriptName\n",
"missing usage from scriptName\n",
"missing requiredRate from scale\n",
"missing usage from scale\n",
"missing requiredRate from IFSmode\n",
"missing usage from IFSmode\n",
"missing requiredRate from pickoffMirrorMech\n",
"missing usage from pickoffMirrorMech\n",
"missing requiredRate from periscopeMirrorMech\n",
"missing usage from periscopeMirrorMech\n",
"missing requiredRate from firstopticsmech\n",
"missing usage from firstopticsmech\n",
"missing requiredRate from secondopticsmech\n",
"missing usage from secondopticsmech\n",
"missing requiredRate from GRATING_state\n",
"missing usage from GRATING_state\n",
"missing requiredRate from LENSLETMASK_state\n",
"missing usage from LENSLETMASK_state\n",
"missing requiredRate from SLICERMASK_state\n",
"missing usage from SLICERMASK_state\n",
"missing requiredRate from resolution\n",
"missing usage from resolution\n",
"missing requiredRate from gratingmech\n",
"missing usage from gratingmech\n",
"missing requiredRate from lensletmaskmech\n",
"missing usage from lensletmaskmech\n",
"missing requiredRate from slicermaskmech\n",
"missing usage from slicermaskmech\n",
"missing requiredRate from currentConfig\n",
"missing usage from currentConfig\n",
"missing requiredRate from systemConf\n",
"missing usage from systemConf\n",
"missing requiredRate from exposureState\n",
"missing usage from exposureState\n",
"missing requiredRate from startExposure\n",
"missing usage from startExposure\n",
"missing requiredRate from readoutCompleted\n",
"missing usage from readoutCompleted\n",
"missing requiredRate from endExposure\n",
"missing usage from endExposure\n",
"missing requiredRate from aborting\n",
"missing usage from aborting\n",
"missing requiredRate from aborted\n",
"missing usage from aborted\n",
"missing requiredRate from readoutFailed\n",
"missing usage from readoutFailed\n",
"missing requiredRate from IMGTEMP[XX]\n",
"missing usage from IMGTEMP[XX]\n",
"missing requiredRate from IFSTEMP[XX]\n",
"missing usage from IFSTEMP[XX]\n",
"missing requiredRate from TEMP_TEMP[N]\n",
"missing usage from TEMP_TEMP[N]\n",
"missing requiredRate from wind-speeds\n",
"missing usage from wind-speeds\n",
"missing requiredRate from air-temperatures\n",
"missing usage from air-temperatures\n",
"missing requiredRate from surface-temperatures\n",
"missing usage from surface-temperatures\n",
"missing requiredRate from structural-temperatures\n",
"missing usage from structural-temperatures\n",
"missing requiredRate from humidities\n",
"missing usage from humidities\n",
"missing requiredRate from dew-points\n",
"missing usage from dew-points\n",
"missing requiredRate from pressures\n",
"missing usage from pressures\n"
]
}
],
"source": [
"field_values = {}\n",
"for name in field_name:\n",
" field_values[name] = set()\n",
"for t in telemetry:\n",
" for name in field_name:\n",
" try:\n",
" field_values[name].add(t[name])\n",
" except pyhocon.ConfigMissingException:\n",
" print(f\"missing {name} from {t['name']}\")\n",
" field_values[name].add(np.nan)"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
"telemetry_df = pd.DataFrame(telemetry)"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [
{
"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>subsystem</th>\n",
" <th>component</th>\n",
" <th>name</th>\n",
" <th>requiredRate</th>\n",
" <th>usage</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>oiwfsTargetInfo</td>\n",
" <td>4.0</td>\n",
" <td>Proposed item in which TCS publishes ICRS RA, ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>odgwTargetInfo</td>\n",
" <td>4.0</td>\n",
" <td>Proposed item in which TCS publishes ICRS RA, ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>TCS</td>\n",
" <td>cmNFIRAOS</td>\n",
" <td>ngsTargetInfo</td>\n",
" <td>4.0</td>\n",
" <td>Proposed item in which TCS publishes ICRS RA, ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>TCS</td>\n",
" <td>pk</td>\n",
" <td>currentPosition</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>TCS</td>\n",
" <td>pk</td>\n",
" <td>pointingStatus</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>TCS</td>\n",
" <td>cmNFIRAOS</td>\n",
" <td>atmDispersion</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>TCS</td>\n",
" <td>cmNFIRAOS</td>\n",
" <td>ngsPos</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>TCS</td>\n",
" <td>TCS M3 Assembly</td>\n",
" <td>M3 Position</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>TCS</td>\n",
" <td>TCS M2 Assembly</td>\n",
" <td>M2 Position</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>imgAtmDispersion</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>oiwfs1AtmDispersion</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>oiwfs2AtmDispersion</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>oiwfs3AtmDispersion</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>instrumentRotatorAngle</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>pupilRotation</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>positionAngle</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>oiwfsProbeDemands</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>odgwPosDemands</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18</th>\n",
" <td>TCS</td>\n",
" <td>TCS MCS Assembly</td>\n",
" <td>TCS Telescope Position</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19</th>\n",
" <td>TCS</td>\n",
" <td>ENCAssembly</td>\n",
" <td>CurrentPosition</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>20</th>\n",
" <td>TCS</td>\n",
" <td>PointingKernelAssembly</td>\n",
" <td>CurrentPosition</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21</th>\n",
" <td>NFIRAOS</td>\n",
" <td>ssLgs</td>\n",
" <td>current</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>22</th>\n",
" <td>NFIRAOS</td>\n",
" <td>rtc</td>\n",
" <td>turbLgs</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>23</th>\n",
" <td>NFIRAOS</td>\n",
" <td>rtc</td>\n",
" <td>turbNgs</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>24</th>\n",
" <td>NFIRAOS</td>\n",
" <td>rtc</td>\n",
" <td>mode</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25</th>\n",
" <td>NFIRAOS</td>\n",
" <td>rtc</td>\n",
" <td>inst</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>26</th>\n",
" <td>NFIRAOS</td>\n",
" <td>rtc</td>\n",
" <td>lgsState</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>27</th>\n",
" <td>NFIRAOS</td>\n",
" <td>rtc</td>\n",
" <td>odgwImage</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>28</th>\n",
" <td>NFIRAOS</td>\n",
" <td>rtc</td>\n",
" <td>oiwfsImage</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>29</th>\n",
" <td>NFIRAOS</td>\n",
" <td>rtc</td>\n",
" <td>pwfsState</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>83</th>\n",
" <td>IRIS</td>\n",
" <td>ifs.scale</td>\n",
" <td>pickoffMirrorMech</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>84</th>\n",
" <td>IRIS</td>\n",
" <td>ifs.scale</td>\n",
" <td>periscopeMirrorMech</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>85</th>\n",
" <td>IRIS</td>\n",
" <td>ifs.scale</td>\n",
" <td>firstopticsmech</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>86</th>\n",
" <td>IRIS</td>\n",
" <td>ifs.scale</td>\n",
" <td>secondopticsmech</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>87</th>\n",
" <td>IRIS</td>\n",
" <td>ifs.res</td>\n",
" <td>GRATING_state</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>88</th>\n",
" <td>IRIS</td>\n",
" <td>ifs.res</td>\n",
" <td>LENSLETMASK_state</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>89</th>\n",
" <td>IRIS</td>\n",
" <td>ifs.res</td>\n",
" <td>SLICERMASK_state</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>90</th>\n",
" <td>IRIS</td>\n",
" <td>ifs.res</td>\n",
" <td>resolution</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>91</th>\n",
" <td>IRIS</td>\n",
" <td>ifs.res</td>\n",
" <td>gratingmech</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>92</th>\n",
" <td>IRIS</td>\n",
" <td>ifs.res</td>\n",
" <td>lensletmaskmech</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>93</th>\n",
" <td>IRIS</td>\n",
" <td>ifs.res</td>\n",
" <td>slicermaskmech</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>94</th>\n",
" <td>IRIS</td>\n",
" <td>ifs.detector</td>\n",
" <td>currentConfig</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>95</th>\n",
" <td>IRIS</td>\n",
" <td>ifs.detector</td>\n",
" <td>systemConf</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>96</th>\n",
" <td>IRIS</td>\n",
" <td>ifs.detector</td>\n",
" <td>exposureState</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>97</th>\n",
" <td>IRIS</td>\n",
" <td>ifs.detector</td>\n",
" <td>startExposure</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>98</th>\n",
" <td>IRIS</td>\n",
" <td>ifs.detector</td>\n",
" <td>readoutCompleted</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>99</th>\n",
" <td>IRIS</td>\n",
" <td>ifs.detector</td>\n",
" <td>endExposure</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>100</th>\n",
" <td>IRIS</td>\n",
" <td>ifs.detector</td>\n",
" <td>aborting</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>101</th>\n",
" <td>IRIS</td>\n",
" <td>ifs.detector</td>\n",
" <td>aborted</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>102</th>\n",
" <td>IRIS</td>\n",
" <td>ifs.detector</td>\n",
" <td>readoutFailed</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>103</th>\n",
" <td>IRIS</td>\n",
" <td>sc.cryoenv</td>\n",
" <td>IMGTEMP[XX]</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>104</th>\n",
" <td>IRIS</td>\n",
" <td>sc.cryoenv</td>\n",
" <td>IFSTEMP[XX]</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>105</th>\n",
" <td>IRIS</td>\n",
" <td>el.env</td>\n",
" <td>TEMP_TEMP[N]</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>106</th>\n",
" <td>ESEN</td>\n",
" <td>ESEN Publisher Assembly</td>\n",
" <td>wind-speeds</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>107</th>\n",
" <td>ESEN</td>\n",
" <td>ESEN Publisher Assembly</td>\n",
" <td>air-temperatures</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>108</th>\n",
" <td>ESEN</td>\n",
" <td>ESEN Publisher Assembly</td>\n",
" <td>surface-temperatures</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>109</th>\n",
" <td>ESEN</td>\n",
" <td>ESEN Publisher Assembly</td>\n",
" <td>structural-temperatures</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>110</th>\n",
" <td>ESEN</td>\n",
" <td>ESEN Publisher Assembly</td>\n",
" <td>humidities</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>111</th>\n",
" <td>ESEN</td>\n",
" <td>ESEN Publisher Assembly</td>\n",
" <td>dew-points</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>112</th>\n",
" <td>ESEN</td>\n",
" <td>ESEN Publisher Assembly</td>\n",
" <td>pressures</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>113 rows × 5 columns</p>\n",
"</div>"
],
"text/plain": [
" subsystem component name requiredRate \\\n",
"0 TCS cmIRIS oiwfsTargetInfo 4.0 \n",
"1 TCS cmIRIS odgwTargetInfo 4.0 \n",
"2 TCS cmNFIRAOS ngsTargetInfo 4.0 \n",
"3 TCS pk currentPosition NaN \n",
"4 TCS pk pointingStatus NaN \n",
"5 TCS cmNFIRAOS atmDispersion NaN \n",
"6 TCS cmNFIRAOS ngsPos NaN \n",
"7 TCS TCS M3 Assembly M3 Position NaN \n",
"8 TCS TCS M2 Assembly M2 Position NaN \n",
"9 TCS cmIRIS imgAtmDispersion NaN \n",
"10 TCS cmIRIS oiwfs1AtmDispersion NaN \n",
"11 TCS cmIRIS oiwfs2AtmDispersion NaN \n",
"12 TCS cmIRIS oiwfs3AtmDispersion NaN \n",
"13 TCS cmIRIS instrumentRotatorAngle NaN \n",
"14 TCS cmIRIS pupilRotation NaN \n",
"15 TCS cmIRIS positionAngle NaN \n",
"16 TCS cmIRIS oiwfsProbeDemands NaN \n",
"17 TCS cmIRIS odgwPosDemands NaN \n",
"18 TCS TCS MCS Assembly TCS Telescope Position NaN \n",
"19 TCS ENCAssembly CurrentPosition NaN \n",
"20 TCS PointingKernelAssembly CurrentPosition NaN \n",
"21 NFIRAOS ssLgs current NaN \n",
"22 NFIRAOS rtc turbLgs NaN \n",
"23 NFIRAOS rtc turbNgs NaN \n",
"24 NFIRAOS rtc mode NaN \n",
"25 NFIRAOS rtc inst NaN \n",
"26 NFIRAOS rtc lgsState NaN \n",
"27 NFIRAOS rtc odgwImage NaN \n",
"28 NFIRAOS rtc oiwfsImage NaN \n",
"29 NFIRAOS rtc pwfsState NaN \n",
".. ... ... ... ... \n",
"83 IRIS ifs.scale pickoffMirrorMech NaN \n",
"84 IRIS ifs.scale periscopeMirrorMech NaN \n",
"85 IRIS ifs.scale firstopticsmech NaN \n",
"86 IRIS ifs.scale secondopticsmech NaN \n",
"87 IRIS ifs.res GRATING_state NaN \n",
"88 IRIS ifs.res LENSLETMASK_state NaN \n",
"89 IRIS ifs.res SLICERMASK_state NaN \n",
"90 IRIS ifs.res resolution NaN \n",
"91 IRIS ifs.res gratingmech NaN \n",
"92 IRIS ifs.res lensletmaskmech NaN \n",
"93 IRIS ifs.res slicermaskmech NaN \n",
"94 IRIS ifs.detector currentConfig NaN \n",
"95 IRIS ifs.detector systemConf NaN \n",
"96 IRIS ifs.detector exposureState NaN \n",
"97 IRIS ifs.detector startExposure NaN \n",
"98 IRIS ifs.detector readoutCompleted NaN \n",
"99 IRIS ifs.detector endExposure NaN \n",
"100 IRIS ifs.detector aborting NaN \n",
"101 IRIS ifs.detector aborted NaN \n",
"102 IRIS ifs.detector readoutFailed NaN \n",
"103 IRIS sc.cryoenv IMGTEMP[XX] NaN \n",
"104 IRIS sc.cryoenv IFSTEMP[XX] NaN \n",
"105 IRIS el.env TEMP_TEMP[N] NaN \n",
"106 ESEN ESEN Publisher Assembly wind-speeds NaN \n",
"107 ESEN ESEN Publisher Assembly air-temperatures NaN \n",
"108 ESEN ESEN Publisher Assembly surface-temperatures NaN \n",
"109 ESEN ESEN Publisher Assembly structural-temperatures NaN \n",
"110 ESEN ESEN Publisher Assembly humidities NaN \n",
"111 ESEN ESEN Publisher Assembly dew-points NaN \n",
"112 ESEN ESEN Publisher Assembly pressures NaN \n",
"\n",
" usage \n",
"0 Proposed item in which TCS publishes ICRS RA, ... \n",
"1 Proposed item in which TCS publishes ICRS RA, ... \n",
"2 Proposed item in which TCS publishes ICRS RA, ... \n",
"3 NaN \n",
"4 NaN \n",
"5 NaN \n",
"6 NaN \n",
"7 NaN \n",
"8 NaN \n",
"9 NaN \n",
"10 NaN \n",
"11 NaN \n",
"12 NaN \n",
"13 NaN \n",
"14 NaN \n",
"15 NaN \n",
"16 NaN \n",
"17 NaN \n",
"18 NaN \n",
"19 NaN \n",
"20 NaN \n",
"21 NaN \n",
"22 NaN \n",
"23 NaN \n",
"24 NaN \n",
"25 NaN \n",
"26 NaN \n",
"27 NaN \n",
"28 NaN \n",
"29 NaN \n",
".. ... \n",
"83 NaN \n",
"84 NaN \n",
"85 NaN \n",
"86 NaN \n",
"87 NaN \n",
"88 NaN \n",
"89 NaN \n",
"90 NaN \n",
"91 NaN \n",
"92 NaN \n",
"93 NaN \n",
"94 NaN \n",
"95 NaN \n",
"96 NaN \n",
"97 NaN \n",
"98 NaN \n",
"99 NaN \n",
"100 NaN \n",
"101 NaN \n",
"102 NaN \n",
"103 NaN \n",
"104 NaN \n",
"105 NaN \n",
"106 NaN \n",
"107 NaN \n",
"108 NaN \n",
"109 NaN \n",
"110 NaN \n",
"111 NaN \n",
"112 NaN \n",
"\n",
"[113 rows x 5 columns]"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"telemetry_df"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [],
"source": [
"telemetry_df[\"fits_name\"] = \"\""
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [],
"source": [
"row = telemetry_df.iloc[0]"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [],
"source": [
"row = telemetry_df.iloc[54]"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"nan"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"row[\"usage\"]"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [],
"source": [
"expanded_telemetry_list = []"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [],
"source": [
"# from Nils\n",
"shorten_name = {\"AOTTFGUID\":\"AOTTGUID\",\n",
" \"AOTTGUID1\":\"AOTTUID1\",\n",
" \"AOTTGUID2\":\"AOTTUID2\",\n",
" \"AOTT1GAIN\":\"AOT1GAIN\",\n",
" \"AOTT1STAT\":\"AOT1STAT\",\n",
" \"AOTT2GAIN\":\"AOT2GAIN\",\n",
" \"AOTT2STAT\":\"AOT2STAT\",\n",
" \"AOTTFGAIN\":\"AOTFGAIN\",\n",
" \"AOTTFSTAT\":\"AOTFSTAT\",\n",
" \"GUID_CTS1\":\"GUIDCTS1\",\n",
" \"GUID_CTS2\":\"GUIDCTS2\",\n",
" \"GUID_CTS3\":\"GUIDCTS3\",\n",
" \"GUID_GAIN1\":\"GUIDAIN1\",\n",
" \"GUID_GAIN2\":\"GUIGAIN2\",\n",
" \"GUID_GAIN3\":\"GUIGAIN3\",\n",
" \"AODM1GAIN\":\"AOD1GAIN\",\n",
" \"AODM1STAT\":\"AOD1STAT\",\n",
" \"AODM2GAIN\":\"AOD2GAIN\",\n",
" \"AODM2STAT\":\"AOD2STAT\",\n",
" \"LGS1RMSWF\":\"LGS1MSWF\",\n",
" \"LGS2RMSWF\":\"LGS2MSWF\",\n",
" \"LGS3RMSWF\":\"LGS3MSWF\",\n",
" \"LGS4RMSWF\":\"LGS4MSWF\",\n",
" \"LGS5RMSWF\":\"LGS5MSWF\",\n",
" \"LGS6RMSWF\":\"LGS6MSWF\"}\n"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [],
"source": [
"shorten_name = {}"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [],
"source": [
"expanded_telemetry_list = []\n",
"for _, row in telemetry_df.iterrows():\n",
" if np.isnan(row.requiredRate):\n",
" expanded_telemetry_list.append(row.copy())\n",
" continue\n",
" splitted = row.usage.split(\"FITS=\")\n",
" if len(splitted) < 2:\n",
" raise Exception(\"Missing FITS= in line:\", row)\n",
" elif len(splitted) == 2:\n",
" row.fits_name = splitted[1].strip()\n",
" if len(row[\"fits_name\"]) > 8:\n",
" print(\"Need to shorten\", row[\"fits_name\"])\n",
" row[\"fits_name\"] = shorten_name[row[\"fits_name\"]]\n",
" expanded_telemetry_list.append(row)\n",
" else:\n",
" header = []\n",
" try:\n",
" usage_lines = row.usage.split(\"\\n\")\n",
" except AttributeError:\n",
" usage_lines = [\"\"]\n",
" for line in usage_lines:\n",
" if \"FITS=\" not in line:\n",
" header.append(line)\n",
" elif \"FITS=\" in line:\n",
" row[\"fits_name\"] = line.split(\"FITS=\")[1].strip()\n",
"\n",
" row[\"usage\"] = \"\\n\".join(header + [line])\n",
" if \"<\" not in row[\"fits_name\"]:\n",
" if len(row[\"fits_name\"]) > 8:\n",
" print(row[\"fits_name\"])\n",
" expanded_telemetry_list.append(row.copy())\n",
" else:\n",
" # handle sensorID or gaugeNumber\n",
" base_name = row[\"fits_name\"].split(\"<\")[0]\n",
" #print(base_name)\n",
" for i in range(10):\n",
" row[\"fits_name\"] = base_name + str(i)\n",
" if len(row[\"fits_name\"]) > 8:\n",
" print(row[\"fits_name\"])\n",
" row[\"fits_name\"] = shorten_name[row[\"fits_name\"]]\n",
" expanded_telemetry_list.append(row.copy())"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [],
"source": [
"expanded_telemetry_df = pd.DataFrame(expanded_telemetry_list)"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {},
"outputs": [
{
"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>component</th>\n",
" <th>name</th>\n",
" <th>requiredRate</th>\n",
" <th>usage</th>\n",
" <th>fits_name</th>\n",
" </tr>\n",
" <tr>\n",
" <th>subsystem</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>IRIS</th>\n",
" <td>14</td>\n",
" <td>14</td>\n",
" <td>2</td>\n",
" <td>12</td>\n",
" <td>14</td>\n",
" </tr>\n",
" <tr>\n",
" <th>TCS</th>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>0</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" component name requiredRate usage fits_name\n",
"subsystem \n",
"IRIS 14 14 2 12 14\n",
"TCS 2 2 0 2 2"
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"expanded_telemetry_df.groupby(\"subsystem\").count()"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"16"
]
},
"execution_count": 38,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"len(expanded_telemetry_df)"
]
},
{
"cell_type": "code",
"execution_count": 115,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"187"
]
},
"execution_count": 115,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"len(telemetry_df)"
]
},
{
"cell_type": "code",
"execution_count": 106,
"metadata": {},
"outputs": [],
"source": [
"import datetime"
]
},
{
"cell_type": "code",
"execution_count": 107,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'2018-11-27 13:28:52.991023'"
]
},
"execution_count": 107,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"str(datetime.datetime.now())"
]
},
{
"cell_type": "code",
"execution_count": 108,
"metadata": {},
"outputs": [],
"source": [
"expanded_telemetry_df.index.name = \"index\""
]
},
{
"cell_type": "code",
"execution_count": 109,
"metadata": {},
"outputs": [],
"source": [
"expanded_telemetry_df[\"default_value\"] = 0"
]
},
{
"cell_type": "code",
"execution_count": 110,
"metadata": {},
"outputs": [],
"source": [
"expanded_telemetry_df[\"function\"] = \"\""
]
},
{
"cell_type": "code",
"execution_count": 111,
"metadata": {},
"outputs": [],
"source": [
"expanded_telemetry_df.to_csv(\"telemetry.csv\")"
]
},
{
"cell_type": "code",
"execution_count": 112,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"command-model.conf publish-model.conf\n",
"component-model.conf subscribe-model.conf\n",
"\u001b[0m\u001b[01;32mdefinition_of_metadata_from_detector_assemblies.png\u001b[0m* telemetry.csv\n"
]
}
],
"source": [
"ls"
]
},
{
"cell_type": "code",
"execution_count": 113,
"metadata": {},
"outputs": [],
"source": [
"mv telemetry.csv ~/p/software/IRIS-telemetry"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"/home/azonca/p/software/IRIS-telemetry\n"
]
}
],
"source": [
"cd ../../.."
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [],
"source": [
"metadata = pd.read_csv(\"Metadata_IRIS_new - icd.csv\")"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"261"
]
},
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"len(metadata)"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [],
"source": [
"metadata = metadata.dropna(\"index\", how=\"all\")"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"206"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"len(metadata)"
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Index(['Fits Keywords', 'Assembly', 'Subsystem', 'Event_Name', 'Variable',\n",
" 'Description', 'Type', 'Unit', 'Readout ', 'Raw Frame',\n",
" 'Processed Frame'],\n",
" dtype='object')"
]
},
"execution_count": 39,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"metadata.columns"
]
},
{
"cell_type": "code",
"execution_count": 62,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Index(['subsystem', 'component', 'name', 'requiredRate', 'usage'], dtype='object')"
]
},
"execution_count": 62,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"telemetry_df.columns"
]
},
{
"cell_type": "code",
"execution_count": 66,
"metadata": {},
"outputs": [
{
"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>Fits Keywords</th>\n",
" <th>Assembly</th>\n",
" <th>Subsystem</th>\n",
" <th>Event_Name</th>\n",
" <th>Variable</th>\n",
" <th>Description</th>\n",
" <th>Type</th>\n",
" <th>Unit</th>\n",
" <th>Readout</th>\n",
" <th>Raw Frame</th>\n",
" <th>Processed Frame</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>XSIZE</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Window Size</td>\n",
" <td>Int 16</td>\n",
" <td>pixels</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>YSIZE</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Window Size</td>\n",
" <td>Int 16</td>\n",
" <td>Pixels</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>XSTART</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Subarray Start X</td>\n",
" <td>Int 16</td>\n",
" <td>pixels</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>YSTART</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Subarray Start Y</td>\n",
" <td>Int 16</td>\n",
" <td>pixels</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>SARRMODE</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Subarray Mode [FULL_FRAME,SUB_ARRAY,ODGW}</td>\n",
" <td>enum</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>READTIME</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Start time of the first pixel read</td>\n",
" <td>Int 64</td>\n",
" <td>Microseconds in MJD</td>\n",
" <td>1.0</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>RST_TIME</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Time of the last reset</td>\n",
" <td>Int 64</td>\n",
" <td>Microseconds in MJD</td>\n",
" <td>1.0</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>FRM_TIME</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Time taken to read all the pixels in the reado...</td>\n",
" <td>Int 64</td>\n",
" <td>Microseconds</td>\n",
" <td>1.0</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>OBS_ID</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Observation id</td>\n",
" <td>string</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>DET_ID</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Detector ID IMG1/2/3/4 ,SLC/LEN</td>\n",
" <td>enum</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>EXP_NO</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Exposure number XXXX 0-9999</td>\n",
" <td>Int 32</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>RAMP_NO</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Ramp within Exposure [0-99999]</td>\n",
" <td>Int 32</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>READ_NO</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Readout Within Ramp [0-99999]</td>\n",
" <td>Int 32</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>COMPLETE</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Indicates if Pixels were readout</td>\n",
" <td>bool</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>GUIDRA*</td>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>oiwfsTargetInfo</td>\n",
" <td>NaN</td>\n",
" <td>Proposed item in which TCS publishes ICRS RA, ...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>GUIDDEC*</td>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>oiwfsTargetInfo</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>GUIDNAM*</td>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>oiwfsTargetInfo</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18</th>\n",
" <td>GUIDPM*</td>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>oiwfsTargetInfo</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19</th>\n",
" <td>GUIDCOL*</td>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>oiwfsTargetInfo</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>20</th>\n",
" <td>GUIDRA*</td>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>odgwTargetInfo</td>\n",
" <td>NaN</td>\n",
" <td>Proposed item in which TCS publishes ICRS RA, ...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21</th>\n",
" <td>GUIDDEC*</td>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>odgwTargetInfo</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>22</th>\n",
" <td>GUIDNAM*</td>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>odgwTargetInfo</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>23</th>\n",
" <td>GUIDPM*</td>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>odgwTargetInfo</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>24</th>\n",
" <td>GUIDCOL*</td>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>odgwTargetInfo</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25</th>\n",
" <td>GUIDRA*</td>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>ngsTargetInfo</td>\n",
" <td>NaN</td>\n",
" <td>Proposed item in which TCS publishes ICRS RA, ...</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>26</th>\n",
" <td>GUIDDEC*</td>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>ngsTargetInfo</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>27</th>\n",
" <td>GUIDNAM*</td>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>ngsTargetInfo</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>28</th>\n",
" <td>GUIDPM*</td>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>ngsTargetInfo</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>29</th>\n",
" <td>GUIDCOL*</td>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>ngsTargetInfo</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>30</th>\n",
" <td>RA</td>\n",
" <td>TCS</td>\n",
" <td>pk</td>\n",
" <td>currentPosition</td>\n",
" <td>ra</td>\n",
" <td>\\t\\nCurrent right ascension (ICRS, at equinox)</td>\n",
" <td>NaN</td>\n",
" <td>degree</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>31</th>\n",
" <td>DEC</td>\n",
" <td>TCS</td>\n",
" <td>pk</td>\n",
" <td>currentPosition</td>\n",
" <td>dec</td>\n",
" <td>Current declination (ICRS, at equinox)</td>\n",
" <td>double</td>\n",
" <td>degree</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>32</th>\n",
" <td>EQUINOX</td>\n",
" <td>TCS</td>\n",
" <td>pk</td>\n",
" <td>currentPosition</td>\n",
" <td>equinox</td>\n",
" <td>Equinox of the celestial coordinate system</td>\n",
" <td>double</td>\n",
" <td>years</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>33</th>\n",
" <td>PARANG</td>\n",
" <td>TCS</td>\n",
" <td>pk</td>\n",
" <td>currentPosition</td>\n",
" <td>parallactic</td>\n",
" <td>Current parallactic angle (ICRS, at equinox)</td>\n",
" <td>double</td>\n",
" <td>degree</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>34</th>\n",
" <td>AZ</td>\n",
" <td>TCS</td>\n",
" <td>pk</td>\n",
" <td>currentPosition</td>\n",
" <td>az</td>\n",
" <td>Current Azimuth</td>\n",
" <td>double</td>\n",
" <td>degree</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>35</th>\n",
" <td>EL</td>\n",
" <td>TCS</td>\n",
" <td>pk</td>\n",
" <td>currentPosition</td>\n",
" <td>el</td>\n",
" <td>Current Elevation</td>\n",
" <td>double</td>\n",
" <td>degree</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>36</th>\n",
" <td>NaN</td>\n",
" <td>TCS</td>\n",
" <td>pk</td>\n",
" <td>currentPosition</td>\n",
" <td>z</td>\n",
" <td>Current Zenith Angle</td>\n",
" <td>double (1 ≤ x ≤ 65)</td>\n",
" <td>degree</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>37</th>\n",
" <td>HA</td>\n",
" <td>TCS</td>\n",
" <td>pk</td>\n",
" <td>currentPosition</td>\n",
" <td>ha</td>\n",
" <td>Current Hour Angle</td>\n",
" <td>double</td>\n",
" <td>degree</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>38</th>\n",
" <td>AIRMASS</td>\n",
" <td>TCS</td>\n",
" <td>pk</td>\n",
" <td>currentPosition</td>\n",
" <td>airmass</td>\n",
" <td>Air Mass (TBD whether plane-parallel, i.e., se...</td>\n",
" <td>double</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>39</th>\n",
" <td>TELFOCUS</td>\n",
" <td>TCS</td>\n",
" <td>pk</td>\n",
" <td>currentPosition</td>\n",
" <td>focus</td>\n",
" <td>Current focus (with 10 micrometer precision)</td>\n",
" <td>double</td>\n",
" <td>mm</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>40</th>\n",
" <td>TELFRAT</td>\n",
" <td>TCS</td>\n",
" <td>pk</td>\n",
" <td>currentPosition</td>\n",
" <td>fratio</td>\n",
" <td>Telescope F-ratio (TBD: this is a static quant...</td>\n",
" <td>double</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>41</th>\n",
" <td>LST</td>\n",
" <td>TCS</td>\n",
" <td>pk</td>\n",
" <td>currentPosition</td>\n",
" <td>lst</td>\n",
" <td>Local Sidereal Time</td>\n",
" <td>double</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>42</th>\n",
" <td>NaN</td>\n",
" <td>TCS</td>\n",
" <td>pk</td>\n",
" <td>currentPosition</td>\n",
" <td>timestamp</td>\n",
" <td>Timestamp for the data</td>\n",
" <td>double</td>\n",
" <td>MJD</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>44</th>\n",
" <td>PNTGST</td>\n",
" <td>TCS</td>\n",
" <td>pk</td>\n",
" <td>pointingStatus</td>\n",
" <td>pointingstate</td>\n",
" <td>Current state of the pointing system</td>\n",
" <td>enum: (SLEWING, TRACKING, INPOSITION)</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>49</th>\n",
" <td>M3ROT</td>\n",
" <td>TCS</td>\n",
" <td>TCS M3 Assembly</td>\n",
" <td>M3 Position</td>\n",
" <td>rotation</td>\n",
" <td>Current position in rotation.</td>\n",
" <td>double</td>\n",
" <td>degree</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>50</th>\n",
" <td>M3TILT</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>tilt</td>\n",
" <td>Current position in tilt.</td>\n",
" <td>double</td>\n",
" <td>degree</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>52</th>\n",
" <td>M2TIP</td>\n",
" <td>TCS</td>\n",
" <td>TCS M2 Assembly</td>\n",
" <td>M2 Position</td>\n",
" <td>tip</td>\n",
" <td>Current position in tip.</td>\n",
" <td>double</td>\n",
" <td>degree</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>53</th>\n",
" <td>M2TILT</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>tilt</td>\n",
" <td>Current position in tilt.</td>\n",
" <td>double</td>\n",
" <td>degree</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>54</th>\n",
" <td>M2PISTON</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>piston</td>\n",
" <td>Current position in piston.</td>\n",
" <td>double</td>\n",
" <td>m</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>55</th>\n",
" <td>M2DECENX</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>decenter-x</td>\n",
" <td>Current position in decenter-x.</td>\n",
" <td>double</td>\n",
" <td>m</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>56</th>\n",
" <td>M2DECENY</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>decenter-y</td>\n",
" <td>Current position in decenter-y.</td>\n",
" <td>double</td>\n",
" <td>m</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Fits Keywords Assembly Subsystem Event_Name Variable \\\n",
"0 XSIZE NaN NaN NaN NaN \n",
"1 YSIZE NaN NaN NaN NaN \n",
"2 XSTART NaN NaN NaN NaN \n",
"3 YSTART NaN NaN NaN NaN \n",
"4 SARRMODE NaN NaN NaN NaN \n",
"5 READTIME NaN NaN NaN NaN \n",
"6 RST_TIME NaN NaN NaN NaN \n",
"7 FRM_TIME NaN NaN NaN NaN \n",
"8 OBS_ID NaN NaN NaN NaN \n",
"9 DET_ID NaN NaN NaN NaN \n",
"10 EXP_NO NaN NaN NaN NaN \n",
"11 RAMP_NO NaN NaN NaN NaN \n",
"12 READ_NO NaN NaN NaN NaN \n",
"13 COMPLETE NaN NaN NaN NaN \n",
"15 GUIDRA* TCS cmIRIS oiwfsTargetInfo NaN \n",
"16 GUIDDEC* TCS cmIRIS oiwfsTargetInfo NaN \n",
"17 GUIDNAM* TCS cmIRIS oiwfsTargetInfo NaN \n",
"18 GUIDPM* TCS cmIRIS oiwfsTargetInfo NaN \n",
"19 GUIDCOL* TCS cmIRIS oiwfsTargetInfo NaN \n",
"20 GUIDRA* TCS cmIRIS odgwTargetInfo NaN \n",
"21 GUIDDEC* TCS cmIRIS odgwTargetInfo NaN \n",
"22 GUIDNAM* TCS cmIRIS odgwTargetInfo NaN \n",
"23 GUIDPM* TCS cmIRIS odgwTargetInfo NaN \n",
"24 GUIDCOL* TCS cmIRIS odgwTargetInfo NaN \n",
"25 GUIDRA* TCS cmIRIS ngsTargetInfo NaN \n",
"26 GUIDDEC* TCS cmIRIS ngsTargetInfo NaN \n",
"27 GUIDNAM* TCS cmIRIS ngsTargetInfo NaN \n",
"28 GUIDPM* TCS cmIRIS ngsTargetInfo NaN \n",
"29 GUIDCOL* TCS cmIRIS ngsTargetInfo NaN \n",
"30 RA TCS pk currentPosition ra \n",
"31 DEC TCS pk currentPosition dec \n",
"32 EQUINOX TCS pk currentPosition equinox \n",
"33 PARANG TCS pk currentPosition parallactic \n",
"34 AZ TCS pk currentPosition az \n",
"35 EL TCS pk currentPosition el \n",
"36 NaN TCS pk currentPosition z \n",
"37 HA TCS pk currentPosition ha \n",
"38 AIRMASS TCS pk currentPosition airmass \n",
"39 TELFOCUS TCS pk currentPosition focus \n",
"40 TELFRAT TCS pk currentPosition fratio \n",
"41 LST TCS pk currentPosition lst \n",
"42 NaN TCS pk currentPosition timestamp \n",
"44 PNTGST TCS pk pointingStatus pointingstate \n",
"49 M3ROT TCS TCS M3 Assembly M3 Position rotation \n",
"50 M3TILT NaN NaN NaN tilt \n",
"52 M2TIP TCS TCS M2 Assembly M2 Position tip \n",
"53 M2TILT NaN NaN NaN tilt \n",
"54 M2PISTON NaN NaN NaN piston \n",
"55 M2DECENX NaN NaN NaN decenter-x \n",
"56 M2DECENY NaN NaN NaN decenter-y \n",
"\n",
" Description \\\n",
"0 Window Size \n",
"1 Window Size \n",
"2 Subarray Start X \n",
"3 Subarray Start Y \n",
"4 Subarray Mode [FULL_FRAME,SUB_ARRAY,ODGW} \n",
"5 Start time of the first pixel read \n",
"6 Time of the last reset \n",
"7 Time taken to read all the pixels in the reado... \n",
"8 Observation id \n",
"9 Detector ID IMG1/2/3/4 ,SLC/LEN \n",
"10 Exposure number XXXX 0-9999 \n",
"11 Ramp within Exposure [0-99999] \n",
"12 Readout Within Ramp [0-99999] \n",
"13 Indicates if Pixels were readout \n",
"15 Proposed item in which TCS publishes ICRS RA, ... \n",
"16 NaN \n",
"17 NaN \n",
"18 NaN \n",
"19 NaN \n",
"20 Proposed item in which TCS publishes ICRS RA, ... \n",
"21 NaN \n",
"22 NaN \n",
"23 NaN \n",
"24 NaN \n",
"25 Proposed item in which TCS publishes ICRS RA, ... \n",
"26 NaN \n",
"27 NaN \n",
"28 NaN \n",
"29 NaN \n",
"30 \\t\\nCurrent right ascension (ICRS, at equinox) \n",
"31 Current declination (ICRS, at equinox) \n",
"32 Equinox of the celestial coordinate system \n",
"33 Current parallactic angle (ICRS, at equinox) \n",
"34 Current Azimuth \n",
"35 Current Elevation \n",
"36 Current Zenith Angle \n",
"37 Current Hour Angle \n",
"38 Air Mass (TBD whether plane-parallel, i.e., se... \n",
"39 Current focus (with 10 micrometer precision) \n",
"40 Telescope F-ratio (TBD: this is a static quant... \n",
"41 Local Sidereal Time \n",
"42 Timestamp for the data \n",
"44 Current state of the pointing system \n",
"49 Current position in rotation. \n",
"50 Current position in tilt. \n",
"52 Current position in tip. \n",
"53 Current position in tilt. \n",
"54 Current position in piston. \n",
"55 Current position in decenter-x. \n",
"56 Current position in decenter-y. \n",
"\n",
" Type Unit Readout \\\n",
"0 Int 16 pixels 1.0 \n",
"1 Int 16 Pixels 1.0 \n",
"2 Int 16 pixels 1.0 \n",
"3 Int 16 pixels 1.0 \n",
"4 enum NaN 1.0 \n",
"5 Int 64 Microseconds in MJD 1.0 \n",
"6 Int 64 Microseconds in MJD 1.0 \n",
"7 Int 64 Microseconds 1.0 \n",
"8 string NaN NaN \n",
"9 enum NaN 1.0 \n",
"10 Int 32 NaN 1.0 \n",
"11 Int 32 NaN 1.0 \n",
"12 Int 32 NaN 1.0 \n",
"13 bool NaN 1.0 \n",
"15 NaN NaN NaN \n",
"16 NaN NaN NaN \n",
"17 NaN NaN NaN \n",
"18 NaN NaN NaN \n",
"19 NaN NaN NaN \n",
"20 NaN NaN NaN \n",
"21 NaN NaN NaN \n",
"22 NaN NaN NaN \n",
"23 NaN NaN NaN \n",
"24 NaN NaN NaN \n",
"25 NaN NaN NaN \n",
"26 NaN NaN NaN \n",
"27 NaN NaN NaN \n",
"28 NaN NaN NaN \n",
"29 NaN NaN NaN \n",
"30 NaN degree NaN \n",
"31 double degree NaN \n",
"32 double years NaN \n",
"33 double degree NaN \n",
"34 double degree NaN \n",
"35 double degree NaN \n",
"36 double (1 ≤ x ≤ 65) degree NaN \n",
"37 double degree NaN \n",
"38 double NaN NaN \n",
"39 double mm NaN \n",
"40 double NaN NaN \n",
"41 double NaN NaN \n",
"42 double MJD NaN \n",
"44 enum: (SLEWING, TRACKING, INPOSITION) NaN NaN \n",
"49 double degree NaN \n",
"50 double degree NaN \n",
"52 double degree NaN \n",
"53 double degree NaN \n",
"54 double m NaN \n",
"55 double m NaN \n",
"56 double m NaN \n",
"\n",
" Raw Frame Processed Frame \n",
"0 1.0 1.0 \n",
"1 1.0 1.0 \n",
"2 1.0 1.0 \n",
"3 1.0 1.0 \n",
"4 1.0 1.0 \n",
"5 NaN NaN \n",
"6 NaN NaN \n",
"7 NaN NaN \n",
"8 NaN NaN \n",
"9 NaN NaN \n",
"10 NaN NaN \n",
"11 NaN NaN \n",
"12 NaN NaN \n",
"13 NaN NaN \n",
"15 NaN 1.0 \n",
"16 NaN 1.0 \n",
"17 NaN 1.0 \n",
"18 NaN 1.0 \n",
"19 NaN 1.0 \n",
"20 NaN 1.0 \n",
"21 NaN 1.0 \n",
"22 NaN 1.0 \n",
"23 NaN 1.0 \n",
"24 NaN 1.0 \n",
"25 NaN 1.0 \n",
"26 NaN 1.0 \n",
"27 NaN 1.0 \n",
"28 NaN 1.0 \n",
"29 NaN 1.0 \n",
"30 1.0 1.0 \n",
"31 1.0 1.0 \n",
"32 1.0 1.0 \n",
"33 1.0 1.0 \n",
"34 1.0 1.0 \n",
"35 1.0 1.0 \n",
"36 1.0 1.0 \n",
"37 1.0 1.0 \n",
"38 1.0 1.0 \n",
"39 1.0 1.0 \n",
"40 1.0 1.0 \n",
"41 1.0 1.0 \n",
"42 1.0 1.0 \n",
"44 NaN 1.0 \n",
"49 NaN 1.0 \n",
"50 NaN 1.0 \n",
"52 NaN 1.0 \n",
"53 NaN 1.0 \n",
"54 NaN 1.0 \n",
"55 NaN 1.0 \n",
"56 NaN 1.0 "
]
},
"execution_count": 66,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"metadata.head(50)"
]
},
{
"cell_type": "code",
"execution_count": 64,
"metadata": {},
"outputs": [
{
"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>subsystem</th>\n",
" <th>component</th>\n",
" <th>name</th>\n",
" <th>requiredRate</th>\n",
" <th>usage</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>oiwfsTargetInfo</td>\n",
" <td>4.0</td>\n",
" <td>Proposed item in which TCS publishes ICRS RA, ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>TCS</td>\n",
" <td>cmIRIS</td>\n",
" <td>odgwTargetInfo</td>\n",
" <td>4.0</td>\n",
" <td>Proposed item in which TCS publishes ICRS RA, ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>TCS</td>\n",
" <td>cmNFIRAOS</td>\n",
" <td>ngsTargetInfo</td>\n",
" <td>4.0</td>\n",
" <td>Proposed item in which TCS publishes ICRS RA, ...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>TCS</td>\n",
" <td>pk</td>\n",
" <td>currentPosition</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>TCS</td>\n",
" <td>pk</td>\n",
" <td>pointingStatus</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" subsystem component name requiredRate \\\n",
"0 TCS cmIRIS oiwfsTargetInfo 4.0 \n",
"1 TCS cmIRIS odgwTargetInfo 4.0 \n",
"2 TCS cmNFIRAOS ngsTargetInfo 4.0 \n",
"3 TCS pk currentPosition NaN \n",
"4 TCS pk pointingStatus NaN \n",
"\n",
" usage \n",
"0 Proposed item in which TCS publishes ICRS RA, ... \n",
"1 Proposed item in which TCS publishes ICRS RA, ... \n",
"2 Proposed item in which TCS publishes ICRS RA, ... \n",
"3 NaN \n",
"4 NaN "
]
},
"execution_count": 64,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"telemetry_df.head()"
]
},
{
"cell_type": "code",
"execution_count": 61,
"metadata": {},
"outputs": [],
"source": [
"del telemetry_df[\"fits_name\"]"
]
},
{
"cell_type": "code",
"execution_count": 54,
"metadata": {},
"outputs": [],
"source": [
"repeated = telemetry_df.groupby([telemetry_df.subsystem,telemetry_df.component,telemetry_df.name]).name.count()"
]
},
{
"cell_type": "code",
"execution_count": 57,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0"
]
},
"execution_count": 57,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"(repeated>1).sum()"
]
},
{
"cell_type": "code",
"execution_count": 70,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'cmIRIS'"
]
},
"execution_count": 70,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"next(telemetry_df.itertuples()).component"
]
},
{
"cell_type": "code",
"execution_count": 72,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Missing Pandas(Index=2, subsystem='TCS', component='cmNFIRAOS', name='ngsTargetInfo', requiredRate=4.0, usage='Proposed item in which TCS publishes ICRS RA, Dec and proper motions, names, and colors (what system?) for the NGS WFS target. FITS=???')\n",
"Missing Pandas(Index=5, subsystem='TCS', component='cmNFIRAOS', name='atmDispersion', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=6, subsystem='TCS', component='cmNFIRAOS', name='ngsPos', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=10, subsystem='TCS', component='cmIRIS', name='oiwfs1AtmDispersion', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=11, subsystem='TCS', component='cmIRIS', name='oiwfs2AtmDispersion', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=12, subsystem='TCS', component='cmIRIS', name='oiwfs3AtmDispersion', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=18, subsystem='TCS', component='TCS MCS Assembly', name='TCS Telescope Position', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=20, subsystem='TCS', component='PointingKernelAssembly', name='CurrentPosition', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=26, subsystem='NFIRAOS', component='rtc', name='lgsState', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=28, subsystem='NFIRAOS', component='rtc', name='oiwfsImage', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=29, subsystem='NFIRAOS', component='rtc', name='pwfsState', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=31, subsystem='NFIRAOS', component='ssNgs', name='current', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=35, subsystem='NFIRAOS', component='lgsTrombone', name='current', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=38, subsystem='IRIS', component='imager.odgw', name='current', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=41, subsystem='IRIS', component='imager.filter', name='dark', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=42, subsystem='IRIS', component='imager.filter', name='current', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=49, subsystem='IRIS', component='imager.adc', name='odgwShift', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=50, subsystem='IRIS', component='imager.adc', name='PRISM_state', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=53, subsystem='IRIS', component='imager.detector', name='exposureState', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=54, subsystem='IRIS', component='imager.detector', name='startExposure', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=55, subsystem='IRIS', component='imager.detector', name='readoutCompleted', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=56, subsystem='IRIS', component='imager.detector', name='endExposure', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=57, subsystem='IRIS', component='imager.detector', name='aborting', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=58, subsystem='IRIS', component='imager.detector', name='aborted', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=59, subsystem='IRIS', component='imager.detector', name='readoutFailed', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=64, subsystem='IRIS', component='is', name='aborting', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=69, subsystem='IRIS', component='is', name='startPrepare', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=70, subsystem='IRIS', component='is', name='startDataAcquisition', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=71, subsystem='IRIS', component='is', name='endDataAcquisition', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=72, subsystem='IRIS', component='is', name='startReadout', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=73, subsystem='IRIS', component='is', name='endReadout', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=74, subsystem='IRIS', component='is', name='startDatasetWrite', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=75, subsystem='IRIS', component='is', name='endDatasetWrite', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=76, subsystem='IRIS', component='is', name='observeComplete', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=77, subsystem='IRIS', component='is', name='observationId', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=78, subsystem='IRIS', component='is', name='observerKeywords', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=79, subsystem='IRIS', component='is', name='observationBlockKeywords', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=80, subsystem='IRIS', component='is', name='scriptName', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=96, subsystem='IRIS', component='ifs.detector', name='exposureState', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=97, subsystem='IRIS', component='ifs.detector', name='startExposure', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=98, subsystem='IRIS', component='ifs.detector', name='readoutCompleted', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=99, subsystem='IRIS', component='ifs.detector', name='endExposure', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=100, subsystem='IRIS', component='ifs.detector', name='aborting', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=101, subsystem='IRIS', component='ifs.detector', name='aborted', requiredRate=nan, usage=nan)\n",
"Missing Pandas(Index=102, subsystem='IRIS', component='ifs.detector', name='readoutFailed', requiredRate=nan, usage=nan)\n"
]
}
],
"source": [
"for row in telemetry_df.itertuples():\n",
" if len(metadata[(metadata[\"Assembly\"]==row.subsystem) & (metadata[\"Subsystem\"]==row.component) & (metadata[\"Event_Name\"]==row.name)]) == 0:\n",
" print(\"Missing\", row)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "jwst",
"language": "python",
"name": "jwst"
},
"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.6.9"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment