Exemple #1
0
 public MercuryIsotopeDistribution(string isotopeFileName)
 {
     //ElementalIsotopeComposition.LoadData(isotopeFileName);
     ChargeCarrierMass = 1.00727638;
     ApType            = ApodizationType.Gaussian;
     MercurySize       = 8192;
 }
 public MercuryIsotopeDistribution(MercuryIsotopeDistribution mercDistribution)
 {
     ElementalIsotopeComposition = mercDistribution.ElementalIsotopeComposition;
     ChargeCarrierMass           = mercDistribution.ChargeCarrierMass;
     ApType       = mercDistribution.ApType;
     MercurySize  = mercDistribution.MercurySize;
     PointsPerAmu = mercDistribution.PointsPerAmu;
 }
Exemple #3
0
 public void SetApodizationZeroFillOptions(ApodizationType type, double min_x, double max_x,
                                           int apodization_percent,
                                           short num_zeros)
 {
     menmApodizationType           = type;
     mdbl_apodization_min_x        = min_x;
     mdbl_apodization_max_x        = max_x;
     mint_apodization_apex_percent = apodization_percent;
     mshort_num_zeros = num_zeros;
 }
Exemple #4
0
 public clsRawDataPreprocessOptions()
 {
     menmApodizationType    = ApodizationType.NOAPODIZATION;
     mintApodizationPercent = 50;
     mdbl_apodization_min_x = 0;
     mdbl_apodization_max_x = 0.9437166;
     mshort_num_zeros       = 0;
     menmCalibrationType    = CalibrationType.UNDEFINED;
     mdbl_A = 0;
     mdbl_B = 0;
     mdbl_C = 0;
 }
Exemple #5
0
 public Icr2lsRawData()
 {
     mptr_data                      = null;
     mptr_data_copy                 = null;
     mint_allocated_size            = 0;
     marr_file_name                 = "";
     mint_last_scan_num             = -1;
     mint_num_points_in_scan        = 0;
     mint_allocated_size            = 0;
     mbln_tic_file                  = false;
     menmApodizationType            = ApodizationType.NOAPODIZATION;
     mshort_num_zeros               = 0;
     mbln_use_specified_calibration = false;
 }
 public MercuryIsotopeDistribution()
 {
     ChargeCarrierMass = 1.00727638;
     ApType            = ApodizationType.Gaussian;
     MercurySize       = 8192;
 }
Exemple #7
0
        public static void Apodize(double minX, double maxX, double sampleRate, bool invert, ApodizationType type,
                                   float[] vectIntensities, int numPts, int apexPosition = 50)
        {
            var startIndex = (int)(minX * sampleRate);
            var stopIndex  = (int)(maxX * sampleRate);

            if (startIndex > stopIndex)
            {
                var temp = startIndex;
                startIndex = stopIndex;
                stopIndex  = startIndex;
            }
            if (stopIndex >= numPts)
            {
                stopIndex = numPts - 1;
            }

            if (apexPosition != 50)
            {
                var apexIndex = startIndex + ((stopIndex - startIndex) * apexPosition) / 100;
                for (var index = startIndex; index < apexIndex; index++)
                {
                    vectIntensities[index] = vectIntensities[index] * (index - startIndex) / (apexIndex - startIndex);
                }
                for (var index = apexIndex; index < stopIndex; index++)
                {
                    vectIntensities[index] = vectIntensities[index] * (stopIndex - index) / (stopIndex - apexIndex);
                }
            }
            if (!invert)
            {
                switch (type)
                {
                case ApodizationType.SQUARE:
                    PerformSquareApodization(startIndex, stopIndex, vectIntensities);
                    break;

                case ApodizationType.PARZEN:
                    PerformParzenApodization(startIndex, stopIndex, vectIntensities);
                    break;

                case ApodizationType.HANNING:
                    PerformHanningApodization(startIndex, stopIndex, vectIntensities);
                    break;

                case ApodizationType.WELCH:
                    PerformWelchApodization(startIndex, stopIndex, vectIntensities);
                    break;

                case ApodizationType.TRIANGLE:
                    PerformTriangleApodization(startIndex, stopIndex, vectIntensities);
                    break;

                default:
                    break;
                }
            }
            else
            {
                switch (type)
                {
                case ApodizationType.SQUARE:
                    PerformInvertedSquareApodization(startIndex, stopIndex, vectIntensities);
                    break;

                case ApodizationType.PARZEN:
                    PerformInvertedParzenApodization(startIndex, stopIndex, vectIntensities);
                    break;

                case ApodizationType.HANNING:
                    PerformInvertedHanningApodization(startIndex, stopIndex, vectIntensities);
                    break;

                case ApodizationType.WELCH:
                    PerformInvertedWelchApodization(startIndex, stopIndex, vectIntensities);
                    break;

                case ApodizationType.TRIANGLE:
                    PerformInvertedTriangleApodization(startIndex, stopIndex, vectIntensities);
                    break;

                default:
                    break;
                }
            }
        }