Skip to content

i4Ds/helioviewer-visualisation

 
 

Repository files navigation

README

This repository contains the code for the backend of the Helioviewer Timeline Project.

Getting started

Prerequisites

Instalation

  1. Open a terminal, PowerShell, ... and execute git clone https://github.com/stby4/helioviewer-visualisation.git heliovis-back.
  2. Install the .editorconfig plugin for your preffered editor (we recommend VSCode or IntelliJ).
  3. Open the heliovis-back directory with your editor.
  4. Execute gradle runImporter in your terminal, PowerShell, ... to create your database for the first time.

Projects

Project folder Content
api Web servlet for a data API to the database.
config Stores global settings, e.g. path to database.
database Handles access to the memory mapped files, offers read / write access.
importer Downloads files with X-ray flux data from various sources, updates database.
api Web servlet for a data API to the database.

Gradle commands

  • gradle runImporter starts the download of all required data from the NOAA servers. This might take several hours. Only needs to be executed once.
  • gradle runUpdater updates the database.
  • gradle appRunDebug starts an Jetty server for the API.
  • Alternatively, gradle tomcatRunDebug starts a Tomcat server for the API.
  • gradle api:war builds /api/build/libs/api.war for deployment on a server.

Debugging with gretty

After starting a server with gradle appRunDebug, you can listen on communicate with the server on port 5005. Use the VS Code debugger and the Debug (Attach) launch configuration to start debugging.

API

Request

Example request: http://localhost:8080/api/?from=1009843200000&to=1528927023999&points=2926

Parameter Description Valid values
from Sets the start date for the time series. UNIX timestamp in milliseconds, any time
to Sets the end date for the time series. UNIX timestamp in milliseconds, any time larger than "from".
points Sets the amount of returned data points. This is only a maximum number, the amount of actually returned data points can be lower. Any integer value larger than 0.

Response

The response is json formatted:

[
    ["timestamp in milliseconds", "flux value in Watts/m^2"],
    ...
]

About

Backend for the Helioviewer timeline

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%