Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions examples/filetable.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def filetable_to_firefly(
Instance of FireflyClient connected to a Firefly server

topdir: "str"
pathname for directory to search
pathname for directory to search, must be an absolute path.

pattern: "str"
filename pattern to search for, e.g. "*.fits"
Expand Down Expand Up @@ -159,15 +159,17 @@ def main():
if printurl:
input("Press Enter after you have opened the Firefly URL printed above...")

# TODO: figure out how to activate data products (meta) tab in Bi-View
# if "slate" not in html_file:
# fc.change_triview_layout(firefly_client.FireflyClient.BIVIEW_T_IChCov)
# fc.dispatch('layout.updateLayout', {'images':{'selectedTab':'meta'}})
if "slate" not in html_file:
fc.change_triview_layout(firefly_client.FireflyClient.BIVIEW_T_IChCov)
fc.dispatch('layout.updateLayout', {'rightSide': {'selectedTab': 'meta'}})
r = fc.add_cell(0, 0, 1, 2, "tables", "main")
fc.show_table(tbl_val, meta=metainfo)
r = fc.add_cell(0, 1, 1, 2, "tableImageMeta", "image-meta")
fc.show_image_metadata(viewer_id=r["cell_id"])


if __name__ == "__main__":
# Test example:
# python filetable.py '/Users/jsinghal/dev/cm/__test_data' '*.*' --firefly_url http://localhost:8080/firefly/

main()
3 changes: 3 additions & 0 deletions firefly_client/firefly_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1230,6 +1230,7 @@ def show_xyplot(self, tbl_id, standalone=False, group_id=None, **chart_params):

payload = {'chartId': cid, 'chartType': 'scatter',
'groupId': group_id, 'viewerId': group_id,
'activateViewer': True,
'params': {'tbl_id': tbl_id, **chart_params}}

r = self.dispatch(ACTION_DICT['ShowXYPlot'], payload)
Expand Down Expand Up @@ -1281,6 +1282,7 @@ def show_histogram(self, tbl_id, group_id=None, **histogram_params):
payload = {'chartId': cid, 'chartType': 'histogram',
'groupId': group_id,
'viewerId': group_id,
'activateViewer': True,
'params': {'tbl_id': tbl_id, **histogram_params}}

r = self.dispatch(ACTION_DICT['ShowXYPlot'], payload)
Expand Down Expand Up @@ -1330,6 +1332,7 @@ def show_chart(self, group_id=None, **chart_params):
payload = {'chartId': chart_id,
'groupId': group_id,
'viewerId': group_id,
'activateViewer': True,
'chartType': 'plot.ly',
'closable': True}

Expand Down