From 547f76fb690b1b82f2080c821f0042db24e99c0a Mon Sep 17 00:00:00 2001 From: David Rafferty <drafferty@hs.uni-hamburg.de> Date: Thu, 14 Sep 2023 13:53:22 +0000 Subject: [PATCH] Fix LoTSS query radius and change url to Gaussian catalog --- lsmtool/skymodel.py | 4 ++-- lsmtool/tableio.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lsmtool/skymodel.py b/lsmtool/skymodel.py index 2a35633..e5f2ea9 100644 --- a/lsmtool/skymodel.py +++ b/lsmtool/skymodel.py @@ -125,7 +125,7 @@ class SkyModel(object): self._addHistory("LOAD (from LoTSS at position {0})".format(VOPosition)) else: raise ValueError("VO service '{}' not understood. Must be one of " - "'WENSS', 'NVSS', 'TGSS', or 'GSM'. If you want " + "'WENSS', 'NVSS', 'TGSS', 'GSM', or 'LOTSS'. If you want " "instead to load a model from a local file, do not " "set VOPosition or VORadius.".format(fileName)) except (IndexError, InconsistentTableError): @@ -137,7 +137,7 @@ class SkyModel(object): else: # If fileName does not point to a VO query, assume it points to a local file self.log.debug("Attempting to load model from file '{0}'...".format(fileName)) - if fileName.lower() in ('wenss', 'nvss', 'tgss', 'gsm'): + if fileName.lower() in ('wenss', 'nvss', 'tgss', 'gsm', 'lotss'): self.log.warn("It appears from the filename that you may be trying to " "query a VO service. If so, you must provide values for " "both VOPosition and VORadius.") diff --git a/lsmtool/tableio.py b/lsmtool/tableio.py index 0388edd..2ee03a8 100644 --- a/lsmtool/tableio.py +++ b/lsmtool/tableio.py @@ -110,7 +110,7 @@ allowedVOServices = { # Define the various URLs used for downloading sky models TGSS_URL = 'http://tgssadr.strw.leidenuniv.nl/cgi-bin/gsmv4.cgi' GSM_URL = 'https://lcs165.lofar.eu/cgi-bin/gsmv1.cgi' -LOTSS_URL = 'https://vo.astron.nl/lotss_dr2/q/src_cone/form' +LOTSS_URL = 'https://vo.astron.nl/lotss_dr2/q/gaus_cone/form' def raformat(val): @@ -1358,6 +1358,7 @@ def getLoTSS(position, radius): log.debug('Querying LoTSS...') RA, Dec, radius = getQueryInputs(position, radius) + radius *= 60 # LoTSS query requires arcmin, not degrees url = (LOTSS_URL + '?__nevow_form__=genForm&' 'hscs_pos={0}%2C%20{1}&hscs_sr={2}&_DBOPTIONS_ORDER=&' '_DBOPTIONS_DIR=ASC&MAXREC=100000&_FORMAT=CSV&submit=Go'.format(RA, Dec, radius)) -- GitLab