clean up jup cells
parent
1d33022187
commit
5e20e323d5
|
@ -9,43 +9,18 @@
|
|||
"import os\n",
|
||||
"import sys\n",
|
||||
"import glob\n",
|
||||
"import time"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import configparser"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import numpy as np"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import warnings"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from termcolor import colored"
|
||||
"import time\n",
|
||||
"import configparser\n",
|
||||
"import numpy as np\n",
|
||||
"import warnings\n",
|
||||
"from termcolor import colored\n",
|
||||
"from stvid.stars import pixel_catalog\n",
|
||||
"from stvid.stars import store_calibration\n",
|
||||
"from stvid.stars import generate_star_catalog\n",
|
||||
"from stvid.astrometry import calibrate_from_reference\n",
|
||||
"from stvid.astrometry import is_calibrated\n",
|
||||
"from stvid.astrometry import generate_reference_with_anet\n",
|
||||
"from astropy.utils.exceptions import AstropyWarning"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -54,33 +29,11 @@
|
|||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Use custom FourFrame for Jupyter that shows images\n",
|
||||
"from stvid.jupfourframe import FourFrame\n",
|
||||
"from stvid.jupfourframe import Observation"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from stvid.stars import pixel_catalog\n",
|
||||
"from stvid.stars import store_calibration\n",
|
||||
"from stvid.stars import generate_star_catalog\n",
|
||||
"from stvid.astrometry import calibrate_from_reference\n",
|
||||
"from stvid.astrometry import is_calibrated\n",
|
||||
"from stvid.astrometry import generate_reference_with_anet"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from astropy.utils.exceptions import AstropyWarning"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
|
@ -89,15 +42,7 @@
|
|||
"source": [
|
||||
"if __name__ == \"__main__\":\n",
|
||||
" # Read configuration file\n",
|
||||
" cfg = configparser.ConfigParser(inline_comment_prefixes=(\"#\", \":\"))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
" cfg = configparser.ConfigParser(inline_comment_prefixes=(\"#\", \":\"))\n",
|
||||
" conf_file=\"config_jupyter.ini\"\n",
|
||||
" result = cfg.read([conf_file])\n",
|
||||
" if not result:\n",
|
||||
|
@ -111,7 +56,9 @@
|
|||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
" file_dir = (\"data/obs/jupyter/\")"
|
||||
" file_dir = (\"data/obs/jupyter/\")\n",
|
||||
" fname = os.path.join(file_dir, \"jupyter.fits\")\n",
|
||||
" calfname = os.path.join(file_dir, \"test.fits\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -123,7 +70,6 @@
|
|||
" # Set warnings\n",
|
||||
" warnings.filterwarnings(\"ignore\", category=UserWarning, append=True)\n",
|
||||
" warnings.simplefilter(\"ignore\", AstropyWarning)\n",
|
||||
" \n",
|
||||
" nstarsmin = cfg.getint(\"Processing\", \"nstarsmin\")"
|
||||
]
|
||||
},
|
||||
|
@ -148,17 +94,7 @@
|
|||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
" fname = os.path.join(file_dir, \"jupyter.fits\")\n",
|
||||
" calfname = os.path.join(file_dir, \"test.fits\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
" # XXX REMOVE WITH A HAMMER ALL TEMP FILES:\n",
|
||||
" # XXX REMOVE WITH A HAMMER ALL GENERATED FILES:\n",
|
||||
" fdats = glob.glob(\"data/obs/jupyter/*.dat\", recursive=False)\n",
|
||||
" for fdat in fdats:\n",
|
||||
" print(\"Removing\", fdat)\n",
|
||||
|
|
Loading…
Reference in New Issue