Skip to content
Snippets Groups Projects
Commit 992866af authored by Peter Drewelow's avatar Peter Drewelow
Browse files

IR_config_constants: added path to Test archive and use this variable in...

IR_config_constants: added path to Test archive and use this variable in downloadversionIRdata when building an archive path
downloadversionIRdata: consistent use of testmode parameter
downloadversionIRdata: added testmode to all reading routines allowing reading from Test archive
IR_image_tools: no longer sets working directory to script file location
IR_config_constants: sets parameter_file_path as absolute path
downloadversionIRdata: new function get_trigger_from_PID() wraps get_program_from_PID() and allows getting timestamps for lab data
downloadversionIRdata: download_images_by_time_via_png() now uses nanosecond timestamps to call AKF_2.get_time_intervals()
downloadversionIRdata: disable DeprecationWarning in import of archivedb (timezone issue on Windows)
downloadversionIRdata: get_NUC_by_times() uses the reference cold frame in case no cold frame (NUC frame) was found for this time
downloadversionIRdata: unified use of stoptime instead of endtime
downloadversionIRdata: expanded testing sections (profile, coldframe, timestamps and scene model)
parent 42d8a821
Branches
Tags
No related merge requests found
......@@ -11,7 +11,11 @@ IRCamColdframes_fittingpath=calibpath+"IRCamColdframes_fitting\\"
#IRCamRefImagespath = calibpath+'IRCamReferenceImages\\'
IRCAMBadPixels_path = calibpath + 'IRCAMBadPixels\\'
heatflux_requestlist_path="\\\\x-drive\\Diagnostic-logbooks\\QRT-DivertorThermography\\ArchiveDB_heatflux_pipeline\\"
parameter_file_path = ".\\data"
# get local parameter directory from script location
import os.path as ospath
parameter_file_path = ospath.join(ospath.dirname(__file__), 'data')
try:
# import sys
path=str(repr(__file__)).split("IR_config_constants")[0].split("'")[1]+"upload_config"
......@@ -28,6 +32,7 @@ except Exception as E:
archivepath="http://archive-webapi.ipp-hgw.mpg.de/Test/raw/"
print("config loading failed",E)
# raise Exception("Config file was not loaded properly",E)
testarchivepath = "http://archive-webapi.ipp-hgw.mpg.de/Test/raw/"
#%% Dictionaries
project="W7X"
......
......@@ -21,9 +21,6 @@ import datetime
#import h5py
#import glob
# set working directory to local directory of script
os.chdir(os.path.dirname(__file__))
def get_OP_by_time(time_ns=None, shot_no=None, program_str=None):
'''Derives operation phase (OP) of W7-X based on either:
a nanosacond time stamp, a MDSplus style shot no. or a program ID.
......@@ -57,7 +54,7 @@ def get_OP_by_time(time_ns=None, shot_no=None, program_str=None):
return "OP1.2a"
else:
return None
elif dateOP.year == 2018:
elif dateOP.year >= 2018:
return "OP1.2b"
elif dateOP.year <= 2016 and dateOP.year >= 2015:
if (dateOP.year == 2016 and dateOP.month <= 3) or (dateOP.year == 2015 and dateOP.month == 12):
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment