Question: My Pastebin : <http://pastebin.com/PmfDEdEw>

Hi,

I am doing a bus search script and here is a table called "bus\_notavailable" and it has fields as

```
nodate_id(PK)
bus_id(FK)
DD(INT 2)
MM(INT 2)
and YYYY(INT 4)

```

My Question is : Suppose Bus ID is 1 which is not available for these two dates are 15-08-2013 and 26-01-2013 so the record will filtered for this day...

The Nodates Table

```
Nodate_id             bus_id        DD     MM     YYYY
1                     1             15     08     2013
2                     1             26     01     2013 

```

• so bus\_notavailable.DD != '26' its showing me one record

• bus\_notavailable.DD != '11' then its showing me 2 records

I know I did mistakes or don't know the solutions therefore want to find out the way to get rid of, and knew this is a issue of one to many relationship where the 'bus\_notavailable' has two id of the same bus its showing me two records from 'bus' table.

So Do I need a sub-query to achieve this or is there any other methods?

Answer: 
Photoshop's "smart sharpening" function uses a mathematical operation called *deconvolution* internally. `numpy` does have a `deconvolve()` function that could probably be pressed into service for this task, but I couldn't find a ready-made function to do smart sharpening specifically with `numpy`, so you'd probably have to code it up yourself.

An alternative approach would be to do it using the GIMP. There's a GIMP plug-in (intuitively named "G'Mic") that will do deconvolution among other sharpening algorithms, and you can automate GIMP using Python.
@StefanvanderWalt
Unfortunately, the Wiener code needs a revamp. I've added an example above on how to motion deblur an image. This method can also be used if you only know your blurring kernel--essentially, you apply the Fourier transform to both your image (f -> F) and your kernel (h -> H), and then return the inverse FFT of (F / H), after making sure that the amplitude is limited in places where H is close to zero. Padding avoids boundary effects, and windowing the image limits oscillations in the reconstruction.
***What values ​​and dimensions the hann window used?***