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
a093532d
Commit
a093532d
authored
Apr 28, 2021
by
Carlo Ferrigno
Browse files
v1.3.13
Compute values of conversion factor only if the file secret.yml is in the working dir.
parent
c1e9d41c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
oda_integral_wrapper/get_osa10_11_factor.py
oda_integral_wrapper/get_osa10_11_factor.py
+6
-0
setup.py
setup.py
+4
-11
No files found.
oda_integral_wrapper/get_osa10_11_factor.py
View file @
a093532d
...
...
@@ -16,6 +16,7 @@ def get_existing_dict():
cmd
=
'git clone https://gitlab.astro.unige.ch/oda/integral-osa-additional-parameters.git'
get_existing_dict
.
_log
.
warning
(
"It will not be possible to upload the recomputed factor"
)
else
:
cmd
=
'git clone https://oauth2:%s@gitlab.astro.unige.ch/oda/integral-osa-additional-parameters.git'
%
(
secret
[
'token'
])
cmd
+=
';cd integral-osa-additional-parameters;git remote set-url origin https://oauth2:%s@gitlab.astro.unige.ch/oda/integral-osa-additional-parameters.git'
%
(
...
...
@@ -40,6 +41,7 @@ def get_existing_dict():
@
logged
def
get_osa10_11_conversion_factor
(
E1_isgri_keV
,
E2_isgri_keV
,
radius
=
10.
,
oda_platform
=
"staging-1-2"
,
s_max
=
50
,
lc_time_bin
=
3000
):
import
os.path
conversion_dict
=
get_existing_dict
()
...
...
@@ -51,6 +53,10 @@ def get_osa10_11_conversion_factor(E1_isgri_keV, E2_isgri_keV, radius=10., oda_p
if
compute_factor
:
if
not
os
.
path
.
isfile
(
'secret.yaml'
):
get_osa10_11_conversion_factor
.
_log
.
warning
(
"As the file secret.yaml does not exist, I do not perform the computation of the value"
)
return
-
1.0
import
oda_integral_wrapper.wrapper
wrap
=
oda_integral_wrapper
.
wrapper
.
INTEGRALwrapper
(
host_type
=
oda_platform
)
...
...
setup.py
View file @
a093532d
from
__future__
import
absolute_import
,
division
,
print_function
from
builtins
import
(
bytes
,
str
,
open
,
super
,
range
,
zip
,
round
,
input
,
int
,
pow
,
object
,
map
,
zip
)
__author__
=
'Carlo Ferrigno'
#!/usr/bin/env python
from
setuptools
import
setup
,
find_packages
import
glob
import
glob
packs
=
find_packages
()
packs
=
find_packages
()
print
(
'packs'
,
packs
)
print
(
'packs'
,
packs
)
include_package_data
=
True
scripts_list
=
glob
.
glob
(
'./bin/*'
)
setup
(
name
=
'oda_integral_wrapper'
,
version
=
"1.3.1
2
"
,
version
=
"1.3.1
3
"
,
description
=
'wrapper for INTEGRAL analysis using the API plugin for CDCI online data analysis'
,
author
=
'Carlo Ferrigno'
,
author_email
=
'carlo.ferrigno@unige.ch'
,
...
...
@@ -42,6 +38,3 @@ setup(name='oda_integral_wrapper',
],
python_requires
=
'>=3.0'
,
)
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