Command-line interface

Every step can be run with sub-commands of the musered command. By default it supposes that the command is run in the directory containing the settings file, named settings.yml. Otherwise this settings file can be specified with --settings.

It is also possible to setup completion, or to run the subcommands in a REPL with musered repl (after installing click-repl).

musered

Main MuseRed command.

See the help of the sub-commands for more details.

By default musered tries to read a settings file (settings.yml) in the current directory. This file can also be set with --settings, or with the MUSERED_SETTINGS environment variable.

The logging level can be set in the settings file, and overridden with --loglevel.

musered [OPTIONS] COMMAND [ARGS]...

Options

--version

Show the version and exit.

--redversion <redversion>

version of the reduction (overrides the version in settings

--loglevel <loglevel>

log level (debug, info, warning, etc.)

--drslevel <drslevel>

log level for the DRS

--settings <settings>

settings file, default to settings.yml

--pdb

run pdb if an exception occurs

--debug

debug log level + pdb

Environment variables

MUSERED_SETTINGS

Provide a default for --settings

check-integrity

Test raw files checksum.

musered check-integrity [OPTIONS]

Options

--report

report integrity checks

clean

Remove data and database entries for a given recipe and dates.

musered clean [OPTIONS]

Options

-r, --recipe <recipe>
-d, --date <date>
-n, --night <night>
--force

nothing is done if this is not set

--keep-files

do not delete files

exp-align

Compute offsets between exposures.

musered exp-align [OPTIONS] DATASET

Options

--method <method>

method to use: drs (default) or imphot

--name <name>

output name, default to method

--params <params>

name of the parameters block

--filter <filter>

filter to use for the images (drs only): white (default), Johnson_V, Cousins_R, Cousins_I

--date <date>

exposure to process, by default all exposures are used

-f, --force

force re-processing (imphot only)

--dry-run

do not run the recipe

--njobs <njobs>

number of parallel process (imphot)

Arguments

DATASET

Required argument

exp-combine

Compute offsets between exposures.

musered exp-combine [OPTIONS] DATASET

Options

--params <params>

name of the parameters block

--method <method>

method to use: drs (default) or mpdaf. This can be overridden in the settings file.

--name <name>

output name, default to “{dataset}_{recipe}”

--dry-run

do not run the recipe

-f, --force

force re-processing

Arguments

DATASET

Required argument

info

Print info about raw and reduced data, or night or exposure.

musered info [OPTIONS]

Options

--datasets

list all datasets

--nights

list all nights

--runs

list all runs

--calibs

list calibration sequences

--exps

list all exposures

--qc <qc>

show QC keywords

--date <date>

show info for a given date

--run <run>

show info for a given run

--excluded

show excluded exps (for the main info report)

--tables <tables>

tables to show, comma-separated list, allowed values are raw, calib, and science. By default all tables are displayed.

--no-header

hide header

info-exp

Show reduction log for a night or exposure.

Example:

$ musered info-exp 2017-06-16T01:34:56.867

$ musered info-exp --night --short 2017-06-17
musered info-exp [OPTIONS] [EXP]...

Options

--night

show reduction log for a night

--short

shortened output for –exp

-r, --recipe <recipe>

recipe name to show

Arguments

EXP

Optional argument(s)

info-raw

Print a table with raw exposures.

The displayed files can be limited to the result of a query, with key:value items passed as arguments. Example:

$ musered info-raw DPR_CATG:CALIB night:2017-06-18
musered info-raw [OPTIONS] [SELECT]...

Arguments

SELECT

Optional argument(s)

info-warnings

Print warnings.

  • --mode summary prints a table with the number of warnings per recipe and exposure name.

  • --mode list prints the list of exposures with warnings, with the log filename.

  • --mode detail prints all warnings for each exposure.

musered info-warnings [OPTIONS]

Options

-m, --mode <mode>

display mode

Options

summary | list | detail

-d, --date <date>

show info for a given date

-r, --recipe <recipe>

recipe name to show

process-calib

Process calibrations (bias, dark, flat, etc.) for given nights.

By default, process calibrations for all nights, and all types except dark. Already processed calibrations are skipped unless using --force.

musered process-calib [OPTIONS] [DATE]...

Options

-f, --force

force re-processing nights

--dry-run

do not run the recipe

--bias

run muse_bias

--dark

run muse_dark

--flat

run muse_flat

--wavecal

run muse_wavecal

--lsf

run muse_lsf

--twilight

run muse_twilight

Arguments

DATE

Optional argument(s)

process-exp

Run recipes for science exposures.

By default, run scibasic, standard, and scipost, for all exposures. Already processed exposures are skipped unless using --force.

musered process-exp [OPTIONS] [DATE]...

Options

-f, --force

force re-processing exposures

--dry-run

do not run the recipe

--scibasic

run muse_scibasic

--standard

run muse_standard

--scipost

run muse_scipost

--makecube

run muse_scipost_make_cube

--superflat

run superflat

--zap

run zap

--fsf

run fsf for individual exposures

--params <params>

name of the parameters block

--dataset <dataset>

process exposures for a given dataset

Arguments

DATE

Optional argument(s)

retrieve-data

Retrieve files and/or calibrations from the ESO archive.

By default this will retrieve science files and associated calibrations, with the filters defined in the settings files. It is also possible to retrieve all the calibration files for a list of nights (with –calib) and for an instrument mode (–ins-mode).

Note that the definition of nights is different for MuseRed and for ESO:

  • for MuseRed, the 2017-06-19 night corresponds to the day calibrations of 2017-06-20

  • for ESO, the 2017-06-19 night corresponds to the day calibrations of 2017-06-19

Examples:

$ musered retrieve-data --start 2017-06-19 IC4406

$ musered retrieve-data --calib 2017-06-19 --ins-mode WFM-AO-N
musered retrieve-data [OPTIONS] [DATASET]...

Options

--username <username>

username for the ESO archive

--help-query

print query options

--dry-run

don’t retrieve files

--force

request all objects

--no-update-db

don’t update the database

--calib <calib>

retrieve only calibrations for a list of comma-separated nights (YYYY MM(M) DD)

--ins-mode <ins_mode>

instrument mode for calib retrieval

--start <start>

start date, to limit query results

--end <end>

end date, to limit query results

Arguments

DATASET

Optional argument(s)

shell

Starts an IPython shell.

musered shell [OPTIONS]

std-combine

Combine std exposures for a given run.

musered std-combine [OPTIONS] [RUN]...

Options

--params <params>

name of the parameters block

-f, --force

force re-processing

Arguments

RUN

Optional argument(s)

update-db

Create or update the database containing FITS keywords.

musered update-db [OPTIONS]

Options

-f, --force

force update for existing rows

update-qa

Update QA databases (qa_raw and qa_reduced).

musered update-qa [OPTIONS] [DATE]...

Options

--sky

update qa_reduced table with sky flux in B,V,R

--fsf

update qa_reduced table with FSF values

--sparta

update qa_raw table with average sparta seeing and GL

--imphot

update qa_reduced table with imphot values

--psfrec

run PSF reconstruction and update qa_raw table

--recipe <recipe>

recipe name

--band <band>

band to use for –imphot, default to F775W

--force

force update of database

--dry-run

don’t update the database

Arguments

DATE

Optional argument(s)

update-qc

Create or update the database containing QC keywords.

musered update-qc [OPTIONS]

Options

--type <type>

type of file to parse (DPR.TYPE)

--recipe <recipe>

recipe for which files are parsed

-f, --force

force update for existing rows