Skip to content

Commit

Permalink
Merge pull request #32 from ConorMacBride/ibis-data-url-to-main
Browse files Browse the repository at this point in the history
Set IBIS data URL to main branch
  • Loading branch information
ConorMacBride committed May 13, 2021
2 parents 66d6389 + d9c5fb1 commit 3e42120
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion docs/guide/examples/neural_network/LabellingTutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"outputs": [],
"source": [
"path = 'https://raw.githubusercontent.com/ConorMacBride/mcalf/main/examples/data/ibis8542data/'\n",
"path = 'https://raw.githubusercontent.com/ConorMacBride/mcalf/include-ibis-data/examples/data/ibis8542data/'\n",
"\n",
"for file in ('wavelengths.txt', 'spectra.fits'):\n",
" r = requests.get(path + file, allow_redirects=True)\n",
Expand Down
8 changes: 4 additions & 4 deletions examples/gallery/models/plot_ibis8542data.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Working with IBIS data
======================
This example show how to initialise the
This example shows how to initialise the
:class:`mcalf.models.IBIS8542Model` class with
real IBIS data, and train a neural network
classifier. We then proceed to fit the array
Expand All @@ -20,7 +20,6 @@
import requests

path = 'https://raw.githubusercontent.com/ConorMacBride/mcalf/main/examples/data/ibis8542data/'
path = 'https://raw.githubusercontent.com/ConorMacBride/mcalf/include-ibis-data/examples/data/ibis8542data/'

for file in ('wavelengths.txt', 'spectra.fits',
'training_data.json', 'results.fits'):
Expand Down Expand Up @@ -217,7 +216,7 @@ def select_training_set(indices, model):
# -------------------
#
# Now that the data have been loaded and the
# neural network as been trained, we can proceed
# neural network has been trained, we can proceed
# to fit the spectra.

#%%
Expand All @@ -230,14 +229,15 @@ def select_training_set(indices, model):
# downloaded ``results.fits`` file.
#
# The next step of the example loads this file back into
# Python as through we have just directly calculated it.
# Python as though we have just directly calculated it.
# This isn't something you would usually need to do,
# so do not worry about the contents of the
# ``load_results()`` function, however, we plan to
# include this functionality in MCALF itself in the future.


def load_results(file):

with fits.open(file) as hdul:
for hdu in hdul:
if hdu.name == 'PARAMETERS':
Expand Down
1 change: 0 additions & 1 deletion examples/neural_network/LabellingTutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"outputs": [],
"source": [
"path = 'https://raw.githubusercontent.com/ConorMacBride/mcalf/main/examples/data/ibis8542data/'\n",
"path = 'https://raw.githubusercontent.com/ConorMacBride/mcalf/include-ibis-data/examples/data/ibis8542data/'\n",
"\n",
"for file in ('wavelengths.txt', 'spectra.fits'):\n",
" r = requests.get(path + file, allow_redirects=True)\n",
Expand Down

0 comments on commit 3e42120

Please sign in to comment.