Changeset 4735 for trunk/Ohana/doc/www/html/Opihi-Programs/index.htm
- Timestamp:
- Aug 9, 2005, 5:15:14 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/doc/www/html/Opihi-Programs/index.htm (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/doc/www/html/Opihi-Programs/index.htm
r4734 r4735 28 28 <p> 29 29 The command-line interaction is based on the readline libraries and 30 behaves like #tcsh/#. Arrows can be used for editing. There is both30 behaves like <tt>tcsh</tt>. Arrows can be used for editing. There is both 31 31 command and file completion with the TAB key. You can also use 32 32 emacs-like commands such as ctrl-a to reach the beginning of the line … … 59 59 consist of the standard math operators (+,-,*,/) as well as any 60 60 already-defined variables and the functions log(), ln(), sqrt(), 61 exp(), ten() ($10^x$), sin(), cos(), etc. Other special operators are 62 the carret (^) for exponetiation (eg, 2^3 is 8) and the @ symbol as a 63 binary arc-tangent (eg, 1@3 is 18.43 degrees). In addition, the 64 operator #<</# returns the minimum of the two surrounding values, and 65 #>>/# returns the maximum. Variables can be numeric or character 66 strings. If the shell does not understand the syntax of the line as a 67 math expression, it is assumed to be a string. 61 exp(), ten() (10<sup>x</sup>), sin(), cos(), etc. Other special 62 operators are the carret (^) for exponetiation (eg, 2^3 is 8) and the 63 @ symbol as a binary arc-tangent (eg, 1@3 is 18.43 degrees). In 64 addition, the operator <tt><<</tt> returns the minimum of the two 65 surrounding values, and <tt>>></tt> returns the maximum. Variables 66 can be numeric or character strings. If the shell does not understand 67 the syntax of the line as a math expression, it is assumed to be a 68 string. 68 69 69 70 <em>local variables</em> … … 82 83 83 84 would give the response 7.07107 if $fred had the value of 10.0. There 84 are math functions #cos/#, #sin/#, and #tan/#, which operate on radian85 expressions, and also #dcos/#, #dsin/#, #dtan/#, which operate on85 are math functions <tt>cos</tt>, <tt>sin</tt>, and <tt>tan</tt>, which operate on radian 86 expressions, and also <tt>dcos</tt>, <tt>dsin</tt>, <tt>dtan</tt>, which operate on 86 87 degree expressions. There are also the equivalent inverse functions: 87 eg., #asin/# and #dasin/#return radians and degrees, respectively.88 eg., <tt>asin</tt> and <tt>dasin</tt> return radians and degrees, respectively. 88 89 The help section on Math defines all of the available math functions. 89 90 … … 130 131 131 132 <h4> queues </h4> 133 134 <pre> 135 queuelist -- list existing queues 136 queuesize -- return the length of the given queue 137 queueinit -- create a zero-length queues 138 queuedelete -- delete a queues 139 queuepush -- add an item to the end of the queue 140 queuepop -- remove and return the first item in the queue 141 </pre> 132 142 133 143 A queue is a data construct consisting of a sequence of lines from … … 267 277 exit -- exit program 268 278 help -- get help on a function 279 config -- reload configuration information 280 exit -- exit program 281 quit -- exit program 282 wait -- wait until return is typed 283 sleep -- sleep for N seconds 284 usleep -- sleep for N microseconds 285 which -- show command 286 cd -- change current working directory 287 pwd -- report current working directory 288 date -- return the current date 289 file -- test file existence 290 memory -- long listing of the allocated memory 291 version -- list version information 292 </pre> 293 294 Most of these commands should be clear from the simple descriptions 295 above, or from the online help. The command ?? prints the system 296 variables. The <tt>help</tt> command will provide help on a single 297 command or, without any arguments, will list all available help files 298 (this includes general help not associated with a specific command). 299 300 <h3> String Manipulation and other data commands </h3> 301 302 <pre> 303 local -- define local variables 269 304 output -- redirect output to file 270 quit -- exit program271 305 scan -- scan line from keyboard or file to variable 272 wait -- wait until return is typed 273 which -- show command 274 </pre> 275 276 Most of these are self-explanatory. The command ?? prints the system 277 variables. The <tt>help</tt> command will provide help on a single 278 command or, without any arguments, will list all available help 279 files (this includes general help not associated with a specific 280 command). 281 282 <em>output</em> 283 284 <em>scan</em> 285 286 <h3> 1D Data and the Graphing Window </h3> 287 288 <h3> Vector Plotting </h3> 306 sprintf -- formatted print to a variable 307 fprintf -- formatted print to standard output 308 getchr -- find character in string 309 strlen -- string length 310 substr -- substring 311 </pre> 312 313 These commands provide a few tools to manipulate data in opihi 314 variables. The #local/# command specifies that the given variable is 315 local to its macro. The #output/# command changes the default output 316 destination for functions which print results to the screen. This 317 function does not zero the file length; new output is appended to the 318 file. The command #scan/# reads specific lines from a file, an 319 optionally places them in an opihi variable (EOF is returned at the 320 end of a file). The group of commands #getchr/#, #strlen/#, and 321 #substr/# provide the ability to manipulate the elements of a string. 322 Finally, #sprintf/# and #fprintf/# perform formatted output to a 323 variable and to the screen, respectively. 324 325 <h3> Vectors</h3> 326 327 <h4>Vector Manipulation Functions</h4> 328 329 <pre> 330 create -- create a new vector 331 hist -- create histogram from a vector 332 print -- write vectors to file 333 vectors -- list vectors 334 accum -- accumulate vector values in another vector 335 applyfit -- apply fit to new vector 336 applyfit2d -- apply 2-d fit to new vector 337 circstats -- circular statistics 338 concat -- reduce vector dimension 339 datafile -- define file to read vectors 340 delete -- delete vectors or matrices 341 fft1d -- fft on the pixel-stream in an image 342 fit -- fit polynomial to vector pair 343 gaussdev -- generate a gaussian deviate vector 344 gaussint -- return the integrated gaussian vector 345 histogram -- generate histogram from vector 346 integrate -- integrate a vector 347 interpolate -- interpolate between vector pairs 348 vectors -- list vectors 349 medacc -- accumulate vector values in another vector 350 peak -- find vector peak in range 351 read -- read vectors from datafile 352 set -- image and vector math 353 sort -- sort list of vectors 354 subset -- expand vector dimension 355 uniq -- create a uniq vector subset from a vector 356 vbin -- bin values in a vector to be within a range 357 vclip -- clip values in a vector to be within a range 358 select -- selective vector assignment 359 vgauss 360 vgrid 361 vload -- load vectors on Kii 362 vstat -- get info from imreg database 363 vsmooth -- gaussian smooth of a vector 364 vroll -- roll vector elements 365 vpop -- remove first element 366 write -- write vectors to datafile 367 </pre> 368 369 <h4>The Graphing Window (Kapa)</h4> 289 370 290 371 <pre> 291 372 box -- draw a box on the plot 292 373 clear -- erase plot 293 create -- create a new vector294 374 cursor -- get coords from cursor 295 375 grid -- plot cartesian grid 296 hist -- create histogram from a vector297 376 labels -- define labels for plot 298 377 limits -- define plot limits 299 378 plot -- plot a pair of vectors 300 print -- write vectors to file301 379 ps -- define labels for plot 302 set -- vector math303 380 style -- set the style for graph plots 304 vectors -- list vectors305 381 zplot -- plot scaled points 382 device -- set / get current graphics device 383 jpeg -- write text line on graph 384 line -- plot line 385 dot -- plot a single point 386 resize -- set graphics/image window size 387 section -- define section of graph 388 textline -- write text line on graph 389 zplot -- plot x y with size scaled by z 306 390 </pre> 307 391 … … 314 398 315 399 <p> 316 In addition to scalar variables, <tt>status</tt> can manipulate and 317 display 1-D vector variables. Many of the commands which extract data 318 from the photometry database place the data in vectors as well as 319 plotting them. A vector can also be created based on a number 320 sequence with the command <tt>create name Nelements start delta</tt>. 321 The resulting vector has $Nelements$ entries, starting at a value of 322 $start$ and running until $start + delta*Nelements$. If $delta$ is 323 0.0, all elements will have the value of $start$. A histogram of a vector 324 may be made with the command <tt>hist</tt>, which creates a new vector 325 containing the histogram of the first vector. The data range and bin 326 size of the histogram are defined in same way as with create. This 327 makes it easy to create the index vector that goes with a histogram 328 vector: 400 A vector can be created based on a number sequence with the command 401 <tt>create name Nelements start delta</tt>. The resulting vector has 402 #Nelements/# entries, starting at a value of #start/# and running 403 until #start + delta*Nelements/#. If #delta/# is 0.0, all elements 404 will have the value of #start/#. A histogram of a vector may be made 405 with the command <tt>hist</tt>, which creates a new vector containing 406 the histogram of the first vector. The data range and bin size of the 407 histogram are defined in same way as with create. This makes it easy 408 to create the index vector that goes with a histogram vector: 329 409 330 410 <pre> … … 411 491 green, blue, and yellow overlays. 412 492 413 <h3> programming considerations </h3> 493 <h4>Image Manipulation Functions</h4> 494 495 <pre> 496 clip -- clip values in a buffer to be within a range 497 contour -- create contour from image 498 cut -- extract a cut across an image 499 extract -- extract a portion of a buffer into another buffer 500 fft2d -- fft on an image 501 fit2d -- fit 2-d polynomial to vector triplet 502 header -- print buffer header 503 imcut -- linear image cut between arbitrary coords 504 imhist -- histogram of an image region 505 imsmooth -- circular gaussian smoothing 506 kern -- convolve with 3x3 kernel 507 keyword -- extract a FITS keyword from buffer header 508 buffers -- list the currently allocated buffers 509 mcreate -- create a matrix 510 minterp -- interpolate image pixels 511 rd -- load fits image 512 rdseg -- read a segment of an image from a file 513 rebin -- rebin data by factor of N 514 roll -- roll image to new start point 515 rotate -- rotate image 516 set -- image and vector math 517 shift -- shift data in an image 518 spline.apply -- apply spline fit to generate an image 519 spline.const -- create spline 2nd deriv. terms 520 stats -- give statistics on a portion of a buffer 521 subraster -- subraster of fits image 522 unsign -- toggle the UNSIGN status 523 wd -- write an image to a file 524 zap -- delete pixels 525 </pre> 526 527 <h4>The Image Display Window (Kii)</h4> 528 529 <pre> 530 ps -- define labels for plot 531 center -- center image on coords 532 device -- set / get current graphics device 533 erase -- erase objects on an overlay 534 jpeg -- write text line on graph 535 load -- load an SAOimage style overlay 536 point -- load overlay with single point 537 save -- save an SAOimage style overlay 538 resize -- set graphics/image window size 539 tv -- display an image on the Kii window 540 tvcontour -- send contour to overlay 541 tvgrid -- wait until return is typed 542 </pre> 543 544 545 <h4>Other data functions</h4> 546 547 <pre> 548 gaussj -- solve Ax = B (N-D) 549 gridify -- convert vector triplet to buffer 550 ungridify -- convert buffer region to vector triplet 551 dimendown -- convert matrix to vector 552 dimenup -- convert vector to matrix 553 mget -- extract a vector from a matrix 554 mset -- insert a vector in a matrix 555 svd -- singular value decomposition of a matrix 556 swapbytes -- byte swap thing 557 </pre> 558 559 560 561 <h3> Programming Considerations </h3> 414 562 The programming structure of the Opihi front-end 415 makes it very easy to add commands to the package; more about this 416 later. 563 makes it very easy to add commands to the package.
Note:
See TracChangeset
for help on using the changeset viewer.
