{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from __future__ import print_function, division, absolute_import\n", "from firefly_client import FireflyClient\n", "\n", "url='http://127.0.0.1:8080/firefly'\n", "html = 'slate.html'\n", "\n", "fc = FireflyClient(url, html_file=html)\n", "fc.launch_browser()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Add a three color fits\n", "# in cell 0, 0, 1, 1\n", "target = '210.80227;54.34895;EQ_J2000' #Galaxy M101\n", "viewer_id = '3C'\n", "r = fc.add_cell(0, 0, 1, 1, 'images', viewer_id)\n", "rv = '92,-2,92,8,NaN,2,44,25,600,120'\n", "if r['success']:\n", " threeC= [\n", " {\n", " 'Type' : 'SERVICE',\n", " 'Service' : 'WISE',\n", " 'Title' : '3 color',\n", " 'SurveyKey' : '3a',\n", " 'SurveyKeyBand': '3',\n", " 'WorldPt' : target,\n", " 'RangeValues': rv,\n", " 'SizeInDeg' : '.14'\n", " },\n", " {\n", " 'Type' : 'SERVICE',\n", " 'Service' : 'WISE',\n", " 'Title' : '3 color',\n", " 'SurveyKey' : '3a',\n", " 'SurveyKeyBand': '2',\n", " 'WorldPt' : target,\n", " 'RangeValues': rv,\n", " 'SizeInDeg' : '.14'\n", " },\n", " {\n", " 'Type' : 'SERVICE',\n", " 'Service' : 'WISE',\n", " 'Title' : '3 color',\n", " 'SurveyKey' : '3a',\n", " 'SurveyKeyBand': '1',\n", " 'WorldPt' : target,\n", " 'RangeValues': rv,\n", " 'SizeInDeg' : '.14'\n", " }]\n", " \n", " fc.show_fits_3color(threeC, plot_id='wise_m101', viewer_id=viewer_id)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Set stretch using hue-preserving algorithm with scaling coefficients .15 for RED, 1.0 for GREEN, and .4 for BLUE.\n", "fc.set_stretch_hprgb(plot_id='wise_m101', asinh_q_value=4.2, scaling_k=[.15,1,.4])" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Set per-band stretch\n", "fc.set_stretch(plot_id='wise_m101', stype='ztype', algorithm='asinh', band='ALL')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.5" } }, "nbformat": 4, "nbformat_minor": 2 }