<commit_before>export class ChromatogramSeries {
  is1D(): boolean;
  is2D(): boolean;
  toJSON(): {
    data: ChromatogramSeriesData;
    meta?: object;
  };

  /**
   * Specify an array of indexes to keep.
   * @param array
   */
  keep(array: number[]): this;
}

export class ChromatogramSeries1D extends ChromatogramSeries {}
export class ChromatogramSeries2D extends ChromatogramSeries {}

export type ChromatogramSeriesData = number[] | number[][];

export interface ChromatogramRange {
  from: number;
  to: number;
}

export interface ChromatogramPeak {
  x: number;
  y: number;
}

export interface AddSeriesOptions {
  /**
   * Force replacement of existing series.
   * If `false`, trying to add an already existing series will throw an error.
   * @default `false`
   */
  force?: boolean;
}

export interface FilterOptions {
  /**
   * Whether the method should return a copy of the chromatogram or modify it in-place.
   * @default `false`
   */
  copy?: boolean;
}

export interface GetPeaksOptions {
  /**
   * Filter all objects that are below `heightFilter` times the median of the height.
   * @default: `2`
   */
  heightFilter?: number;

  /**
   * Series to do the peak picking on
   * @default `'tic'`
   */
  seriesName?: string;
}

export interface GSDObject {
  from: number;
  to: number;
  fromIndex: number;
  toIndex: number;
  x: number;
  y: number;
  index: number;
}

// TODO: Use type from dependency ml-gsd?
export interface BroadenPeaksOptions {
  /**
   * Factor to enlarge.
   * @default: `1`
   */
  factor?: number;

  /**
   * If false, prevents overlap.
   * @default `false`
   */
  overlap?: boolean;
}

export interface CalculateOptions {
  /**
   * Force the calculation if it already exists.
   * If `false`, calling the method more than once will have no effect.
   * @default `false`
   */
  force?: boolean;
}

export interface CalculateForMassOptions {
  /**
   * Name of the series where the result will be stored.
   * Defaults to an automatically generated name.
   */
  seriesName?: string;

  /**
   * Retrieve result from cache if it exists.<commit_msg>doc: remove now unused interface<commit_after>export class ChromatogramSeries {
  is1D(): boolean;
  is2D(): boolean;
  toJSON(): {
    data: ChromatogramSeriesData;
    meta?: object;
  };

  /**
   * Specify an array of indexes to keep.
   * @param array
   */
  keep(array: number[]): this;
}

export class ChromatogramSeries1D extends ChromatogramSeries {}
export class ChromatogramSeries2D extends ChromatogramSeries {}

export type ChromatogramSeriesData = number[] | number[][];

export interface ChromatogramRange {
  from: number;
  to: number;
}

export interface ChromatogramPeak {
  x: number;
  y: number;
}

export interface AddSeriesOptions {
  /**
   * Force replacement of existing series.
   * If `false`, trying to add an already existing series will throw an error.
   * @default `false`
   */
  force?: boolean;
}

export interface FilterOptions {
  /**
   * Whether the method should return a copy of the chromatogram or modify it in-place.
   * @default `false`
   */
  copy?: boolean;
}

export interface GetPeaksOptions {
  /**
   * Filter all objects that are below `heightFilter` times the median of the height.
   * @default: `2`
   */
  heightFilter?: number;

  /**
   * Series to do the peak picking on
   * @default `'tic'`
   */
  seriesName?: string;
}

export interface GSDObject {
  from: number;
  to: number;
  fromIndex: number;
  toIndex: number;
  x: number;
  y: number;
  index: number;
}

export interface CalculateOptions {
  /**
   * Force the calculation if it already exists.
   * If `false`, calling the method more than once will have no effect.
   * @default `false`
   */
  force?: boolean;
}

export interface CalculateForMassOptions {
  /**
   * Name of the series where the result will be stored.
   * Defaults to an automatically generated name.
   */
  seriesName?: string;

  /**
   * Retrieve result from cache if it exists.
{'fraction_non_alphanumeric': 0.10565848773159739, 'fraction_numerical': 0.002754131196795193, 'mean_word_length': 3.2275132275132274, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6394431', 'n_tokens_mistral': 1234, 'n_tokens_neox': 1199, 'n_words': 429}