Skip to content

Instantly share code, notes, and snippets.

@ctslater
Created June 1, 2018 17:36
Show Gist options
  • Save ctslater/6c08ad10e8f49c8858f8ec629f30fea0 to your computer and use it in GitHub Desktop.
Save ctslater/6c08ad10e8f49c8858f8ec629f30fea0 to your computer and use it in GitHub Desktop.
ComCam raw_amp
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import lsst.daf.persistence as dafPersist"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"dataPath = \"/datasets/comCam/repo/rtm5\"\n",
"butler = dafPersist.Butler(dataPath)\n",
"camera = butler.get(\"camera\")"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"sensor_name = \"S11\""
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"target_ccds = [ ccd for ccd in camera if ccd.getName() == sensor_name]\n",
"if len(target_ccds) == 0:\n",
" print(\"did not find sensor\")\n",
"else:\n",
" target_ccd = target_ccds[0]"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"# There's a bug where the butler didn't lookup the run number automatically\n",
"raw_amp = butler.get(\"raw_amp\", run=4389, ccd='S11', visit=269897641, channel=8)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<lsst.afw.image.exposure.exposure.ExposureI at 0x7f091c11a030>"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"raw_amp"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "LSST",
"language": "python",
"name": "lsst"
},
"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.2"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment