From 13b87ce77b316c4db9cb4decaeb295768993c877 Mon Sep 17 00:00:00 2001 From: Sumit Gupta <53135486+Sumit112192@users.noreply.github.com> Date: Fri, 23 Aug 2024 19:45:45 +0530 Subject: [PATCH] Doc changes for RPacketTracker (#2795) * Doc changes * Remove Output * Fix TYpo * Changed doc without any change to meta data --- docs/io/output/how_to_rpacket_tracking.ipynb | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/io/output/how_to_rpacket_tracking.ipynb b/docs/io/output/how_to_rpacket_tracking.ipynb index c088a7e53a4..6d51039bd51 100644 --- a/docs/io/output/how_to_rpacket_tracking.ipynb +++ b/docs/io/output/how_to_rpacket_tracking.ipynb @@ -15,7 +15,7 @@ "id": "c103617c", "metadata": {}, "source": [ - "**TARDIS** has the functionality to track the properties of the *RPackets* that are generated when running the Simulation. The `rpacket_tracker` can track all the interactions a packet undergoes & thus keeps a track of the various properties, a packet may have.
Currently, the `rpacket_tracker` tracks the properties of all the rpackets in the *Last Iteration of the Simulation*. It generates a `List` that contains the individual instances of `RPacketCollection`{`Numba JITClass`}, for storing all the interaction properties as listed below." + "**TARDIS** has the functionality to track the properties of the *RPackets* that are generated when running the Simulation. The `rpacket_tracker` can track all the interactions a packet undergoes & thus keeps a track of the various properties, a packet may have.
Currently, the `rpacket_tracker` tracks the properties of all the rpackets in the *Last Iteration of the Simulation*. It generates a `List` that contains the individual instances of `RPacketTracker`{`Numba JITClass`}, for storing all the interaction properties as listed below." ] }, { @@ -37,6 +37,7 @@ "
  • energy - Energy of the Packet
  • \n", "
  • shell_id - Current Shell Id where the Packet is present
  • \n", "
  • interaction_type - Last Interaction type of the packet
  • \n", + "
  • boundary_interaction - Boundary interactions data in the format (event_id, current_shell_id, next_shell_id) of the packet
  • \n", " \n", " \n", "" @@ -192,7 +193,7 @@ "id": "532bfafc", "metadata": {}, "source": [ - "Now, the `tracked` properties can be accessed via the `rpacket_tracker` attribute of the `sim.transport` object. " + "Now, the `tracked` properties can be accessed via the `rpacket_tracker` attribute of the `sim.transport.transport_state` object. " ] }, { @@ -211,7 +212,7 @@ "id": "4771d92a", "metadata": {}, "source": [ - "It can be seen from the above code, that the `sim.transport.rpacket_tracker` is an instance of the `List` specifically *Numba Typed List*. The `RPacketCollection` class has the following structure for the properties : {More information in the **TARDIS API** for `RPacketCollection` class}" + "It can be seen from the above code, that the `sim.transport.transport_state.rpacket_tracker` is an instance of the `List` specifically *Numba Typed List*. The `RPacketTracker` class has the following structure for the properties : {More information in the **TARDIS API** for `RPacketTracker` class}" ] }, { @@ -221,8 +222,8 @@ "metadata": {}, "source": [ "```python\n", - "# Basic structure for the RPacketCollection Class\n", - "class RPacketCollection:\n", + "# Basic structure for the RPacketTracker Class\n", + "class RPacketTracker:\n", " # Properties\n", " index\n", " seed\n", @@ -233,6 +234,7 @@ " energy\n", " shell_id\n", " interaction_type\n", + " boundary_interaction\n", "```" ] }, @@ -328,7 +330,7 @@ "id": "ea308a55", "metadata": {}, "source": [ - "Thus, all other properties (`r`, `nu`, `mu`, `energy`, `shell_id`,`interaction_type`) can be accessed accordingly." + "Thus, all other properties (`r`, `nu`, `mu`, `energy`, `shell_id`,`interaction_type`, `boundary_interaction`) can be accessed accordingly." ] }, { @@ -360,7 +362,7 @@ "\n", "Warning\n", "\n", - "If we try to access `sim.transport.rpacket_tracker` property when we have the `track_rpacket` property in the `tracking` subsection of `montecarlo` config, turned off as follows `config[\"montecarlo\"][\"tracking\"][\"track_rpacket\"] = False`, it will return `None`. Error will be raised if we try to access the properties i.e. `seed`, `index`, etc.\n", + "If we try to access `sim.transport.transport_state.rpacket_tracker` property when we have the `track_rpacket` property in the `tracking` subsection of `montecarlo` config, turned off as follows `config[\"montecarlo\"][\"tracking\"][\"track_rpacket\"] = False`, it will return `None`. Error will be raised if we try to access the properties i.e. `seed`, `index`, etc.\n", "" ] }, @@ -374,7 +376,7 @@ "\n", "Note\n", " \n", - "When we initialise the `RPacketCollection()` class, the properties arrays {`index`, `seed`, `status`, etc} are allocated certain length based on the `initial_array_length` parameter that can be set via the `initial_array_length` property under `montecarlo -> tracking` section of the configuration. The default size of the array is `10`. This variable is important as the number of interactions a packet may have is variable, thus we need to allocate space dynamically. This variable is used to compute the size and expand the array such that the properties are able to hold these values for the packet interaction. Higher number, allocates more space initially leading to lesser times the arrays expands and vice versa. It can be set in the following manner `config[\"montecarlo\"][\"tracking\"][\"initial_array_length\"] = {value}`.\n", + "When we initialise the `RPacketTracker()` class, the properties arrays {`index`, `seed`, `status`, etc} are allocated certain length based on the `initial_array_length` parameter that can be set via the `initial_array_length` property under `montecarlo -> tracking` section of the configuration. The default size of the array is `10`. This variable is important as the number of interactions a packet may have is variable, thus we need to allocate space dynamically. This variable is used to compute the size and expand the array such that the properties are able to hold these values for the packet interaction. Higher number, allocates more space initially leading to lesser times the arrays expands and vice versa. It can be set in the following manner `config[\"montecarlo\"][\"tracking\"][\"initial_array_length\"] = {value}`.\n", "" ] },