# Metrics from LPM-17 (the Science Requirements Document)
# http://ls.st/lpm-17

PA1:
  reference:
    doc: LPM-17
    url: http://ls.st/lpm-17
    page: 21
  description: >
    The maximum rms of the unresolved source magnitude distribution around the
    mean value (repeatability).
  operator: "<="
  specs:
    - level: design
      value: 5.0
      unit: mmag
      filter_names: [g, r, i, HSC-G, HSC-R, HSC-I]
    - level: design
      value: 7.5
      unit: mmag
      filter_names: [u, z, y, HSC-U, HSC-Z, HSC-Y]
    - level: minimum
      value: 8.0
      unit: mmag
      filter_names: [g, r, i, HSC-G, HSC-R, HSC-I]
    - level: minimum
      value: 12.0
      unit: mmag
      filter_names: [u, z, y, HSC-U, HSC-Z, HSC-Y]
    - level: stretch
      value: 3.0
      unit: mmag
      filter_names: [g, r, i, HSC-G, HSC-R, HSC-I]
    - level: stretch
      value: 4.5
      unit: mmag
      filter_names: [u, z, y, HSC-U, HSC-Z, HSC-Y]

PF1:
  reference:
    doc: LPM-17
    url: http://ls.st/lpm-17
    page: 21
  description: >
    The maximum fraction of magnitudes deviating by more than PA2 from mean (%).
  operator: "<="
  specs:
    - level: design
      value: 10.0
      unit: ''
      dependencies:
        - PA2
    - level: minimum
      value: 20.0
      unit: ''
      dependencies:
        - PA2
    - level: stretch
      value: 5.0
      unit: ''
      dependencies:
        - PA2

PA2:
  reference:
    doc: LPM-17
    url: http://ls.st/lpm-17
    page: 21
  description: >
    At most PF1 % of magnitudes may deviate by more than this from the mean
    (millimag).
  operator: "<="
  specs:
    - level: design
      value: 15.0
      unit: mmag
      filter_names: [g, r, i, HSC-G, HSC-R, HSC-I]
      dependencies:
        - PF1
    - level: design
      value: 22.5
      unit: mmag
      filter_names: [u, z, y, HSC-U, HSC-Z, HSC-Y]
      dependencies:
        - PF1
    - level: minimum
      value: 15.0
      unit: mmag
      filter_names: [g, r, i, HSC-G, HSC-R, HSC-I]
      dependencies:
        - PF1
    - level: minimum
      value: 22.5
      unit: mmag
      filter_names: [u, z, y, HSC-U, HSC-Z, HSC-Y]
      dependencies:
        - PF1
    - level: stretch
      value: 10.0
      unit: mmag
      filter_names: [g, r, i, HSC-G, HSC-R, HSC-I]
      dependencies:
        - PF1
    - level: stretch
      value: 15.0
      unit: mmag
      filter_names: [u, z, y, HSC-U, HSC-Z, HSC-Y]
      dependencies:
        - PF1

AM1:
  reference:
    doc: LPM-17
    url: http://ls.st/lpm-17
    page: 23
  description: >
    The maximum rms of the astrometric distance distribution for stellar pairs
    with separations of D=5 arcmin (repeatability) (milliarcsec).
  operator: "<="
  parameters:
    D: {value: 5.0, unit: arcmin}
    x: {value: 1}
  specs:
    - level: design
      value: 10.0
      unit: marcsec
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]
    - level: minimum
      value: 20.0
      unit: marcsec
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]
    - level: stretch
      value: 5.0
      unit: marcsec
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]

AM2:
  reference:
    doc: LPM-17
    url: http://ls.st/lpm-17
    page: 23
  description: >
    The maximum rms of the astrometric distance distribution for stellar pairs
    with separations of D=20 arcmin (repeatability) (milliarcsec).
  operator: "<="
  parameters:
    D: {value: 20.0, unit: arcmin}
    x: {value: 2}
  specs:
    - level: design
      value: 10.0
      unit: marcsec
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]
    - level: minimum
      value: 20.0
      unit: marcsec
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]
    - level: stretch
      value: 5.0
      unit: marcsec
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]

AM3:
  reference:
    doc: LPM-17
    url: http://ls.st/lpm-17
    page: 23
  description: >
    The maximum rms of the astrometric distance distribution for stellar pairs
    with separations of D=200. arcmin (repeatability) (milliarcsec).
  operator: "<="
  parameters:
    D: {value: 200.0, unit: arcmin}
    x: {value: 3}
  specs:
    - level: design
      value: 15.0
      unit: marcsec
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]
    - level: minimum
      value: 30.0
      unit: marcsec
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]
    - level: stretch
      value: 10.0
      unit: marcsec
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]

AF1:
  reference:
    doc: LPM-17
    url: http://ls.st/lpm-17
    page: 23
  description: >
    The maximum fraction of astrometric distances which deviate by more than
    ADx milliarcsec (see AMx) (%)
  operator: "<="
  parameters:
    D: {value: 5.0, unit: arcmin}
    x: {value: 1}
  specs:
    - level: design
      value: 10.0
      unit: ''
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]
      dependencies:
        - AD1
    - level: minimum
      value: 20.0
      unit: ''
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]
      dependencies:
        - AD1
    - level: stretch
      value: 5.0
      unit: ''
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]
      dependencies:
        - AD1

AF2:
  reference:
    doc: LPM-17
    url: http://ls.st/lpm-17
    page: 23
  description: >
    The maximum fraction of astrometric distances which deviate by more than
    ADx milliarcsec (see AMx) (%)
  operator: "<="
  parameters:
    D: {value: 20.0, unit: arcmin}
    x: {value: 2}
  specs:
    - level: design
      value: 10.0
      unit: ''
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]
      dependencies:
        - AD2
    - level: minimum
      value: 20.0
      unit: ''
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]
      dependencies:
        - AD2
    - level: stretch
      value: 5.0
      unit: ''
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]
      dependencies:
        - AD2

AF3:
  reference:
    doc: LPM-17
    url: http://ls.st/lpm-17
    page: 23
  description: >
    The maximum fraction of astrometric distances which deviate by more than
    ADx milliarcsec (see AMx) (%)
  operator: "<="
  parameters:
    D: {value: 200.0, unit: arcmin}
    x: {value: 3}
  specs:
    - level: design
      value: 10.0
      unit: ''
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]
      dependencies:
        - AD3
    - level: minimum
      value: 20.0
      unit: ''
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]
      dependencies:
        - AD3
    - level: stretch
      value: 5.0
      unit: ''
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]
      dependencies:
        - AD3

AD1:
  reference:
    doc: LPM-17
    url: http://ls.st/lpm-17
    page: 23
  description: >
    No more than AFx of the astrometric distances will deviate by more than
    this from the median (see AMx, AFx) (milliarcsec).
  operator: "<="
  parameters:
    D: {value: 5.0, unit: arcmin}
    x: {value: 1}
  specs:
    - level: design
      value: 20.0
      unit: milliarcsecond
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]
      dependencies:
        - AF1
    - level: minimum
      value: 40.0
      unit: milliarcsecond
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]
      dependencies:
        - AF1
    - level: stretch
      value: 10.0
      unit: milliarcsecond
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]
      dependencies:
        - AF1

AD2:
  reference:
    doc: LPM-17
    url: http://ls.st/lpm-17
    page: 23
  description: >
    No more than AFx of the astrometric distances will deviate by more than
    this from the median (see AMx, AFx) (milliarcsec).
  operator: "<="
  parameters:
    D: {value: 20.0, unit: arcmin}
    x: {value: 2}
  specs:
    - level: design
      value: 20.0
      unit: milliarcsecond
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]
      dependencies:
        - AF2
    - level: minimum
      value: 40.0
      unit: milliarcsecond
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]
      dependencies:
        - AF2
    - level: stretch
      value: 10.0
      unit: milliarcsecond
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]
      dependencies:
        - AF2

AD3:
  reference:
    doc: LPM-17
    url: http://ls.st/lpm-17
    page: 23
  description: >
    No more than AFx of the astrometric distances will deviate by more than
    this from the median (see AMx, AFx) (milliarcsec).
  operator: "<="
  parameters:
    D: {value: 200.0, unit: arcmin}
    x: {value: 3}
  specs:
    - level: design
      value: 30.0
      unit: milliarcsecond
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]
      dependencies:
        - AF3
    - level: minimum
      value: 50.0
      unit: milliarcsecond
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]
      dependencies:
        - AF3
    - level: stretch
      value: 20.0
      unit: milliarcsecond
      filter_names: [u, g, r, i, z, y, HSC-U, HSC-G, HSC-R, HSC-I, HSC-Z, HSC-Y]
      dependencies:
        - AF3

TE1:
  reference:
    doc: LPM-17
    url: http://ls.st/lpm-17
    page: 31
  description: >
    The averaged E1, E2, and Ex residual PSF ellipticity correlations
    must have median absolute value less than this for separations < 1 arcmin.
  operator: "<="
  parameters:
    D:
      value: 1.0
      unit: arcmin
      description: Separation distance
    bin_range_operator:
      value: "<="
      description: Specifies if we're looking at correlations less than D or greater than D.
    x: {value: 1}
  specs:
    - level: design
      value: 0.00002
      unit: ''
      filter_names: [r, i, HSC-R, HSC-I, HSC-Y]
    - level: minimum
      value: 0.00003
      unit: ''
      filter_names: [r, i, HSC-R, HSC-I, HSC-Y]
    - level: stretch
      value: 0.00001
      unit: ''
      filter_names: [r, i, HSC-R, HSC-I, HSC-Y]

TE2:
  reference:
    doc: LPM-17
    url: http://ls.st/lpm-17
    page: 31
  description: >
    The averaged E1, E2, and Ex residual PSF ellipticity correlations
    must have median absolute value less than this for separations > 5 arcmin.
  operator: "<="
  parameters:
    D:
      value: 5.0
      unit: arcmin
      description: Separation distance
    bin_range_operator:
      value: ">="
      description: Specifies if we're looking at correlations less than D or greater than D.
    x: {value: 2}
  specs:
    - level: design
      value: 0.00005
      unit: ''
      filter_names: [r, i, HSC-R, HSC-I, HSC-Y]
    - level: minimum
      value: 0.00003
      unit: ''
      filter_names: [r, i, HSC-R, HSC-I, HSC-Y]
    - level: stretch
      value: 0.00001
      unit: ''
      filter_names: [r, i, HSC-R, HSC-I, HSC-Y]
