Skip to content

Commit f7dd7d2

Browse files
mhsarmientobsipocz
authored andcommitted
GAIAPCR-1151 updated help content for param 'valid_data' at method 'load_data'
1 parent 46b11d2 commit f7dd7d2

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

astroquery/gaia/core.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,11 @@ def load_data(self, ids, data_release=None, data_structure='INDIVIDUAL', retriev
190190
For future GAIA DR3 (Once published), possible values will be ['EPOC_PHOTOMETRY', 'RVS', 'XP_CONTINUOUS',
191191
'XP_SAMPLED', 'MCMC_GSPPHOT' or 'MCMC_MSC']
192192
valid_data : bool, optional, default False
193-
By default, the epoch photometry service returns all data associated to a given source.
194-
In order to retrieve only valid data, that is, all data rows where flux is not null and
195-
rejected_by_photometry flag is not true, this parameter should be included (valid_data=True)
193+
By default, the epoch photometry service returns all available data, including
194+
data rows where flux is null and/or the rejected_by_photometry flag is set to True.
195+
In order to retrieve only valid data (data rows where flux is not null and/or the
196+
rejected_by_photometry flag is set to False) this request parameter should be included
197+
with valid_data=True.
196198
band : str, optional, default None, valid values: G, BP, RP
197199
By default, the epoch photometry service returns all the
198200
available photometry bands for the requested source.

astroquery/gaia/tests/test_gaiatap.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class TestTap:
4444
def test_query_object(self):
4545
conn_handler = DummyConnHandler()
4646
tapplus = TapPlus("http://test:1111/tap", connhandler=conn_handler)
47-
tap = GaiaClass(conn_handler, tapplus)
47+
tap = GaiaClass(conn_handler, tapplus, show_messages=False)
4848
# Launch response: we use default response because the query contains
4949
# decimals
5050
response_launch_job = DummyResponse()
@@ -125,7 +125,7 @@ def test_query_object(self):
125125
def test_query_object_async(self):
126126
conn_handler = DummyConnHandler()
127127
tapplus = TapPlus("http://test:1111/tap", connhandler=conn_handler)
128-
tap = GaiaClass(conn_handler, tapplus)
128+
tap = GaiaClass(conn_handler, tapplus, show_messages=False)
129129
jobid = '12345'
130130
# Launch response
131131
response_launch_job = DummyResponse()
@@ -220,7 +220,7 @@ def test_query_object_async(self):
220220
def test_cone_search_sync(self):
221221
conn_handler = DummyConnHandler()
222222
tapplus = TapPlus("http://test:1111/tap", connhandler=conn_handler)
223-
tap = GaiaClass(conn_handler, tapplus)
223+
tap = GaiaClass(conn_handler, tapplus, show_messages=False)
224224
# Launch response: we use default response because the query contains
225225
# decimals
226226
response_launch_job = DummyResponse()
@@ -273,7 +273,7 @@ def test_cone_search_sync(self):
273273
def test_cone_search_async(self):
274274
conn_handler = DummyConnHandler()
275275
tapplus = TapPlus("http://test:1111/tap", connhandler=conn_handler)
276-
tap = GaiaClass(conn_handler, tapplus)
276+
tap = GaiaClass(conn_handler, tapplus, show_messages=False)
277277
jobid = '12345'
278278
# Launch response
279279
response_launch_job = DummyResponse()
@@ -380,7 +380,7 @@ def __check_results_column(self, results, column_name, description, unit,
380380

381381
def test_load_data(self):
382382
dummy_handler = DummyTapHandler()
383-
tap = GaiaClass(dummy_handler, dummy_handler)
383+
tap = GaiaClass(dummy_handler, dummy_handler, show_messages=False)
384384

385385
ids = "1,2,3,4"
386386
retrieval_type = "epoch_photometry"
@@ -395,7 +395,7 @@ def test_load_data(self):
395395
output_file = os.path.abspath(path_to_end_with)
396396

397397
params_dict = {}
398-
params_dict['VALID_DATA'] = "true"
398+
params_dict['VALID_DATA'] = "false"
399399
params_dict['ID'] = ids
400400
params_dict['FORMAT'] = str(format)
401401
params_dict['RETRIEVAL_TYPE'] = str(retrieval_type)
@@ -419,7 +419,7 @@ def test_load_data(self):
419419

420420
def test_get_datalinks(self):
421421
dummy_handler = DummyTapHandler()
422-
tap = GaiaClass(dummy_handler, dummy_handler)
422+
tap = GaiaClass(dummy_handler, dummy_handler, show_messages=False)
423423
ids = ["1", "2", "3", "4"]
424424
verbose = True
425425
parameters = {}
@@ -431,7 +431,7 @@ def test_get_datalinks(self):
431431
def test_xmatch(self):
432432
conn_handler = DummyConnHandler()
433433
tapplus = TapPlus("http://test:1111/tap", connhandler=conn_handler)
434-
tap = GaiaClass(conn_handler, tapplus)
434+
tap = GaiaClass(conn_handler, tapplus, show_messages=False)
435435
jobid = '12345'
436436
# Launch response
437437
response_launch_job = DummyResponse()
@@ -579,7 +579,7 @@ def test_xmatch(self):
579579
def test_login(self, mock_login):
580580
conn_handler = DummyConnHandler()
581581
tapplus = TapPlus("http://test:1111/tap", connhandler=conn_handler)
582-
tap = GaiaClass(conn_handler, tapplus)
582+
tap = GaiaClass(conn_handler, tapplus, show_messages=False)
583583
tap.login("user", "password")
584584
assert (mock_login.call_count == 2)
585585
mock_login.side_effect = HTTPError("Login error")
@@ -591,7 +591,7 @@ def test_login(self, mock_login):
591591
def test_login_gui(self, mock_login_gui, mock_login):
592592
conn_handler = DummyConnHandler()
593593
tapplus = TapPlus("http://test:1111/tap", connhandler=conn_handler)
594-
tap = GaiaClass(conn_handler, tapplus)
594+
tap = GaiaClass(conn_handler, tapplus, show_messages=False)
595595
tap.login_gui()
596596
assert (mock_login_gui.call_count == 1)
597597
mock_login_gui.side_effect = HTTPError("Login error")
@@ -602,7 +602,7 @@ def test_login_gui(self, mock_login_gui, mock_login):
602602
def test_logout(self, mock_logout):
603603
conn_handler = DummyConnHandler()
604604
tapplus = TapPlus("http://test:1111/tap", connhandler=conn_handler)
605-
tap = GaiaClass(conn_handler, tapplus)
605+
tap = GaiaClass(conn_handler, tapplus, show_messages=False)
606606
tap.logout()
607607
assert (mock_logout.call_count == 2)
608608
mock_logout.side_effect = HTTPError("Login error")

0 commit comments

Comments
 (0)