Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
esap-db-python-client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ASTRON SDC
ESCAPE WP5
esap-db-python-client
Commits
cb16dee7
Commit
cb16dee7
authored
3 years ago
by
Pierre Chanial
Browse files
Options
Downloads
Patches
Plain Diff
Add notebook for the ESCAPE General Assembly demo.
parent
07c601ee
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
README.md
+22
-0
22 additions, 0 deletions
README.md
notebooks/demo-2021-08-05.ipynb
+1761
-0
1761 additions, 0 deletions
notebooks/demo-2021-08-05.ipynb
poetry.lock
+1285
-443
1285 additions, 443 deletions
poetry.lock
pyproject.toml
+7
-4
7 additions, 4 deletions
pyproject.toml
with
3076 additions
and
447 deletions
.gitignore
+
1
−
0
View file @
cb16dee7
...
...
@@ -3,5 +3,6 @@
__pycache__/
.mypy_cache/
.ipynb_checkpoints/
.coverage
htmlcov
This diff is collapsed.
Click to expand it.
README.md
+
22
−
0
View file @
cb16dee7
...
...
@@ -120,3 +120,25 @@ The new table `apertif_table` can be imported by the Python client as Pandas dat
```
python
table
.
aspandas
()
```
## Creation of a table from a TAP query
All the TAP services can be accessed through ESAP-DB. Queries can be stored as a table in a user's dataset.
A VO table is referenced in ESAP-DB by
`tap_service.schema_name.table_name`
. The following example
performs a cone search around an optical source in the Gaia DR3 catalog.
```
python
query
=
"""
SELECT *
FROM esavo_gaia_tap.gaiaedr3.gaia_source
WHERE 1 = CONTAINS(
POINT(
'
ICRS
'
, ra, dec),
CIRCLE(
'
ICRS
'
, 207.5, 52.5, 1.)
)
"""
print
(
f
'
Cone search around optical source...
'
,
end
=
''
)
table_optical
=
dataset
.
create_table_as
(
query
,
'
optical
'
)
print
(
f
'
{
len
(
table_optical
)
}
results.
'
)
table_optical
.
aspandas
()
```
This diff is collapsed.
Click to expand it.
notebooks/demo-2021-08-05.ipynb
0 → 100644
+
1761
−
0
View file @
cb16dee7
This diff is collapsed.
Click to expand it.
poetry.lock
+
1285
−
443
View file @
cb16dee7
This diff is collapsed.
Click to expand it.
pyproject.toml
+
7
−
4
View file @
cb16dee7
...
...
@@ -6,20 +6,23 @@ authors = ["Pierre Chanial <pierre.chanial@ego-gw.it>"]
[tool.poetry.dependencies]
python
=
"^3.9"
trio
=
"^0.19.0"
trio-websocket
=
"^0.9.2"
asks
=
"^2.4.12"
requests
=
"^2.25.1"
pandas
=
"^1.2.5"
pydantic
=
"^1.8.2"
tabulate
=
"^0.8.9"
termcolor
=
"^1.1.0"
ipykernel
=
{
version
=
"^6.8.0"
,
optional
=
true
}
jupyter
=
{
version
=
"^1.0.0"
,
optional
=
true
}
nbconvert
=
{
extras
=
[
"webpdf"
],
version
=
"^6.4.1"
,
optional
=
true
}
[tool.poetry.dev-dependencies]
pytest
=
"^6.2.4"
pytest-xdist
=
"^2.3.0"
ipython
=
"^7.25.0"
pre-commit
=
"^2.13.0"
pre-commit
=
"^2.17.0"
[tool.poetry.extras]
jupyter
=
[
"jupyter"
,
"ipykernel"
,
"nbconvert"
]
[build-system]
requires
=
["poetry-core>
=
1.0
.
0
a
5
"]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment