|
1 |
| - |
2 |
| -# If the user presses enter to run the sample data, download sample data if needed and |
3 |
| -# put it into a sample-data directory at the top level of the user's Gdrive. Count |
4 |
| -# the .fits files (images) and .json files (inits files) in the directory entered |
5 |
| -# by the user (or in the sample-data directory if the user pressed enter). If |
6 |
| -# there are at least 20 .fits files, assume this is a directory of images and display |
7 |
| -# the first one in the series. If there is exactly one inits file in the directory, |
8 |
| -# show the specified target and comp coords so that the user can check these against |
9 |
| -# the displayed image. Otherwise, prompt for target / comp coords and make an inits |
10 |
| -# file based on those (save this new inits file in the folder with the output files |
11 |
| -# so that the student can consult it later). Finally, run EXOTIC with the newly-made |
| 1 | +# ########################################################################### # |
| 2 | +# Copyright (c) 2019-2020, California Institute of Technology. |
| 3 | +# All rights reserved. Based on Government Sponsored Research under |
| 4 | +# contracts NNN12AA01C, NAS7-1407 and/or NAS7-03001. |
| 5 | +# |
| 6 | +# Redistribution and use in source and binary forms, with or without |
| 7 | +# modification, are permitted provided that the following conditions |
| 8 | +# are met: |
| 9 | +# 1. Redistributions of source code must retain the above copyright |
| 10 | +# notice, this list of conditions and the following disclaimer. |
| 11 | +# 2. Redistributions in binary form must reproduce the above copyright |
| 12 | +# notice, this list of conditions and the following disclaimer in |
| 13 | +# the documentation and/or other materials provided with the |
| 14 | +# distribution. |
| 15 | +# 3. Neither the name of the California Institute of |
| 16 | +# Technology (Caltech), its operating division the Jet Propulsion |
| 17 | +# Laboratory (JPL), the National Aeronautics and Space |
| 18 | +# Administration (NASA), nor the names of its contributors may be |
| 19 | +# used to endorse or promote products derived from this software |
| 20 | +# without specific prior written permission. |
| 21 | +# |
| 22 | +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 23 | +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 24 | +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 25 | +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE CALIFORNIA |
| 26 | +# INSTITUTE OF TECHNOLOGY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 27 | +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED |
| 28 | +# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 29 | +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
| 30 | +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 31 | +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 32 | +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 33 | +# |
| 34 | +# ########################################################################### # |
| 35 | +# EXOplanet Transit Interpretation Code (EXOTIC) |
| 36 | +# # NOTE: See companion file version.py for version info. |
| 37 | +# ########################################################################### # |
| 38 | +# IMPORTANT RUNTIME INFORMATION ABOUT DATA ACCESS AND STORAGE |
| 39 | +# |
| 40 | +# If the user presses enter to run the sample data, download sample data if |
| 41 | +# needed and put it into a sample-data directory at the top level of the |
| 42 | +# user's Gdrive. Count the .fits files (images) and .json files (inits files) |
| 43 | +# in the directory entered by the user (or in the sample-data directory if the |
| 44 | +# user pressed enter). If there are at least 20 .fits files, assume this is a |
| 45 | +# directory of images and display the first one in the series. If there is |
| 46 | +# exactly one inits file in the directory, show the specified target and comp |
| 47 | +# coords so that the user can check these against the displayed image. |
| 48 | +# Otherwise, prompt for target / comp coords and make an inits file based on |
| 49 | +# those (save this new inits file in the folder with the output files so that |
| 50 | +# the student can consult it later). Finally, run EXOTIC with the newly-made |
12 | 51 | # or pre-existing inits file, plus any other inits files in the directory.
|
13 |
| - |
| 52 | +# |
14 | 53 | #########################################################
|
15 |
| -from IPython.display import display, HTML |
| 54 | +from astropy.io import fits |
16 | 55 | from astropy.time import Time
|
17 | 56 | from barycorrpy import utc_tdb
|
18 |
| -import numpy as np |
19 |
| -from io import BytesIO |
20 |
| -from astropy.io import fits |
21 |
| -from scipy.ndimage import label |
22 |
| -from bokeh.plotting import figure, output_file, show |
| 57 | +# import bokeh.io |
| 58 | +# from bokeh.io import output_notebook |
23 | 59 | from bokeh.palettes import Viridis256
|
24 |
| -from bokeh.models import ColorBar, LinearColorMapper, LogColorMapper, LogTicker |
25 |
| -from bokeh.models import BoxZoomTool,WheelZoomTool,ResetTool,HoverTool,PanTool,FreehandDrawTool |
26 |
| -#import bokeh.io |
27 |
| -#from bokeh.io import output_notebook |
28 |
| -from pprint import pprint |
29 |
| -#from IPython.display import Image |
30 |
| -#from ipywidgets import widgets, HBox |
31 |
| -from skimage.transform import rescale, resize, downscale_local_mean |
32 |
| -#import copy |
| 60 | +from bokeh.plotting import figure, output_file, show |
| 61 | +from bokeh.models import BoxZoomTool, ColorBar, FreehandDrawTool, HoverTool, LinearColorMapper, LogColorMapper, \ |
| 62 | + LogTicker, PanTool, ResetTool, WheelZoomTool |
| 63 | +# import copy |
| 64 | +from io import BytesIO |
| 65 | +from IPython.display import display, HTML |
| 66 | +# from IPython.display import Image |
| 67 | +# from ipywidgets import widgets, HBox |
| 68 | +import json |
| 69 | +import numpy as np |
33 | 70 | import os
|
| 71 | +from pprint import pprint |
34 | 72 | import re
|
35 |
| -import json |
36 |
| -#import subprocess |
| 73 | +from scipy.ndimage import label |
| 74 | +from skimage.transform import rescale, resize, downscale_local_mean |
| 75 | +# import subprocess |
37 | 76 | import time
|
38 | 77 |
|
39 | 78 |
|
|
0 commit comments