Calibrator Search Tool (CST) Python/Django Development Page

This page will capture development detail related to migrating the Calibrator Search Tool from a cgi-bin C code web app to a Python/Django web app.

The table below includes links to code repositories, locations, and references to guiding documentation for the Calibrator Search Tool. Full version of the tool documentation is found at the bottom of the page under 'Attachments'.
File Location Comment
cgi-bin Calibrator Search Tool http://www.vlba.nrao.edu/astro/calib/  
cgi-bin C code location

/home/www.vlba.nrao.edu/content/astro/calib

main() in vlba_calib.c

 
VLBA CST Python code location

https://svn.aoc.nrao.edu/repos/VLBA/calibratorsearchtool/

or

https://gitlab.nrao.edu/nms-vlba/calibratorsearchtool/

 
Jira ticket for new CST https://bugs.nrao.edu/browse/VLBASYS-811  
Requirements Document for New Calibrator Search Tool https://sharepoint.nrao.edu/lbo/Shared%20Documents/Observatory%20Documents/VLBA_Calibrator_Search_Tool_Requirements_final.docx?Web=1 By Justin Linford

Calibrator Search Tool Description

The Calibrator Search Tool provides a form that users can use to look over calibrator sources. A table of results that are in range of the parameters specified is displayed along with a plot of the sources in a new page. In the new tool, the calibrator sources are linked to a more detailed page where more information is display along with rad plots, contour maps, and a SCHED . key.

The tool is to be completed by September 2022.

The tool is has completed test by scientific staff and currently waiting on testing by user's committee. The tool has been deployed publicly at: https://obs.vlba.nrao.edu/cst/

Please submit comments or required changes to Justin Linford.

New Tool Deployment Location and Considerations

Currently, the tool in is development on a Virtual Machine.

Initial deployment is hosted on Prominence with a connection to the PostgreSQL database (VLBACAL) on elbow (elbow:8000). Currently, the tool has been deployed in at an obs site https://obs.vlba.nrao.edu/cst/.

New Tool Design Considerations

  • The new CST will behave the same as the current search engine, but with extra functionality for details.
  • The new programming language will be Python3 to be able to run in a Linux system without the need of specific tools to re-compile the code.
  • Instead of retrieving information from a text file, it will use a PostgreSQL database that contains all data needed such as calibrator sources data, rad plots, contour maps, and SCHED .keys.
  • The new CST web application uses Django web framework and it will be hosted on an Apache server.
  • The code should be modular enough to introduce new functionality in the future without affecting baseline functionality.

New Tool Code Structure and OOD Considerations

The new Calibrator Search Tool uses Django web framework. Django is highly modular and uses a Model View Controller paradigm. Django uses 'views' to render HTML templates and 'models' to interact with a database by creating data-tables columns and rules.

It is also recommended to separate functionalities by creating different applications for each. Each application contains its own views, models, HTML templates, and tests.

CST is divided in two 'applications' to separate the main functions: website and calib_sources. The 'website' application is in charge of the web forms, input validation, and input formatting. The 'calib_sources' application starts as soon as a form is validated, it takes the formatted/verified input parameters to iterate the DB for in range calibrator sources and renders the results page with the results table, the plot, and details page.

The file structure looks like the following:

CST tree.png

New Calibrator Search Tool Software Requirements Specification Document

The CST SRS document (CST_SRS_v1.0.odt) contains a the description of the old and new CST application and its operational environment. It also contains a preliminary list of the requirements requested for the new baseline of the tool. The uses of the tool are explored with a use case diagram and scenarios as well as a class diagram with screenshots of the actual tool to explain how classes interact with each other.

System Design

The diagram below depicts the architecture of the software of the system. Each class represents a class on the system and their relationship to each other.

calibsourcetool(1).png

As explained before, CST is divided in two applications: website and calib_sources.

The ‘website’ application contains the home page (welcome.html) that hosts the forms that the users will fill out to obtain related calibrator sources. Forms inputs are passed to views.py to be validated and converted to the correct format using the format.py. If the form is correct it will render the results pages hosted by the calib_sources application. Otherwise, it will return a validation error.

The ‘calib_source’ application, starts as a response of a valid form. The view classes (calib_source/views.py) connect with the DB models (models.py) and iterate through all the sources in it. Each source is checked to see if it is in range of the RA and DEC values specified by the user (calculations.py). If a source is valid, the CalibResult DB will record it as True as well as recording the distance from the center. After the iteration is complete, a list of valid (True) sources will be taken and sorted as specified by the user in the Welcome page. Once the list of in range sources is sorted, the view will generate a plot (plot.py) and redirect to a results html page. The results page will display a table of in range calibrator sources and a plot of the sources with the specified RA and DEC coordinates at the center. In the results page table, each calibrator source name is a hyper link and it can be clicked to redirect to a details page (detail.html). The details page contains extra information of the calibrator source such as other names, RA, DEC, origin and flux density bands. Also, it includes the source’s SCHED .key that can be copied along with its visibility plot and contour maps (if available).

The calibrator_project directory was created by Django. It is in charge of managing the application by specifying applications used within Django such as the database and also manages URLS paths between applications.

Installation Manual

The complete installation manual to replicate in a virtual environment is found at CST_Manual.odt.

Test Documentation

The initial CST Test Documentation is found at CST_Test_Document_v0.3.odt.
Topic attachments
I Attachment Action Size Date WhoSorted ascending Comment
CST_Manual.odtodt CST_Manual.odt manage 19 K 2022-02-08 - 12:32 AdrianaEscobar Installation Manual
CST_SRS_v1.0.odtodt CST_SRS_v1.0.odt manage 2 MB 2022-05-17 - 13:21 AdrianaEscobar Updated SRS
CST_Test_Document_v0.3.odtodt CST_Test_Document_v0.3.odt manage 616 K 2022-05-17 - 13:21 AdrianaEscobar Test documentation
Requirement_Tracker.odsods Requirement_Tracker.ods manage 25 K 2021-11-29 - 16:14 AdrianaEscobar  
Topic revision: r11 - 2022-05-17, AdrianaEscobar
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback