Package prompt :: Module dasha :: Class Dasha
[hide private]
[frames] | no frames]

Class Dasha

source code


Class for interfacing with the program Dasha.

Instance Methods [hide private]
 
create(self, algor='LM', dir=None, force=False)
Function for creating the Dasha script.
source code
 
execute(self, dir=None, force=False, binary='dasha')
Function for executing Dasha.
source code
 
extract(self, dir=None)
Function for extracting data from the Dasha results file.
source code

Inherited from base_class.User_fn_class: __init__

Method Details [hide private]

create(self, algor='LM', dir=None, force=False)

source code 
Function for creating the Dasha script.

Keyword Arguments
~~~~~~~~~~~~~~~~~

algor:  The minimisation algorithm.

dir:  The directory to place the files.

force:  A flag which if set to True will cause the results file to be overwritten if it
already exists.


Description
~~~~~~~~~~~

The script file created is called 'dir/dasha_script'.


Optimisation algorithms
~~~~~~~~~~~~~~~~~~~~~~~

The two minimisation algorithms within Dasha are accessible through the algor argument which
can be set to:

    'LM' - The Levenberg-Marquardt algorithm.
    'NR' - Newton-Raphson algorithm.

For Levenberg-Marquardt minimisation, the function 'lmin' will be called, while for Newton
-Raphson, the function 'min' will be executed.

execute(self, dir=None, force=False, binary='dasha')

source code 
Function for executing Dasha.

Keyword Arguments
~~~~~~~~~~~~~~~~~

dir:  The directory to place the files.

force:  A flag which if set to True will cause the results file to be overwritten if it
already exists.

binary:  The name of the executable Dasha program file.


Execution
~~~~~~~~~

Dasha will be executed as

$ dasha < dasha_script | tee dasha_results


If you would like to use a different Dasha executable file, change the keyword argument
'binary' to the appropriate file name.  If the file is not located within the environment's
path, include the full path in front of the binary file name.

extract(self, dir=None)

source code 
Function for extracting data from the Dasha results file.

Keyword Arguments
~~~~~~~~~~~~~~~~~

dir:  The directory where the file 'dasha_results' is found.