Example of spectroscopic node¶
Materials¶
This example uses some data from Chianti: a few records from each table. The data are provided in ASCII tables. To read them into the database, I include mapping files for the VAMDC publishing software, which is the approved way of loading the database.
The mapping generates files states.out and lines.out which supply the tables states and transitions [1] respectively. The third table, species, is derived from the states table by an SQL command. The SQL script schema.sql creates the empty tables [2] and ingest.sql fills them.
The Python files modelling the node are adapted from the Chianti node running in the 12.07 system and therefore need that edition of the node software. When you have that tree of software installed on the demonstration machine, you should copy these Python files from this page into the directory NodeSoftware/nodes/tignanello/node/ [3].
You then need to edit NodeSoftware/nodes/tignanello/settings.py to get a runnable node. I’ve included on this page a settings.py that should work if your RDBMS is MySQL, set up according to the infrastructure checklist elsewhere in this tutorial package.
Recommended order of demonstration¶
This is an outline. Follow the node-software user-guide for the details. You will need to run through this sequence before the tutorial to make sure that you understand all the details and can avoid the traps.
Create the tignanello database and assign access to the vamdc user. Leave the database empty for now.
Copy in the settings.py file so that Django can see the database.
Copy in the models.py file and let Django create the (empty) database tables from the models. Show the audience what Django has made. [4]
Show the mapping file of the publishing software to the audience and explain how what it does.
Run the publishing software, load the database and show the audience what was loaded.
Explain that the node software now knows the structure of the database but not how it maps to VSS2 or XSAMS. [5]
Copy in the dictionaries.py file [6], explain what it means, and demonstrate that the node now understands queries. [7]
Show the node’s capabilities document and explain how this links the node to the registry. [8]
Show how to test the node in the TAP validator.
Optionally, show how to enable the node software in a production-quality web-server.
Footnotes