diff --git a/docs/0-quickstart.ipynb b/docs/0-quickstart.ipynb index f0e6ba00..0ad75fd7 100644 --- a/docs/0-quickstart.ipynb +++ b/docs/0-quickstart.ipynb @@ -237,10 +237,7 @@ ] }, { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "cell_type": "markdown", "source": [ "sources = []\n", "for k,center in enumerate(centers):\n", @@ -256,7 +253,10 @@ "\n", "for k, src in enumerate(sources):\n", " print (f\"{k}: {src.__class__.__name__}\")" - ] + ], + "metadata": { + "collapsed": false + } }, { "cell_type": "markdown", diff --git a/docs/conf.py b/docs/conf.py index 2fcfd8d0..98ee9844 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -59,7 +59,7 @@ # General information about the project. project = "scarlet" -copyright = "2018-2021, Fred Moolekamp and Peter Melchior" +copyright = "2018-2024, Fred Moolekamp and Peter Melchior" author = "Fred Moolekamp and Peter Melchior" # The version info for the project you're documenting, acts as replacement for diff --git a/docs/tutorials/lite.ipynb b/docs/tutorials/lite.ipynb index 334e42fd..dcb131c4 100644 --- a/docs/tutorials/lite.ipynb +++ b/docs/tutorials/lite.ipynb @@ -537,7 +537,6 @@ "for k, blend in blends.items():\n", " display.show_scene(\n", " blend,\n", - " observation,\n", " show_model=False,\n", " show_rendered=True,\n", " show_observed=True,\n", @@ -547,7 +546,6 @@ " # Show the scene again with the reweighted flux\n", " display.show_scene(\n", " blend,\n", - " observation,\n", " show_model=False,\n", " show_rendered=True,\n", " show_observed=True,\n", @@ -593,13 +591,6 @@ "source": [ "display.compare_spectra(**sources)" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/docs/tutorials/wavelet_model.ipynb b/docs/tutorials/wavelet_model.ipynb index 37ccd605..69d22c79 100644 --- a/docs/tutorials/wavelet_model.ipynb +++ b/docs/tutorials/wavelet_model.ipynb @@ -363,10 +363,10 @@ "outputs": [], "source": [ "# find all sources with very similar colors to the Starlet source of the diffuse emission\n", - "spectrum = sources[-1].spectrum\n", + "spectrum = sources[-1].spectrum.get_parameter(0)\n", "C = np.zeros(len(sources))\n", "for j, src in enumerate(sources):\n", - " spectrum_ = src.spectrum\n", + " spectrum_ = src.spectrum.get_parameter(0)\n", " # cosine similarity\n", " C[j] = spectrum @ spectrum_ / np.sqrt(spectrum @ spectrum) / np.sqrt(spectrum_ @ spectrum_)\n", "\n", diff --git a/scarlet/initialization.py b/scarlet/initialization.py index 0e809f61..a493c940 100644 --- a/scarlet/initialization.py +++ b/scarlet/initialization.py @@ -306,7 +306,7 @@ def init_all_sources( model will be kept, otherwise one component is removed and the source reinitialized. If a source cannot be initialized, its index is returned in `skipped`. - See `~init_sources` for a description of the arguments + See `~init_source` for a description of the arguments Parameters ---------- @@ -404,8 +404,7 @@ def init_source( The `Observation` that contains the images, weights, and PSF used to generate the model. thresh : `float` - Fraction of the background to use as a threshold for - each pixel in the initialization + Multiple of the backround RMS used as a flux cutoff for morphology initialization max_components : int The maximum number of components in a source. If `fallback` is `True` then when @@ -417,7 +416,9 @@ def init_source( The minimum number of components in a source. Only relevent for `fallback=True`. min_snr: float - Mininmum SNR per component to accept the source. + Mininmum SNR per component of a multi-component source. + If fallback=True, every component needs to have at least min_snr, otherwise the component number will be reduced + At last resort, the component is initialized with a PointSource morphology shifting : bool Whether or not to fit the position of a source. This is an expensive operation and is typically only used when