kartikmandar commited on
Commit
9924df1
·
1 Parent(s): d214369

change theme and style

Browse files
assets/images/stingray_explorer.png ADDED
assets/images/stingray_explorer.webp ADDED
assets/images/stingray_logo.png ADDED
assets/stylesheets/explorer.css ADDED
@@ -0,0 +1 @@
 
 
1
+ /* Home Heading */
explorer.py ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import panel as pn
2
+ from utils.strings import HOME_HEADING_STRING, WELCOME_MESSAGE
3
+
4
+
5
+ # Initialize panel extension
6
+ pn.extension()
7
+
8
+ # Create a boolean status indicator
9
+ busy_indicator = pn.indicators.BooleanStatus(value=True, color='warning', width=30, height=30)
10
+
11
+ # Create header
12
+ HOME_HEADING = pn.pane.Markdown(HOME_HEADING_STRING, stylesheets=['../assets/stylesheets/explorer.css'])
13
+
14
+ # Create a welcome message
15
+ welcome_message = pn.pane.Markdown(WELCOME_MESSAGE)
16
+
17
+ # Create main content layout
18
+ main = pn.Column(HOME_HEADING, welcome_message)
19
+
20
+ # Create sidebar using the create_sidebar function and pass the main content layout
21
+ sidebar = pn.pane.Markdown("Sidebar")
22
+
23
+ # Create a footer
24
+ footer = pn.pane.Markdown(
25
+ """
26
+ <div style='text-align: center;'>
27
+ <p>Stingray Explorer Dashboard</p>
28
+ <p>&copy; 2021 Kartik Mandar</p>
29
+ </div>
30
+ """,
31
+ width=200,
32
+ )
33
+
34
+ # Create a FastGridTemplate layout
35
+ layout = pn.template.FastGridTemplate(
36
+
37
+ # Basic Panel layout components
38
+ header="Next-Generation Spectral Timing Made Easy",
39
+ sidebar=[sidebar],
40
+ main=[main, footer],
41
+ modal=True,
42
+
43
+ # Parameters for the FastGridTemplate
44
+ site="", # Not shown as already doing in title
45
+ site_url="StingrayExplorer",
46
+ logo="./assets/images/stingray_explorer.png",
47
+ title="Stingray Explorer",
48
+ favicon="./assets/images/stingray_explorer.png",
49
+ sidebar_footer="Sidebar Footer",
50
+ # config= (TemplateConfig): Contains configuration options similar to pn.config but applied to the current Template only. (Currently only css_files is supported) But css_files are now deprecated.
51
+ busy_indicator=busy_indicator,
52
+
53
+ # For configuring the grid
54
+ cols={'lg': 12, 'md': 10, 'sm': 6, 'xs': 4, 'xxs': 2},
55
+ breakpoints={'lg': 1200, 'md': 996, 'sm': 768, 'xs': 480, 'xxs': 0},
56
+ row_height=150,
57
+ dimensions={'minW': 0, 'maxW': float('inf'), 'minH': 0, 'maxH': float('inf')},
58
+ prevent_collision=False,
59
+ save_layout=True,
60
+
61
+ # Styling parameter
62
+ theme="default",
63
+ theme_toggle=True,
64
+ # background_color="#FFFFFF", # The toggle button choses it according to the theme
65
+ neutral_color="#D3D3D3",
66
+ accent_base_color="#c4e1c5",
67
+ header_background="#000000",
68
+ header_color="#c4e1c5",
69
+ header_neutral_color="#D3D3D3",
70
+ header_accent_base_color="#c4e1c5",
71
+ corner_radius=7,
72
+ # font="",
73
+ # font_url="",
74
+ shadow=True,
75
+ main_layout="card",
76
+
77
+ # Layout parameters
78
+ collapsed_sidebar=False,
79
+ sidebar_width=250,
80
+ main_max_width="100%",
81
+
82
+
83
+ # Meta data
84
+ meta_description='Stingray Explorer Dashboard',
85
+ meta_keywords='Stingray, Explorer, Dashboard, Astronomy, Stingray Explorer, X-ray Astronomy, X-ray Data Analysis',
86
+ meta_author='Kartik Mandar',
87
+ meta_refresh='',
88
+ meta_viewport='width=device-width, initial-scale=1',
89
+ base_url='/',
90
+ base_target='_self',
91
+ )
92
+
93
+ # Serve the layout
94
+ layout.servable()
main.py DELETED
@@ -1,5 +0,0 @@
1
- import panel as pn
2
-
3
-
4
- # Initialize panel extension
5
- pn.extension()
 
 
 
 
 
 
utils/__pycache__/strings.cpython-311.pyc ADDED
Binary file (2.82 kB). View file
 
utils/strings.py ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## This section contains the textual strings used in the explorer.py
2
+
3
+ HOME_HEADING_STRING = """<div>
4
+ <h1>Welcome to the Stingray Explorer Dashboard</h1>
5
+ </div>"""
6
+
7
+
8
+ ## This section contains the textual strings used in the explorer.py
9
+
10
+ WELCOME_MESSAGE = """
11
+ <div>
12
+ <p>This dashboard is designed to provide a comprehensive toolset for X-ray astronomy data analysis. Here are the main features:</p>
13
+ <ul style='text-align: left;'>
14
+ <li><b>Quicklook with Stingray:</b><ul><li> Don't want to dabble around too much and generate plots fast and easy, this is the way.</li></ul></li>
15
+ <li><b>Working with Event Data:</b>
16
+ <ul>
17
+ <li>Setup and creating EventList from photon arrival times</li>
18
+ <li>Roundtrip to Astropy-compatible formats</li>
19
+ <li>Loading and writing EventList objects</li>
20
+ <li>Simulating EventList from Lightcurve</li>
21
+ <li>Joining EventLists</li>
22
+ </ul>
23
+ </li>
24
+ <li><b>Working with Lightcurves:</b>
25
+ <ul>
26
+ <li>Creating light curves from time stamps, counts, or photon arrival times</li>
27
+ <li>Operations including addition, subtraction, indexing, and plotting</li>
28
+ <li>Handling Good Time Intervals (GTIs) and analyzing light curve segments</li>
29
+ </ul>
30
+ </li>
31
+ <li><b>Fourier Analysis:</b>
32
+ <ul>
33
+ <li>Generating Powerspectra, AveragedPowerspectra, and Cross Spectra</li>
34
+ <li>Normalizing and re-binning power spectra</li>
35
+ <li>Creating Dynamical Power Spectra</li>
36
+ </ul>
37
+ </li>
38
+ <li><b>Cross and Autocorrelations:</b>
39
+ <ul>
40
+ <li>Generating CrossCorrelation and AutoCorrelation plots</li>
41
+ </ul>
42
+ </li>
43
+ <li><b>Bispectra:</b>
44
+ <ul>
45
+ <li>Understanding and plotting Bispectrum</li>
46
+ </ul>
47
+ </li>
48
+ <li><b>Bayesian Excess Variance:</b>
49
+ <ul>
50
+ <li>Theoretical background and practical examples</li>
51
+ </ul>
52
+ </li>
53
+ <li><b>Multi-taper Periodogram:</b>
54
+ <ul>
55
+ <li>Creating and analyzing Multitaper objects</li>
56
+ </ul>
57
+ </li>
58
+ <li><b>Lomb Scargle Spectra:</b>
59
+ <ul>
60
+ <li>Generating Lomb Scargle Powerspectrum and Crossspectrum</li>
61
+ </ul>
62
+ </li>
63
+ </ul>
64
+ <p>Please use the sidebar to navigate to the different analysis tools. Each tool comes with interactive widgets to customize your analysis and generate plots on the fly.</p>
65
+ <p>We hope you find this dashboard useful for your research!</p>
66
+ </div>
67
+ """