I am sure it does seem odd - I don't really know what I am doing - hence the 
question about where I can read about similar operations. I only know that I am 
trying to pull out sections of the vectors that line up with a specific 
$rtcRate and $time. The $rtcRate is a small enough number that I could loop 
through them and leave them in a where statement. The $time though would be a 
problem. 

Thanks

CLIFF SOBCHUK
Core RF Engineering
Phone 613-667-1974   ecn: 8109-71974
mobile 403-819-9233
yahoo: sobchuk
www.ericsson.com 

"The author works for Telefonaktiebolaget L M Ericsson ("Ericsson"), who is 
solely responsible for this email and its contents. All inquiries regarding 
this email should be addressed to Ericsson. The web site for Ericsson is 
www.ericsson.com."

This Communication is Confidential. We only send and receive email on the basis 
of the terms set out at www.ericsson.com/email_disclaimer


-----Original Message-----
From: Chris Marshall [mailto:[email protected]] 
Sent: November-28-10 4:39 PM
To: Clifford Sobchuk
Cc: [email protected]
Subject: Re: [Perldl] How to sum over sections of

On 11/28/2010 5:52 PM, Clifford Sobchuk wrote:
> Hi Folks, I am trying to manipulate some vectors and I can't get what I want.
> What I have is a list of vectors that are brought in via RCOLS:
>
> ($sector,$rtcRate,$subPack,$time,$badPhy, $goodMac, $goodPhy)
>
> I am trying to calculate a value on a per unit time where there are :
>
> $sectors = 1..3;
> $rtcRate = 1..12;
> $subPack = 1..4;
> $time = serialized number representing mmddYYYYHHMM; $badPhy = number 
> of bad physical packets per subpacket per rtcRate per sector.
> $goodMac = number of good MAC bytes subpacket per rtcRate per sector - 
> not used for this calculation $goodPhy = number of good physical packets per 
> subpacket per rtcRate per sector.
>
> Example of data:
> 1,1,1,111620100000,0.00,605865.00,46605.00
> 1,1,2,111620100000,0.00,46189.00,3553.00
> 1,1,3,111620100000,0.00,18616.00,1432.00
> 1,1,4,111620100000,273.00,9529.00,733.00
>
>
> What I need is to get a per sector throughput value per unit time where the 
> throughput is calculated as:
>
> rtcRatePacksize * Sum($goodPhy)/ (number of elements in a time capture) 
> across all $subPack for each $rtcRate per unit time.
>
> So the return vector should have throughput for each time change, like so:
> 203.234 111620100000
> 204.221 111620100030
> 220.111 111620100100
>
> My thought to do this was to create index vectors for the $sectors, $rtcRate, 
> $subPack and $time that were their uniq index values.
> $sectInd=uniq($sector);$rtcRateInd=uniq($rtcRate);$subPackInd=uniq($su
> bPack);$timeStamp=uniq($time);
>
> Then I would do:
>
> ($packRate)=where ($goodPhy, $sectors==$sectInd & $rtcRate=$rtcRateInd 
> & $subPack==$subPackInd & $time=$timeStamp)->sum();
>
> but I get the following error:
>
> Runtime error: PDL: PDL::Ops::eq(a,b,c): Parameter 'b'
> PDL: Mismatched implicit thread dimension 0: should be 48384, is 3
>
> So it seems I am not applying the indices correctly. Where can I find 
> examples of doing this sort of operation?

I'm not sure about the calculation but your use of $rtcRate=$rtcRateInd and 
$time=$timeStamp in the where() argument seems odd...

--Chris

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to