diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..73f69e0 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/Pamplemousse.iml b/.idea/Pamplemousse.iml new file mode 100644 index 0000000..c956989 --- /dev/null +++ b/.idea/Pamplemousse.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..023e680 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Apply-Network1.py b/Apply-Network1.py index 6246e79..e2c8dd4 100644 --- a/Apply-Network1.py +++ b/Apply-Network1.py @@ -1,8 +1,7 @@ -from keras.models import load_model -from orcs.process import SpectralCube import os import numpy as np import matplotlib.pyplot as plt +import time from keras import activations from keras.models import Sequential from keras.layers import Dense, InputLayer, Flatten, Dropout @@ -10,11 +9,12 @@ from keras.layers.convolutional import MaxPooling1D from keras.optimizers import Adam from keras.callbacks import EarlyStopping, ReduceLROnPlateau +from keras.models import load_model +from orcs.process import SpectralCube from astropy.io import fits from pickle import load -from tqdm import tqdm_notebook as tqdm from scipy import interpolate -import time + #--------------------------------- INPUTS -------------------------------------# home_dir = '/path/to/main/directory/containing/data' # Location weights file diff --git a/ApplyDataCube.html b/ApplyDataCube.html new file mode 100644 index 0000000..73c0000 --- /dev/null +++ b/ApplyDataCube.html @@ -0,0 +1,41 @@ +

+ This example will guide you through the process of applying a pre-trained network (i.e. the weights have been trained), + to a SITELLE data cube. This example will use the network trained to predict velocity and broadening values, therefore, + we will be applying this to an SN3 cube. +

+

+ The code will read in a the network and a datacube. We will then step through each pixel in the datacube, extract the + spectrum, subtract the background, interpolate the background-subtracted spectrum onto the reference spectrum's x-axis, + and finally apply the network to extract the velocity and broadening parameters. Let's start with our imports -- I apologize + for all of them! +

+
+  
+    import os
+    import numpy as np
+    import matplotlib.pyplot as plt
+    import time
+    from keras.optimizers import Adam
+    from keras.models import load_model
+    from orcs.process import SpectralCube
+    from astropy.io import fits
+    from pickle import load
+    from scipy import interpolate
+  
+
+ +

+ Now we need to define our directories, cube name, and location of the deep frame. If you have not created a deep frame + for the cube, please do so now. Also, be sure to have the reference spectrum in the home directory. +

+ +
+  
+    home_dir = '/path/to/main/directory/containing/data'   # Location weights file
+    cube_dir = '/path/to/cubes'  # Path to data cube
+    cube_name = 'cube_name'  # don't add .hdf5 extension
+    output_dir = '/path/to/output'  # Path to output directory
+    output_name = 'output_name'  # output file prefix
+    deep_file = '/full/path/to/deep/fits'  # Path to deep image fits file: required for header
+  
+
\ No newline at end of file diff --git a/css/business-frontpage.css b/css/business-frontpage.css new file mode 100644 index 0000000..d7ec90a --- /dev/null +++ b/css/business-frontpage.css @@ -0,0 +1,8 @@ +/*! + * Start Bootstrap - Business Frontpage (https://startbootstrap.com/template/business-frontpage) + * Copyright 2013-2020 Start Bootstrap + * Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-business-frontpage/blob/master/LICENSE) + */ +body { + padding-top: 56px; +} diff --git a/css/main.css b/css/main.css new file mode 100644 index 0000000..572f19c --- /dev/null +++ b/css/main.css @@ -0,0 +1,19 @@ +body { + padding-top: 56px; +} + +h2 { + padding-top: 20px; +} + +/* pygments highlight */ +.highlight { + border: 1px solid #cfcfcf; + padding-top: 10px; + padding-left: 10px; + padding-right: 10px; + border-radius: 2px; + background: #f7f7f7; + line-height: 1.21429em; + margin-bottom: 10px; +} diff --git a/css/notebook.css b/css/notebook.css new file mode 100644 index 0000000..d7dec4b --- /dev/null +++ b/css/notebook.css @@ -0,0 +1,561 @@ +.prompt { + /* This needs to be wide enough for 3 digit prompt numbers: In[100]: */ + min-width: 14ex; + /* This padding is tuned to match the padding on the CodeMirror editor. */ + padding: 0.4em; + margin: 0px; + font-family: monospace; + text-align: right; + /* This has to match that of the the CodeMirror class line-height below */ + line-height: 1.21429em; + /* Don't highlight prompt number selection */ + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + /* Use default cursor */ + cursor: default; +} +@media (max-width: 540px) { + .prompt { + text-align: left; + } +} +div.inner_cell { + min-width: 0; + /* Old browsers */ + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-box-align: stretch; + display: -moz-box; + -moz-box-orient: vertical; + -moz-box-align: stretch; + display: box; + box-orient: vertical; + box-align: stretch; + /* Modern browsers */ + display: flex; + flex-direction: column; + align-items: stretch; + /* Old browsers */ + -webkit-box-flex: 1; + -moz-box-flex: 1; + box-flex: 1; + /* Modern browsers */ + flex: 1; +} +/* input_area and input_prompt must match in top border and margin for alignment */ +div.input_area { + border: 1px solid #cfcfcf; + border-radius: 2px; + background: #f7f7f7; + line-height: 1.21429em; +} +/* This is needed so that empty prompt areas can collapse to zero height when there + is no content in the output_subarea and the prompt. The main purpose of this is + to make sure that empty JavaScript output_subareas have no height. */ +div.prompt:empty { + padding-top: 0; + padding-bottom: 0; +} +div.unrecognized_cell { + padding: 5px 5px 5px 0px; + /* Old browsers */ + display: -webkit-box; + -webkit-box-orient: horizontal; + -webkit-box-align: stretch; + display: -moz-box; + -moz-box-orient: horizontal; + -moz-box-align: stretch; + display: box; + box-orient: horizontal; + box-align: stretch; + /* Modern browsers */ + display: flex; + flex-direction: row; + align-items: stretch; +} +div.unrecognized_cell .inner_cell { + border-radius: 2px; + padding: 5px; + font-weight: bold; + color: red; + border: 1px solid #cfcfcf; + background: #eaeaea; +} +div.unrecognized_cell .inner_cell a { + color: inherit; + text-decoration: none; +} +div.unrecognized_cell .inner_cell a:hover { + color: inherit; + text-decoration: none; +} +@media (max-width: 540px) { + div.unrecognized_cell > div.prompt { + display: none; + } +} +div.code_cell { + /* avoid page breaking on code cells when printing */ +} +@media print { + div.code_cell { + page-break-inside: avoid; + } +} +/* any special styling for code cells that are currently running goes here */ +div.input { + page-break-inside: avoid; + /* Old browsers */ + display: -webkit-box; + -webkit-box-orient: horizontal; + -webkit-box-align: stretch; + display: -moz-box; + -moz-box-orient: horizontal; + -moz-box-align: stretch; + display: box; + box-orient: horizontal; + box-align: stretch; + /* Modern browsers */ + display: flex; + flex-direction: row; + align-items: stretch; +} +@media (max-width: 540px) { + div.input { + /* Old browsers */ + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-box-align: stretch; + display: -moz-box; + -moz-box-orient: vertical; + -moz-box-align: stretch; + display: box; + box-orient: vertical; + box-align: stretch; + /* Modern browsers */ + display: flex; + flex-direction: column; + align-items: stretch; + } +} +/* input_area and input_prompt must match in top border and margin for alignment */ +div.input_prompt { + color: #303F9F; + border-top: 1px solid transparent; +} +div.input_area > div.highlight { + margin: 0.4em; + border: none; + padding: 0px; + background-color: transparent; +} +div.input_area > div.highlight > pre { + margin: 0px; + border: none; + padding: 0px; + background-color: transparent; +} +/* The following gets added to the if it is detected that the user has a + * monospace font with inconsistent normal/bold/italic height. See + * notebookmain.js. Such fonts will have keywords vertically offset with + * respect to the rest of the text. The user should select a better font. + * See: https://github.com/ipython/ipython/issues/1503 + * + * .CodeMirror span { + * vertical-align: bottom; + * } + */ +.CodeMirror { + line-height: 1.21429em; + /* Changed from 1em to our global default */ + font-size: 14px; + height: auto; + /* Changed to auto to autogrow */ + background: none; + /* Changed from white to allow our bg to show through */ +} +.CodeMirror-scroll { + /* The CodeMirror docs are a bit fuzzy on if overflow-y should be hidden or visible.*/ + /* We have found that if it is visible, vertical scrollbars appear with font size changes.*/ + overflow-y: hidden; + overflow-x: auto; +} +.CodeMirror-lines { + /* In CM2, this used to be 0.4em, but in CM3 it went to 4px. We need the em value because */ + /* we have set a different line-height and want this to scale with that. */ + /* Note that this should set vertical padding only, since CodeMirror assumes + that horizontal padding will be set on CodeMirror pre */ + padding: 0.4em 0; +} +.CodeMirror-linenumber { + padding: 0 8px 0 4px; +} +.CodeMirror-gutters { + border-bottom-left-radius: 2px; + border-top-left-radius: 2px; +} +.CodeMirror pre { + /* In CM3 this went to 4px from 0 in CM2. This sets horizontal padding only, + use .CodeMirror-lines for vertical */ + padding: 0 0.4em; + border: 0; + border-radius: 0; +} +.CodeMirror-cursor { + border-left: 1.4px solid black; +} +@media screen and (min-width: 2138px) and (max-width: 4319px) { + .CodeMirror-cursor { + border-left: 2px solid black; + } +} +@media screen and (min-width: 4320px) { + .CodeMirror-cursor { + border-left: 4px solid black; + } +} +/* + +Original style from softwaremaniacs.org (c) Ivan Sagalaev +Adapted from GitHub theme + +*/ +.highlight-base { + color: #000; +} +.highlight-variable { + color: #000; +} +.highlight-variable-2 { + color: #1a1a1a; +} +.highlight-variable-3 { + color: #333333; +} +.highlight-string { + color: #BA2121; +} +.highlight-comment { + color: #408080; + font-style: italic; +} +.highlight-number { + color: #080; +} +.highlight-atom { + color: #88F; +} +.highlight-keyword { + color: #008000; + font-weight: bold; +} +.highlight-builtin { + color: #008000; +} +.highlight-error { + color: #f00; +} +.highlight-operator { + color: #AA22FF; + font-weight: bold; +} +.highlight-meta { + color: #AA22FF; +} +/* previously not defined, copying from default codemirror */ +.highlight-def { + color: #00f; +} +.highlight-string-2 { + color: #f50; +} +.highlight-qualifier { + color: #555; +} +.highlight-bracket { + color: #997; +} +.highlight-tag { + color: #170; +} +.highlight-attribute { + color: #00c; +} +.highlight-header { + color: blue; +} +.highlight-quote { + color: #090; +} +.highlight-link { + color: #00c; +} +/* apply the same style to codemirror */ +.cm-s-ipython span.cm-keyword { + color: #008000; + font-weight: bold; +} +.cm-s-ipython span.cm-atom { + color: #88F; +} +.cm-s-ipython span.cm-number { + color: #080; +} +.cm-s-ipython span.cm-def { + color: #00f; +} +.cm-s-ipython span.cm-variable { + color: #000; +} +.cm-s-ipython span.cm-operator { + color: #AA22FF; + font-weight: bold; +} +.cm-s-ipython span.cm-variable-2 { + color: #1a1a1a; +} +.cm-s-ipython span.cm-variable-3 { + color: #333333; +} +.cm-s-ipython span.cm-comment { + color: #408080; + font-style: italic; +} +.cm-s-ipython span.cm-string { + color: #BA2121; +} +.cm-s-ipython span.cm-string-2 { + color: #f50; +} +.cm-s-ipython span.cm-meta { + color: #AA22FF; +} +.cm-s-ipython span.cm-qualifier { + color: #555; +} +.cm-s-ipython span.cm-builtin { + color: #008000; +} +.cm-s-ipython span.cm-bracket { + color: #997; +} +.cm-s-ipython span.cm-tag { + color: #170; +} +.cm-s-ipython span.cm-attribute { + color: #00c; +} +.cm-s-ipython span.cm-header { + color: blue; +} +.cm-s-ipython span.cm-quote { + color: #090; +} +.cm-s-ipython span.cm-link { + color: #00c; +} +.cm-s-ipython span.cm-error { + color: #f00; +} +.cm-s-ipython span.cm-tab { + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=); + background-position: right; + background-repeat: no-repeat; +} +div.output_wrapper { + /* this position must be relative to enable descendents to be absolute within it */ + position: relative; + /* Old browsers */ + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-box-align: stretch; + display: -moz-box; + -moz-box-orient: vertical; + -moz-box-align: stretch; + display: box; + box-orient: vertical; + box-align: stretch; + /* Modern browsers */ + display: flex; + flex-direction: column; + align-items: stretch; + z-index: 1; +} +/* class for the output area when it should be height-limited */ +div.output_scroll { + /* ideally, this would be max-height, but FF barfs all over that */ + height: 24em; + /* FF needs this *and the wrapper* to specify full width, or it will shrinkwrap */ + width: 100%; + overflow: auto; + border-radius: 2px; + -webkit-box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8); + box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8); + display: block; +} +/* output div while it is collapsed */ +div.output_collapsed { + margin: 0px; + padding: 0px; + /* Old browsers */ + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-box-align: stretch; + display: -moz-box; + -moz-box-orient: vertical; + -moz-box-align: stretch; + display: box; + box-orient: vertical; + box-align: stretch; + /* Modern browsers */ + display: flex; + flex-direction: column; + align-items: stretch; +} +div.out_prompt_overlay { + height: 100%; + padding: 0px 0.4em; + position: absolute; + border-radius: 2px; +} +div.out_prompt_overlay:hover { + /* use inner shadow to get border that is computed the same on WebKit/FF */ + -webkit-box-shadow: inset 0 0 1px #000; + box-shadow: inset 0 0 1px #000; + background: rgba(240, 240, 240, 0.5); +} +div.output_prompt { + color: #D84315; +} +/* This class is the outer container of all output sections. */ +div.output_area { + padding: 0px; + page-break-inside: avoid; + /* Old browsers */ + display: -webkit-box; + -webkit-box-orient: horizontal; + -webkit-box-align: stretch; + display: -moz-box; + -moz-box-orient: horizontal; + -moz-box-align: stretch; + display: box; + box-orient: horizontal; + box-align: stretch; + /* Modern browsers */ + display: flex; + flex-direction: row; + align-items: stretch; +} +div.output_area .MathJax_Display { + text-align: left !important; +} +div.output_area .rendered_html table { + margin-left: 0; + margin-right: 0; +} +div.output_area .rendered_html img { + margin-left: 0; + margin-right: 0; +} +div.output_area img, +div.output_area svg { + max-width: 100%; + height: auto; +} +div.output_area img.unconfined, +div.output_area svg.unconfined { + max-width: none; +} +div.output_area .mglyph > img { + max-width: none; +} +/* This is needed to protect the pre formating from global settings such + as that of bootstrap */ +.output { + /* Old browsers */ + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-box-align: stretch; + display: -moz-box; + -moz-box-orient: vertical; + -moz-box-align: stretch; + display: box; + box-orient: vertical; + box-align: stretch; + /* Modern browsers */ + display: flex; + flex-direction: column; + align-items: stretch; +} +@media (max-width: 540px) { + div.output_area { + /* Old browsers */ + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-box-align: stretch; + display: -moz-box; + -moz-box-orient: vertical; + -moz-box-align: stretch; + display: box; + box-orient: vertical; + box-align: stretch; + /* Modern browsers */ + display: flex; + flex-direction: column; + align-items: stretch; + } +} +div.output_area pre { + max-height: 500px; + margin: 0; + padding: 1px 0 1px 0; + border: 0; + vertical-align: baseline; + color: black; + background-color: transparent; + border-radius: 0; +} +/* This class is for the output subarea inside the output_area and after + the prompt div. */ +div.output_subarea { + overflow-x: auto; + padding: 0.4em; + /* Old browsers */ + -webkit-box-flex: 1; + -moz-box-flex: 1; + box-flex: 1; + /* Modern browsers */ + flex: 1; + max-width: calc(100% - 14ex); +} +div.output_scroll div.output_subarea { + overflow-x: visible; +} +/* The rest of the output_* classes are for special styling of the different + output types */ +/* all text output has this class: */ +div.output_text { + text-align: left; + color: #000; + /* This has to match that of the the CodeMirror class line-height below */ + line-height: 1.21429em; +} +/* stdout/stderr are 'text' as well as 'stream', but execute_result/error are *not* streams */ +div.output_stderr { + background: #fdd; + /* very light red background for stderr */ +} +div.output_latex { + text-align: left; +} +/* Empty output_javascript divs should have no height */ +div.output_javascript:empty { + padding: 0; +} +.th { + text-center: left; +} diff --git a/css/pygments/notebook/colorful.css b/css/pygments/notebook/colorful.css new file mode 100644 index 0000000..480df4a --- /dev/null +++ b/css/pygments/notebook/colorful.css @@ -0,0 +1,69 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #ffffff; } +.highlight .c { color: #888888 } /* Comment */ +.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */ +.highlight .k { color: #008800; font-weight: bold } /* Keyword */ +.highlight .o { color: #333333 } /* Operator */ +.highlight .ch { color: #888888 } /* Comment.Hashbang */ +.highlight .cm { color: #888888 } /* Comment.Multiline */ +.highlight .cp { color: #557799 } /* Comment.Preproc */ +.highlight .cpf { color: #888888 } /* Comment.PreprocFile */ +.highlight .c1 { color: #888888 } /* Comment.Single */ +.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */ +.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */ +.highlight .s { background-color: #fff0f0 } /* Literal.String */ +.highlight .na { color: #0000CC } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */ +.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */ +.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #007700 } /* Name.Tag */ +.highlight .nv { color: #996633 } /* Name.Variable */ +.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */ +.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */ +.highlight .sc { color: #0044DD } /* Literal.String.Char */ +.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #DD4422 } /* Literal.String.Doc */ +.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */ +.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */ +.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */ +.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */ +.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */ +.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */ +.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */ +.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */ +.highlight .vc { color: #336699 } /* Name.Variable.Class */ +.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */ +.highlight .vi { color: #3333BB } /* Name.Variable.Instance */ +.highlight .vm { color: #996633 } /* Name.Variable.Magic */ +.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ diff --git a/examples.html b/examples.html new file mode 100644 index 0000000..58b6bad --- /dev/null +++ b/examples.html @@ -0,0 +1,80 @@ + + + + + + + + + + Pamplemousse + + + + + + + + + + + + + +
+ + + +
+
+
+

Dynamic Tabs

+

To make the tabs toggleable, add the data-toggle="tab" attribute to each link. Then add a .tab-pane class with a unique ID for every tab and wrap them inside a div element with class .tab-content.

+ + + +
+ +
+

Create Synthetic Data

+
+
+

Train Network

+
+
+

Apply to Data Cube

+
+
+
+
+
+
+ + + + + + + + + + + + + diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..a08e74b --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,61 @@ +"use strict"; + +// Load plugins +const browsersync = require("browser-sync").create(); +const del = require("del"); +const gulp = require("gulp"); +const merge = require("merge-stream"); + +// BrowserSync +function browserSync(done) { + browsersync.init({ + server: { + baseDir: "./" + }, + port: 3000 + }); + done(); +} + +// BrowserSync reload +function browserSyncReload(done) { + browsersync.reload(); + done(); +} + +// Clean vendor +function clean() { + return del(["./vendor/"]); +} + +// Bring third party dependencies from node_modules into vendor directory +function modules() { + // Bootstrap + var bootstrap = gulp.src('./node_modules/bootstrap/dist/**/*') + .pipe(gulp.dest('./vendor/bootstrap')); + // jQuery + var jquery = gulp.src([ + './node_modules/jquery/dist/*', + '!./node_modules/jquery/dist/core.js' + ]) + .pipe(gulp.dest('./vendor/jquery')); + return merge(bootstrap, jquery); +} + +// Watch files +function watchFiles() { + gulp.watch("./**/*.css", browserSyncReload); + gulp.watch("./**/*.html", browserSyncReload); +} + +// Define complex tasks +const vendor = gulp.series(clean, modules); +const build = gulp.series(vendor); +const watch = gulp.series(build, gulp.parallel(watchFiles, browserSync)); + +// Export tasks +exports.clean = clean; +exports.vendor = vendor; +exports.build = build; +exports.watch = watch; +exports.default = build; diff --git a/images/CarterRhea.png b/images/CarterRhea.png new file mode 100644 index 0000000..b2be635 Binary files /dev/null and b/images/CarterRhea.png differ diff --git a/images/Logo_CRAQ_Bi_transparent.png b/images/Logo_CRAQ_Bi_transparent.png new file mode 100644 index 0000000..c52c7d4 Binary files /dev/null and b/images/Logo_CRAQ_Bi_transparent.png differ diff --git a/images/NGC2207.png b/images/NGC2207.png new file mode 100644 index 0000000..5e6eddb Binary files /dev/null and b/images/NGC2207.png differ diff --git a/images/NN-confusion.png b/images/NN-confusion.png new file mode 100644 index 0000000..0b2426b Binary files /dev/null and b/images/NN-confusion.png differ diff --git a/images/Network.jpg b/images/Network.jpg new file mode 100644 index 0000000..c218368 Binary files /dev/null and b/images/Network.jpg differ diff --git a/images/Ratio-Errors.jpg b/images/Ratio-Errors.jpg new file mode 100644 index 0000000..78f770c Binary files /dev/null and b/images/Ratio-Errors.jpg differ diff --git a/images/Universite_de_Montreal_logo_blue_negative.png b/images/Universite_de_Montreal_logo_blue_negative.png new file mode 100644 index 0000000..2508c22 Binary files /dev/null and b/images/Universite_de_Montreal_logo_blue_negative.png differ diff --git a/images/Velocity_dist_30k_resvar.png b/images/Velocity_dist_30k_resvar.png new file mode 100644 index 0000000..03cbb8a Binary files /dev/null and b/images/Velocity_dist_30k_resvar.png differ diff --git a/images/X-TRA_Negatif.png b/images/X-TRA_Negatif.png new file mode 100644 index 0000000..b0fbbbe Binary files /dev/null and b/images/X-TRA_Negatif.png differ diff --git a/images/cnn.jpg b/images/cnn.jpg new file mode 100644 index 0000000..6b56575 Binary files /dev/null and b/images/cnn.jpg differ diff --git a/images/example_spectrum.png b/images/example_spectrum.png new file mode 100644 index 0000000..dc9661e Binary files /dev/null and b/images/example_spectrum.png differ diff --git a/images/ivado-transparent.png b/images/ivado-transparent.png new file mode 100644 index 0000000..1ecce21 Binary files /dev/null and b/images/ivado-transparent.png differ diff --git a/images/logo-UdeM-blanc.png b/images/logo-UdeM-blanc.png new file mode 100644 index 0000000..b0446d8 Binary files /dev/null and b/images/logo-UdeM-blanc.png differ diff --git a/images/mosdef_dust.jpg b/images/mosdef_dust.jpg new file mode 100644 index 0000000..d88ef9b Binary files /dev/null and b/images/mosdef_dust.jpg differ diff --git a/include.js b/include.js new file mode 100644 index 0000000..7c2c9d8 --- /dev/null +++ b/include.js @@ -0,0 +1,7 @@ +$(function () { + var includes = $('[data-include]') + $.each(includes, function () { + var file = '' + $(this).data('include') + '.html' + $(this).load(file) + }) +}) diff --git a/index.html b/index.html new file mode 100644 index 0000000..89050c5 --- /dev/null +++ b/index.html @@ -0,0 +1,214 @@ + + + + + + + + + + + + Pamplemousse + + + + + + + + +
+ + + +
+
+
+
+

Pamplemousse:

+

A set of machine learning tools for Integral Field Unit Spectral Analysis

+

+ Machine learning is rapidly becoming ubiquitous in astronomy. The Pamplemousse project is a collection of tools built specifically for the analysis of spectra + taken with the SITELLE instrument on the CFHT. The tools are developed by a team lead by Carter Rhea at the Université de Montréal. The core team includes Dr. Laurie Rousseau-Nepton, + Dr. Simon Prunet, and Dr. Julie Hlavacek-Larrondo. +

+
+
+
+
+
+ ... +
+
+
+
+ ... +
+
+
+
+ ... +
+
+
+
+ ... +
+
+
+
+
+ + +
+
+
+
+

+ Our Projects +

+ +
+
+

Click on the headers to learn about the projects using Pamplemousse!

+
+
+
+ +
+
+
+
+
+ +
Fig. 3 - Schematic Diagram of the Convolutional Neural Network employed in this work
+
+

+ The first paper explores the use of a convolutional neural network to extract the flux and velocity of underlying components. + We report a standard deviation of ∼5 km/s for the velocity parameter and a standard deviation of approximately 5.5 km/s for the broadening parameter. +

+
+ +
Fig. 4 - Density plot of the velocity residuals in km s−1along with the standard deviation for the test set.
+
+
+
+
+ + +
+
+
+ +
+
+
+
+
+ +
Fig. 5 - Artificial Neural Network created for this work.
+
+

+ In this work, we apply an artificial neural network to combined-filter (SN1, SN2, and SN3) SITELLE data representing typical SIGNALS large program observations. + The network is designed to calculate important emission-line ratios for HII-like regions which are present in the primary SITELLE filters. + Our resultsindicate that the network can potentially constrain the line ratios with greater precision than the standard line fitting technique implemented in ORCS \textbf{if the source spectral properties are well represented in the training set}. + Timing analysis indicates that the network can analyze the entire cube approximately 100 times faster than the standard methods. +

+ +
+ +
Fig. 6 - Line Ratio Errors for the 8 line ratios studied in this work.
+
+ +
+
+
+ + +
+
+
+ +
+
+
+
+
+ +
Fig. 7 - Confusion matrix for the convolutional neural network used to categorize the number of underlying line-of-sight emission components.
+
+

+ In this paper (in preparation), the third of the series, we develop a convolutional neural network to classify spectra as having either a sin-gle or double line-of-sight component. + This systemati cmethod will be critical for disentangling components in merger systems, HII regions, and supernova remnants.We demonstrate that the network outperforms AIC andBayesian inference model comparisons. +

+
+ +
Fig. 8 - NGC2207-IC2163 merging system. Left: Deep SITELLE image of the N2207/IC2163 system created withORCS. This panel shows the stacked optical emission in the component galaxies. + Several structures such as the spiral arms, bulges, tidal tails, merging region (green circle), and diffuse emission regions (purple circles) stand out. + Right: Component map for the NGC2207/IC2163 system. White pixels correspond to double component emission. Black pixels correspond to single component emission.
+
+
+
+
+
+
+
+
+
+ + + +
+ +
+ +
+
+ +
+
+

Contact Us

+
+
+ https://github.com/sitelle-signals/Pamplemousse +
Campus MIL +
L'Université de Montréal, QC, CA +
+
+
+ E: + carter.rhea@umontreal.ca +
+
+
+ + +
+ + + + + + + + + + + + diff --git a/isotope.pkgd.min.js b/isotope.pkgd.min.js new file mode 100755 index 0000000..f6361b9 --- /dev/null +++ b/isotope.pkgd.min.js @@ -0,0 +1,12 @@ +/*! + * Isotope PACKAGED v3.0.5 + * + * Licensed GPLv3 for open source use + * or Isotope Commercial License for commercial use + * + * https://isotope.metafizzy.co + * Copyright 2017 Metafizzy + */ + +!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,s,a){function u(t,e,o){var n,s="$()."+i+'("'+e+'")';return t.each(function(t,u){var h=a.data(u,i);if(!h)return void r(i+" not initialized. Cannot call methods, i.e. "+s);var d=h[e];if(!d||"_"==e.charAt(0))return void r(s+" is not a valid method");var l=d.apply(h,o);n=void 0===n?l:n}),void 0!==n?n:t}function h(t,e){t.each(function(t,o){var n=a.data(o,i);n?(n.option(e),n._init()):(n=new s(o,e),a.data(o,i,n))})}a=a||e||t.jQuery,a&&(s.prototype.option||(s.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=n.call(arguments,1);return u(this,t,e)}return h(this,t),this},o(a))}function o(t){!t||t&&t.bridget||(t.bridget=i)}var n=Array.prototype.slice,s=t.console,r="undefined"==typeof s?function(){}:function(t){s.error(t)};return o(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},o=i[t]=i[t]||[];return o.indexOf(e)==-1&&o.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},o=i[t]=i[t]||{};return o[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var o=i.indexOf(e);return o!=-1&&i.splice(o,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var o=this._onceEvents&&this._onceEvents[t],n=0;n