LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fast coincidence logic

I wasn't aware that it would have problems with these large numbers, it was simply a convenient place to start. I wrote the text file in many different time formats because I wasn't sure which one I'd ultimately use for this.

 

Unfortunately time zero isn't the same for both detectors so the 'time since assay start' column doesn't contain absolute coincidence information on its own.

 

What I can do is go back to earlier code and instead of referencing them to UTC absolute time, I can reference them to a day maybe at the beginning of the week or month which would be a much, much smaller number.

 

The first column of the text file is in units of days (OLE format - Excel can turn it directly into a formatted date/time), so the timing window would actually correspond to 1E-4 days which is a time window of ~9 seconds. Sorry that wasn't more clear, I didn't think to reformat the headers on those text files before attaching them.

0 Kudos
Message 11 of 12
(535 Views)

One simple solution would be to take the integer part of the first element for each UTC time and subtract the smaller one from all integer parts before adding the fractional part.

 

Here's a simple modification that implements this idea. See how fast it is for your very large files. 😄

 

(I assume that typically the files have a similar number of rows so data can be reasonably combined into 2D arrays for simpler code.)

 

 

0 Kudos
Message 12 of 12
(523 Views)