SWDatabase
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
fetch_wso_date Namespace Reference

Download synoptic carrington maps from fetch type WSO_DATE. More...

Detailed Description

Download synoptic carrington maps from fetch type WSO_DATE.

Only Photo.latest.txt is downloaded if newer.
From the downloaded file (Fetch level 0 with data format ASCII_WSO_V0), copy it as another file with observing date in the name (Fetch level 1 with same data format) and reformat it as V1 format (Fetch level 2 with data format ASCII_WSO_V1).
Do it if not already present locally or if not the most recent.
Add in SW Database the new downloaded or formatted files.
Important: After running this script, one must call update_database routine. Indeed, if this program fails before updating the database then the folder will have files not followed by the database.

Author
M. Indurain
Date
01 Jan 2019

1. Connect to server and get info about Photo.latest.txt

Get the modification date of Photo.latest.txt.

3. Fetch level 0: Download files

4. Fetch level 1: Rename with observing date in name

Copy Photo.latest.txt into a Photo_latest_YYYYMMDDHHMMSS.txt.

5. Fetch level 2: format in V1

Reformat file with data format ASCII_WSO_V0 into data format ASCII_WSO_V1.

6. Update database

Add or update the map2D database with recently created files (files from downloaded_files, f1_fetched_files, f2_fetched_files).