How to downsample (with averaging) by a non-integer factor?

I am collecting data from a photomultiplier at 10MHz (from NI-PXI6115), to
produce an image in which
each pixel will be the average of several samples. That is trivial if the
number of samples per pixel is an
integer. But I need to be able to have the pixels created from an arbitrary
DBL, like 3.5845 samples per
pixel. (This is to satisfy the constraints of fast mirrors scanning a laser
to
produce the light collected by
the PMT)
I can't seem to find any VI that does this. How can I do this, and do it
quickly (images are coming in from
this 10MHz stream continuously, at about 10 FPS, and should be displayed
continuously). I did find a vi to
"align and resample" the data, but that does not seem to be able to take a
running average. There is also
the "decimate" command, which only decimates by an integer value.
I am collecting data from a photomultiplier at 10MHz (from NI-PXI-6115), to produce an image in which each pixel will be the average of several samples. That is trivial if the number of samples per pixel is an integer. But I need to be able to have the pixels created from an arbitrary
DBL, like 3.5845 samples per pixel. (This is to satisfy the constraints of fast mirrors scanning a laser to produce the light collected by the PMT)
I can't seem to find any VI that does this. How can I do this, and do it quickly (images are coming in from this 10MHz stream continuously, at about 10 FPS, and should be displayed continuously). I did find a vi to "align and resample" the data, but that does not seem to be able to take a running average. There is also the "decimate" command, which only decimates and averages an integer number of array elements (samples). All that I and an NI engineer came up with so far is to first upsample with interpolation by a large factor, then do the decimation with an integer that is my desired DBL multiplied by the upsampling factor. Any more efficient ways do approximate this? Which specific VIs to use?
Thanks,
Steve Potter

Have you tried the "Resample (constant to constant)" VI in the Signal Processing/Signal Operation palette?  This uses a filter to allow resampling of the signal at an arbitrary dt.  If you need a variable dt (i.e. your sampling rate changes with time), you could try fitting some function (say a cubic or bezier or spline) to the input data and then interpolating values at your desired locations.

Similar Messages

  • How to deal with Portal, Workshop, and non-BEA software?

    Hi,
    I'm really new to working with portal, and have looking into integrating a single sign-on software (RSA ClearTrust) into existing portal code.
    The ClearTrust installation involves installation of a bunch of software that integrates with the portal software, but I found that if the portal code was developed with Workshop, that if Workshop is run again after the ClearTrust integration has been done, that Workshop appears to overwrite some of the XML configuration files (e.g., web.xml).
    The result of this is that the WebLogic server won't start.
    So, I was wondering if anyone here has had to deal with this kind of situation, not necessarily with ClearTrust specifically, but maybe with other products?
    I'm not looking forward to re-doing the integration everytime someone makes some portal code changes :(...
    Thanks in advance,
    Jim

    There are really two types of Graphic Styles - Object level styles and Group level styles. There is no way to tell which style is which. So if you have an Object level Style and try to apply it to a group of objects or often a compound shape, you get each individual object having the style. If you have a Group level style and try to apply it to only an object, you often get nothing applied.
    It perhaps sounds like you have an Object level style and are trying to apply it to a group.
    There's no way to convert an Object level style to a Group level style or vice versa. The best (and pretty much only) way I've found to get around this is to apply the style to teh correct level then make a note of all the style settings, select the other level and recreate the style for that level.
    Whether or not a style applies correctly has a great deal to do with specific aspects of the style in addition to what level the style was generated from. This is a frustrating aspect of Graphic Styles.

  • How to deal with Sum of Averages problem in BPC

    Hi All
    I have a situation where I am trying to calculate Averages.
    P1, P2 and P3 roll up to "All_Projects"
    Similar problem appears at Monthly level (which gets calculated correctly, but incorrectly at quarterly level).
    Please help, how we could possibly resolve this problem?
    Thanks
    AJ

    Hi Ankur,
    Please, read my document Average percent values on nodes to understand how to work with average figures.
    B.R. Vadim

  • How I can extend JSlider to work with non-integer values?

    I need to create slider with non-integer scale. How I can do it?

    As it turns out, I found a solution by myself.  By using the "onBlur" method instead of the "onChange" method, I got what I needed.
    Thanks,
    Ralph

  • I imported over 50 cds to my itunes account on my laptop. I subsequently got a new laptop with Windows 8. None of my imports are there. How do I get them on my new laptop?

    I imported over 50 cds to my itunes account on my laptop. I subsequently got a new laptop with Windows 8. None of my imports are there. How do I get them on my new laptop?

    See this migrate iTunes library post for background on moving your library across properly.
    tt2

  • When I create a calendar on my mac it automatically syncs with my iPhone but none of the events on that calendar sync with my phone. How do I fix this?

    When I create a calendar on my macbook it automatically syncs with my iPhone, but none of the events on that calendar sync with my iPhone. How do you fix this and make it so everything syncs.

    Using iCoud?
    On the iPhone tap Settings > iCloud
    Make sure Calendars is switched ON.

  • HT1711 I have an itunes account with my own music (non purchased).  I have loaded the playlists to my iphone and ipod.  How can I load the same music on my wifes iphone and ipad

    How do I syn my own music (non purchased) from my itunes account to my wifes iphone and ipad

    Does your wife sync her phone with a different computer or iTunes.
    If so you need to copy that music to that iTunes
    If she syncs with the same iTunes as you do just select your music and sync as normal

  • How can I unlock the copy protection of songs that I've acquired some years ago with an old - and non existing anymore - account? Can I link the songs to my new account or do I have to purchase them again?

    How can I unlock the copy protection of songs that I've acquired some years ago with an old - and non existing anymore - account? Can I link the songs to my new account or do I have to purchase them again?

    If you're in the US, you will be able to use iTunes Match for $25 a year to remove copy protection in a few months: http://www.apple.com/icloud/features/
    If you're not, you can't.  You can authorise iTunes with the old account in addition to your current account, so all your songs will play, but I'm not sure what will happen if you try to sync them to an iPod.

  • I have and Ipod touch, and new computer. How can i add all purchased and non purchased songs? The old computer with the original library is dead. HELP

    I have an  ipod touch 3rd  generation and a new computer. How can i add all purchased and non purchased songs into the new computers itune library? The old computer is dead! Will not even turn on. Help!!!!!!!! I'm going crazy.

    Look into downloading some type of iRip software! Allows you to transfer music from iPod to iTunes.

  • How to deal with deadlock on wwv_flow_data table when http server times out

    There are some threads about a deadlock on the wwv_flow_data table. None of them contain a real explanation for this behaviour. In my case I will try to explain what I think is happening. Maybe it helps somebody who is hitting the same matter.
    In my case with APEX 3.2.1 I am navigating from one page to another. Doing this APEX will lock the table wwv_flow_data. As soon as the other page is shown the lock will be released. But now this other page contains a bad performing query (standaard report region). After 5 minutes the http server (modplsql) will time out and present the message "No response from the application server" on the screen. In the meanwhile the query is still running on the database server and the lock stays on the wwv_flow_data table.
    Normal user behaviour will be that the user will use the back button to return to the previous page and tries it again to navigate to the other page or
    the user will try to refresh the page with the bad performing query.
    And voila now you will have a deadlock on the wwv_flow_data table since a second session is trying to do the same thing while the first hasn't finished yet.
    How to deal with it?
    First of all. Have a good look at the bad performing query. Maybe you can improve it that it will succeed before the http server will timeout.
    In my case the 11gr1 optimizer couldn't handle a subquery factoring clause in the best way. After changing it back to a classical inline query the problem was solved.
    Secondly you could increase the timeout parameter of the http server. Although this not the best way.
    Maybe it would better if APEX in a next version would release the lock on the table wwv_flow_date earlier or do a rollback just before the moment that the http server is timing out.
    regards,
    Mathieu Meeuwissen

    Hello Shmoove,
    I saw your reply here and you probably understand the problems the HTTP 100 response may cause.
    I am trying to send image that was taken by getSnapshot. The problem is that the server respond with this HTTP 100 message.
    I suspect that the reason that my server doesn't recognize the file that I'm sending from J2me is that the "server to client" response to the 100 message comes after the second message of (see what the TCPIP viewer shows down here):
    POST /up01/up02.aspx HTTP/1.1
    Content-Type: multipart/form-data; boundary=xxxxyyyyzzz
    Connection: Keep-Alive
    Content-length: 6294
    User-Agent: UNTRUSTED/1.0
    Host: szekely.dnsalias.com:80
    Transfer-Encoding: chunked
    400: Client to Server (126 bytes)
    78
    --xxxxyyyyzzz
    Content-Disposition: form-data; name="pic"; filename="david.jpg"
    Content-Type: application/octet-stream
    400: Connected to Server
    400: Server to Client (112 bytes)
    HTTP/1.1 100 Continue
    Server: Microsoft-IIS/5.1
    Date: Wed, 23 Mar 2005 00:47:02 GMT
    X-Powered-By: ASP.NET
    Any help will be appreciated,
    David

  • How Can we get the data from Non-SAP to SAP in WebDynpro

    Hi,
    I hope u understand my query, How can we get the data from Non-SAP to SAP thru WebDynpro Programming.
    Help out with the steps for getting the data or procedure.
    Regards,
    Mutyapu

    You can expose the APIs in the Non-SAP backend as Web Services, and consume them in SAP by creating an Enterprise Proxy. Then these can be called just like normal class methods from Web Dynpro.
    Regards,
    Nithya

  • How can I get report of only non compliant clients via Fileshare or to admin mailbox each day?

    I need to figure out how to get a daily report of non compliant clients in SCCM2012 to admin email or fileshare.
    Is there any built-in report that returns only non compliant clients I could use to accomplish this,
    and create alert subscription or exchange server connector to receive the message / file once a day ?
    Do I need to use SQL Server Reporting Services for this ? New to SCCM and getting confused with all those reports,
    sorry ;-)

    Yes you need SSRS for this.
    This will help.
    http://be.enhansoft.com/post/2013/08/27/How-to-Set-up-a-Windows-File-Share-Subscription.aspx
    http://be.enhansoft.com/post/2013/08/14/How-to-Set-up-an-Email-Subscription-in-SSRS.aspx
    Non compliant for what?
    http://www.enhansoft.com/

  • How to start with RMAN as I am beginner?

    Dear all,
    How to start with RMAN as I am beginner? Any simple document or guide line for me.
    Thanks,
    Amy

    How to start with RMAN as I am beginner? Any simple
    document or guide line for me.go to yours oracle home directory /orahome/bin there is RMAN exe tool run it it will show you prompt RMAN
    Recovery Manager: Release 10.1.0.2.0 - Production
    Copyright (c) 1995, 2004, Oracle.  All rights reserved.
    RMAN> connect target sys/sys
    connected to target database: ORCL (DBID=1171886541)
    RMAN> backup database
    2> ;
    Starting backup at 21-JAN-08
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting full datafile backupset
    channel ORA_DISK_1: specifying datafile(s) in backupset
    input datafile fno=00001 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\SYSTEM01.DBF
    input datafile fno=00003 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\SYSAUX01.DBF
    input datafile fno=00005 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\EXAMPLE01.DBF
    input datafile fno=00002 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\UNDOTBS01.DBF
    input datafile fno=00004 name=C:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL\USERS01.DBF
    channel ORA_DISK_1: starting piece 1 at 21-JAN-08
    channel ORA_DISK_1: finished piece 1 at 21-JAN-08
    piece handle=C:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2008_01_21\O1_MF_NNNDF_TAG20080121T135924_3S8QQF74_.BKP comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:01:15
    channel ORA_DISK_1: starting full datafile backupset
    channel ORA_DISK_1: specifying datafile(s) in backupset
    including current controlfile in backupset
    including current SPFILE in backupset
    channel ORA_DISK_1: starting piece 1 at 21-JAN-08
    channel ORA_DISK_1: finished piece 1 at 21-JAN-08
    piece handle=C:\ORACLE\PRODUCT\10.1.0\FLASH_RECOVERY_AREA\ORCL\BACKUPSET\2008_01_21\O1_MF_NCSNF_TAG20080121T135924_3S8QSSN4_.BKP comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
    Finished backup at 21-JAN-08
    http://www.orafaq.com/faq/rmanKhurram

  • HT2534 how new id with out cridet card pls let me know

    Hi sir,madam,
    pls i need help how apple id with out credit card i have apple id but not spt Tiunes & App Store pls let me know pls i wirting for yor repls.........
    Thanks.....
    <Email Edited by Host>

    Select None for payment method.
    Instructions here > iTunes Store: Changing account information

  • How to do an average on time series data?

    I need to generate average hold times for various stock of companies as follows:
    The data looks like:
    stock        timestamp (sec)            quantity
    GOOG          12459.6                    -100        <-- SALE
    GOOG          12634.0                    +100        <-- PURCHASE
    GOOG          12636.2                    +200
    GOOG          12464.8                    -100
    GOOG          12568.3                    -300
    GOOG          12678.0                    +200
    The rules are
    1. begin and end day with balance 0
    2. can short sell, i.e. can sell shares even if balance is currently 0
    3. hold time is defined as number of seconds stock was held before it was sold
    4. first stock purchased are sold first
    I need to generate the average hold times seconds per share.  I'd prefer to do this using SQL and NOT a procedure.
    Any tips on how to go about calculating this?  I have looked at various analytic functions, but still not sure.
    Thank you.

    I'm afraid you might be after something like below:
    this is a simplified scenario where the quantity balance always reaches 0 before changing sign (not very probable in real life)
    Simple examples are reserved for the lecturer was a pretty common phrase in my university times
    I dont know how to deal with a general case yet
    select * from trade_0 order by position,time
    TIME
    POSITION
    DIRECTION
    QUANTITY
    8
    GOOG
    S
    100
    13
    GOOG
    B
    20
    16
    GOOG
    B
    30
    17
    GOOG
    B
    30
    19
    GOOG
    B
    20
    22
    GOOG
    B
    20
    25
    GOOG
    B
    30
    26
    GOOG
    B
    20
    30
    GOOG
    B
    30
    34
    GOOG
    B
    20
    38
    GOOG
    B
    30
    41
    GOOG
    S
    150
    7
    YHOO
    S
    10
    12
    YHOO
    S
    20
    15
    YHOO
    S
    30
    16
    YHOO
    S
    40
    18
    YHOO
    S
    60
    21
    YHOO
    S
    30
    24
    YHOO
    S
    10
    25
    YHOO
    B
    100
    29
    YHOO
    B
    300
    33
    YHOO
    S
    100
    37
    YHOO
    S
    80
    40
    YHOO
    S
    20
    your condition 4. first stock purchased are sold first requires a procedural solution so model clause must be used if you want to do it in SQL.
    Model Men, bear with me, please !
    select m.*,
           avg(abs(x_time - decode(kind,'B',time_b,time_s))) over (partition by position
                                                                       order by rn rows between unbounded preceding
                                                                                            and unbounded following
              ) average
      from (select *
              from (select nvl(b.position,s.position) position,
                           nvl(b.rn,s.rn) rn,
                           nvl(b.cnt,0) cnt_b,
                           nvl(s.cnt,0) cnt_s,
                           b.time time_b,
                           s.time time_s,
                           b.quantity qty_b,
                           s.quantity qty_s
                      from (select time,position,quantity,
                                   row_number() over (partition by position order by time) rn,
                                   count(*) over (partition by position) cnt
                              from trade_0
                             where direction = 'B'
                           ) b
                           full outer join
                           (select time,position,quantity,
                                   row_number() over (partition by position order by time) rn,
                                   count(*) over (partition by position) cnt
                              from trade_0
                             where direction = 'S'
                           ) s
                        on b.position = s.position
                       and b.rn = s.rn
             model
             partition by (position)
             dimension by (rn)
             measures (0 loc,
                       case when cnt_b >= cnt_s then 'B' else 'S' end kind,
                       time_b,
                       time_s,
                       qty_b,
                       qty_s,
                       0 qty_left,
                       0 x_time
             rules iterate (1000000) until (loc[iteration_number] is null)
              loc[0] = nvl2(loc[0],loc[0],1),
              qty_left[loc[0]] = case when iteration_number > 0
                                      then qty_left[loc[0]] + case when kind[iteration_number] = 'B'
                                                                   then qty_b[iteration_number]
                                                                   else qty_s[iteration_number]
                                                              end
                                      else 0
                                 end,
              x_time[iteration_number] = case when kind[iteration_number] = 'B'
                                              then time_s[loc[0]]
                                              else time_b[loc[0]]
                                         end,
              loc[0] = loc[0] + case when qty_left[loc[0]] = case when kind[iteration_number] = 'B'
                                                                  then qty_s[loc[0]]
                                                                  else qty_b[loc[0]]
                                                             end
                                     then 1
                                     else 0
                                end
           ) m
    where kind is not null
    order by position,rn
    POSITION
    RN
    LOC
    KIND
    TIME_B
    TIME_S
    QTY_B
    QTY_S
    QTY_LEFT
    X_TIME
    AVERAGE
    GOOG
    1
    0
    B
    13
    8
    20
    100
    100
    8
    10.4
    GOOG
    2
    0
    B
    16
    41
    30
    150
    150
    8
    10.4
    GOOG
    3
    0
    B
    17
    30
    8
    10.4
    GOOG
    4
    0
    B
    19
    20
    0
    8
    10.4
    GOOG
    5
    0
    B
    22
    20
    0
    41
    10.4
    GOOG
    6
    0
    B
    25
    30
    0
    41
    10.4
    GOOG
    7
    0

Maybe you are looking for

  • CUCM 10.5 Local Route Group

    When utilizing the local route group for a device pool, when a change is made for that device pool, does a reset of the devices have to occur for the changes to go into affect?  The reason I ask is if you are simply making the change to the Route Lis

  • My Ipod is not recgonised by my computer

    My sister In Law's ipod is not recognised by her computer. She has been given this Apple Ipod by her Brother. Only the charge battery USB icon appears on screen, but nothing else.  I am not sure of the model details ( Sorry)   Her brother had taken s

  • Inspection lot status BREQ

    i am getting lot status as BREQ - batch assignment required. what does it mean? its not allowing me to do the result recording. please help.

  • Solaris10, sparcv9, JVM use JIT cause crash because SIGILL, please help!

    I start up my java process with using JIT,but JVM crash everytime! When i close JIT with -Xint, there is no crash, but it run very slowly! there is hs.log file and using mdb core...Please help me! hs.log file: # An unexpected error has been detected

  • Can you use the  tag in mail?

    I was reading about sub-addressing in email accounts. It was suggested to use the +tag with your email address, such as: [email protected] Any idea if this works with Apple Mail, and if so how to go about it?. Thanks