herschel.ia.toolbox.spectrum.operations.segments.resampling
public abstract class BoxResampler extends java.lang.Object
#setIsDensity(boolean))
- if set to true it gives the flux per frequency unit - or the integrated flux seen
in the channel if set to false.
The channel boundaries are constructed by the mid-points of the frequency values -
so strictly speaking, if you have an irregular grid, the frequency values are not mid points
within the channels. Similarly, from the new frequency grid suitable frequency channels are defined.
Currently there are two box resamplers implemented: Euler and Trapezoidal scheme.
The difference between Euler and Trapezoidal consists in how the flux or flux density is
computed for the output channels.
For Euler, it just sums up all the flux contributions defined for the original grid -
for not completely overlapping channels it just takes the fractional contribution
where the fraction is determined just by comparing the width of the overlapping part of the new
with the channel width of the orginal spectrum.
For Trapezoidal, the density is integrated by using a trapezoidal integration scheme.
At the boundaries of the new channels, flux density values are computed by using a linear
interpolation scheme.| Constructor and Description |
|---|
BoxResampler()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
SpectrumIntegrator |
getFluxIntegrator() |
void |
resample(Double1d freqOld,
Double1d fluxOld,
Double1d freqNew,
Double1d fluxNew)
Apply scheme in which only flux should be processed.
|
public SpectrumIntegrator getFluxIntegrator()
public void resample(Double1d freqOld,
Double1d fluxOld,
Double1d freqNew,
Double1d fluxNew)