You can interact with this notebook online: Launch interactive version

Tracking the Properties of Real Packets

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.The rpacket_tracker tracks the properties of all the rpackets in the All the Iterations of the Simulation. It generates a pandas.DataFrame that contains the the properties of all the interactions that a particular RPacket undergoes as it is propagated throughout the run of the simulation. This happens for all the packets of each respective Iteration and are stored along with the iteration number. A sample of the RPacket Tracking DataFrame can be seen in the end of this tutorial.

The properties that are tracked are as follows :

  1. index - Index of the Packet

  2. seed - Seed of the Packet

  3. status - Current Status for the Packet Interaction

  4. r - Radius of the Current Shell

  5. nu - Packet’s Frequency

  6. mu - Propagation Direction of the Packet (cosine of the angle the packet’s path makes with the radial direction)

  7. energy - Energy of the Packet

  8. shell_id - Current Shell Id where the Packet is present

Warning

Turning on the tracking option in the config has consequences on the time of the simulation run. Please keep this into consideration as the time for processing the output is high and can lead to long simulation times for simpler runs as well.Properties can be accessed through the DataFrame indexing easily.

How to Setup the Tracking for the RPackets?

TARDISrpacket_tracker is configured via the YAML file. This functionality of tracking the packets is turned off, by default. This is due to the fact that using this property, leads to longer execution time for the Simulation. An example configuration can be seen below for setting up the tracking:

...
montecarlo:
...
tracking:
    track_rpacket: true

The montecarlo section of the YAML file has a tracking sub section which holds the configuration properties for the track_rpacket & the initial_array_length (discussed later in the tutorial).

Let us see, the new rpacket_tracker in action.

[1]:
from tardis.io.config_reader import Configuration
/usr/share/miniconda3/envs/tardis/lib/python3.7/importlib/_bootstrap.py:219: QAWarning: pyne.data is not yet QA compliant.
  return f(*args, **kwds)
[2]:
# Reading the Configuration stored in `tardis_config_packet_tracking.yml` into config

config = Configuration.from_yaml("tardis_tracking_example.yml")
[3]:
# Checking the `tracking` section via the Schema

config["montecarlo"]["tracking"]
[3]:
{'track_rpacket': False, 'initial_array_length': 10}
[4]:
# Setting `r_packet_tracking` to True to turn on the Tracking

config["montecarlo"]["tracking"]["track_rpacket"] = True
[5]:
config["montecarlo"]["tracking"]
[5]:
{'track_rpacket': True, 'initial_array_length': 10}
[6]:
from tardis import run_tardis
[7]:
# Running the simulation from the config

sim = run_tardis(config, log_level="Debug", show_convergence_plots=False, show_progress_bars=False)
[py.warnings         ][WARNING]  /usr/share/miniconda3/envs/tardis/lib/python3.7/site-packages/traitlets/traitlets.py:3050: FutureWarning: --rc={'figure.dpi': 96} for dict-traits is deprecated in traitlets 5.0. You can pass --rc <key=value> ... multiple times to add items to a dict.
  FutureWarning,
 (warnings.py:110)
[tardis.plasma.standard_plasmas][INFO   ]  Reading Atomic Data from kurucz_cd23_chianti_H_He.h5 (standard_plasmas.py:92)
[tardis.io.atom_data.util][INFO   ]  Atom Data kurucz_cd23_chianti_H_He.h5 not found in local path.
        Exists in TARDIS Data repo /home/runner/Downloads/tardis-data/kurucz_cd23_chianti_H_He.h5 (util.py:34)
[tardis.io.atom_data.base][DEBUG  ]  Dataframe does not contain NAME column (base.py:172)
[tardis.io.atom_data.base][DEBUG  ]  Dataframe does not contain NAME column (base.py:172)
[tardis.io.atom_data.base][DEBUG  ]  Dataframe does not contain NAME column (base.py:172)
[tardis.io.atom_data.base][DEBUG  ]  Dataframe does not contain NAME column (base.py:172)
[tardis.io.atom_data.base][INFO   ]  Reading Atom Data with: UUID = 6f7b09e887a311e7a06b246e96350010 MD5  = 864f1753714343c41f99cb065710cace  (base.py:204)
[tardis.io.atom_data.base][INFO   ]  Non provided Atomic Data: synpp_refs, photoionization_data, yg_data, two_photon_data (base.py:209)
[tardis.plasma.base  ][DEBUG  ]  Updating modules in the following order: SelectedAtoms->IonizationData->AtomicMass->NumberDensity->Lines->Levels->LinesUpperLevelIndex->LinesLowerLevelIndex->JBluesDiluteBlackBody->ElectronTemperature->BetaRadiation->LevelBoltzmannFactorLTE->LevelBoltzmannFactorNoNLTE->PartitionFunction->GElectron->PhiSahaLTE->IonNumberDensity->LevelNumberDensity->StimulatedEmissionFactor->TauSobolev->BetaSobolev->TransitionProbabilities (base.py:267)
[py.warnings         ][WARNING]  /usr/share/miniconda3/envs/tardis/lib/python3.7/site-packages/tardis-2021.12.21.0.dev129+g098e24fc-py3.7.egg/tardis/plasma/properties/radiative_properties.py:92: RuntimeWarning: invalid value encountered in true_divide
  (g_lower * n_upper) / (g_upper * n_lower)
 (warnings.py:110)
[tardis.plasma.base  ][DEBUG  ]  Updating modules in the following order: SelectedAtoms->IonizationData->AtomicMass->NumberDensity->Lines->Levels->LinesUpperLevelIndex->LinesLowerLevelIndex->JBluesDiluteBlackBody->ElectronTemperature->BetaRadiation->LevelBoltzmannFactorLTE->LevelBoltzmannFactorNoNLTE->PartitionFunction->GElectron->PhiSahaLTE->IonNumberDensity->LevelNumberDensity->StimulatedEmissionFactor->TauSobolev->BetaSobolev->TransitionProbabilities (base.py:267)
[py.warnings         ][WARNING]  /usr/share/miniconda3/envs/tardis/lib/python3.7/site-packages/tardis-2021.12.21.0.dev129+g098e24fc-py3.7.egg/tardis/plasma/properties/radiative_properties.py:92: RuntimeWarning: invalid value encountered in true_divide
  (g_lower * n_upper) / (g_upper * n_lower)
 (warnings.py:110)
[tardis.montecarlo.base][DEBUG  ]  Electron scattering switched on (base.py:610)
[tardis.simulation.base][INFO   ]  Starting iteration 1 of 10 (base.py:368)
[tardis.simulation.base][INFO   ]  Luminosity emitted   = 8.269e+42 erg / s
        Luminosity absorbed  = 2.364e+42 erg / s
        Luminosity requested = 1.059e+43 erg / s
 (base.py:537)
[tardis.simulation.base][INFO   ]  Plasma stratification: (base.py:504)
Shell No. t_rad next_t_rad w next_w
0 9.93e+03 1.08e+04 0.4 0.328
5 9.85e+03 1e+04 0.211 0.21
10 9.78e+03 1.01e+04 0.143 0.11
15 9.71e+03 1.02e+04 0.105 0.0756
[tardis.simulation.base][INFO   ]  Current t_inner = 9933.952 K
        Expected t_inner for next iteration = 10588.561 K
 (base.py:532)
[tardis.plasma.base  ][DEBUG  ]  Updating modules in the following order: JBluesDiluteBlackBody->ElectronTemperature->BetaRadiation->LevelBoltzmannFactorLTE->LevelBoltzmannFactorNoNLTE->PartitionFunction->GElectron->PhiSahaLTE->IonNumberDensity->LevelNumberDensity->StimulatedEmissionFactor->TauSobolev->BetaSobolev->TransitionProbabilities (base.py:267)
[py.warnings         ][WARNING]  /usr/share/miniconda3/envs/tardis/lib/python3.7/site-packages/tardis-2021.12.21.0.dev129+g098e24fc-py3.7.egg/tardis/plasma/properties/radiative_properties.py:92: RuntimeWarning: invalid value encountered in true_divide
  (g_lower * n_upper) / (g_upper * n_lower)
 (warnings.py:110)
[tardis.simulation.base][INFO   ]  Starting iteration 2 of 10 (base.py:368)
[tardis.simulation.base][INFO   ]  Luminosity emitted   = 9.967e+42 erg / s
        Luminosity absorbed  = 3.671e+42 erg / s
        Luminosity requested = 1.059e+43 erg / s
 (base.py:537)
[tardis.simulation.base][INFO   ]  Plasma stratification: (base.py:504)
Shell No. t_rad next_t_rad w next_w
0 1.08e+04 1.03e+04 0.328 0.599
5 1e+04 1.03e+04 0.21 0.255
10 1.01e+04 1.15e+04 0.11 0.106
15 1.02e+04 1.04e+04 0.0756 0.0849
[tardis.simulation.base][INFO   ]  Current t_inner = 10588.561 K
        Expected t_inner for next iteration = 10752.220 K
 (base.py:532)
[tardis.plasma.base  ][DEBUG  ]  Updating modules in the following order: JBluesDiluteBlackBody->ElectronTemperature->BetaRadiation->LevelBoltzmannFactorLTE->LevelBoltzmannFactorNoNLTE->PartitionFunction->GElectron->PhiSahaLTE->IonNumberDensity->LevelNumberDensity->StimulatedEmissionFactor->TauSobolev->BetaSobolev->TransitionProbabilities (base.py:267)
[tardis.simulation.base][INFO   ]  Starting iteration 3 of 10 (base.py:368)
[tardis.simulation.base][INFO   ]  Luminosity emitted   = 1.166e+43 erg / s
        Luminosity absorbed  = 2.942e+42 erg / s
        Luminosity requested = 1.059e+43 erg / s
 (base.py:537)
[tardis.simulation.base][INFO   ]  Plasma stratification: (base.py:504)
Shell No. t_rad next_t_rad w next_w
0 1.03e+04 1.06e+04 0.599 0.56
5 1.03e+04 1.13e+04 0.255 0.184
10 1.15e+04 1.22e+04 0.106 0.0923
15 1.04e+04 1.02e+04 0.0849 0.105
[tardis.simulation.base][INFO   ]  Current t_inner = 10752.220 K
        Expected t_inner for next iteration = 10499.892 K
 (base.py:532)
[tardis.plasma.base  ][DEBUG  ]  Updating modules in the following order: JBluesDiluteBlackBody->ElectronTemperature->BetaRadiation->LevelBoltzmannFactorLTE->LevelBoltzmannFactorNoNLTE->PartitionFunction->GElectron->PhiSahaLTE->IonNumberDensity->LevelNumberDensity->StimulatedEmissionFactor->TauSobolev->BetaSobolev->TransitionProbabilities (base.py:267)
[tardis.simulation.base][INFO   ]  Starting iteration 4 of 10 (base.py:368)
[tardis.simulation.base][INFO   ]  Luminosity emitted   = 9.335e+42 erg / s
        Luminosity absorbed  = 3.832e+42 erg / s
        Luminosity requested = 1.059e+43 erg / s
 (base.py:537)
[tardis.simulation.base][INFO   ]  Plasma stratification: (base.py:504)
Shell No. t_rad next_t_rad w next_w
0 1.06e+04 1.03e+04 0.56 0.575
5 1.13e+04 1.16e+04 0.184 0.147
10 1.22e+04 9.89e+03 0.0923 0.189
15 1.02e+04 1.02e+04 0.105 0.105
[tardis.simulation.base][INFO   ]  Current t_inner = 10499.892 K
        Expected t_inner for next iteration = 10842.410 K
 (base.py:532)
[tardis.plasma.base  ][DEBUG  ]  Updating modules in the following order: JBluesDiluteBlackBody->ElectronTemperature->BetaRadiation->LevelBoltzmannFactorLTE->LevelBoltzmannFactorNoNLTE->PartitionFunction->GElectron->PhiSahaLTE->IonNumberDensity->LevelNumberDensity->StimulatedEmissionFactor->TauSobolev->BetaSobolev->TransitionProbabilities (base.py:267)
[tardis.simulation.base][INFO   ]  Starting iteration 5 of 10 (base.py:368)
[tardis.simulation.base][INFO   ]  Luminosity emitted   = 1.202e+43 erg / s
        Luminosity absorbed  = 3.072e+42 erg / s
        Luminosity requested = 1.059e+43 erg / s
 (base.py:537)
[tardis.simulation.base][INFO   ]  Plasma stratification: (base.py:504)
Shell No. t_rad next_t_rad w next_w
0 1.03e+04 1.16e+04 0.575 0.361
5 1.16e+04 1.16e+04 0.147 0.181
10 9.89e+03 1.3e+04 0.189 0.0751
15 1.02e+04 1.13e+04 0.105 0.0771
[tardis.simulation.base][INFO   ]  Current t_inner = 10842.410 K
        Expected t_inner for next iteration = 10509.975 K
 (base.py:532)
[tardis.plasma.base  ][DEBUG  ]  Updating modules in the following order: JBluesDiluteBlackBody->ElectronTemperature->BetaRadiation->LevelBoltzmannFactorLTE->LevelBoltzmannFactorNoNLTE->PartitionFunction->GElectron->PhiSahaLTE->IonNumberDensity->LevelNumberDensity->StimulatedEmissionFactor->TauSobolev->BetaSobolev->TransitionProbabilities (base.py:267)
[tardis.simulation.base][INFO   ]  Starting iteration 6 of 10 (base.py:368)
[tardis.simulation.base][INFO   ]  Luminosity emitted   = 1.010e+43 erg / s
        Luminosity absorbed  = 3.189e+42 erg / s
        Luminosity requested = 1.059e+43 erg / s
 (base.py:537)
[tardis.simulation.base][INFO   ]  Plasma stratification: (base.py:504)
Shell No. t_rad next_t_rad w next_w
0 1.16e+04 1.14e+04 0.361 0.365
5 1.16e+04 1.27e+04 0.181 0.116
10 1.3e+04 1.18e+04 0.0751 0.0865
15 1.13e+04 1.1e+04 0.0771 0.0753
[tardis.simulation.base][INFO   ]  Current t_inner = 10509.975 K
        Expected t_inner for next iteration = 10637.381 K
 (base.py:532)
[tardis.plasma.base  ][DEBUG  ]  Updating modules in the following order: JBluesDiluteBlackBody->ElectronTemperature->BetaRadiation->LevelBoltzmannFactorLTE->LevelBoltzmannFactorNoNLTE->PartitionFunction->GElectron->PhiSahaLTE->IonNumberDensity->LevelNumberDensity->StimulatedEmissionFactor->TauSobolev->BetaSobolev->TransitionProbabilities (base.py:267)
[tardis.simulation.base][INFO   ]  Starting iteration 7 of 10 (base.py:368)
[tardis.simulation.base][INFO   ]  Luminosity emitted   = 1.069e+43 erg / s
        Luminosity absorbed  = 3.219e+42 erg / s
        Luminosity requested = 1.059e+43 erg / s
 (base.py:537)
[tardis.simulation.base][INFO   ]  Plasma stratification: (base.py:504)
Shell No. t_rad next_t_rad w next_w
0 1.14e+04 1.01e+04 0.365 0.641
5 1.27e+04 1.14e+04 0.116 0.178
10 1.18e+04 1.17e+04 0.0865 0.0989
15 1.1e+04 1.19e+04 0.0753 0.0633
[tardis.simulation.base][INFO   ]  Current t_inner = 10637.381 K
        Expected t_inner for next iteration = 10612.937 K
 (base.py:532)
[tardis.plasma.base  ][DEBUG  ]  Updating modules in the following order: JBluesDiluteBlackBody->ElectronTemperature->BetaRadiation->LevelBoltzmannFactorLTE->LevelBoltzmannFactorNoNLTE->PartitionFunction->GElectron->PhiSahaLTE->IonNumberDensity->LevelNumberDensity->StimulatedEmissionFactor->TauSobolev->BetaSobolev->TransitionProbabilities (base.py:267)
[tardis.simulation.base][INFO   ]  Starting iteration 8 of 10 (base.py:368)
[tardis.simulation.base][INFO   ]  Luminosity emitted   = 9.634e+42 erg / s
        Luminosity absorbed  = 4.123e+42 erg / s
        Luminosity requested = 1.059e+43 erg / s
 (base.py:537)
[tardis.simulation.base][INFO   ]  Plasma stratification: (base.py:504)
Shell No. t_rad next_t_rad w next_w
0 1.01e+04 1.08e+04 0.641 0.509
5 1.14e+04 1.13e+04 0.178 0.164
10 1.17e+04 1.04e+04 0.0989 0.135
15 1.19e+04 1.02e+04 0.0633 0.094
[tardis.simulation.base][INFO   ]  Current t_inner = 10612.937 K
        Expected t_inner for next iteration = 10870.769 K
 (base.py:532)
[tardis.plasma.base  ][DEBUG  ]  Updating modules in the following order: JBluesDiluteBlackBody->ElectronTemperature->BetaRadiation->LevelBoltzmannFactorLTE->LevelBoltzmannFactorNoNLTE->PartitionFunction->GElectron->PhiSahaLTE->IonNumberDensity->LevelNumberDensity->StimulatedEmissionFactor->TauSobolev->BetaSobolev->TransitionProbabilities (base.py:267)
[tardis.simulation.base][INFO   ]  Starting iteration 9 of 10 (base.py:368)
[tardis.simulation.base][INFO   ]  Luminosity emitted   = 9.298e+42 erg / s
        Luminosity absorbed  = 5.812e+42 erg / s
        Luminosity requested = 1.059e+43 erg / s
 (base.py:537)
[tardis.simulation.base][INFO   ]  Plasma stratification: (base.py:504)
Shell No. t_rad next_t_rad w next_w
0 1.08e+04 1.16e+04 0.509 0.491
5 1.13e+04 1.09e+04 0.164 0.201
10 1.04e+04 1.12e+04 0.135 0.0779
15 1.02e+04 1.12e+04 0.094 0.0546
[tardis.simulation.base][INFO   ]  Current t_inner = 10870.769 K
        Expected t_inner for next iteration = 11236.850 K
 (base.py:532)
[tardis.plasma.base  ][DEBUG  ]  Updating modules in the following order: JBluesDiluteBlackBody->ElectronTemperature->BetaRadiation->LevelBoltzmannFactorLTE->LevelBoltzmannFactorNoNLTE->PartitionFunction->GElectron->PhiSahaLTE->IonNumberDensity->LevelNumberDensity->StimulatedEmissionFactor->TauSobolev->BetaSobolev->TransitionProbabilities (base.py:267)
[tardis.simulation.base][INFO   ]  Starting iteration 10 of 10 (base.py:368)
[tardis.simulation.base][INFO   ]  Luminosity emitted   = 1.268e+43 erg / s
        Luminosity absorbed  = 4.626e+42 erg / s
        Luminosity requested = 1.059e+43 erg / s
 (base.py:537)
[tardis.simulation.base][INFO   ]  Simulation finished in 10 iterations Simulation took 19.67 s
 (base.py:458)

Now, the tracked properties can be accessed via the rpacket_tracker attribute of the sim.runner object.

[8]:
type(sim.runner.rpacket_tracker)
[8]:
pandas.core.frame.DataFrame

It can be seen from the above code, that the sim.runner.rpacket_tracker is an instance of the pandas.DataFrame object. The RPacketCollection class has the following structure for the properties : {More information in the TARDIS API for RPacketCollection class}

# Basic structure for the RPacketCollection Class
class RPacketCollection:
   # Properties
    index
    seed
    status
    r
    nu
    mu
    energy
    shell_id
[9]:
len(sim.runner.rpacket_tracker)
[9]:
37998

The generated DataFrame can be accessed with sim.runner.rpacket_tracker. The DataFrame for this particular simulation configuration can be seen as follows :

[10]:
sim.runner.rpacket_tracker
[10]:
Iteration Packet Index Packet Seed Packet Status r nu mu energy shell_id
0 0 0 2850180890 0 1.235520e+15 9.409395e+14 0.815502 0.010308 0
1 0 0 2850180890 0 1.286064e+15 9.409395e+14 0.831176 0.010308 1
2 0 0 2850180890 0 1.336608e+15 9.409395e+14 0.844862 0.010308 2
3 0 0 2850180890 0 1.356168e+15 9.189503e+14 0.275900 0.010068 2
4 0 0 2850180890 0 1.387152e+15 9.189503e+14 0.341953 0.010068 3
... ... ... ... ... ... ... ... ... ...
37993 9 999 301457724 0 1.299259e+15 9.431548e+14 -0.766266 0.000952 1
37994 9 999 301457724 0 1.286064e+15 9.431548e+14 -0.760690 0.000952 0
37995 9 999 301457724 0 1.240273e+15 9.901331e+14 0.585639 0.001000 0
37996 9 999 301457724 0 1.260332e+15 1.618517e+15 -0.983315 0.000942 0
37997 9 999 301457724 2 1.235520e+15 1.618517e+15 -0.982633 0.000942 0

37998 rows × 9 columns

To access these different properties, we may consider the following examples for the rpacket_tracker: In this Example, we are trying to access the properties of the packet at index 10.In a similar way, we can check for any property for any packet in the range of packets for the last iteration.

  • Accessing the index property for the packets :

[11]:
sim.runner.rpacket_tracker["Packet Index"]
[11]:
0          0
1          0
2          0
3          0
4          0
        ...
37993    999
37994    999
37995    999
37996    999
37997    999
Name: Packet Index, Length: 37998, dtype: int64
  • Accessing the seed property for the packets :

[12]:
sim.runner.rpacket_tracker["Packet Seed"].unique()
[12]:
array([2850180890, 1078554911, 3614248311, ..., 1148267512, 2392874660,
        301457724])
  • Accessing the status property for the packets :

[13]:
sim.runner.rpacket_tracker["Packet Status"]
[13]:
0        0
1        0
2        0
3        0
4        0
        ..
37993    0
37994    0
37995    0
37996    0
37997    2
Name: Packet Status, Length: 37998, dtype: int64
[14]:
sim.runner.rpacket_tracker.loc[sim.runner.rpacket_tracker["Iteration"] == 1]
[14]:
Iteration Packet Index Packet Seed Packet Status r nu mu energy shell_id
1864 1 0 3625304954 0 1.235520e+15 7.032766e+14 0.994758 0.010379 0
1865 1 0 3625304954 0 1.286064e+15 7.032766e+14 0.995163 0.010379 1
1866 1 0 3625304954 0 1.336608e+15 7.032766e+14 0.995522 0.010379 2
1867 1 0 3625304954 0 1.387152e+15 7.032766e+14 0.995843 0.010379 3
1868 1 0 3625304954 0 1.437696e+15 7.032766e+14 0.996131 0.010379 4
... ... ... ... ... ... ... ... ... ...
3891 1 99 3232451889 0 2.044224e+15 4.962172e+14 0.854243 0.010181 16
3892 1 99 3232451889 0 2.094768e+15 4.962172e+14 0.861752 0.010181 17
3893 1 99 3232451889 0 2.145312e+15 4.962172e+14 0.868678 0.010181 18
3894 1 99 3232451889 0 2.195856e+15 4.962172e+14 0.875082 0.010181 19
3895 1 99 3232451889 1 2.246400e+15 4.962172e+14 0.881017 0.010181 19

2032 rows × 9 columns

[15]:
sim.runner.rpacket_tracker.loc[sim.runner.rpacket_tracker["Iteration"] == 9]
[15]:
Iteration Packet Index Packet Seed Packet Status r nu mu energy shell_id
17867 9 0 3996436251 0 1.235520e+15 2.255016e+15 0.896350 0.001034 0
17868 9 0 3996436251 0 1.286064e+15 2.255016e+15 0.904760 0.001034 1
17869 9 0 3996436251 0 1.336608e+15 2.255016e+15 0.912168 0.001034 2
17870 9 0 3996436251 0 1.387152e+15 2.255016e+15 0.918731 0.001034 3
17871 9 0 3996436251 0 1.437696e+15 2.255016e+15 0.924575 0.001034 4
... ... ... ... ... ... ... ... ... ...
37993 9 999 301457724 0 1.299259e+15 9.431548e+14 -0.766266 0.000952 1
37994 9 999 301457724 0 1.286064e+15 9.431548e+14 -0.760690 0.000952 0
37995 9 999 301457724 0 1.240273e+15 9.901331e+14 0.585639 0.001000 0
37996 9 999 301457724 0 1.260332e+15 1.618517e+15 -0.983315 0.000942 0
37997 9 999 301457724 2 1.235520e+15 1.618517e+15 -0.982633 0.000942 0

20131 rows × 9 columns

Thus, all other properties {r, nu, mu, energy, shell_id} can be accessed accordingly.

Warning

If we try to access sim.runner.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.

Note

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}.