IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 16, 2020, 1:54:47 PM (6 years ago)
Author:
tdeboer
Message:

revert to working Ohana build

File:
1 edited

Legend:

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

    r41164 r41340  
    44 memtest1
    55end
    6 
    7 macro 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  
    16 end
    17 
    18 macro 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
    46 end
    47 
    486
    497# Test if cut works
     
    7937 end
    8038end
    81 
    82 macro 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    
    120 end
Note: See TracChangeset for help on using the changeset viewer.