SWDatabase
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
Namespaces | Variables
fetch_solarmonitor_noaaevent.py File Reference

Namespaces

 fetchevent.fetch_solarmonitor_noaaevent
 
 fetch_solarmonitor_noaaevent
 Download and reformat NOAA event file from fetch type SOLARMONITOR_NOAAEVENT.
 

Variables

string fetchevent.fetch_solarmonitor_noaaevent.help_message
 
tuple fetchevent.fetch_solarmonitor_noaaevent.date_begin = module_common.utc_today-datetime.timedelta(days=31)
 
tuple fetchevent.fetch_solarmonitor_noaaevent.date_end = datetime.datetime(module_common.utc_today.year+1,12,31)
 
 fetchevent.fetch_solarmonitor_noaaevent.last_data = False
 
 fetchevent.fetch_solarmonitor_noaaevent.first_data = False
 
 fetchevent.fetch_solarmonitor_noaaevent.download = True
 
 fetchevent.fetch_solarmonitor_noaaevent.verbose = False
 
string fetchevent.fetch_solarmonitor_noaaevent.fetch_type = 'SOLARMONITOR_NOAAEVENT'
 
list fetchevent.fetch_solarmonitor_noaaevent.local_dir = interface_fetch_event.fetch_info[fetch_type]
 
list fetchevent.fetch_solarmonitor_noaaevent.table_name = interface_fetch_event.fetch_info[fetch_type]
 
tuple fetchevent.fetch_solarmonitor_noaaevent.log_name = os.path.join('logs','fetch_event_solarmonitor_noaaevent_' + '%04d'%(module_common.utc_today.year) + '%02d'%(module_common.utc_today.month) + '%02d'%(module_common.utc_today.day))
 
tuple fetchevent.fetch_solarmonitor_noaaevent.log_id = open(log_name,'a')
 
tuple fetchevent.fetch_solarmonitor_noaaevent.itime = module_timespace.Time()
 
tuple fetchevent.fetch_solarmonitor_noaaevent.logs = database_event.init_db(database_event.database_path,1)
 
string fetchevent.fetch_solarmonitor_noaaevent.message = '... Connecting to and reading solarmonitor.org website...'
 
tuple fetchevent.fetch_solarmonitor_noaaevent.server = interface_fetch_event.connect_remote_server(fetch_type)
 
tuple fetchevent.fetch_solarmonitor_noaaevent.all_remote_files = interface_fetch_event.read_remote_server(fetch_type,server,date_min=date_begin,date_max=date_end)
 
list fetchevent.fetch_solarmonitor_noaaevent.pattern = interface_fetch_event.fetch_info[fetch_type]
 
tuple fetchevent.fetch_solarmonitor_noaaevent.metafile = interface_fetch_event.MetaFile()
 
list fetchevent.fetch_solarmonitor_noaaevent.remote_files_fm1 = [ all_remote_files[-1] ]
 
tuple fetchevent.fetch_solarmonitor_noaaevent.to_be_downloaded = interface_fetch_event.vn2vnp1(remote_files_fm1,fetch_type,-1)
 
list fetchevent.fetch_solarmonitor_noaaevent.downloaded_files = []
 
list fetchevent.fetch_solarmonitor_noaaevent.remote_files_f0 = []
 
tuple fetchevent.fetch_solarmonitor_noaaevent.metafile_f0 = interface_fetch_event.MetaFile()
 
tuple fetchevent.fetch_solarmonitor_noaaevent.to_be_f1_fetched = interface_fetch_event.vn2vnp1(remote_files_f0,fetch_type,0)
 
list fetchevent.fetch_solarmonitor_noaaevent.f1_fetched_paths = []
 
tuple fetchevent.fetch_solarmonitor_noaaevent.current_dir = os.getcwd()
 
 fetchevent.fetch_solarmonitor_noaaevent.file_f0 = metafile.name
 
tuple fetchevent.fetch_solarmonitor_noaaevent.file_f1 = interface_fetch_event.set_name_np1(fetch_type,file_f0,0)
 
string fetchevent.fetch_solarmonitor_noaaevent.command = 'ln -sf '
 
list fetchevent.fetch_solarmonitor_noaaevent.f1_fetched_files = []
 
 fetchevent.fetch_solarmonitor_noaaevent.file_fx = metafile.name
 
tuple fetchevent.fetch_solarmonitor_noaaevent.flevel = interface_fetch_event.find_fetch_level(fetch_type,file_fx)
 
tuple fetchevent.fetch_solarmonitor_noaaevent.events = read_solarmonitor_event.read_v0(os.path.join(local_dir,file_fx))
 Get the date itime.datetime = interface_fetch_event.get_datetime(fetch_type,flevel,file_fx) itime.convert('datetime') Read the file to get event number, date_begin, date_end. More...
 
list fetchevent.fetch_solarmonitor_noaaevent.str_date_begin = events[0]
 
list fetchevent.fetch_solarmonitor_noaaevent.str_date_end = events[0]
 
tuple fetchevent.fetch_solarmonitor_noaaevent.nevent = len(events)
 
tuple fetchevent.fetch_solarmonitor_noaaevent.event_types = read_solarmonitor_event.regroup_event_by_attribute(events,attribute='event_id')
 
tuple fetchevent.fetch_solarmonitor_noaaevent.result = database_event.find_element([table_name],conn,cur,filename = file_fx)
 
 fetchevent.fetch_solarmonitor_noaaevent.n_event = nxflare,\
 
tuple fetchevent.fetch_solarmonitor_noaaevent.fetch_level = metafile.mdate.strftime('%Y-%m-%d %H:%M:%S')
 
tuple fetchevent.fetch_solarmonitor_noaaevent.row_id