When sampling from input_spectrum.txt, rather than use the value of one bin edge, adds logic for improved Interpolation between bin edges. There are three modes, set by specifying beam energy, i.e.
energy = -1 MeV ⇒ 1st order interpolation
energy = -2 MeV ⇒ 2nd order interpolation
energy = -3 MeV ⇒ no interpolation (for discrete energy spectra)
All other negative values default to 1st order interpolation.
As an illustrative example, consider an neutron source using a (relatively coarse) Watt spectrum in a vaccum geometry (visualization of geometry at bottom).
Current grasshopper version:
1st order interpolation:
2nd order interpolation:
No interpolation:
The no interpolation option is useful for spectra that take on discrete values, such as with gammas. In this case, the structure of input_spectrum.txt is the same, but energies are sampled at exactly the values given (weighted appropriately) with no interpolation between bins.
When sampling from input_spectrum.txt, rather than use the value of one bin edge, adds logic for improved Interpolation between bin edges. There are three modes, set by specifying beam energy, i.e.
quantity name="BeamEnergy" type="energy" value="-2" unit="MeV"
energy = -1 MeV ⇒ 1st order interpolation energy = -2 MeV ⇒ 2nd order interpolation energy = -3 MeV ⇒ no interpolation (for discrete energy spectra) All other negative values default to 1st order interpolation.
As an illustrative example, consider an neutron source using a (relatively coarse) Watt spectrum in a vaccum geometry (visualization of geometry at bottom).
Current grasshopper version:![Old](https://user-images.githubusercontent.com/19719622/85188252-16f24b80-b25a-11ea-963c-bf26ee27f940.png)
1st order interpolation:![1st order interpolation](https://user-images.githubusercontent.com/19719622/85211870-30e76900-b302-11ea-817f-9bb1143e20c0.png)
2nd order interpolation:![2nd order interpolation](https://user-images.githubusercontent.com/19719622/85211877-3a70d100-b302-11ea-8b3b-28cd362b962e.png)
No interpolation:![No interpolation](https://user-images.githubusercontent.com/19719622/85211900-6c823300-b302-11ea-98f1-463a7e753d1b.png)
The no interpolation option is useful for spectra that take on discrete values, such as with gammas. In this case, the structure of input_spectrum.txt is the same, but energies are sampled at exactly the values given (weighted appropriately) with no interpolation between bins.
Simple geometry from above simulations:![geom](https://user-images.githubusercontent.com/19719622/85211938-bc60fa00-b302-11ea-9d91-c83732fb373c.png)