@@ -732,6 +732,8 @@ def show_fits(self, file_on_server=None, plot_id=None, viewer_id=None, **additio
732732 Display only a particular image extension from the file (zero-based index).
733733 **Title** : `str`, optional
734734 Title to display with the image.
735+ **url** : `str`, optional
736+ URL of the fits image file, if it's not a local file you can upload.
735737
736738 Returns
737739 -------
@@ -803,18 +805,20 @@ def show_fits_3color(self, three_color_params, plot_id=None, viewer_id=None):
803805 warning and r .update ({'warning' : warning })
804806 return r
805807
806- def show_table (self , file_on_server = None , tbl_id = None , title = None , page_size = 100 , is_catalog = True ,
808+ def show_table (self , file_on_server = None , url = None , tbl_id = None , title = None , page_size = 100 , is_catalog = True ,
807809 meta = None , target_search_info = None , options = None , table_index = None ,
808810 column_spec = None , filters = None , visible = True ):
809811 """
810812 Show a table.
811813
812814 Parameters
813815 ----------
814- file_on_server : `str`
816+ file_on_server : `str`, optional
815817 The name of the file on the server.
816818 If you use `upload_file()`, then it is the return value of the method. Otherwise it is a file that
817819 Firefly has direct access to.
820+ url : `str`, optional
821+ URL of the table file, if it's not a local file you can upload.
818822 tbl_id : `str`, optional
819823 A table ID. It will be created automatically if not specified.
820824 title : `str`, optional
@@ -872,28 +876,32 @@ def show_table(self, file_on_server=None, tbl_id=None, title=None, page_size=100
872876 A string specifying filters. Column names must be quoted.
873877 For example, '("coord_dec" > -0.478) and ("parent" > 0)'.
874878 visible: `bool`, optional
875- If false, only load the table to Firefly but don't show it in the UI
879+ If false, only load the table to Firefly but don't show it in the UI.
880+ Similar to `fetch_table()`
876881
877882 Returns
878883 -------
879884 out : `dict`
880885 Status of the request, like {'success': True}.
881886
882- .. note:: `file_on_server` and `target_search_info` are exclusively required.
887+ .. note:: `url`, `file_on_server`, and `target_search_info` are exclusively required.
888+ If more than one of these 3 parameters are passed, precedence order is:
889+ `url` > `file_on_server` > `target_search_info`
883890 """
884891
885892 if not tbl_id :
886893 tbl_id = gen_item_id ('Table' )
887894 if not title :
888- title = tbl_id if file_on_server else target_search_info .get ('catalog' , tbl_id )
895+ title = tbl_id if file_on_server or url else target_search_info .get ('catalog' , tbl_id )
889896
890897 meta_info = {'title' : title , 'tbl_id' : tbl_id }
891898 meta and meta_info .update (meta )
892899
893900 tbl_req = {'startIdx' : 0 , 'pageSize' : page_size , 'tbl_id' : tbl_id }
894- if file_on_server :
901+ if file_on_server or url :
895902 tbl_type = 'table' if not is_catalog else 'catalog'
896- tbl_req .update ({'source' : file_on_server , 'tblType' : tbl_type ,
903+ source = url if url else file_on_server
904+ tbl_req .update ({'source' : source , 'tblType' : tbl_type ,
897905 'id' : 'IpacTableFromSource' })
898906 table_index and tbl_req .update ({'tbl_index' : table_index })
899907 elif target_search_info :
@@ -941,7 +949,6 @@ def fetch_table(self, file_on_server, tbl_id=None, title=None, page_size=1, tabl
941949 out : `dict`
942950 Status of the request, like {'success': True}.
943951 """
944-
945952 if not tbl_id :
946953 tbl_id = gen_item_id ('Table' )
947954 if not title :
0 commit comments