Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.048 X-Spam-Evidence: '*H*': 0.91; '*S*': 0.00; 'postgresql': 0.07; 'suppose': 0.07; 'subject:process': 0.09; 'sure,': 0.09; 'cc:addr :python-list': 0.11; 'jan': 0.12; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'geek': 0.16; 'hire': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; '15,': 0.26; 'gets': 0.27; 'header:In-Reply- To:1': 0.27; 'point': 0.28; 'am,': 0.29; 'points': 0.29; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'larry': 0.31; 'libraries': 0.31; 'another': 0.32; 'moment': 0.34; "can't": 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'subject:data': 0.36; 'application': 0.37; 'two': 0.37; 'being': 0.38; 'previous': 0.38; "you're": 0.61; 'back': 0.62; 'within': 0.65; 'here': 0.66; 'circle': 0.68; '100%': 0.77; 'overlap.': 0.84; 'square,': 0.84; '1:18': 0.91; 'to:none': 0.92; 'won': 0.96 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=paC2kzNA7i1izjz+fLuobsziyyciQ4Pnfaze5yZYvQE=; b=RQPc9ITAL6RD438JLPN+q21mYna/l/76lT+GvrHlJ4ve84uDONFKZLPfKdOZcYmQzd 1J07vh2grc/kapq67smwP/xt4yvExjjLtOAcT81Iu5dt1MxCpqyIaNBivq9iwJG3TKlF YiP8vaSiTkT3wiefLKlL9gI7MJtmzG2kCNw7+AiJy9wZYZa88kucmV3Eyei9Ml0q7UBF 7ihHmKXXPWi8gdcgOvKlRkY+37f3OofWbIBcsR2amo2xBbAnK7f7w41xsKJ0DUwXCBbE bIG6PTel2yKS1l4fnfnGoUwUjDhJYC0fcpRO9L96cCSZe8ebupr/QwIm4iZNBKL54Vui XlOQ== MIME-Version: 1.0 X-Received: by 10.68.247.6 with SMTP id ya6mr2017617pbc.45.1389709591223; Tue, 14 Jan 2014 06:26:31 -0800 (PST) In-Reply-To: References: Date: Wed, 15 Jan 2014 01:26:31 +1100 Subject: Re: efficient way to process data From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1389709601 news.xs4all.nl 2887 [2001:888:2000:d::a6]:47167 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:63908 On Wed, Jan 15, 2014 at 1:18 AM, Larry Martell wrote: > if you're interested in what the application is, this is data > collected with an electron microscope from semiconductor wafers as > they are being manufactured. The x and y are the position on the wafer > that the data was collected, in microns. If 2 data points are > collected within 1 micron of each other they need to be combined when > being analyzed. As far as I'm concerned, you won geek cred the moment you said "electron microscope", and "semiconductor wafers as they are being manufactured" is just gravy I don't suppose you want to hire another programmer? :) Do you actually mean here that the two points need to be within 1 micron, or that data gets combined if it's nearby in *either* coordinate? There are libraries for figuring out if two things are near each other - I'm not 100% sure, but you might be able to do this inside PostgreSQL (though that just gets back to the previous rule: can't move off MySQL). Treat every data point as a circle or square, and then look for overlap. ChrisA