code: public static double Function1D(double x, double mean, double amplitude, double position, double width, double phase, double frequency) {
          double envelope = mean + amplitude * Math.exp(-Math.pow((x - position), 2) / Math.pow((2 * width), 2));
          double carry = Math.cos(2 * Math.PI * frequency * (x - position) + phase);
          return envelope * carry;
      }
docs: 1-D Gabor function.
  
  @param x         Value.
  @param mean      Mean.
  @param amplitude Amplitude.
  @param position  Position.
  @param width     Width.
  @param phase     Phase.
  @param frequency Frequency.
  @return Gabor response.