DispatcherAPI¶
- class oda_api.gallery_api.GalleryDispatcherAPI(instrument='mock', url=None, run_analysis_handle='run_analysis', host=None, port=None, cookies=None, protocol='https', wait=True, n_max_tries=200, session_id=None, use_local_cache=False, token=None)[source]¶
Bases:
DispatcherAPIMethods Summary
post_data_product_to_gallery([...])Methods Documentation
- post_data_product_to_gallery(product_title: str | None = None, product_id: str = None, observation_id: str | None = None, gallery_image_path: str | None = None, fits_file_path=None, yaml_file_path=None, token: str | None = None, insert_new_source: bool = False, validate_source: bool = False, force_insert_not_valid_new_source: bool = False, apply_fields_source_resolution: bool = False, html_image: str = None, in_evidence: bool = False, observation_time_format: str = 'ISOT', **kwargs)[source]¶
- Parameters:
product_title – title to assign to the product, in case this is not provided, then a title is automatically built using the name of the source and the type of product
product_id – identifier of a data product assigned by the user, this can be used during the creation of a new data-product, as well as to identify an already existing one and update it with the arguments provided by the user
observation_id – this can be indicated in two different ways * by specifying the id of an already present observation (eg ‘test observation’) * by specifying the time range, in particular the value of T1 and T2
observation_time_format – format of the time values for an observation (i.e. T1 and T2), default to ISOT, (e.g. ‘2003-03-15T23:27:40.0’), also the MJD format is supported
in_evidence – a boolean value specifying if the product will be in evidence over thew page of the correspondent source
gallery_image_path – path of the generated image and to be uploaded over the gallery
fits_file_path – a list of fits file links used for the generation of the product to upload over the gallery
yaml_file_path – a list of yaml file links to be attached to the observation of the product to upload over the gallery
token – user token
insert_new_source – a boolean value specifying if, in case the sources that are passed as parameters and are not available on the product gallery, will be created and then used for the new data product
validate_source – a boolean value to specify if, in case the sources that are passed as parameters will be validated against an online service. In case the validation fails the source won’t be inserted as a parameter for the data product and a warning for the user will be generated (unless this is intentionally specified setting to True the boolean parameter force_insert_not_valid_new_sources described below)
force_insert_not_valid_new_source – a boolean value to specify if, in case the validation of the sources passed as parameters fails, those should be in any case provided as a parameter for the data product
apply_fields_source_resolution – a boolean value to specify if, in case only a single source is passed within the parameters and then successfully validated, to apply the parameters values returned from the validation (an example of these parameters are RA and DEC), default to False
html_image – field used to upload an image encapsulated within an html block generated using external tools (e.g. bokeh)
kwargs –
- keyword arguments representing the main parameters values used to generate the product. Amongst them,
it is important to mention the following ones:
instrument: name of the instrument used for the generated product (e.g. isgri, jemx1)
product_type: type of product generated (e.g. isgri_lc, jemx_image)
src_name: name of a single, or a list of, known sources (eg Crab, Cyg X-1)
- others: other parameters used for the product. Not all the parameters are currently supported,
but the list of the supported ones will be extended. RA=25