Inherits CommandParser.
|
| Interpreter () |
| default constructor
|
|
| Interpreter (int &argc, char **&argv) |
| construct from command line arguments
|
|
| ~Interpreter () |
| destructor
|
|
bool | evaluate (const std::string &expression) |
| Evaluate a boolean expression.
|
|
void | set (Archive *data) |
| set the current Archive
|
|
Archive * | get () |
| get the current Archive
|
|
bool | has () const |
| return true if there is a current Archive
|
|
void | setmap (const std::string &name, Archive *data) |
| set the named Archive
|
|
Archive * | getmap (const std::string &name, bool throw_exception=true) |
| get the named Archive
|
|
Status | get_status () const |
| get the status after the last command
|
|
void | set_reply (bool f) |
| set to false to disable the 'ok' reply
|
|
std::string | get_report (const std::string &args) |
| get plugin information
|
|
std::string | load (const std::string &args) |
| load an archive from disk to top of stack and optionally the map
|
|
std::string | unload (const std::string &args) |
| write an archive from either the top of the stack or the map
|
|
std::string | push (const std::string &args) |
| push a clone of the current stack top onto the stack
|
|
std::string | pop (const std::string &args) |
| pop the top of the stack
|
|
std::string | set (const std::string &args) |
| set the name of the current archive
|
|
std::string | get (const std::string &args) |
| get the named archive
|
|
std::string | remove (const std::string &args) |
| remove the named archive from the map
|
|
std::string | clone (const std::string &args) |
| clone the current archive
|
|
std::string | convert (const std::string &args) |
| convert the current archive or a named archive to a different class
|
|
std::string | extract (const std::string &args) |
| extract part of the current archive
|
|
std::string | echo (const std::string &args) |
| evaluate any expressions and print result
|
|
std::string | edit (const std::string &args) |
| edit the current archive
|
|
std::string | system (const std::string &args) |
| execute a shell command More...
|
|
std::string | test (const std::string &args) |
| test a boolean expression More...
|
|
std::string | config (const std::string &args) |
| edit the configuration parameters
|
|
std::string | append (const std::string &args) |
| append one archive to another
|
|
std::string | freq_append (const std::string &args) |
| append one archive to another in frequency direction
|
|
std::string | shuffle (const std::string &args) |
| randomly rearrange sub-integrations
|
|
std::string | fscrunch (const std::string &args) |
| frequency scrunch an archive in the stack
|
|
std::string | tscrunch (const std::string &args) |
| time scrunch an archive in the stack
|
|
std::string | pscrunch (const std::string &args) |
| poln scrunch an archive in the stack
|
|
std::string | state (const std::string &args) |
| convert the state of the data
|
|
std::string | invint (const std::string &args) |
| form the Stokes invariant interval profile
|
|
std::string | bscrunch (const std::string &args) |
| bin scrunch an archive in the stack
|
|
std::string | fold (const std::string &args) |
| fold an archive in the stack
|
|
std::string | centre (const std::string &args) |
| centre an archive in the stack
|
|
std::string | dedisperse (const std::string &args) |
| dedisperse an archive in the stack
|
|
std::string | defaraday (const std::string &args) |
| correct for faraday rotation
|
|
std::string | weight (const std::string &args) |
| weight each profile according to the named scheme
|
|
std::string | scale (const std::string &args) |
| scale each profile by the specified value
|
|
std::string | offset (const std::string &args) |
| offset each profile by the specified value
|
|
std::string | rotate (const std::string &args) |
| rotate each profile by the specified value
|
|
std::string | dynspec (const std::string &args) |
| compute dynamic spectrum of archive on stack
|
|
std::string | correct_instrument (const std::string &args) |
| correct for parallactic angle effects
|
|
std::string | scattered_power_correct (const std::string &args) |
| apply scattered power corrections
|
|
std::string | image_correct (const std::string &args) |
| apply image pulse correction
|
|
std::string | screen_dump (const std::string &args) |
| dump the raw data points to the screen
|
|
std::string | toggle_clobber (const std::string &args) |
| toggle the clober flag
|
|
std::string | toggle_evaluate (const std::string &args) |
| toggle the evaluate flag
|
|
void | import (Extension *) |
| Import the Extension.
|
|
void | import (Extension *, const std::string &command, const std::string &help) |
| Import a nested Extension.
|
|
Pulsar data processing command language interpreter.
The Interpreter class is a command language interpreter that provides access to PSRCHIVE data processing algorithms.
The Interpreter maintains a stack and a named list (map) of Pulsar::Archive instances. Archives in the stack provide a convenient history mechanism, and Archives in the map are referenced by name, a single keyword.
All operations perform on the top of the stack. The only exceptions to this rule are the load and unload methods, which may operate directly on named archives in the map. The contents of both the stack and the map can be modified by adding Archives from file, copying Archives or subsets of Archives from other Archives in memory and finally by deleting Archives from memory. At any stage, the top of the stack or any of the Archives in the map can be saved to disk.
Commands that create copies of existing data (push, clone and extract) can accept the name of an Archive in the map as the first argument. The append command requires the name of the Archive in the map that is to be appended to the top of the stack. In all cases, the result of the operation affects the top of the stack.