Command line tools

Catalogue processing

4MOST command line Exposure Time Calculator

This tool processes a target catalog and adds the estimated exposure times for dark, gray and bright nights as extra columns TEXP_D, TEXP_G, TEXP_B, and TEXP_S respectively.

usage: tools/process_catalogue [-h] [-C] [-f] [-n] [-p procs] [-y survey.yml]
                               [-c catalog.fits] [-R rulesets.csv]
                               [-r rules.csv] [-t dir] [-o result.fits]

Named Arguments

-C, --check

only check catalogue integrity

Default: False

-f, --force

force processing even with consistency problems

Default: False

-n, --no-progress

disable progress dots

Default: False

-p, --processes

number of parallel processes

Input files

Either a config file must me given or all files must be specified individually.

-y, --config

run configuration file (YAML)

-c, --catalog

target catalogue (FITS)

-R, --ruleset

rulesets file (CSV)

-r, --rules

rules file (CSV)

-t, --templates

templates directory

-o, --output

output catalog (FITS)

Exit codes

There are the following possible exit states of the ETC:

  • 0: all is OK: result catalog is created

  • 1: consistency check fails; no result catalog is created

  • 1: other failures (input files not readable, output file not writeable, a signal etc.); stacktrace generated

  • 2: something unexpected happened during the calculation of an exposure time. These times are set to -1

If the exit status is not zero, the standard output should be checked for more information.

Debugging individual targets

4MOST command line ETC result debugging tool

This tool processes one target from a catalogue and prints some intermediate values for all rules on the way to estimate the exposure time.

usage: tools/debug_target [-h] [-V] [-y survey.yml] [-c catalog.fits]
                          [-R rulesets.csv] [-r rules.csv] [-t dir] [-n NAME]
                          [-i INDEX] [-m {dark,grey,bright,superbright}]

Named Arguments

-V, --version

show program’s version number and exit

Input files

Either a config file must me given or all files must be specified individually.

-y, --config

Run configuration file (YAML)

-c, --catalog

Target catalogue (FITS)

-R, --ruleset

Rulesets file (CSV)

-r, --rules

Rules file (CSV)

-t, --templates

Templates directory

Target selection

Either a unique target name or the target index must be specified.

-n, --name

Target name in catalogue to investigate

-i, --index

Target index in catalogue to investigate (start with 1)

Observation conditions

-m, --moon

Possible choices: dark, grey, bright, superbright

Moon brightness (default: dark)

Default: 'dark'

Example

$ debug_target -y qmostetc/tests/conf.yml -i 1
Catalog:       qmostetc/tests/targets.fits
Name:          example (row #1)
Template:      Pickles_G0V, reddening 0.0 mag, z=0.00
Declination:   32.0 deg --> typical airmass 1.91, seeing 1.179 arcsec
Shape:         point
Magnitude:     20.000 mag(VEGA) / Generic_Johnson.V
Moon:          dark
Spectrograph:  LRS
Exposure time: 107.86 min / 4 exposure(s)

Ruleset Test1LR: Seng1_LR_blue and Seng2_LR_red
  Seng1_LR_blue = median(snr[515.0 … 520.0 nm], binning=0.1 nm) > 10.0
  Seng2_LR_red = median(snr[849.0 … 867.5 nm], binning=0.1 nm) > 10.0

Value           | Seng1_LR_blue | Seng2_LR_red  |  Unit
----------------|---------------|---------------|--------------------
Wavelength      | 515.0 … 520.0 | 849.0 … 867.5 | nm
Energy flux     | 3.49663e-12   | 1.87694e-12   | erg nm⁻¹ s⁻¹ m⁻²
Photon flux     | 0.913303      | 0.810427      | ph nm⁻¹ s⁻¹ m⁻²
----------------|---------------|---------------|--------------------
Atm. tramsmiss. | 0.772298      | 0.946675      |
Effective area  | 7.46712       | 7.46712       | m²
Target seeing   | 1.17105       | 1.05835       | ″
Fiber fraction  | 0.425838      | 0.425838      |
Throughput      | 3.08433       | 3.3025        | m²
Mean loss       | 1.38082       | 1.08016       | mag
Fiber flux      | 2.18032       | 2.53309       | ph nm⁻¹ s⁻¹
----------------|---------------|---------------|--------------------
Sky flux        | 0.216065      | 0.591362      | ph nm⁻¹ s⁻¹ ″⁻² m⁻²
Flat throughput | 11.9847       | 11.9847       | ″² m²
Sky fiber flux  | 2.57948       | 7.08739       | ph nm⁻¹ s⁻¹
----------------|---------------|---------------|--------------------
Bin width       | 0.0296152     | 0.0426558     | nm
Efficiency      | 0.339892      | 0.30435       | e⁻ ph⁻¹
CCD target flux | 0.0216077     | 0.0326935     | e⁻ s⁻¹
CCD sky flux    | 0.0260334     | 0.102376      | e⁻ s⁻¹
----------------|---------------|---------------|--------------------
Target response | 139.3         | 211.587       | e⁻
Sky response    | 168.433       | 664.03        | e⁻
Readout noise   | 10.6121       | 9.93401       | e⁻
Total noise     | 20.923        | 31.5681       | e⁻
SNR             | 6.6009        | 6.53119       |
----------------|---------------|---------------|--------------------
Rule bin width  | 0.1           | 0.1           | nm
Target/rule bin | 470.354       | 495.95        | e⁻
Noise/rule bin  | 38.4473       | 48.3347       | e⁻
SNR / rule bin  | 12.1296       | 10.0001       |
----------------|---------------|---------------|--------------------