Skip to content

Commit

Permalink
website
Browse files Browse the repository at this point in the history
  • Loading branch information
crhea93 committed May 17, 2021
1 parent 2419e7a commit 5fa4185
Show file tree
Hide file tree
Showing 62 changed files with 46,954 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/Pamplemousse.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Apply-Network1.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
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
from keras.layers.convolutional import Conv1D
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
Expand Down
41 changes: 41 additions & 0 deletions ApplyDataCube.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<p>
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.
</p>
<p>
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!
</p>
<pre class="line-numbers">
<code class="language-python">
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
</code>
</pre>

<p>
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.
</p>

<pre>
<code class="language-python">
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
</code>
</pre>
8 changes: 8 additions & 0 deletions css/business-frontpage.css
Original file line number Diff line number Diff line change
@@ -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;
}
19 changes: 19 additions & 0 deletions css/main.css
Original file line number Diff line number Diff line change
@@ -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;
}
Loading

0 comments on commit 5fa4185

Please sign in to comment.