-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
62 changed files
with
46,954 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
Oops, something went wrong.