okprof - utility script providing an interface to the Kite::Profile module.
The okprof script provides a simple user-interface to the Kite::Profile module. This allows 2D profiles to be loaded from files (Plotfoil format) and manipulated via various commands.
For a summary of usage and commands, type 'okprof -h'.
usage: okprof [options] filename [commands]
The script loads the profile data from the file specified by 'filename' and then performs the operations denoted by the 'commands' list. The script does not modify the original profile file and by default will simply load the data and exit.
Example: load the data from the file 'S2091' and print a summary.
$ okprof S2091 print Profile S2091-101-83 (S2091) length: 0.999 height: 0.107 62 co-ordinate pairs: n X Y -------------------------------------- 0: 1.00000000 0.00000000 1: 0.99674000 0.00035000 2: 0.98707000 0.00150000 3: 0.97126000 0.00367000 . . . . . . 60: 1.00001000 0.00000000 61: 1.00000000 0.00000000
Example: load the same file then print various information about the profile:
$ okprof ~/etc/airfoils/S2091 minx maxx miny maxy length height min x: 0.00058 max x: 1.00001 min y: -0.01939 max y: 0.08804 length: 0.99943 height: 0.10743
A number of commands are provided for manipulating the profile. These only affect the profile data held in memory and do not modify the original file. The various commands that display profile information (e.g. print, minx, length, etc.) send their output to STDERR. The 'output' command generates the (modified) profile data in Plotfoil format and prints it to STDOUT. This allows the script to be used as a simple filter.
Example: load profile, normalise (ensure length = 1), scale by 450, send output to 'newfile.ps', printing the length (to STDERR) before and after, for information purposes.
$ okprof S2091 length normal scalex 450 length output > newfile length: 0.99943 length: 450
The -i option puts the script into interactive mode. After loading the profile and executing any commands specified on the command line, a prompt is printed and further commands can be entered.
$ okprof -i S2091 length length: 0.99943 okprof>
All output from the interactive session (except for the 'output') command is sent to STDERR. Thus, it is possible to run an interactive session while still redirecting the modified data (generated by 'output' command) to a file.
$ okprof -i S2091 > newfile okprof> normal scalex 450 output okprof> quit
Type 'help' or '?' for help and 'quit' or 'q' to quit.
The -v option sets verbose mode.
The -d option sets debug mode.
Andy Wardley <abw@kfs.org>
$Revision: 1.4 $
Copyright (C) 2000 Andy Wardley. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Kite::Profile
To install Kite, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Kite
CPAN shell
perl -MCPAN -e shell install Kite
For more information on module installation, please visit the detailed CPAN module installation guide.