Commit f47abb23 authored by Peter Drewelow's avatar Peter Drewelow
Browse files

renaming files and allow for Sandbox download

upload_config: renamed to download_config (to avoid same name as in ir_upload)
IR_config_constants.py: renamed to IR_da_config_constants.py (to avoid same name as in ir_upload)
IR_image_tools.py, downloadversionIRdata.py, setup.py: adjusted import to IR_da_config_constants
download_config: parameter archivedb changed from boolean 'True'/'False' to string 'ArchiveDB'/'Test'/'Sandbox'
IR_da_config_constants.py: load target database from upload_config parameter archivedb and build archivepath from it
parent 0ad0604a
......@@ -18,15 +18,13 @@ 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"
path=str(repr(__file__)).split("IR_da_config_constants")[0].split("'")[1]+"download_config"
cFile=open(path.replace('\\\\',"\\"))#+"upload_config")
for line in cFile:
if line[0:3]!="###":
if line.split("=")[0]=='archivedb':
if eval(line.split("=")[1].split("\n")[0]):
archivepath="http://archive-webapi.ipp-hgw.mpg.de/ArchiveDB/raw/"
else:
archivepath="http://archive-webapi.ipp-hgw.mpg.de/Test/raw/"
database = eval(line.split("=")[1].strip())
archivepath = "http://archive-webapi.ipp-hgw.mpg.de/{0}/raw/".format(database)
cFile.close()
except Exception as E:
archivepath="http://archive-webapi.ipp-hgw.mpg.de/Test/raw/"
......
......@@ -15,7 +15,7 @@ Tools for:
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches as patches
from IR_config_constants import portcamdict, IRCAMBadPixels_path, parameter_file_path
from IR_da_config_constants import portcamdict, IRCAMBadPixels_path, parameter_file_path
import os
import datetime
#import h5py
......
......@@ -16,7 +16,7 @@ version="V3.4.0"
import numpy as np
import IR_image_tools as IR_tools
from IR_config_constants import archivepath, testarchivepath, portcamdict, camlimdict, \
from IR_da_config_constants import archivepath, testarchivepath, portcamdict, camlimdict, \
valid_FOV_circle, valid_background_rectangle, \
TC_port, TC_channel, IRCamColdframes_fittingpath, \
exJet, portpathdict, project, project_ana, \
......
......@@ -9,14 +9,14 @@ setup(
py_modules = [
'downloadversionIRdata',
'IR_image_tools',
'IR_config_constants',
'IR_da_config_constants',
'IR_image_tools',
'plot_IR_data' ,
'Create_HDF5_from_archive_data',
'plot_heatflux_example'
],
data_files=[
('',['upload_config','CHANGELOG','ToDo.txt']),
('',['download_config','CHANGELOG','ToDo.txt']),
('data',['data/AEF10_coldframes_background_fails_real.txt',
'data/AEF11_coldframes_background_fails_real.txt',
'data/AEF20_coldframes_background_fails_real.txt',
......
......@@ -23,7 +23,8 @@ nuc=False
metastream=True
temperature=False
retry=2
archivedb=True
### target database (ArchiveDB/Test/Sandbox) ###
archivedb='ArchiveDB'
### versioning ###
reupload=False
reason=""
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