EazyExplorer

class eazy.visualization.EazyExplorer(photoz, zout, extra_zout_columns=[], selection=None, extra_plots={}, extra_slider_kws={'checked': [], 'column': 'id', 'label': 'ID', 'max': 10, 'min': 0, 'step': 1, 'value': [1, 5]})[source]

Bases: object

Generating a tool for interactive visualization of eazy outputs with the dash + plotly libraries.

Parameters:
photozPhotoZ

The main PhotoZ object.

zoutastropy.table.Table

The zout output table with galaxy parameters. At a minimum, it must have columns id, z_phot, z_spec, z_phot_chi2, nusefilt, restU, restV, restJ, sfr, mass, ra, dec.

extra_zout_columnslist

Additional columns from zout to copy to the app df pandas.DataFrame object.

selectionarray-like

Selection array on zout for catalog subset, can be integer indices, or a boolean array with the same length as zout

extra_plotsdict

Extra scatter plot definitions following

>>> extra_plots = {'PlotName': (xcol, ycol, xlabel, ylabel, xr, yr)}

where xcol and ycol are str column names in zout, xlabel and ylabel are str used for the plot labels and xr and yr are the default plot range tuples. Only xcol and ycol are required, and the others are computed if not provided. Note that xcol and ycol are added automatically from zout if necessary and don’t need to be specified in extra_zout_columns.

Attributes Summary

dec_bounds

ra_bounds

Methods Summary

get_filters_from_api()

Query available HST/JWST filters from the heroku API

make_dash_app([template, server_mode, port, ...])

Create a Plotly/Dash app for interactive exploration

Attributes Documentation

dec_bounds
ra_bounds

Methods Documentation

get_filters_from_api()[source]

Query available HST/JWST filters from the heroku API

make_dash_app(template='plotly_white', server_mode='external', port=8050, app=None, app_type='jupyter', plot_height=680, external_stylesheets=['https://codepen.io/chriddyp/pen/bWLwgP.css'], infer_proxy=False, slider_width=140, cutout_hdu=None, cutout_rgb=None, cutout_size=10, api_filters=None, api_size=2, api_args='', PLOT_TYPES=['zphot-zspec', 'Mag-redshift', 'Mag-color', 'redshift-color', 'Mass-redshift', 'UVJ', 'RA/Dec', 'UV-redshift', 'chi2-redshift'], get_content=False, fitsmap_url=None, cutout_url='https://grizli-cutout.herokuapp.com/thumb?all_filters=True&size=4&scl=1.0&asinh=True&filters=f115w-clear,f277w-clear,f444w-clear&rgb_scl=1.5,0.74,1.3&pl=2&ra={ra}&dec={dec}')[source]

Create a Plotly/Dash app for interactive exploration

Parameters:
templatestr

plotly style template.

server_mode, portstr, int

If not None, the app server is started with app.run_server(mode=server_mode, port=port).

app_typestr

If jupyter then app = jupyter_dash.JupyterDash(), else app = dash.Dash()

plot_heightint

Height in pixels of the scatter and SED+P(z) plot windows.

infer_proxybool

Run JupyterDash.infer_jupyter_proxy_config(), before app initilization, e.g., for running on GoogleColab.

Returns:
appobject

App object following app_type.