You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had a quick look at the code and noticed several things.
To determine if virtual packets should be created the code compares with spectrum_virt_start_nu which comes from montecarlo.virtual_spectrum_range
When 'saving' the virtual packet, the code uses spectrum_start_nu and spectrum_delta_nu to determine which bin the packet corresponds to(spectrum.[start|stop|num])
The spectrum_delta_nu is calculated as the difference of the first two elements of the real spectrum frequency(constant bin width assumed but that's okay as we don't support anything else)
So there is some 'duplicate information' passed to the montecarlo as well as some hidden 'mechanics'.
The current state of the code allows to control the virtual spectrum in two ways. Either one could simply crop the spectrum with spectrum.[start|end] or one uses montecarlo.virtual_spectrum_range to control virtual spectrum creation with the result of only having data between 6000-7000 angstrom in a 1000-20000 angstrom spectrum.
The proper solution to this issue would be to 'streamline' the montecarlo and get rid of all duplicate information in storage_model_t(namely spectrum_virt_*). I don't see a reason to have both spectrum_virt_start_nu and spectrum_start_nu.
The result would be to have only one method to control the range of the spectrum.
TLDR:
There are currently two ways to control the virtual spectrum. Let's remove one of them.
When cleaning up the
config_reader
I've noticed that the configuration propertymontecarlo.virtual_spectrum_range.num
is never used in the code.Shall we remove it from the schemas or is this a bug?
The text was updated successfully, but these errors were encountered: