# Detector settings commands

Commands to setup the settings of the detector

- settingsdir [dir] Sets/gets the directory where the settings files are located (string)

- trimdir [dir] obsolete `settingsdir`

- caldir [dir] Sets/gets the directory where the calibration files are located (string)

- trimen [n e0 e1...e(n-1)] Sets/gets the number of energies n at which the detector has default trim file and their values in eV (int)

- settings [s] sets/gets the settings of the detector. Options: `standard`, `fast`, `highgain`, `dynamicgain`, `lowgain`, `mediumgain`, `veryhighgain`, `lownoise`, `dynamichg0`, `fixgain1`, `fixgain2`, `forceswitchg1`, `forceswitchg2`.
  In Eiger, only sets in client shared memory. Use `threshold` or `thresholdnotb` to pass to detector. Gets from detector.

- threshold [eV] [sett] sets/gets the detector threshold in eV. sett is optional and if provided also sets the settings. Use this for Eiger instead of `settings`.

- thresholdnotb [eV] [sett] sets/gets the detector threshold in eV without loading trimbits. sett is optional and if provided also sets the settings. Use this for Eiger instead of `settings`.

- trimbits [fname] loads/stores the trimbits to/from the detector. If no extension is specified, the serial number of each module will be attached.

- trim:[mode] [fname] trims the detector according to mode and saves resulting trimbits to file. Mode: noise, beam, improve, fix. Used in MYTHEN only. Only put!

- trimval [i] sets all trimbits to i. Used in EIGER only.

- pedestal [i] starts acquisition for i frames, calculates pedestal and writes back to fpga. Used in GOTTHARD only. Only put!