diff --git a/docs/using/interaction/custom_source.ipynb b/docs/using/interaction/custom_source.ipynb index 8205681142e..68aaf50a46d 100644 --- a/docs/using/interaction/custom_source.ipynb +++ b/docs/using/interaction/custom_source.ipynb @@ -35,7 +35,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Custom packet source class that is derived from BasePacketSource. The method create_packets (which returns ```nus, mus, energies```) has to be defined." + "Custom packet source class that is derived from BasePacketSource. The method create_packets (which returns ```radii, nus, mus, energies```) has to be defined." ] }, { @@ -55,7 +55,7 @@ " self.rng = np.random.default_rng(seed=seed)\n", " self.truncation_wavelength = truncation_wavelength\n", " \n", - " def create_packets(self, T, no_of_packets, rng,\n", + " def create_packets(self, T, no_of_packets, rng, radius,\n", " drawing_sample_size=None):\n", " \"\"\"\n", " Packet source that generates a truncated Blackbody source.\n", @@ -71,6 +71,9 @@ " Only wavelengths higher than the truncation wavelength\n", " will be sampled.\n", " \"\"\"\n", + " \n", + " # Makes uniform array of packet radii\n", + " radii = np.ones(no_of_packets) * radius\n", "\n", " # Use mus and energies from normal blackbody source.\n", " mus = self.create_zero_limb_darkening_packet_mus(no_of_packets, self.rng)\n", @@ -100,7 +103,7 @@ " additional_nus = additional_nus[mask][:no_of_packets]\n", " nus = np.hstack([nus, additional_nus])[:no_of_packets]\n", " \n", - " return nus, mus, energies" + " return radii, nus, mus, energies" ] }, { @@ -161,7 +164,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.7" + "version": "3.7.10" }, "nbsphinx": { "execute": "always",