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
9522a0f9
Commit
9522a0f9
authored
May 25, 2021
by
Carlo Ferrigno
Browse files
Merge remote-tracking branch 'origin/master'
parents
3db19153
c85a1620
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
oda_integral_wrapper/wrapper.py
oda_integral_wrapper/wrapper.py
+10
-8
No files found.
oda_integral_wrapper/wrapper.py
View file @
9522a0f9
...
...
@@ -112,7 +112,7 @@ class INTEGRALwrapper(object):
_disp
=
disp_by_call
[
ys
]
data
=
data_by_call
.
get
(
ys
,
None
)
self
.
__log
.
debug
(
'
\n\n\n
n_call
'
,
n_call
,
'
\n
Data
'
,
data
,
'
\n
Is failed
'
,
_disp
.
is_failed
)
self
.
__log
.
debug
(
f
'
\n\n\n
n_call
{
n_call
}
\n
Data
{
data
}
\n
Is failed
{
_disp
.
is_failed
}
'
)
if
data
is
None
and
not
_disp
.
is_failed
:
revs
=
get_revs
(
scw_list
)
# Force 0SA10.2 for ISGRI before rev. 1626
...
...
@@ -125,7 +125,7 @@ class INTEGRALwrapper(object):
local_arguments
[
'osa_version'
]
=
arguments
[
'osa_version'
]
scw_list_str
=
","
.
join
([
s
for
s
in
sorted
(
set
(
scw_list
))])
self
.
__log
.
debug
(
"Is submitted
"
,
_disp
.
is_submitted
)
self
.
__log
.
debug
(
f
"Is submitted
:
{
_disp
.
is_submitted
}
"
)
if
not
_disp
.
is_submitted
:
data
=
_disp
.
get_product
(
scw_list
=
scw_list_str
,
**
local_arguments
)
else
:
...
...
@@ -138,10 +138,10 @@ class INTEGRALwrapper(object):
else
:
data_by_call
[
ys
]
=
_disp
.
get_product
(
scw_list
=
scw_list_str
,
**
local_arguments
)
self
.
__log
.
debug
(
'n_poll
'
,
n_poll
)
self
.
__log
.
debug
(
f
'n_poll
:
{
n_poll
}
'
)
n_complete
=
len
([
call
for
call
,
_disp
in
disp_by_call
.
items
()
if
_disp
.
is_complete
])
self
.
__log
.
debug
(
'n_complete
'
,
n_complete
)
self
.
__log
.
debug
(
f
"complete
{
n_complete
}
/
{
len
(
disp_by_call
)
}
"
)
self
.
__log
.
debug
(
f
'n_complete
:
{
n_complete
}
'
)
self
.
__log
.
debug
(
f
"complete
{
float
(
n_complete
)
/
len
(
disp_by_call
)
}
"
)
if
n_complete
==
len
(
disp_by_call
):
self
.
__log
.
info
(
"done!"
)
break
...
...
@@ -158,7 +158,7 @@ class INTEGRALwrapper(object):
self
.
__log
.
debug
(
kk
)
self
.
all_data
.
append
(
data_by_call
[
kk
])
self
.
__log
.
debug
(
len
(
total_scw_list
),
tot_num
)
self
.
__log
.
debug
(
f
'
{
len
(
total_scw_list
)
}
,
{
tot_num
}
'
)
if
'spectrum'
in
self
.
product
:
return
self
.
sum_spectra
()
...
...
@@ -581,7 +581,9 @@ class INTEGRALwrapper(object):
if
not
include_new_sources
:
ind
=
[
not
'NEW'
in
ss
for
ss
in
sources
[
'src_names'
]]
clean_sources
=
sources
[
ind
]
INTEGRALwrapper
.
__log
.
debug
(
ind
,
sources
,
clean_sources
)
INTEGRALwrapper
.
__log
.
debug
(
ind
)
INTEGRALwrapper
.
__log
.
debug
(
sources
)
INTEGRALwrapper
.
__log
.
debug
(
clean_sources
)
else
:
clean_sources
=
sources
...
...
@@ -1064,7 +1066,7 @@ class INTEGRALwrapper(object):
else
:
raise
Exception
(
"fail"
)
INTEGRALwrapper
.
__log
.
debug
(
"object:
"
,
ooi
,
c
)
INTEGRALwrapper
.
__log
.
debug
(
f
"object:
{
ooi
}
,
{
c
}
"
)
plt
.
scatter
(
c
.
ra
.
deg
,
c
.
dec
.
deg
,
marker
=
"o"
,
facecolors
=
'none'
,
s
=
100
,
edgecolors
=
'green'
,
...
...
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