Source code for casatasks.single.getjyperkalma

#
# stub function definition file for docstring parsing
#

[docs] def getjyperkalma(vis, caltable='', infile='', endpoint='asdm', timeout=180, retry=3, retry_wait_time=5, spw='', pol='', backup_hosts=''): r""" A new task dedicated to Jy/K calibration [`Description`_] [`Examples`_] [`Development`_] [`Details`_] Parameters - vis_ (path) - Name of input visibility file - caltable_ (string='') - Name of input calibration table - infile_ (string='') - Input ancilliary file - endpoint_ (string='asdm') - Input endpoint of the Jy/K DB Web API: (asdm, model-fit, interpolation) - timeout_ (int=180) - Maximum waiting time [sec] for the Web API access - retry_ (int=3) - Number of retry when the Web API access fails - retry_wait_time_ (int=5) - Waiting time [sec] until next query - spw_ (string='') - Select spectral window/channels - pol_ (string='') - Calibration polarizations(s) selection - backup_hosts_ (stringVec='') - List of Jy/K DB Web API URLs .. _Description: Description This task generates Jy/K calibration table for ALMA Total Power data. The task without 'infile' sub-parameter queries Jy/K DB from the environmental variable JYPERKDB_URL (https://asa.alma.cl/science/jy-kelvins), if available, via the internet to obtain Jy/K factors and generate a caltable. Jy/K factors can also be taken from the backup hosts or from a file in the local storage specified by the 'infile' sub-parameter to generate a caltable. Task queries the information with the following priorities (if available), in order: - JYPERKDB_URL - Backup host 1 - Backup host 2 - ... - infile .. _Examples: Examples getjyperkalma usage for an infile. :: getjyperkalma(vis='test.ms', caltable='test.G', infile='jyperk_factor_csv') Retrieve the factors with backup URLs if JYPERKDB_URL is unavailable, and fall back on one from backup_hosts. If JYPERKDB_URL is accessible, the fallback does not occur. :: getjyperkalma(vis='test.ms', caltable='test.G',backup_hosts=[https://backup1.url/jy-kelvins',"https://backup2.url/jy-kelvins"]) .. _Development: Development No additional development details .. _Details: Parameter Details Detailed descriptions of each function parameter .. _vis: | ``vis (path)`` - Name of input visibility file | Default: none | | Example: vis='ngc5921.ms' .. _caltable: | ``caltable (string='')`` - Name of input calibration table | Default: none | | If the calibration table specified by this parameter does not exist, | it will be created. | If the table already exists, | the new calibration solutions will be added cumulatively to the existing contents. | Only a single timestamp is currently supported for all calibration entries in the table. | Important: | Do not use a calibration table created by other calibration tasks such as | gaincal, bandpass, etc. | Example: | `caltable='test.G'` .. _infile: | ``infile (string='')`` - Input ancilliary file | Default: none | The format of the file in case of 'antpos' is JSON. | The file contains the information about the antenna | positions as well as some metadata. As a reference, | this code snippet would create the most minimal JSON file | that can be used by **gencal** | :: | import json | ... | with open("outfile.json", "w") as f: | json.dump({"data":{"ANT1" : [500000, 500000, 500000]}, "metadata" : {"product_code": "antposalma"} }, f) .. _endpoint: | ``endpoint (string='asdm')`` - Input endpoint of the Jy/K DB Web API. | Default: 'asdm' | Options: 'asdm', 'model-fit', 'interpolation' | The 'interpolation' option may not work for the data after 2019. .. _timeout: | ``timeout (int=180)`` - Maximum waiting time [sec] for the Web API access. | Default: 180 .. _retry: | ``retry (int=3)`` - Number of retry when the Web API access fails. | Default: 3 .. _retry_wait_time: | ``retry_wait_time (int=5)`` - Waiting time [sec] until next query, when the Web API access fails. | Default: 5 .. _spw: | ``spw (string='')`` - Select spectral window/channels | Default: '' (all spectral windows and channels) | | Examples: spw='0~2,4'; spectral windows 0,1,2,4 (all channels) spw='<2'; spectral windows less than 2 (i.e. 0,1) spw='0:5~61'; spw 0, channels 5 to 61 spw='0,10,3:3~45'; spw 0,10 all channels, spw | 3 - chans 3 to 45. spw='0~2:2~6'; spw 0,1,2 with channels 2 | through 6 in each. | spw = '\*:3~64' channels 3 through 64 for all sp id's | spw = ' :3~64' will NOT work. .. _pol: | ``pol (string='')`` - Polarization selection for specified parameters | Default: pol='' (specified parameters apply to | all polarizations) | | Example: pol='R' (specified parameters to | apply to R only) .. _backup_hosts: | ``backup_hosts (stringVec='')`` - List of Web API base URLs used for Jy/K calibration queries. | The task will try the URLs in the given order. | Example: | urls = [ | 'https://example.primary/api', | 'https://example.backup/api' | ] """ pass