##// END OF EJS Templates
Switch to speasy...
jeandet -
r1510:0046d29d6c44 PySide2
parent child
Show More
@@ -1,11 +1,11
1 import traceback
1 import traceback
2 from SciQLopBindings import PyDataProvider, Product, VectorTimeSerie, ScalarTimeSerie, DataSeriesType
2 from SciQLopBindings import PyDataProvider, Product, VectorTimeSerie, ScalarTimeSerie, DataSeriesType
3 import numpy as np
3 import numpy as np
4 from spwc.cache import _cache
4 from speasy.cache import _cache
5 from spwc.common.datetime_range import DateTimeRange
5 from speasy.common.datetime_range import DateTimeRange
6 from datetime import datetime, timedelta, timezone
6 from datetime import datetime, timedelta, timezone
7 from spwc.common.variable import SpwcVariable
7 from speasy.common.variable import SpeasyVariable
8 from spwc.amda import AMDA
8 from speasy.amda import AMDA
9
9
10 amda = AMDA()
10 amda = AMDA()
11
11
@@ -5,7 +5,7 from SciQLopBindings import PyDataProvider, Product, VectorTimeSerie, ScalarTime
5 import numpy as np
5 import numpy as np
6 import requests
6 import requests
7 import copy
7 import copy
8 from spwc.amda import AMDA
8 from speasy.amda import AMDA
9
9
10 amda = AMDA()
10 amda = AMDA()
11
11
@@ -2,35 +2,35 import traceback
2 from SciQLopBindings import PyDataProvider, Product, VectorTimeSerie, ScalarTimeSerie, DataSeriesType
2 from SciQLopBindings import PyDataProvider, Product, VectorTimeSerie, ScalarTimeSerie, DataSeriesType
3 import numpy as np
3 import numpy as np
4 import math
4 import math
5 from spwc.cache import _cache
5 from speasy.cache import _cache
6 from spwc.common.datetime_range import DateTimeRange
6 from speasy.common.datetime_range import DateTimeRange
7 from functools import partial
7 from functools import partial
8 from datetime import datetime, timedelta, timezone
8 from datetime import datetime, timedelta, timezone
9 from spwc.common.variable import SpwcVariable
9 from speasy.common.variable import SpeasyVariable
10
10
11
11
12 def make_scalar(x):
12 def make_scalar(x):
13 y = np.cos(x/10.)
13 y = np.cos(x/10.)
14 return SpwcVariable(time=x, data=y)
14 return SpeasyVariable(time=x, data=y)
15
15
16 def make_vector(x):
16 def make_vector(x):
17 v=np.ones((len(x),3))
17 v=np.ones((len(x),3))
18 for i in range(3):
18 for i in range(3):
19 v.transpose()[:][i] = np.cos(x/10. + float(i)) + (100. * np.cos(x/10000. + float(i)))
19 v.transpose()[:][i] = np.cos(x/10. + float(i)) + (100. * np.cos(x/10000. + float(i)))
20 return SpwcVariable(time=x, data=v)
20 return SpeasyVariable(time=x, data=v)
21
21
22
22
23 def make_multicomponent(x):
23 def make_multicomponent(x):
24 v=np.ones((len(x),4))
24 v=np.ones((len(x),4))
25 for i in range(4):
25 for i in range(4):
26 v.transpose()[:][i] = float(i+1) * np.cos(x/10. + float(i))
26 v.transpose()[:][i] = float(i+1) * np.cos(x/10. + float(i))
27 return SpwcVariable(time=x, data=v)
27 return SpeasyVariable(time=x, data=v)
28
28
29 def make_spectrogram(x):
29 def make_spectrogram(x):
30 v=np.ones((len(x),32))
30 v=np.ones((len(x),32))
31 for i in range(32):
31 for i in range(32):
32 v.transpose()[:][i] = 100.*(2.+ float(i+1) * np.cos(x/1024. + float(i)))
32 v.transpose()[:][i] = 100.*(2.+ float(i+1) * np.cos(x/1024. + float(i)))
33 return SpwcVariable(time=x, data=v)
33 return SpeasyVariable(time=x, data=v)
34
34
35
35
36 def _get_data(p_type, start, stop):
36 def _get_data(p_type, start, stop):
@@ -20,7 +20,7 cp $HERE/AppRun $SCIQLOP_APPDIR/
20 chmod +x $SCIQLOP_APPDIR/AppRun
20 chmod +x $SCIQLOP_APPDIR/AppRun
21 # Tweak to find custom python from build dir
21 # Tweak to find custom python from build dir
22 sed "s|/usr|$SCIQLOP_APPDIR/usr|" -i $SCIQLOP_APPDIR/usr/lib/pkgconfig/python3.pc
22 sed "s|/usr|$SCIQLOP_APPDIR/usr|" -i $SCIQLOP_APPDIR/usr/lib/pkgconfig/python3.pc
23 LD_PRELOAD=$SCIQLOP_APPDIR/usr/lib/libpython3.7m.so.1.0 PATH=$SCIQLOP_APPDIR/usr/bin/:/usr/bin/ LD_LIBRARY_PATH=AppDir/usr/lib/:AppDir/usr/lib/python3.7/ $SCIQLOP_APPDIR/usr/bin/python3 $SCIQLOP_APPDIR/usr/bin/pip3 install git+https://github.com/jeandet/spwc
23 LD_PRELOAD=$SCIQLOP_APPDIR/usr/lib/libpython3.7m.so.1.0 PATH=$SCIQLOP_APPDIR/usr/bin/:/usr/bin/ LD_LIBRARY_PATH=AppDir/usr/lib/:AppDir/usr/lib/python3.7/ $SCIQLOP_APPDIR/usr/bin/python3 $SCIQLOP_APPDIR/usr/bin/pip3 install speasy
24 LD_LIBRARY_PATH=$SCIQLOP_APPDIR/usr/lib/ PKG_CONFIG_PATH=$SCIQLOP_APPDIR/usr/lib/pkgconfig/:$PKG_CONFIG_PATH PATH=$SCIQLOP_APPDIR/usr/bin/:$PATH meson --prefix=/usr ..
24 LD_LIBRARY_PATH=$SCIQLOP_APPDIR/usr/lib/ PKG_CONFIG_PATH=$SCIQLOP_APPDIR/usr/lib/pkgconfig/:$PKG_CONFIG_PATH PATH=$SCIQLOP_APPDIR/usr/bin/:$PATH meson --prefix=/usr ..
25 ninja
25 ninja
26 DESTDIR=$SCIQLOP_APPDIR ninja install
26 DESTDIR=$SCIQLOP_APPDIR ninja install
@@ -10,6 +10,6 ninja install
10 ~/Library/Python/3.7/bin/virtualenv --always-copy /tmp/SciQLOP.app
10 ~/Library/Python/3.7/bin/virtualenv --always-copy /tmp/SciQLOP.app
11 ~/Library/Python/3.7/bin/virtualenv --relocatable /tmp/SciQLOP.app
11 ~/Library/Python/3.7/bin/virtualenv --relocatable /tmp/SciQLOP.app
12 source /tmp/SciQLOP.app/bin/activate
12 source /tmp/SciQLOP.app/bin/activate
13 /tmp/SciQLOP.app/bin/pip install git+https://github.com/jeandet/spwc
13 /tmp/SciQLOP.app/bin/pip install speasy
14 cp $HERE/SciQLOP_wrapper /tmp/SciQLOP.app/Contents/MacOS/
14 cp $HERE/SciQLOP_wrapper /tmp/SciQLOP.app/Contents/MacOS/
15 chmod +x /tmp/SciQLOP.app/Contents/MacOS/SciQLOP_wrapper
15 chmod +x /tmp/SciQLOP.app/Contents/MacOS/SciQLOP_wrapper
General Comments 0
You need to be logged in to leave comments. Login now