Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ODA
api clients
oda_integral_wrapper
Commits
7b04ae7f
Commit
7b04ae7f
authored
Apr 15, 2021
by
Carlo Ferrigno
Browse files
separate OSA11 and OSA10.2
parent
fda877cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
oda_integral_wrapper/wrapper.py
oda_integral_wrapper/wrapper.py
+25
-1
No files found.
oda_integral_wrapper/wrapper.py
View file @
7b04ae7f
...
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment