forked from radar-bear/spacepku
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
59 lines (51 loc) · 1.53 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# -*- coding: utf-8 -*-
from plotly.graph_objs import *
import numpy as np
import pandas as pd
import os
##################################
# env config
def pku_mag_init(jupyter=True):
# set os env
import os
os.environ['CDF_LIB'] = '/lib'
# set jupyter env for plotly
if jupyter:
from plotly.offline import init_notebook_mode
init_notebook_mode()
##################################
# plot config
DEFAULT_MARGIN = 60
DEFAULT_WIDTH = 900
DEFAULT_HEIGHT = 350
def get_default_layout():
default_layout = Layout(
xaxis=XAxis(rangeslider=dict(visible=False),
showline=True,
showgrid=True,
zeroline=False,
mirror='all'),
yaxis=YAxis(autorange=True,
showline=True,
showgrid=True,
zeroline=False,
mirror='all'),
width=DEFAULT_WIDTH,
height=DEFAULT_HEIGHT,
margin=dict(l=DEFAULT_MARGIN,
r=DEFAULT_MARGIN,
b=DEFAULT_MARGIN,
t=DEFAULT_MARGIN),
)
return default_layout
def get_default_colorbar():
default_colorbar = ColorBar(
thicknessmode='fraction',
thickness=0.015,
#lenmode='pixels',
#len=DEFAULT_HEIGHT-2*DEFAULT_MARGIN,
titleside='right'
)
return default_colorbar
RBSP_PATH = '/data/ECT/rbsp-ect.lanl.gov/data_pub/rbspa/'
RBSP_B_COMPONENT_PATH = '/data/EMFISIS/emfisis.physics.uiowa.edu/Flight/RBSP-A/L3'