Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update some of notebooks
  • Loading branch information
sschmidt23 committed Sep 10, 2022
commit 66bb416785b9f9785c43a9674b91fbb36f2d2553
6 changes: 3 additions & 3 deletions examples/core/FileIO_DataStore.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
"outputs": [],
"source": [
"from rail.core.utils import RAILDIR\n",
"trainFile = os.path.join(RAILDIR, 'tests/data/test_dc2_training_9816.hdf5')\n",
"testFile = os.path.join(RAILDIR, 'tests/data/test_dc2_validation_9816.hdf5')\n",
"trainFile = os.path.join(RAILDIR, 'rail/examples/testdata/test_dc2_training_9816.hdf5')\n",
"testFile = os.path.join(RAILDIR, 'rail/examples/testdata/test_dc2_validation_9816.hdf5')\n",
"\n",
"traindata_io = tables_io.read(trainFile)[\"photometry\"]"
]
Expand Down Expand Up @@ -386,7 +386,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
"version": "3.9.7"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions examples/core/Pipe_Example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"outputs": [],
"source": [
"from rail.core.utils import RAILDIR\n",
"flow_file = os.path.join(RAILDIR, 'examples/goldenspike/data/pretrained_flow.pkl')\n",
"flow_file = os.path.join(RAILDIR, 'rail/examples/goldenspike/data/pretrained_flow.pkl')\n",
"bands = ['u','g','r','i','z','y']\n",
"band_dict = {band:f'mag_{band}_lsst' for band in bands}\n",
"rename_dict = {f'mag_{band}_lsst_err':f'mag_err_{band}_lsst' for band in bands}\n",
Expand Down Expand Up @@ -317,7 +317,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
"version": "3.9.7"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions examples/core/hyperbolic_magnitude_test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"outputs": [],
"source": [
"from rail.core.utils import RAILDIR\n",
"testFile = os.path.join(RAILDIR, 'tests', 'data', 'test_dc2_training_9816.pq')\n",
"testFile = os.path.join(RAILDIR, 'rail', 'examples', 'testdata', 'test_dc2_training_9816.pq')\n",
"test_mags = DS.read_file(\"test_data\", TableHandle, testFile)"
]
},
Expand Down Expand Up @@ -228,7 +228,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
"version": "3.9.7"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions examples/core/iterator_test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"outputs": [],
"source": [
"from rail.core.utils import RAILDIR\n",
"pdfs_file = os.path.join(RAILDIR, \"tests/data/test_dc2_training_9816.hdf5\")"
"pdfs_file = os.path.join(RAILDIR, \"rail/examples/testdata/test_dc2_training_9816.hdf5\")"
]
},
{
Expand Down Expand Up @@ -209,7 +209,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
"version": "3.9.7"
}
},
"nbformat": 4,
Expand Down
10 changes: 5 additions & 5 deletions examples/estimation/NZDir.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
"outputs": [],
"source": [
"from rail.core.utils import RAILDIR\n",
"trainFile = os.path.join(RAILDIR, 'tests/data/test_dc2_training_9816.hdf5')\n",
"testFile = os.path.join(RAILDIR, 'tests/data/test_dc2_validation_9816.hdf5')\n",
"trainFile = os.path.join(RAILDIR, 'rail/examples/testdata/test_dc2_training_9816.hdf5')\n",
"testFile = os.path.join(RAILDIR, 'rail/examples/testdata/test_dc2_validation_9816.hdf5')\n",
"training_data = DS.read_file(\"training_data\", TableHandle, trainFile)"
]
},
Expand Down Expand Up @@ -464,9 +464,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "mvrail",
"language": "python",
"name": "python3"
"name": "mvrail"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -478,7 +478,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
"version": "3.9.13"
}
},
"nbformat": 4,
Expand Down
10 changes: 5 additions & 5 deletions examples/estimation/RAIL_estimation_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@
"outputs": [],
"source": [
"from rail.core.utils import RAILDIR\n",
"trainFile = os.path.join(RAILDIR, 'tests/data/test_dc2_training_9816.hdf5')\n",
"testFile = os.path.join(RAILDIR, 'tests/data/test_dc2_validation_9816.hdf5')\n",
"trainFile = os.path.join(RAILDIR, 'rail/examples/testdata/test_dc2_training_9816.hdf5')\n",
"testFile = os.path.join(RAILDIR, 'rail/examples/testdata/test_dc2_validation_9816.hdf5')\n",
"training_data = DS.read_file(\"training_data\", TableHandle, trainFile)\n",
"test_data = DS.read_file(\"test_data\", TableHandle, testFile)"
]
Expand Down Expand Up @@ -506,9 +506,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "mvrail",
"language": "python",
"name": "python3"
"name": "mvrail"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -520,7 +520,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
"version": "3.9.13"
}
},
"nbformat": 4,
Expand Down
6 changes: 3 additions & 3 deletions examples/estimation/SimpleSOM_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -683,9 +683,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "mvrail",
"language": "python",
"name": "python3"
"name": "mvrail"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -697,7 +697,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
"version": "3.9.13"
}
},
"nbformat": 4,
Expand Down
550 changes: 67 additions & 483 deletions examples/estimation/test_sampled_summarizers.ipynb

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions tests/test_algos.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
import numpy as np
import os
import sys
import glob
import pickle
import pytest
import yaml
import tables_io
from rail.core.stage import RailStage
from rail.core.data import DataStore, TableHandle
from rail.core.algo_utils import one_algo
#from rail.core.utils import RAILDIR
from rail.estimation.algos import randomPZ, sklearn_nn, trainZ
from rail.estimation.algos import pzflow, knnpz
import scipy.special
Expand Down
2 changes: 1 addition & 1 deletion tests/test_som_summarizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def one_algo(key, inform_class, summarizer_class, summary_kwargs):
"spec_input": "som_summarize_test2_spec_input",
},
)
summ_en = summarizer2.summarize(phot_data, spec_data)
_ = summarizer2.summarize(phot_data, spec_data)
fid_ens = qp.read(
summarizer2.get_output(
summarizer2.get_aliased_tag("single_NZ"), final_name=True
Expand Down