Commit 7b04ae7f authored by Carlo Ferrigno's avatar Carlo Ferrigno
Browse files

separate OSA11 and OSA10.2

parent fda877cd
......@@ -60,6 +60,7 @@ class INTEGRALwrapper(object):
total_scw_list = sorted(in_total_scw_list)
self.product = arguments['product']
local_arguments = arguments.copy()
if len(total_scw_list) > s_max:
ind_max = int(len(total_scw_list) / s_max)
......@@ -69,6 +70,23 @@ class INTEGRALwrapper(object):
else:
scw_lists = [total_scw_list]
def get_revs(loc_scw_list):
return np.array(sorted(list(set([int(a[0:4]) for a in loc_scw_list]))))
## I split a list that contains revolutions before and after 1626 (start of validity of OSA11.X
new_scw_lists = []
for ss in scw_lists:
revs = get_revs(ss)
if revs.min() < 1626 and revs.max() >= 1626:
s1 = [s for s in ss if int(s[0:4]) < 1626]
s2 = [s for s in ss if int(s[0:4]) >= 1626]
new_scw_lists.append(s1)
new_scw_lists.append(s2)
else:
new_scw_lists.append(ss)
scw_lists = new_scw_lists
##
self.all_data = []
tot_num = 0
......@@ -98,8 +116,14 @@ class INTEGRALwrapper(object):
if data is None or not _disp.is_failed():
if not _disp.is_submitted:
revs = get_revs(scw_list)
# Force 0SA10.2 for ISGRI before rev. 1626
if revs.min() < 1626 and 'isgri' in arguments['product']:
local_arguments['osa_version'] = 'OSA10.2'
else:
local_arguments['osa_version'] = arguments['osa_version']
scw_list_str = ",".join([s for s in sorted(set(scw_list))])
data = _disp.get_product(scw_list=scw_list_str, **arguments)
data = _disp.get_product(scw_list=scw_list_str, **local_arguments)
else:
_disp.poll()
......
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