Click or drag to resize

CRPSCompressSpectrum Method

Represent a spectrum with a different number of bins

Namespace:  Geosoft.Desktop.GXNetX
Assembly:  geosoft.desktop.gxnetx (in geosoft.desktop.gxnetx.dll) Version: 2026.1.0.24
Syntax
public static void CompressSpectrum(
	CGXNETCore gxNetShared,
	CVA va_dest,
	CVA va_src,
	int cosmic
)

public static void CompressSpectrum(
	CGXNETCore gxNetShared,
	CVA va_dest,
	CVA va_src,
	int cosmic
)

Parameters

gxNetShared
Type: GeoEngine.Core.GXNetXCGXNETCore
A shared CGXNETCore
va_dest
Type: GeoEngine.Core.GXNetXCVA
VA to receive the compressed output
va_src
Type: GeoEngine.Core.GXNetXCVA
VA to compress
cosmic
Type: SystemInt32
Copy the cosmic counts bin without modification
Remarks
In radiometric spectra, with n bins, the first n-1 bins represent counts from 0 to 3 MeV, while the last bin represents counts above 3 MeV (cosmic count). This method uses fractional summation of bins to convert a spectrum with n bins into a spectrum with m bins, while maintaining the original 0 to 3 MeV range in the first m-1 bins and the cosmic count in the last bin. This method works even if n is not a multiple of m, or if n is less than m.
See Also