Skip to content

Commit

Permalink
fixed a small bug with synthetic data generator
Browse files Browse the repository at this point in the history
  • Loading branch information
dgeorgiev21 committed Sep 28, 2023
1 parent 5484e77 commit ff5c26b
Show file tree
Hide file tree
Showing 113 changed files with 895 additions and 855 deletions.
Binary file modified docs/build/doctrees/auto_tutorials/ii-instrumental/i_witec.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/build/doctrees/auto_tutorials/iii-datasets/ii_rruff.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/auto_tutorials/index.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/doctrees/synth.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: e27fa1efa8239973649c45f497ca8afd
config: 55a30d648e3049f9ab8d434cab2865e4
tags: 645f666f9bcd5a90fca523b33c5a78b7
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"\n# Generate synthetic endmembers\n\nIn this example, we will use `RamanSPy` to generate synthetic endmember signatures.\n"
"\n# Generate synthetic spectra\n\nIn this example, we will use `RamanSPy` to generate synthetic spectra.\n"
]
},
{
Expand All @@ -15,7 +15,7 @@
},
"outputs": [],
"source": [
"import ramanspy as rp\n\n# Generate synthetic endmembers\nendmembers = rp.synth.generate_endmembers(5, 1000, realistic=True)\n\nrp.plot.spectra(endmembers, plot_type='single stacked')\nrp.plot.show()"
"import ramanspy as rp\n\n# Generate synthetic spectra\nspectra = rp.synth.generate_spectra(5, 1000, realistic=True)\n\nrp.plot.spectra(spectra, plot_type='single stacked')\nrp.plot.show()"
]
}
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
Generate synthetic endmembers
Generate synthetic spectra
================================
In this example, we will use `RamanSPy` to generate synthetic endmember signatures.
In this example, we will use `RamanSPy` to generate synthetic spectra.
"""

# sphinx_gallery_start_ignore
Expand All @@ -11,9 +11,9 @@

import ramanspy as rp

# Generate synthetic endmembers
endmembers = rp.synth.generate_endmembers(5, 1000, realistic=True)
# Generate synthetic spectra
spectra = rp.synth.generate_spectra(5, 1000, realistic=True)

rp.plot.spectra(endmembers, plot_type='single stacked')
rp.plot.spectra(spectra, plot_type='single stacked')
rp.plot.show()

Binary file not shown.
Binary file not shown.
Binary file modified docs/build/html/_images/sphx_glr_plot_i_endmembers_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/build/html/_images/sphx_glr_plot_i_endmembers_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/build/html/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vi-analysis/plot_iii_unmixing.html">Built-in unmixing methods</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vi-analysis/plot_iv_integrative_svm.html">Integrative analysis: Support Vector Machine (SVM) classification</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vi-analysis/plot_v_integrative_nn.html">Integrative analysis: Neural Network (NN) classification</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vii-synth/plot_i_endmembers.html">Generate synthetic endmembers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vii-synth/plot_i_endmembers.html">Generate synthetic spectra</a></li>
</ul>
</li>
<li class="toctree-l1 has-children"><a class="reference internal" href="../auto_examples/index.html">Examples</a><input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><div class="visually-hidden">Toggle navigation of Examples</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
Expand Down Expand Up @@ -265,7 +265,7 @@ <h1>All modules for which code is available</h1>
<li><a href="ramanspy/plot/plot.html">ramanspy.plot.plot</a></li>
<li><a href="ramanspy/preprocessing/Pipeline.html">ramanspy.preprocessing.Pipeline</a></li>
<li><a href="ramanspy/preprocessing/Step.html">ramanspy.preprocessing.Step</a></li>
<li><a href="ramanspy/synth/mix.html">ramanspy.synth.mix</a></li>
<li><a href="ramanspy/synth/synth.html">ramanspy.synth.synth</a></li>
</ul>
</article>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Loading volumetric Raman data from a list of Raman image files by stacking them
.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 0 minutes 0.000 seconds)
**Total running time of the script:** (0 minutes 0.000 seconds)


.. _sphx_glr_download_auto_tutorials_ii-instrumental_i_witec.py:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The method itself will parse the data to the correct spectral data container, wh
.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 0 minutes 0.000 seconds)
**Total running time of the script:** (0 minutes 0.000 seconds)


.. _sphx_glr_download_auto_tutorials_ii-instrumental_ii_renishaw.py:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ You can use the method to load single spectra.
.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 0 minutes 0.000 seconds)
**Total running time of the script:** (0 minutes 0.000 seconds)


.. _sphx_glr_download_auto_tutorials_ii-instrumental_iii_ocean_insight.py:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Then, we can use the package to load data from such files into `RamanSPy` and us
.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 0 minutes 0.000 seconds)
**Total running time of the script:** (0 minutes 0.000 seconds)


.. _sphx_glr_download_auto_tutorials_ii-instrumental_iv_other.py:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ present at and setting ``download=False``.
.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 0 minutes 0.000 seconds)
**Total running time of the script:** (0 minutes 0.000 seconds)


.. _sphx_glr_download_auto_tutorials_iii-datasets_ii_rruff.py:
Expand Down
4 changes: 2 additions & 2 deletions docs/build/html/_sources/auto_tutorials/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ Synthetic data generation

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="In this example, we will use RamanSPy to generate synthetic endmember signatures.">
<div class="sphx-glr-thumbcontainer" tooltip="In this example, we will use RamanSPy to generate synthetic spectra.">

.. only:: html

Expand All @@ -640,7 +640,7 @@ Synthetic data generation

.. raw:: html

<div class="sphx-glr-thumbnail-title">Generate synthetic endmembers</div>
<div class="sphx-glr-thumbnail-title">Generate synthetic spectra</div>
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
.. _sphx_glr_auto_tutorials_vii-synth_plot_i_endmembers.py:


Generate synthetic endmembers
Generate synthetic spectra
================================

In this example, we will use `RamanSPy` to generate synthetic endmember signatures.
In this example, we will use `RamanSPy` to generate synthetic spectra.

.. GENERATED FROM PYTHON SOURCE LINES 7-17
Expand All @@ -42,17 +42,17 @@ In this example, we will use `RamanSPy` to generate synthetic endmember signatur
import ramanspy as rp
# Generate synthetic endmembers
endmembers = rp.synth.generate_endmembers(5, 1000, realistic=True)
# Generate synthetic spectra
spectra = rp.synth.generate_spectra(5, 1000, realistic=True)
rp.plot.spectra(endmembers, plot_type='single stacked')
rp.plot.spectra(spectra, plot_type='single stacked')
rp.plot.show()
.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 0.117 seconds)
**Total running time of the script:** (0 minutes 0.115 seconds)


.. _sphx_glr_download_auto_tutorials_vii-synth_plot_i_endmembers.py:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

Computation times
=================
**00:00.117** total execution time for **auto_tutorials_vii-synth** files:
**00:00.115** total execution time for **auto_tutorials_vii-synth** files:

+------------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_auto_tutorials_vii-synth_plot_i_endmembers.py` (``plot_i_endmembers.py``) | 00:00.117 | 0.0 MB |
| :ref:`sphx_glr_auto_tutorials_vii-synth_plot_i_endmembers.py` (``plot_i_endmembers.py``) | 00:00.115 | 0.0 MB |
+------------------------------------------------------------------------------------------+-----------+--------+
8 changes: 4 additions & 4 deletions docs/build/html/_sources/synth.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ Synthetic data
.. currentmodule:: ramanspy.synth


Synthetic endmembers
Synthetic spectra
====================
.. autofunction:: generate_endmembers
.. autofunction:: generate_spectra


Synthetic mixtures
==================
.. autofunction:: mix


Synthetic datasets
Synthetic mixture datasets
==================
.. autofunction:: generate_image_dataset
.. autofunction:: generate_mixture_image
2 changes: 1 addition & 1 deletion docs/build/html/analysis.html
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
<li class="toctree-l2"><a class="reference internal" href="auto_tutorials/vi-analysis/plot_iii_unmixing.html">Built-in unmixing methods</a></li>
<li class="toctree-l2"><a class="reference internal" href="auto_tutorials/vi-analysis/plot_iv_integrative_svm.html">Integrative analysis: Support Vector Machine (SVM) classification</a></li>
<li class="toctree-l2"><a class="reference internal" href="auto_tutorials/vi-analysis/plot_v_integrative_nn.html">Integrative analysis: Neural Network (NN) classification</a></li>
<li class="toctree-l2"><a class="reference internal" href="auto_tutorials/vii-synth/plot_i_endmembers.html">Generate synthetic endmembers</a></li>
<li class="toctree-l2"><a class="reference internal" href="auto_tutorials/vii-synth/plot_i_endmembers.html">Generate synthetic spectra</a></li>
</ul>
</li>
<li class="toctree-l1 has-children"><a class="reference internal" href="auto_examples/index.html">Examples</a><input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><div class="visually-hidden">Toggle navigation of Examples</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
Expand Down
6 changes: 3 additions & 3 deletions docs/build/html/auto_examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head><meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta name="color-scheme" content="light dark"><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" /><link rel="next" title="Cell phenotyping" href="plot_i_package_overview.html" /><link rel="prev" title="Generate synthetic endmembers" href="../auto_tutorials/vii-synth/plot_i_endmembers.html" />
<link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" /><link rel="next" title="Cell phenotyping" href="plot_i_package_overview.html" /><link rel="prev" title="Generate synthetic spectra" href="../auto_tutorials/vii-synth/plot_i_endmembers.html" />

<!-- Generated with Sphinx 7.2.6 and Furo 2023.09.10 -->
<title>Examples - RamanSPy</title>
Expand Down Expand Up @@ -210,7 +210,7 @@
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vi-analysis/plot_iii_unmixing.html">Built-in unmixing methods</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vi-analysis/plot_iv_integrative_svm.html">Integrative analysis: Support Vector Machine (SVM) classification</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vi-analysis/plot_v_integrative_nn.html">Integrative analysis: Neural Network (NN) classification</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vii-synth/plot_i_endmembers.html">Generate synthetic endmembers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vii-synth/plot_i_endmembers.html">Generate synthetic spectra</a></li>
</ul>
</li>
<li class="toctree-l1 current has-children current-page"><a class="current reference internal" href="#">Examples</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><div class="visually-hidden">Toggle navigation of Examples</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
Expand Down Expand Up @@ -307,7 +307,7 @@ <h1>Examples<a class="headerlink" href="#examples" title="Link to this heading">
<span>Previous</span>
</div>

<div class="title">Generate synthetic endmembers</div>
<div class="title">Generate synthetic spectra</div>

</div>
</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/build/html/auto_examples/plot_i_package_overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vi-analysis/plot_iii_unmixing.html">Built-in unmixing methods</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vi-analysis/plot_iv_integrative_svm.html">Integrative analysis: Support Vector Machine (SVM) classification</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vi-analysis/plot_v_integrative_nn.html">Integrative analysis: Neural Network (NN) classification</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vii-synth/plot_i_endmembers.html">Generate synthetic endmembers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vii-synth/plot_i_endmembers.html">Generate synthetic spectra</a></li>
</ul>
</li>
<li class="toctree-l1 current has-children"><a class="reference internal" href="index.html">Examples</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><div class="visually-hidden">Toggle navigation of Examples</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul class="current">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vi-analysis/plot_iii_unmixing.html">Built-in unmixing methods</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vi-analysis/plot_iv_integrative_svm.html">Integrative analysis: Support Vector Machine (SVM) classification</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vi-analysis/plot_v_integrative_nn.html">Integrative analysis: Neural Network (NN) classification</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vii-synth/plot_i_endmembers.html">Generate synthetic endmembers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vii-synth/plot_i_endmembers.html">Generate synthetic spectra</a></li>
</ul>
</li>
<li class="toctree-l1 current has-children"><a class="reference internal" href="index.html">Examples</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><div class="visually-hidden">Toggle navigation of Examples</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul class="current">
Expand Down
2 changes: 1 addition & 1 deletion docs/build/html/auto_examples/plot_ii_dl_denoising.html
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vi-analysis/plot_iii_unmixing.html">Built-in unmixing methods</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vi-analysis/plot_iv_integrative_svm.html">Integrative analysis: Support Vector Machine (SVM) classification</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vi-analysis/plot_v_integrative_nn.html">Integrative analysis: Neural Network (NN) classification</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vii-synth/plot_i_endmembers.html">Generate synthetic endmembers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vii-synth/plot_i_endmembers.html">Generate synthetic spectra</a></li>
</ul>
</li>
<li class="toctree-l1 current has-children"><a class="reference internal" href="index.html">Examples</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><div class="visually-hidden">Toggle navigation of Examples</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul class="current">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vi-analysis/plot_iii_unmixing.html">Built-in unmixing methods</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vi-analysis/plot_iv_integrative_svm.html">Integrative analysis: Support Vector Machine (SVM) classification</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vi-analysis/plot_v_integrative_nn.html">Integrative analysis: Neural Network (NN) classification</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vii-synth/plot_i_endmembers.html">Generate synthetic endmembers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vii-synth/plot_i_endmembers.html">Generate synthetic spectra</a></li>
</ul>
</li>
<li class="toctree-l1 current has-children"><a class="reference internal" href="index.html">Examples</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><div class="visually-hidden">Toggle navigation of Examples</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul class="current">
Expand Down
2 changes: 1 addition & 1 deletion docs/build/html/auto_examples/sg_execution_times.html
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vi-analysis/plot_iii_unmixing.html">Built-in unmixing methods</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vi-analysis/plot_iv_integrative_svm.html">Integrative analysis: Support Vector Machine (SVM) classification</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vi-analysis/plot_v_integrative_nn.html">Integrative analysis: Neural Network (NN) classification</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vii-synth/plot_i_endmembers.html">Generate synthetic endmembers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../auto_tutorials/vii-synth/plot_i_endmembers.html">Generate synthetic spectra</a></li>
</ul>
</li>
<li class="toctree-l1 has-children"><a class="reference internal" href="index.html">Examples</a><input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><div class="visually-hidden">Toggle navigation of Examples</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
Expand Down
Loading

0 comments on commit ff5c26b

Please sign in to comment.