General Goal
Create a Basic
SkyNode pointing to theory data (using Python).
Bonus Goal
Draft an
IVOA Working Draft or Note describing the minimal modifications to the
existing SkyNode interface that would allow theory data to be served up by Theory
SkyNodes.
Components
Database
Status: A minimal database schema with two tables has been built with existing data. This should be sufficient for this proof-of-concept.
VOTable
ADQL
Status: XSLT processing in Python has been used to transform ADQL/x to SQL in
MySQL? 's syntax.
SOAP
Examples
mysql> show tables;
+---------------+
| Tables_in_sca |
+---------------+
| catalog |
| cluster_stats |
+---------------+
2 rows in set (0.00 sec)
mysql> select * from catalog;
+----+-------------------+----------------------------------+
| id | name | description |
+----+-------------------+----------------------------------+
| 0 | adiabatic | Adiabatic gas dynamics |
| 1 | radiative_cooling | Radiative Cooling |
| 2 | zero_feedback | Star formation with out feedback |
| 3 | low_feedback | Star formation with low feedback |
+----+-------------------+----------------------------------+
4 rows in set (0.00 sec)
mysql> describe cluster_stats;
+----------------------+------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------------+------------------+------+-----+---------+-------+
| catalog | int(10) unsigned | NO | PRI | | |
| cluster | int(10) unsigned | NO | PRI | | |
| halo | int(10) unsigned | NO | PRI | | |
| z | double | NO | PRI | | |
| image_scale_mpc | double | YES | | NULL | |
| t_look_back_gyr | double | YES | | NULL | |
| m200_tot_msolar | double | YES | | NULL | |
| m200_dm_msolar | double | YES | | NULL | |
| m200_gas_msolar | double | YES | | NULL | |
| m200_star_msolar | double | YES | | NULL | |
| r200_mpc | double | YES | | NULL | |
| t_virial_kev | double | YES | | NULL | |
| x_com_code | double | YES | | NULL | |
| y_com_code | double | YES | | NULL | |
| z_com_code | double | YES | | NULL | |
| vx_com_tot_kms | double | YES | | NULL | |
| vy_com_tot_kms | double | YES | | NULL | |
| vz_com_tot_kms | double | YES | | NULL | |
| vx_com_dm_kms | double | YES | | NULL | |
| vy_com_dm_kms | double | YES | | NULL | |
| vz_com_dm_kms | double | YES | | NULL | |
| vx_com_gas_kms | double | YES | | NULL | |
| vy_com_gas_kms | double | YES | | NULL | |
| vz_com_gas_kms | double | YES | | NULL | |
| lx_dm_mpc_kms | double | YES | | NULL | |
| ly_dm_mpc_kms | double | YES | | NULL | |
| lz_dm_mpc_kms | double | YES | | NULL | |
| lx_gas_mpc_kms | double | YES | | NULL | |
| ly_gas_mpc_kms | double | YES | | NULL | |
| lz_gas_mpc_kms | double | YES | | NULL | |
| spin_dm | double | YES | | NULL | |
| spin_gas | double | YES | | NULL | |
| v_dispersion_dm_kms | double | YES | | NULL | |
| v_dispersion_gas_kms | double | YES | | NULL | |
| delta_v200_sigma_dm | double | YES | | NULL | |
+----------------------+------------------+------+-----+---------+-------+
35 rows in set (0.20 sec)
mysql> select catalog, cluster, halo, avg(t_virial_kev) from cluster_stats where z = 0 group by catalog;
+---------+---------+------+-------------------+
| catalog | cluster | halo | avg(t_virial_kev) |
+---------+---------+------+-------------------+
| 0 | 0 | 0 | 5.1180363155963 |
| 1 | 0 | 0 | 3.336355952 |
| 2 | 0 | 0 | 3.4492808 |
| 3 | 0 | 0 | 3.44889274 |
+---------+---------+------+-------------------+
4 rows in set (0.24 sec)
mysql>
Working Example
select c.*
from TSTVO_rpw:cluster_stats c
where c.z < 0.251
and c.catalog = 3
Get the data somewhere
* Save output as VOTable
* Upload to
OpenSkyQuery
* Query and join
select s.specobjid, s.z, s.mag_0, s.mag_1, s.mag_2, c.*
from SDSSDR3:SpecObjAll s,
MyData:SCAlowZfeedback c
where
abs(s.z - c.tstvo_rpw_z) < 0.1
and s.objType = 0
Work with results
* Save output as VOTable
* Make a plot
--
RichardWagner - 11 Sep 2006