ESOREX(1)
π esorex(1) β ESO Recipe Execution Tool π
okay so this is the User Commands section of the manual, bestie. buckle up, it's a long one and it EATS. π₯
πΈ NAME πΈ
esorex β the ESO Recipe Execution Tool. that's it, that's the name, iconic behaviour honestly π
β¨ SYNOPSIS β¨
esorex [esorex-options] recipe [recipe-options] sof
there it is. options, then a recipe, then recipe options, then the sof. in that order. slay. π
π¦ DESCRIPTION π¦
EsoRex is the ESO Recipe Execution Tool. bestie it can list, configure and execute CPL-based recipes straight from the command line. no GUI, no mouse, just vibes β¨
so here's the lore: one of the features CPL gives you is the ability to make data-reduction algorithms that run as plugins (aka dynamic libraries). these little guys are called recipes</>, and ngl they're likeβ¦ one of the main characters of the whole CPL data-reduction development environment π«Ά
the catch? because these recipes are dynamic libraries, you literally cannot run them directly from the command line. not possible. so ESO provides a few tools to do it for you, which saves recipe developers from having to write that whole application themselves. one of those tools is GASGANO (the GUI-based one) and the other is EsoRex, which runs from the command line β and that's the one we're describing right here. periodt. π
π OPTIONS π
every single one of these can also be set through an environment variable, and every default is in the brackets. iykyk.
--helpβ display this help and exit. and if you also gave a recipe name? then you get help for that recipe too, as a little treat. [TRUE]--versionβ display version information and exit. [FALSE]--check-sof-existβ when TRUE, every single input file has to exist and be readable before the recipe gets called. no sneaky missing files allowed bestie π« this one can also be set with the environment variableESOREX_CHECK_SOF_EXIST. [FALSE]--configβ the configuration file to use for EsoRex. can also be set with the environment variableESOREX_CONFIG. []--create-configβ creates a configuration file for Esorex. if it's set to TRUE, a config file calledesorex.rcgets created in the.esorexdirectory inside the user's$HOME. if you give a filename, then the config file gets created accordingly instead. and if you gave a recipe on the command line, then the config file gets created for the recipe instead β that one's calledrecipename.rc. β οΈ heads up: an existing file will be overwritten, but a backup gets copied tofilename.rc.bakin the same directory, so breathe. and if the filename ends with the.jsonextension, a machine-readable JSON format is used instead. can also be set with the environment variableESOREX_CREATE_CONFIG. [FALSE]--link-dirβ the directory where a symbolic link to each of the product files should be written. the actual on/off switch for whether that link gets made at all is the--suppress-linkoption. can also be set with the environment variableESOREX_LINK_DIR. [/tmp]--log-dirβ directory where the logfile goes. can also be set with the environment variableESOREX_LOG_DIR. [.]--log-fileβ filename of the logfile. can also be set with the environment variableESOREX_LOG_FILE. [esorex.log]--log-levelβ controls the severity level of messages printed to the logfile. can also be set with the environment variableESOREX_LOG_LEVEL. values:<debug | info | warning | error | off>[info]--no-datamd5β disables the computation of the MD5 data hash for FITS product files. can also be set with the environment variableESOREX_NO_DATAMD5. [FALSE]--no-checksumβ disables the computation of the standard FITS product checksums. can also be set with the environment variableESOREX_NO_CHECKSUM. [FALSE]--man-pageβ display a manual page for the specified recipe, then exit. note that this option only applies to recipes, and it does absolutely nothing for esorex by itself. see also the--helpoption. can also be set with the environment variableESOREX_MAN_PAGE. [FALSE]--mem-checkβ report on memory status at completion of recipe execution. can also be set with the environment variableESOREX_MEM_CHECK. [FALSE]--msg-levelβ controls the severity level of messages printed to the terminal. can also be set with the environment variableESOREX_MSG_LEVEL. values:<debug | info | warning | error | off>[info]--output-dirβ the directory where the product files should be finally moved to. and yes, every product is first created in the current dir and then relocated, that's just how it is. can also be set with the environment variableESOREX_OUTPUT_DIR. [.]--output-prefixβ prefix applied to any output file. for example, specifyingprewould translatefilename.fitsintopre_0000.fits. β¨ see also the--suppress-prefixoption. can also be set with the environment variableESOREX_OUTPUT_PREFIX. [out]--output-readonlyβ when TRUE, any existing product files in the specified output directory get set to read-only, for user, group and other. if FALSE, then EsoRex uses the default permissions for that account/directory.destroy any pre-existing files.this option exists for the Paranal operations environment. this option can additionally be used to prevent EsoRex from overwriting pre-existing files. can also be set with the environment variableESOREX_OUTPUT_READONLY. [FALSE]--paf-configβ configuration file for creation of PAF files (deprecated π¬). can also be set with the environment variableESOREX_PAF_CONFIG. []--paramsβ list the input parameters and their current settings (whether they came from the command line or a configuration file) for the esorex application. parameters are labelled using the parameter's alias. and if you also specified a recipe, then the list of its parameters gets generated in the same way too. can also be set with the environment variableESOREX_PARAMS. [FALSE]--products-sofβ output file which contains the FITS files created by the recipe. if the filename ends with the.jsonextension then a machine-readable JSON format will be used. can also be set with the environment variableESOREX_PRODUCTS_SOF. []--recipesβ display a list of all available recipes (the ones that are available in the directory tree specified with--recipe-dir). can also be set with the environment variableESOREX_RECIPES. [FALSE]--recipe-configβ configuration file for any selected recipe. can also be set with the environment variableESOREX_RECIPE_CONFIG. []--recipe-dirβ directory containing recipe libraries. ngl this one goes feral: esorex will recursively search not only the directory you specified, but every single sub-directory below it as well π multiple directory heads may be specified by separating the starting paths with colons (:). can also be set with the environment variableESOREX_PLUGIN_DIR. [.]--show-hiddenβ when TRUE, recipe parameters that the recipe declared as hidden get shown in the output of the help and man page options. π the hidden ones. revealed. [FALSE]--suppress-linkβ when TRUE, no symbolic link is created to the output product. but if FALSE, then a symbolic link gets created in the directory specified with the--link-diroption, for each product the recipe creates. can also be set with the environment variableESOREX_SUPPRESS_LINK. [TRUE]--suppress-prefixβ when TRUE, the original name of the output product, exactly as produced by the recipe, is maintained. if FALSE, then the name of the output file gets changed to theprefix_numberformat, and you can change that prefix with the--output-prefixoption. can also be set with the environment variableESOREX_SUPPRESS_PREFIX. [FALSE]--timeβ measure and show the recipe's execution time β±οΈ can also be set with the environment variableESOREX_TIME. [FALSE]--unload-pluginβ when TRUE, the plugin is unloaded after execution. if FALSE, the plugin is not unloaded after processing, which is the move when you want software like, e.g.,valgrindto be able to debug the executed recipe. π can also be set with the environment variableESOREX_UNLOAD_PLUGIN. [TRUE]
π ENVIRONMENT π
all options can be set as environment parameters as well. bestie, literally all of them. see the previous paragraph for the details π
π FILES π
/etc/esorex.rc$HOME/.esorex/esorex.rcβ default configuration files.
the configuration file contains the EsoRex options, minus the -- switch, but prefixed with esorex.caller.. blank lines are ignored, and any line beginning with # is treated as a comment. π
here's an example configuration file:
# Example EsoRex configuration file
#
esorex.caller.recipe-dir=/home/username/EsoRex/Plugins
esorex.caller.log-dir=.
esorex.caller.log-file=esorex.log
esorex.caller.log-file=esorex.log
esorex.caller.output-dir=.
esorex.caller.output-prefix=out_
(yes the log-file line is in there twice in the example. we don't ask questions, we just respect the icon π
)
filename.sofβ a sof file contains a list of the input data. this data is specified in a sof file (which is, and i cannot stress this enough, just a text file πΈ), where each input file is specified with its associated classification and category. the format of each line in the sof file is as follows:
full-path-to-file classification
optionally, a third column may be provided. the permitted values are either RAW or CALIB. this is for when a recipe does not identify the type of input file β but since all ESO recipes are required to do so, this column is typically not needed. so like, it's the emergency backup column. π«Ά
an example sof file, for the mythological "ZIMOS" instrument, might look like this:
/data/mos/ZIMOS.03-12-26T01:05:06.fits MOS_SCIENCE
/data/mos/ZIMOS.03-12-26T01:26:00.fits MOS_SCIENCE
/data/mos/ZIMOS.03-12-26T01:47:04.fits MOS_SCIENCE
/data/cal/master_bias4.fits MASTER_BIAS
/data/cal/grs_LR_red.3.tfits GRISM_TABLE
/data/gasgano/extract_table2.fits EXTRACT_TABLE
/data/cal/badpixel.3.tfits CCD_TABLE
for a concrete example for a specific instrument, go check the documentation for that instrument. π§
π«Ά HINTS π«Ά
okay bestie, this is the part where I hold your hand through the little traps that are absolutely real and absolutely annoying. no gatekeeping here π
π File permissions
so listen. if you're using a recipe with the --suppress-prefix option, AND --output-dir is pointing at the current working directory, then here's the tea: the first run of that recipe works fine. cute. but the subsequent runs? they may just fail on you π
why tho? because output products get handed read-only permission β and it's genuinely on purpose, to avoid the potential inadvertent loss of products. precious little files, they're protected π₯Ί. but the recipe itself can't modify those permissions, so when it tries to create the file again, it just... can't. it fails.
the solution (yes, beyond just using a different output directory or different prefixes) is to change the permission of those output files, or delete them, before you run that recipe again. do that and you're slaying again β¨
and btw this whole situation is less likely to bite you in EsoRex v2+, because--output-overwritegot replaced with--output-readonly(which is disabled by default, thank u). but a determined user can still absolutely end up here β and if you do, those non-readable products need their permissions changed, exactly like I said above. no cap.
βοΈ Configuration files
when you're creating configuration files, the vibe check is this:
- if the recipe is provided on the command line, then EsoRex generates the configuration file for that recipe π
- if no recipe name is given, then EsoRex generates a configuration file for EsoRex itself πΈ
and where do all these config files live? every single one of them gets written in the $HOME/.esorex/ directory. that's the spot. that's their home. periodt π
π§ Memory checking
you wanna know if the recipe you're running is leaking memory? iconic of you honestly. just enable the --mem-check option and EsoRex will do exactly that π
then, at the conclusion of the recipe execution β and after memory deallocation β a list of all remaining allocated memory gets printed to your screen. that's your receipt π§Ύ
and if there are no memory leaks? then no additional output is displayed. silence is golden, bestie π
π REPORTING BUGS π
found something broken? it's not your fault, I promise. report bugs to <cpl-help@eso.org>. that's the address, write it down, send the email π
π COPYRIGHT π
Copyright 2003-2024, European Southern Observatory.
okay that's the whole page, bestie, you made it to the end π this was esorex, part of EsoRex, and the page you just read is dated July 2026 β¨ go forth and reduce your spectra, you absolute main character π
π¦
π¦ where this page comes from
- ubuntu stonking: esorex 3.13.11+ds-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms