|
|
# Objective
|
|
|
|
|
|
Yafitssel provides a way to look for fits file by performing sql requests against the content of a database fed with the content of the fits files headers.
|
|
|
|
|
|
The users can use a web interface to build the request.
|
|
|
|
|
|
# Filling the database
|
|
|
|
|
|
The database is filled by the script fs2slqite.py installed in the root directory of yafits. This script maintains an sqlite table 'fitsinfos' in an sql database also named 'fitsinfos' created an updated accordingly.
|
|
|
|
|
|
The script has nothing to do with the docker containers. The person in charge of the service will have to configure its execution, for example with a cron task.
|
|
|
|
|
|
# Configuration
|
|
|
|
|
|
The application's execution depends only on two environment variables :
|
|
|
|
|
|
* YAFITS_FITSDIR : the top level directory of the FITS files collection.
|
|
|
* YAFITS_SQLITE_DIR : the directory that containes SQLite database 'fitsinfos.db'
|
|
|
|
|
|
Those variables are defined in the .yafits.bashrc file of the application.
|
|
|
|
|
|
# Database
|
|
|
|
|
|
The sqlite table named 'fitsinfos' has the following columns :
|
|
|
|
|
|
* the path to the fits file relative to the directory containing all the fits files (string)
|
|
|
* the size as a number of bytes of the fits file ( Number )
|
|
|
* a subset of the fits file header stored as an sqlite json extension
|
|
|
|
|
|
# Web interface
|
|
|
|
|
|
## Access point
|
|
|
|
|
|
The user interface url is [http://SERVICE_URL/fits/query](http://dev-artemix.obspm.fr/fits/query)
|
|
|
|
|
|
## Implementation
|
|
|
|
|
|
The interface is part of yafitsv :
|
|
|
|
|
|
* route : sqlite.js
|
|
|
* view : sqlite.ejs
|
|
|
|
|
|
It uses the codemirror-5.53.2 javascript library. |
|
|
\ No newline at end of file |