Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revisionBoth sides next revision | ||
public:lta_tricks [2020-04-10 10:08] – [Examples] Reinoud Bokhorst | public:lta_tricks [2020-07-21 13:53] – Updated link for Python stager API releases Thomas Jürges | ||
---|---|---|---|
Line 51: | Line 51: | ||
There is a server that gives the option to run your own queries on the database [[https:// | There is a server that gives the option to run your own queries on the database [[https:// | ||
- | A useful query might be this one, that gives you all files for a certain Obs Id (SAS VIC tree ID).< | + | A useful query might be this one, that gives you all files for a certain Obs Id (SAS VIC tree ID). |
+ | < | ||
SELECT fo.URI, dp." | SELECT fo.URI, dp." | ||
| | ||
Line 61: | Line 63: | ||
AND fo.data_object = dp." | AND fo.data_object = dp." | ||
AND dp." | AND dp." | ||
+ | |||
</ | </ | ||
Line 77: | Line 80: | ||
AND fo.data_object = dp." | AND fo.data_object = dp." | ||
AND dp." | AND dp." | ||
+ | |||
</ | </ | ||
Line 85: | Line 89: | ||
Once you have installed the client, set up your user name and password. These are the same as for MoM. Remember that this is just a different interface to the LTA catalogue: you will need the same credentials as for the web interface. | Once you have installed the client, set up your user name and password. These are the same as for MoM. Remember that this is just a different interface to the LTA catalogue: you will need the same credentials as for the web interface. | ||
- | After installing the LTA client, the file .awe/ | + | After installing the LTA client, the file .awe/ |
+ | < | ||
[global] | [global] | ||
database_user | database_user | ||
database_password | database_password | ||
+ | |||
</ | </ | ||
Line 120: | Line 127: | ||
pprint(result) | pprint(result) | ||
+ | |||
</ | </ | ||
Line 134: | Line 142: | ||
Pointing found RA 95.561458 DEC 24.584056 | Pointing found RA 95.561458 DEC 24.584056 | ||
..etc.. | ..etc.. | ||
+ | |||
</ | </ | ||
Line 151: | Line 160: | ||
Observation | Observation | ||
from awlofar.toolbox.LtaStager import LtaStager, LtaStagerError | from awlofar.toolbox.LtaStager import LtaStager, LtaStagerError | ||
+ | |||
</ | </ | ||
Line 197: | Line 207: | ||
stager = LtaStager() | stager = LtaStager() | ||
stager.stage_uris(uris) | stager.stage_uris(uris) | ||
+ | |||
</ | </ | ||
Line 255: | Line 266: | ||
for project in (project1, project2) : | for project in (project1, project2) : | ||
stager.stage_uris(uris[project]) | stager.stage_uris(uris[project]) | ||
+ | |||
</ | </ | ||
Line 305: | Line 317: | ||
stager = LtaStager() | stager = LtaStager() | ||
stager.stage_uris(uris) | stager.stage_uris(uris) | ||
+ | |||
</ | </ | ||
Line 318: | Line 331: | ||
print(len(query)) | print(len(query)) | ||
# 1800 | # 1800 | ||
+ | |||
</ | </ | ||
Line 346: | Line 360: | ||
for pipeline in query_pipelines : | for pipeline in query_pipelines : | ||
print(" | print(" | ||
- | |||
# Data products | # Data products | ||
Line 353: | Line 366: | ||
for product in query_products : | for product in query_products : | ||
print(" | print(" | ||
+ | |||
</ | </ | ||
+ | |||
===== Python Module for Staging ===== | ===== Python Module for Staging ===== | ||
- | The python interaction with the LTA catalog can be complemented with the use of a specific module developed to give users more control over their staging requests. | + | The python interaction with the LTA catalog can be complemented with the use of a specific module developed to give users more control over their staging requests. The module is made available **[[https:// |
+ | |||
+ | **Alternatively to the .awe/ | ||
+ | < | ||
- | **Alternatively to the .awe/ | ||
user=XXX | user=XXX | ||
password=YYY | password=YYY | ||
+ | |||
</ | </ | ||
Line 397: | Line 415: | ||
- Status | - Status | ||
- User id -> 1919 | - User id -> 1919 | ||
+ | |||
</ | </ | ||