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

Download and reformat euv171 carrington maps from fetch type EUV2CARMAP_SDO360_171_DATE. More...

Detailed Description

Download and reformat euv171 carrington maps from fetch type EUV2CARMAP_SDO360_171_DATE.

Only files newer than a minimum date (default today - 31 days) AND file corresponding to 12 AM/PM or 1 AM/PM are downloaded.
Download remote files if not already present locally.
From the downloaded file (Fetch level 0 with data format FITS_EUV2CARMAPSDO360_V0) and create a user-friendly symbolic link (Fetch level 1 with the same data format).
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. Server connection

Connect to the server and list all available files on the server (all_remote_files list) without taking into account date_begin and date_end.

2. Filter files

Only 0h,6h,12h,18h and > date_begin and date < date_end are looked (remote_files_fm1 list).

3. Fetch level 0: Download files

4. Fetch level 1: Rename through a symbolic link

Convert original_name.fts (Data format FITS_EUV2CARMAPSDO360_V0) into friendly_name.fts (same data format) with a symbolic link.

5. Update database

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