diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f066368..ee90b7ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: max-parallel: 5 matrix: os: [ubuntu-latest, macos-latest] - python-version: [3.8, 3.9] + python-version: ['3.9', '3.10', '3.11'] steps: - uses: actions/checkout@v2 diff --git a/env/environment-3.10.yml b/env/environment-3.10.yml new file mode 100644 index 00000000..3b9b3b08 --- /dev/null +++ b/env/environment-3.10.yml @@ -0,0 +1,52 @@ +name: exoctk-3.10 +channels: + - conda-forge + - defaults +dependencies: + - astropy>=5.3.1 + - bokeh=2.4.3 + - cython>=0.29.35 + - docopt>=0.6.2 + - docutils>=0.16 + - flake8>=6.0.0 + - flask>=2.2.2 + - ipython>=8.12.0 + - jupyter>=1.0.0 + - matplotlib>=3.7.1 + - numpydoc>=1.5.0 + - pandas>=2.0.3 + - paramiko>=2.8.1 + - pip>=23.1.2 + - pytest>=7.3.1 + - python=3.10.11 + - pyyaml>=6.0.0 + - scp>=0.14.1 + - sphinx>=5.0.2 + - sqlalchemy>=1.4.39 + - wtforms>=2.3.3 + - pip: + - asteval>=0.9.31 + - awscli>=1.29.4 + - bandit>=1.7.5 + - batman-package>=2.4.8 + - bibtexparser>=1.4.0 + - boto3>=1.28.5 + - corner>=2.2.2 + - docutils>=0.16 + - flask_wtf>=1.1.1 + - h5py>=3.9.0 + - hotsoss>=0.1.8 + - gunicorn>=21.1.0 + - numpy>=1.25.1 + - platon>=5.4 + - pyerfa>=2.0.0 + - pysiaf>=0.20.0 + - pysynphot>=2.0.0 + - pyvo>=1.4.1 + - regions>=0.7 + - scipy>=1.11.1 + - sphinx_astropy>=1.9.1 + - svo-filters>=0.4.4 + - werkzeug>=2.3.6 + - jwst_gtvt>=1.0.0 + - astroquery>=0.4.6 diff --git a/env/environment-3.11.yml b/env/environment-3.11.yml new file mode 100644 index 00000000..7ede496c --- /dev/null +++ b/env/environment-3.11.yml @@ -0,0 +1,52 @@ +name: exoctk-3.11 +channels: + - conda-forge + - defaults +dependencies: + - astropy>=5.3.1 + - bokeh=2.4.3 + - cython>=0.29.35 + - docopt>=0.6.2 + - docutils>=0.16 + - flake8>=6.0.0 + - flask>=2.2.2 + - ipython>=8.12.0 + - jupyter>=1.0.0 + - matplotlib>=3.7.1 + - numpydoc>=1.5.0 + - pandas>=2.0.3 + - paramiko>=2.8.1 + - pip>=23.1.2 + - pytest>=7.3.1 + - python=3.11.0 + - pyyaml>=6.0.0 + - scp>=0.14.1 + - sphinx>=5.0.2 + - sqlalchemy>=1.4.39 + - wtforms>=2.3.3 + - pip: + - asteval>=0.9.31 + - awscli>=1.29.4 + - bandit>=1.7.5 + - batman-package>=2.4.8 + - bibtexparser>=1.4.0 + - boto3>=1.28.5 + - corner>=2.2.2 + - docutils>=0.16 + - flask_wtf>=1.1.1 + - h5py>=3.9.0 + - hotsoss>=0.1.8 + - gunicorn>=21.1.0 + - numpy>=1.25.1 + - platon>=5.4 + - pyerfa>=2.0.0 + - pysiaf>=0.20.0 + - pysynphot>=2.0.0 + - pyvo>=1.4.1 + - regions>=0.7 + - scipy>=1.11.1 + - sphinx_astropy>=1.9.1 + - svo-filters>=0.4.4 + - werkzeug>=2.3.6 + - jwst_gtvt>=1.0.0 + - astroquery>=0.4.6 diff --git a/env/environment-3.8.yml b/env/environment-3.8.yml deleted file mode 100644 index acb0677f..00000000 --- a/env/environment-3.8.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: exoctk-3.8 -channels: - - defaults - - http://ssb.stsci.edu/astroconda -dependencies: - - astropy - - bokeh=2.3.0 - - boto3 - - cython=0.29.22 - - docopt=0.6.2 - - docutils=0.16 - - flake8=3.9.0 - - flask=1.1.2 - - gunicorn=20.1.0 - - ipython=7.22.0 - - jupyter=1.0.0 - - matplotlib>3.3.4 - - numpydoc=1.1.0 - - pandas=1.2.3 - - paramiko=2.7.2 - - pip - - pytest=6.2.3 - - python=3.8.5 - - pyyaml - - scp=0.13.3 - - sphinx=3.5.3 - - sqlalchemy=1.3.23 - - wtforms=2.3.3 - - pip: - - asteval==0.9.22 - - awscli - - bandit==1.7.0 - - batman-package==2.4.8 - - bibtexparser==1.2.0 - - corner==2.2.1 - - docutils==0.15.2 - - flask_wtf==0.14.3 - - h5py>=3.8.0 - - hotsoss==0.1.8 - - gunicorn==20.0.4 - - numpy>=1.24.2 - - platon==5.1.2 - - pyerfa>=1.7 - - pysiaf==0.19.1 - - pysynphot==1.0.0 - - pyvo==1.1 - - regions==0.5 - - scipy>=1.6.2 - - sphinx_astropy==1.3 - - svo-filters==0.4.1 - - werkzeug==0.16.1 - - jwst_gtvt>=0.3.1 - - astroquery>=0.4.2 diff --git a/env/environment-3.9.yml b/env/environment-3.9.yml index 81b31bcc..d50e4afa 100644 --- a/env/environment-3.9.yml +++ b/env/environment-3.9.yml @@ -1,52 +1,52 @@ name: exoctk-3.9 channels: + - conda-forge - defaults - - http://ssb.stsci.edu/astroconda dependencies: - - astropy - - bokeh=2.3.0 - - boto3 - - cython=0.29.22 - - docopt=0.6.2 - - docutils=0.16 - - flake8=3.9.0 - - flask=1.1.2 - - ipython=7.22.0 - - jupyter=1.0.0 - - matplotlib>3.3.4 - - numpydoc=1.1.0 - - pandas=1.2.3 - - paramiko=2.7.2 - - pip - - pytest=6.2.3 + - astropy>=5.3.1 + - bokeh=2.4.3 + - cython>=0.29.35 + - docopt>=0.6.2 + - docutils>=0.16 + - flake8>=6.0.0 + - flask>=2.2.2 + - ipython>=8.12.0 + - jupyter>=1.0.0 + - matplotlib>=3.7.1 + - numpydoc>=1.5.0 + - pandas>=2.0.3 + - paramiko>=2.8.1 + - pip>=23.1.2 + - pytest>=7.3.1 - python=3.9.1 - - pyyaml - - scp=0.13.3 - - sphinx=3.5.3 - - sqlalchemy=1.3.23 - - wtforms=2.3.3 + - pyyaml>=6.0.0 + - scp>=0.14.1 + - sphinx>=5.0.2 + - sqlalchemy>=1.4.39 + - wtforms>=2.3.3 - pip: - - asteval==0.9.22 - - awscli - - bandit==1.7.0 - - batman-package==2.4.8 - - bibtexparser==1.2.0 - - corner==2.2.1 - - docutils==0.15.2 - - flask_wtf==0.14.3 - - h5py>=3.8.0 - - hotsoss==0.1.8 - - gunicorn==20.0.4 - - numpy>=1.24.2 - - platon==5.1.2 - - pyerfa>=1.7 - - pysiaf==0.19.1 - - pysynphot==1.0.0 - - pyvo==1.1 - - regions==0.5 - - scipy>=1.6.2 - - sphinx_astropy==1.3 - - svo-filters==0.4.1 - - werkzeug==0.16.1 - - jwst_gtvt>=0.3.1 - - astroquery>=0.4.2 + - asteval>=0.9.31 + - awscli>=1.29.4 + - bandit>=1.7.5 + - batman-package>=2.4.8 + - bibtexparser>=1.4.0 + - boto3>=1.28.5 + - corner>=2.2.2 + - docutils>=0.16 + - flask_wtf>=1.1.1 + - h5py>=3.9.0 + - hotsoss>=0.1.8 + - gunicorn>=21.1.0 + - numpy>=1.25.1 + - platon>=5.4 + - pyerfa>=2.0.0 + - pysiaf>=0.20.0 + - pysynphot>=2.0.0 + - pyvo>=1.4.1 + - regions>=0.7 + - scipy>=1.11.1 + - sphinx_astropy>=1.9.1 + - svo-filters>=0.4.4 + - werkzeug>=2.3.6 + - jwst_gtvt>=1.0.0 + - astroquery>=0.4.6 diff --git a/exoctk/contam_visibility/field_simulator.py b/exoctk/contam_visibility/field_simulator.py index 96cc8e4a..19725946 100755 --- a/exoctk/contam_visibility/field_simulator.py +++ b/exoctk/contam_visibility/field_simulator.py @@ -22,7 +22,6 @@ from bokeh.plotting import figure, show from bokeh.layouts import gridplot, column from bokeh.models import Range1d, LinearColorMapper, LogColorMapper, Label, ColorBar, ColumnDataSource, HoverTool, Slider, CustomJS, VArea, CrosshairTool, TapTool, OpenURL, Span, Legend -from bokeh.models.widgets import Panel, Tabs from bokeh.palettes import PuBu, Spectral6 from bokeh.transform import linear_cmap from hotsoss.plotting import plot_frame diff --git a/exoctk/contam_visibility/visibilityPA.py b/exoctk/contam_visibility/visibilityPA.py index 080ec085..93312005 100755 --- a/exoctk/contam_visibility/visibilityPA.py +++ b/exoctk/contam_visibility/visibilityPA.py @@ -21,7 +21,7 @@ import numpy as np from . import ephemeris_old2x as EPH -from jwst_gtvt.find_tgt_info import get_table +# from jwst_gtvt.find_tgt_info import get_table from ..utils import blockPrint, enablePrint diff --git a/exoctk/exoctk_app/app_exoctk.py b/exoctk/exoctk_app/app_exoctk.py index 7cc1e5a9..38d1c450 100644 --- a/exoctk/exoctk_app/app_exoctk.py +++ b/exoctk/exoctk_app/app_exoctk.py @@ -16,6 +16,7 @@ import numpy as np from exoctk import log_exoctk +from exoctk.contam_visibility.new_vis_plot import build_visibility_plot, get_exoplanet_positions from exoctk.contam_visibility import visibilityPA as vpa from exoctk.contam_visibility import field_simulator as fs from exoctk.contam_visibility import contamination_figure as cf @@ -476,11 +477,13 @@ def contam_visibility(): # Make plot title = form.targname.data or ', '.join([str(form.ra.data), str(form.dec.data)]) - pG, pB, dates, vis_plot, table, badPAs = vpa.using_gtvt(str(form.ra.data), str(form.dec.data), instrument, targetName=str(title)) + # pG, pB, dates, vis_plot, table, badPAs = vpa.using_gtvt(str(form.ra.data), str(form.dec.data), instrument, targetName=str(title)) + vis_plot = build_visibility_plot(str(title), instrument, str(form.ra.data), str(form.dec.data)) + table = get_exoplanet_positions(str(form.ra.data), str(form.dec.data)) # Make output table fh = io.StringIO() - table.write(fh, format='csv', delimiter=',') + table.to_csv(fh, index=False) visib_table = fh.getvalue() # Get scripts