Commit 77f1f0e9 authored by Peter Drewelow's avatar Peter Drewelow
Browse files

Merge branch 'peter' into 'master'

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

See merge request !40
parents 42d8a821 992866af
......@@ -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.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment