IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 27, 2019, 11:22:02 AM (7 years ago)
Author:
eugene
Message:

extend cut function to apply alternate stats to the output vector; extend extract to allow source region to fall beyond bounds of input image; add commands antialias, kapamemory, match1d, mgaussdev, vsigmoid (fit a sigmoid), virls (irls on vector), vwtmean (weighted mean), vtransitions; extend medimage to report variance; fix error in rotate; update some tests; add vgauss -apply option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.data/test/cut.sh

    r16056 r41164  
    44 memtest1
    55end
     6
     7macro test2
     8
     9  mgaussdev z 50 100 0.0 1.0
     10
     11  cut z x y_sum    x 0 0 z[][0] z[0][]
     12  cut z x y_median x 0 0 z[][0] z[0][] -median
     13  cut z x y_mean   x 0 0 z[][0] z[0][] -mean
     14  cut z x y_inner  x 0 0 z[][0] z[0][] -inner
     15 
     16end
     17
     18macro checkrange
     19  if ($0 != 2)
     20    echo "USAGE: checkrange (Npts)"
     21    break
     22  end
     23
     24  $Npts = $1
     25  if ($Npts % 2)
     26    $Ncenter = int($Npts / 2)
     27    $Nquarter = int(0.25 * $Npts)
     28    $Ns = $Ncenter - $Nquarter
     29    $Ne = $Ncenter + $Nquarter
     30  else
     31    $Ncenter = int($Npts / 2) - 1
     32    $Nquarter = int(0.25 * $Npts)
     33    $Ns = $Ncenter - $Nquarter
     34    $Ne = $Ncenter + $Nquarter + 1
     35  end
     36  if ($Ns < 0)
     37    echo "error: Ns < 0: $Ns $Ncenter $Nquarter"
     38  end
     39  if ($Ne >= $Npts)
     40    echo "error: Ne >= Npts: $Ne $Ncenter $Nquarter"
     41  end
     42  echo "$Npts : $Ncenter : $Nquarter : $Ns $Ne"
     43  for i 0 $Npts
     44    echo $i {($i >= $Ns) && ($i <= $Ne)}
     45  end
     46end
     47
    648
    749# Test if cut works
     
    3779 end
    3880end
     81
     82macro memtest1
     83
     84 $i = 0
     85 mcreate tim 100 100
     86 cut tim xdir imx X 40 4 60 6
     87 # do one to set up memory that should stay used
     88
     89 memory check
     90 for i 0 100
     91   cut tim xdir imx X 40 4 60 6
     92 end
     93 memory check
     94   
     95 for i 0 100
     96   cut tim xdir imx y 40 4 60 6
     97 end
     98 memory check
     99   
     100 for i 0 100
     101   cut -median tim xdir imx X 40 4 60 6
     102 end
     103 memory check
     104   
     105 for i 0 100
     106   cut -median tim xdir imx y 40 4 60 6
     107 end
     108 memory check
     109   
     110 for i 0 100
     111   cut -mean tim xdir imx X 40 4 60 6
     112 end
     113 memory check
     114   
     115 for i 0 100
     116   cut -mean tim xdir imx y 40 4 60 6
     117 end
     118 memory check
     119   
     120end
Note: See TracChangeset for help on using the changeset viewer.