From f42e26c077567d8f969f3e39704cfb26a503a8c0 Mon Sep 17 00:00:00 2001 From: Athanaseus Javas Ramaila Date: Tue, 29 Aug 2023 13:17:53 +0200 Subject: [PATCH 1/2] remove old Bokeh remnants --- aimfast/aimfast.py | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/aimfast/aimfast.py b/aimfast/aimfast.py index 00fee8a..df996ec 100644 --- a/aimfast/aimfast.py +++ b/aimfast/aimfast.py @@ -1756,8 +1756,7 @@ def _source_flux_plotter(results, all_models, inline=False, units='milli', columns = [TableColumn(field=x, title=x.capitalize()) for x in cols] dtab = DataTable(source=source, columns=columns, width=500, max_width=550, - height=100, max_height=150, - sizing_mode='stretch_both') + height=100, max_height=150) table_title = Div(text="Cross Matching Statistics") table_title.align = "center" stats_table = column([table_title, dtab]) @@ -1778,8 +1777,7 @@ def _source_flux_plotter(results, all_models, inline=False, units='milli', columns1 = [TableColumn(field=x, title=x.capitalize()) for x in cols1] dtab1 = DataTable(source=source1, columns=columns1, width=500, max_width=550, - height=150, max_height=200, - sizing_mode='stretch_both') + height=150, max_height=200) table_title1 = Div(text=f"Non-matching sources from {model_1_name}") table_title1.align = "center" stats_table1 = column([table_title1, dtab1]) @@ -1799,14 +1797,12 @@ def _source_flux_plotter(results, all_models, inline=False, units='milli', columns2 = [TableColumn(field=x, title=x.capitalize()) for x in cols2] dtab2 = DataTable(source=source2, columns=columns2, width=500, max_width=550, - height=150, max_height=200, - sizing_mode='stretch_both') + height=150, max_height=200) table_title2 = Div(text=f"Non-matching sources from {model_2_name}") table_title2.align = "center" stats_table2 = column([table_title2, dtab2]) # Attaching the hover object with labels hover = plot_flux.select(dict(type=HoverTool)) - hover.names = ['data'] hover.tooltips = OrderedDict([ ("source", "(@label)"), ("(S1,S2)", "(@flux_1, @flux_2)"), @@ -2105,14 +2101,12 @@ def _source_astrometry_plotter(results, all_models, inline=False, units='', columns = [TableColumn(field=x, title=x.capitalize()) for x in cols] dtab = DataTable(source=source, columns=columns, width=450, max_width=500, - height=100, max_height=150, - sizing_mode='stretch_both') + height=100, max_height=150) table_title = Div(text="Cross Matching Statistics") table_title.align = "center" stats_table = column([table_title, dtab]) # Attaching the hover object with labels hover = plot_position.select(dict(type=HoverTool)) - hover.names = ['data'] hover.tooltips = OrderedDict([ ("source", "(@label)"), ("(S1,S2) [mJy]", @@ -2238,7 +2232,6 @@ def _residual_plotter(res_noise_images, points=None, results=None, plot_residual = figure(title=title, x_axis_label='Sources', y_axis_label='Res1-to-Res2', - #sizing_mode='stretch_both', plot_width=1200, plot_height=800, tools=TOOLS) plot_residual.y_range = Range1d(start=min(y1) - .01, end=max(y1) + .01) @@ -2279,14 +2272,12 @@ def _residual_plotter(res_noise_images, points=None, results=None, columns = [TableColumn(field=x, title=x.capitalize()) for x in cols] dtab = DataTable(source=source, columns=columns, width=550, max_width=800, - height=100, max_height=150, - sizing_mode='stretch_both') + height=100, max_height=150) table_title = Div(text="Cross Match Stats") table_title.align = "center" stats_table = column([table_title, dtab]) # Attaching the hover object with labels hover = plot_residual.select(dict(type=HoverTool)) - hover.names = ['ratios'] hover.tooltips = OrderedDict([ ("ratio", "@y"), ("(Res1,Res2)", "(@res1,@res2)"), @@ -2679,8 +2670,7 @@ def plot_subimage_stats(fitsnames, centre_coords, sizes, htmlprefix='default', columns = [TableColumn(field=x, title=x.capitalize()) for x in cols] dtab = DataTable(source=source, columns=columns, width=250, max_width=350, - height=200, max_height=250, - sizing_mode='stretch_both') + height=200, max_height=250) table_title = Div(text="Sub-image Statistics") table_title.align = "center" stats_table = column([table_title, dtab]) @@ -2866,8 +2856,7 @@ def plot_model_columns(catalog_file, x, y, x_err=None, y_err=None, svg=False, columns = [TableColumn(field=col, title=col) for col in column_list] dtab = DataTable(source=bokeh_source_table, columns=columns, width=width, max_width=width + 50, - height=height, max_height=width + 50, - sizing_mode='stretch_both') + height=height, max_height=width + 50) table_title = Div(text="Source Table") table_title.align = "center" source_table = column([table_title, dtab]) @@ -2900,8 +2889,7 @@ def plot_model_data(catalog_file, html_prefix=''): columns = [TableColumn(field=col, title=col) for col in column_list] dtab = DataTable(source=bokeh_source_table, columns=columns, width=width, max_width=width + 50, - height=height, max_height=width + 50, - sizing_mode='stretch_both') + height=height, max_height=width + 50) table_title = Div(text="Source Table") table_title.align = "center" source_table = column([table_title, dtab]) From ddb78f9a91a7147130da675772e4c5389653c0a0 Mon Sep 17 00:00:00 2001 From: Athanaseus Javas Ramaila Date: Tue, 29 Aug 2023 13:20:41 +0200 Subject: [PATCH 2/2] Prepare release --- poetry.lock | 10 +++++----- pyproject.toml | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/poetry.lock b/poetry.lock index b1b576e..eb297be 100644 --- a/poetry.lock +++ b/poetry.lock @@ -664,7 +664,7 @@ test = ["pytest (>=6)"] name = "flake8" version = "5.0.4" description = "the modular source code checker: pep8 pyflakes and co" -optional = true +optional = false python-versions = ">=3.6.1" files = [ {file = "flake8-5.0.4-py2.py3-none-any.whl", hash = "sha256:7a1cf6b73744f5806ab95e526f6f0d8c01c66d7bbe349562d22dfca20610b248"}, @@ -1187,7 +1187,7 @@ python-dateutil = ">=2.7" name = "mccabe" version = "0.7.0" description = "McCabe checker, plugin for flake8" -optional = true +optional = false python-versions = ">=3.6" files = [ {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, @@ -1477,7 +1477,7 @@ testing = ["pytest", "pytest-benchmark"] name = "pycodestyle" version = "2.9.1" description = "Python style guide checker" -optional = true +optional = false python-versions = ">=3.6" files = [ {file = "pycodestyle-2.9.1-py2.py3-none-any.whl", hash = "sha256:d1735fc58b418fd7c5f658d28d943854f8a849b01a5d0a1e6f3f3fdd0166804b"}, @@ -1555,7 +1555,7 @@ test = ["pytest", "pytest-doctestplus (>=0.7)"] name = "pyflakes" version = "2.5.0" description = "passive checker of Python programs" -optional = true +optional = false python-versions = ">=3.6" files = [ {file = "pyflakes-2.5.0-py2.py3-none-any.whl", hash = "sha256:4579f67d887f804e67edb544428f264b7b24f435b263c4614f384135cea553d2"}, @@ -2407,4 +2407,4 @@ testing = ["pytest", "pytest-flake8"] [metadata] lock-version = "2.0" python-versions = ">=3.8" -content-hash = "1587fb5c2a88d43b3194b6dda498be51f2351a5606670fdb26976c3934503010" +content-hash = "b4002735e110c0888be366a5877d05350714dcbf817f9c3cdbbab90efd561475" diff --git a/pyproject.toml b/pyproject.toml index 1ea12bf..3a32f2b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "aimfast" -version = "1.3.4" +version = "1.3.5" description = "An Astronomical Image Fidelity Assessment Tool." authors = ["Athanaseus Ramaila "] readme = "README.rst" @@ -11,6 +11,8 @@ classifiers = ["Development Status :: 5 - Production/Stable", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Topic :: Scientific/Engineering :: Astronomy", "Topic :: Software Development :: Libraries"] keywords = ["fits", "dataset", "lsm", "models", "statistics", "html", "catalogs"]