starlink.wrapper¶
starlink.wrapper: A module for running Starlink commands from python.
This uses subprocess.Popen to run Starlink commands, and therefore requires a separate working installation of the Starlink Software Suite.
You must specify the location of your Starlink installation by eitherj
- a) setting $STARLINK_DIR to the location of your Starlink installation before running Python.
- b) running the command starlink.wrapper.change_starpath after importing the module.
This module allows you to use standard keyword arguments to call the starlink commands. Shell escapes do not need to be used.
By default, when you run commands using this module it will create a new temporary ADAM directory in the current folder, and use that as the ADAM directory for the starlink processes. In order to avoid returning values from a previous run, it will delete the <commandname>.sdf files from the ADAM directory after reading them back in. This also means it will not remember which options you used on the previous call to the command (unlike the command line Starlink).
This code was written to allow quick calling of kappa, smurf and cupid in a more ‘pythonic’ way.
Functions
change_starpath(starlinkdir) |
Change the $STARLINK_DIR used by this module. |
oracdr(instrument[, loop, dataout, datain, …]) |
Run oracdr on a batch of files. |
oracdr_envsetup(instrument[, utdate, …]) |
Setup the various ORAC-DR environmental variables. |
picard(recipe, files[, dataout, recpars, …]) |
Run a picard recipe on a group of files. |
setup_starlink_environ(starpath, adamdir[, …]) |
Create a suitable ENV dict to pass to subprocess.Popen. |
starcomm(command, commandname, *args, **kwargs) |
Execute a Starlink application |
subprocess_setup() |
Classes
oracoutput(runlog, outdir, datafiles, …) |
Exceptions
StarError(command, arg, stderr) |